autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

If-statement influencing syntax/content in config.h? Naming convention


From: Lukas Kaser
Subject: If-statement influencing syntax/content in config.h? Naming convention for preprocessor variables.
Date: Fri, 30 Apr 2010 19:32:29 +0200

Deal List,

today I found an interesting behavior of autoconf, but I don't know
how to find the documentation for it. Does anybody have a link or hint
how smth like this is called? e.g. How can I switch on/off this?

Here is the code:
[configure.ac]
if test x$build_newrenderer = xtrue ; then
        AC_DEFINE_UNQUOTED([COMPILE_NEWRENDERER_RENDERER],
[${build_newrenderer}], [Whether compiled with NEWRENDERER])
fi

=> config.h
/* Whether compiled with NEWRENDERER */
/* #undef COMPILE_NEWRENDERER_RENDERER */ dnl ############# <-- here

dnl if test x$build_newrenderer = xtrue ; then
        AC_DEFINE_UNQUOTED([COMPILE_NEWRENDERER_RENDERER],
[${build_newrenderer}], [Whether compiled with NEWRENDERER])
dnl fi

=> config.h
/* Whether compiled with NEWRENDERER */
#define COMPILE_NEWRENDERER_RENDERER false  dnl ############# <-- here

Is it really the if-statement what generates the distinct output in
config.h? Once the variable is #defined with "false" and once its not
defined. Why?

Second I would like to know how the naming conventions are. Does most
of the people follow the naming-convention "HAVE_VAR_NAME" for
config.h?.

Thanks a lot (!) in advance.

Many greets,
Lukas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]