Is there a favorite configure.in idiom for setting a define in
(ac)config.h?  I use autoheader and the three-value AC_DEFINE macro to
use a config.h file and I have a number of defines that are not noramlly 
set, but I'd like to use --enable-debugfoo (e.g. to enable some 
debugging code).  I also want to report with AC_MSG_* the result.

For example, is there a better (or more compact) way to write:

AC_ARG_ENABLE([memdebug],
        AC_HELP_STRING([--enable-memdebug], [debug memory),
        ,
        enableval=no)

if test "$enableval" != "no"; then
        AC_MSG_NOTICE([MEM_DEBUG enabled])
        AC_DEFINE(MEM_DEBUG,1,[debug memory])
fi






-- 
Bill Moseley
[EMAIL PROTECTED]



Reply via email to