From 7238a71961ebd7e726a0f227b7a47916c196c67d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 19 Sep 2006 22:47:01 +0000 Subject: r18694: prevent -O and -g from being set at the same time (by default) (This used to be commit 5af1d3a425e99a49d7ff6bee4dad024e0f82509b) --- source3/configure.in | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'source3/configure.in') 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) ################################################# -- cgit