summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 17 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index a10790b..2892c70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -124,15 +124,26 @@ AC_SUBST(GENHTML)
# Debug mode
AC_ARG_ENABLE(debug,
- AC_HELP_STRING([--enable-debug],
- [Compile binaries in debug mode]))
+ AC_HELP_STRING([--enable-debug=no/yes/full],
+ [Turn on or off debugging]))
-if test "$enable_debug" = "yes"; then
- CFLAGS="$CFLAGS -g -O0"
- AC_DEFINE_UNQUOTED(_DEBUG, 1, [In debug mode])
- echo "enabling debug compile mode"
+if test "$enable_debug" != "no"; then
+ AC_DEFINE_UNQUOTED(WITH_DEBUG, 1, [Print debug output])
fi
+if test "$enable_debug" = "full"; then
+ debug_status="full"
+ CFLAGS="$CFLAGS -g -O0 -Werror"
+
+elif test "$enable_debug" = "no"; then
+ debug_status="no"
+ AC_DEFINE_UNQUOTED(NDEBUG, 1, [Disable glib assertions])
+
+else
+ debug_status="yes"
+fi
+
+
# ---------------------------------------------------------------------
AC_CONFIG_FILES([Makefile