s3:build: prevent from setting "-O -g", check for $debug first.
authorMichael Adam <obnox@samba.org>
Mon, 23 Mar 2009 13:22:37 +0000 (14:22 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 23 Mar 2009 13:22:37 +0000 (14:22 +0100)
This makes configure actually behave as the comments describe.
The reversal of order was introduced by mistake in
90ea8ae9b1ed3b7ed1c93076517e026e629ea1aa

Michael

source3/configure.in

index 12808eb6f56802220020fc1418e9f74894a7cc5f..5f1a5efe7d579a79f0b3debf9fb08beb44cb4162 100644 (file)
@@ -152,12 +152,12 @@ AC_SUBST(NSCD_LIBS)
 # do this here since AC_CACHE_CHECK apparently sets the CFLAGS to "-g -O2"
 # if it has no value.  This prevent *very* large debug binaries from occurring
 # by default.
-if test "x$CFLAGS" = x; then
-  CFLAGS="-O"
-fi
 if test "x$debug" = "xyes" ; then
        CFLAGS="${CFLAGS} -g"
 fi
+if test "x$CFLAGS" = x; then
+  CFLAGS="-O"
+fi
 
 m4_include(../lib/socket_wrapper/config.m4)
 m4_include(../lib/nss_wrapper/config.m4)