summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 9143cf278e..6b84c69ef6 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -16,7 +16,13 @@ AC_SUBST(PICFLAG)
AC_SUBST(SHLIBEXT)
# compile with optimisation and without debugging by default
-CFLAGS=${CFLAGS-"-O"}
+CFLAGS="-O ${CFLAGS}"
+
+AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],
+ [if eval "test x$enable_debug = xyes"; then
+ CFLAGS="${CFLAGS} -g"
+ fi])
+
dnl Checks for programs.
AC_PROG_CC