From 90ea8ae9b1ed3b7ed1c93076517e026e629ea1aa Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 19 Feb 2008 16:34:43 +0100 Subject: configure: Introduce "debug" variable set to yes by --enable-debug. Michael (This used to be commit b33db84c222af21cc3dd8233d6ff96e6f32ea3cd) --- source3/configure.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/configure.in') 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" -- cgit