diff options
-rw-r--r-- | source3/configure.in | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/configure.in b/source3/configure.in index 2c7ebdd8e6..e9b93eeb4b 100644 --- a/source3/configure.in +++ b/source3/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" |