On 2011-10-18 15:57 +0200, Dmitry Katsubo wrote:
> I have the following question concerning the use of special characters
> in variables. After reading the documentation chapter [1], I've come to
> the conclusion, that I cannot define the following in configure.ac:
>
> CXXFLAGS="-D__int64=\"long long\" ${CXXFLAGS}"
> AC_CHECK_HEADER([jni.h])
>
> The result is:
>
> > configure:4104: checking jni.h usability
> > configure:4104: g++ -c -D__int64="long long" -g -O2
> > -I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux
> > -I/usr/lib/jvm/java-6-sun/include/win32 -I/usr/local/include conftest.cpp
> > >&5
> > g++: long": No such file or directory
> > <command-line>: warning: missing terminating " character
> > configure:4104: $? = 1
>
> Even tough the variable is correctly set and can be used in Makefile,
> but AC_CHECK_HEADER() fails to treat special characters properly.
A possible solution in this case is to just use AC_DEFINE:
AC_DEFINE([__int64], [long long], [description if you use autoheader])
AC_CHECK_HEADER([jni.h])
Autoconf will take care of including the definition in subsequent
configure tests. If you don't use a config header, automake will take
care of putting it on the compiler command line; otherwise, the
definition will end up in the config header.
Hope that helps,
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)
_______________________________________________
Autoconf mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/autoconf