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

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

 



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


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux