## 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
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"