]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r6062: work around autoconf setting the CFLAGS="-g -O2" by default in AC_CACHE_CHECK
authorGerald Carter <jerry@samba.org>
Fri, 25 Mar 2005 14:37:10 +0000 (14:37 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:56:19 +0000 (10:56 -0500)
source/configure.in

index 72a04375a2d254609b3d1c23b971f3ed1893798c..9b2f4b80ce5fc814846f2de8a5c16f260dd76b65 100644 (file)
@@ -235,6 +235,16 @@ AC_ARG_ENABLE(debug,
        CFLAGS="${CFLAGS} -g"
     fi])
 
+# compile with optimization and without debugging by default, but
+# allow people to set their own preference.
+# 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
+
+
 AC_ARG_ENABLE(developer, [  --enable-developer      Turn on developer warnings and debugging (default=no)],
     [if eval "test x$enable_developer = xyes"; then
         developer=yes
@@ -293,13 +303,6 @@ AC_PATH_PROG(PERL, perl)
 
 AC_CHECK_TOOL(AR, ar)
 
-# compile with optimization and without debugging by default, but
-# allow people to set their own preference.
-if test "x$CFLAGS" = x
-then
-  CFLAGS="-O ${CFLAGS}"
-fi
-
 dnl Check if we use GNU ld
 LD=ld
 AC_PROG_LD_GNU