[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freeipmi-devel] bad configure.ac code
From: |
Ian Zimmerman |
Subject: |
[Freeipmi-devel] bad configure.ac code |
Date: |
07 May 2004 15:32:36 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
dnl By default AC_PROG_CC sets CFLAGS="-g -O2". Turn off debugging if
dnl not explicitly requested.
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug], [turn on debugging]),
[
if test "$GCC" = "yes"; then
CFLAGS="-ggdb -Wall"
elif test "$ac_cv_prog_cc_g" = "yes"; then
CFLAGS="-g"
fi
WITH_DEBUG=1
],
[
AC_DEFINE([NDEBUG], [1],
[Define to 1 for a production release])
CFLAGS="-O2"
WITH_DEBUG=0
])
AC_SUBST(WITH_DEBUG)
This is not only redundant, but __WRONG__.
1/ The 3rd argument is not expanded when the option value is "yes".
It is expanded _when the option is given at all_. IOW,
--enable-debug=no
does exactly the wrong thing now. RTFM!
2/ Admins expect to be able to set CFLAGS themselves; this will
frustrate such common usage. If you really must do this, find
a different way that doesn't use the symbol CFLAGS.
Ian
- [Freeipmi-devel] bad configure.ac code,
Ian Zimmerman <=