From: Michael Adam Date: Tue, 19 Feb 2008 15:34:43 +0000 (+0100) Subject: configure: Introduce "debug" variable set to yes by --enable-debug. X-Git-Tag: samba-3.2.0pre2~37^2~160^2~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b33db84c222af21cc3dd8233d6ff96e6f32ea3cd;p=thirdparty%2Fsamba.git configure: Introduce "debug" variable set to yes by --enable-debug. Michael --- diff --git a/source/configure.in b/source/configure.in index 2c7ebdd8e6e..e9b93eeb4ba 100644 --- a/source/configure.in +++ b/source/configure.in @@ -410,10 +410,11 @@ AC_SUBST(NSCD_LIBS) ## check for --enable-debug first before checking CFLAGS before ## so that we don't mix -O and -g +debug=no AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], [Turn on compiler debugging information (default=no)])], [if eval "test x$enable_debug = xyes"; then - CFLAGS="${CFLAGS} -g" + debug=yes fi]) # compile with optimization and without debugging by default, but @@ -424,6 +425,11 @@ AC_ARG_ENABLE(debug, if test "x$CFLAGS" = x; then CFLAGS="-O" fi +if test "x$debug" = "xyes" ; then + CFLAGS="${CFLAGS} -g" +else + CFLAGS="-O" +fi CFLAGS="${CFLAGS} -D_SAMBA_BUILD_=3"