[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Idiom for setting defines
From: |
Bill Moseley |
Subject: |
Idiom for setting defines |
Date: |
Thu, 17 Jul 2003 12:58:44 -0700 |
User-agent: |
Mutt/1.5.4i |
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
address@hidden
- Idiom for setting defines,
Bill Moseley <=