diff options
-rw-r--r-- | source3/configure.in | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/configure.in b/source3/configure.in index 81ccbb4722..af85dab0b5 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -306,6 +306,14 @@ AC_SUBST(EXTRA_ALL_TARGETS) AC_SUBST(CONFIG_LIBS) AC_SUBST(NSCD_LIBS) +## check for --enable-debug first before checking CFLAGS before +## so that we don't mix -O and -g +AC_ARG_ENABLE(debug, +[ --enable-debug Turn on compiler debugging information (default=no)], + [if eval "test x$enable_debug = xyes"; then + 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" @@ -344,12 +352,6 @@ then libc_cv_fpie=no fi -AC_ARG_ENABLE(debug, -[ --enable-debug Turn on compiler debugging information (default=no)], - [if eval "test x$enable_debug = xyes"; then - CFLAGS="${CFLAGS} -g" - fi]) - m4_include(lib/socket_wrapper/config.m4) ################################################# |