summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-02-19 16:34:43 +0100
committerMichael Adam <obnox@samba.org>2008-02-19 17:39:40 +0100
commit90ea8ae9b1ed3b7ed1c93076517e026e629ea1aa (patch)
treeeef23eec5965ac72a64151bb230caa7765432bc9 /source3
parent86e758e24648f39ed547394165390df5e43e027d (diff)
downloadsamba-90ea8ae9b1ed3b7ed1c93076517e026e629ea1aa.tar.gz
samba-90ea8ae9b1ed3b7ed1c93076517e026e629ea1aa.tar.bz2
samba-90ea8ae9b1ed3b7ed1c93076517e026e629ea1aa.zip
configure: Introduce "debug" variable set to yes by --enable-debug.
Michael (This used to be commit b33db84c222af21cc3dd8233d6ff96e6f32ea3cd)
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in8
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"