On 04/30/2010 11:32 AM, Lukas Kaser wrote: [slightly reorganized, to make my reply flow better] > > => config.h > /* Whether compiled with NEWRENDERER */ > /* #undef COMPILE_NEWRENDERER_RENDERER */ dnl ############# <-- here This is the default action if the configure script never reaches an AC_DEFINE* for that variable. > [configure.ac] > if test x$build_newrenderer = xtrue ; then > AC_DEFINE_UNQUOTED([COMPILE_NEWRENDERER_RENDERER], > [${build_newrenderer}], [Whether compiled with NEWRENDERER]) > fi In this case, if $build_newrenderer is not true, then the AC_DEFINE is unreached, explaining why config.h ends up with the default behavior. > > dnl if test x$build_newrenderer = xtrue ; then > AC_DEFINE_UNQUOTED([COMPILE_NEWRENDERER_RENDERER], > [${build_newrenderer}], [Whether compiled with NEWRENDERER]) > dnl fi Here, the AC_DEFINE is reached unconditionally, which explains why: > > => config.h > /* Whether compiled with NEWRENDERER */ > #define COMPILE_NEWRENDERER_RENDERER false dnl ############# <-- here you get an unconditional substitution, whether $build_newrenderer was true or false. > 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?. As long as the name doesn't conflict with other names defined automatically by autoconf, and reads well in your usage contexts, you are probably okay with that name. If you follow recommended practice of not installing config.h, then only your package has to worry about the name you chose, even if you don't name it in the HAVE_* namespace. -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf