summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 40c39b9912..6330cf85e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -131,6 +131,24 @@ if test "$enable_static" = yes; then
fi
AC_SUBST(MKLIB_OPTIONS)
+dnl
+dnl other compiler options
+dnl
+AC_ARG_ENABLE(debug,
+ [AS_HELP_STRING([--enable-debug],
+ [use debug compiler flags and macros @<:@default=disabled@:>@])],
+ enable_debug="$enableval",
+ enable_debug=no
+)
+if test "x$enable_debug" = xyes; then
+ DEFINES="$DEFINES -DDEBUG"
+ if test "x$GCC" = xyes; then
+ CFLAGS="$CFLAGS -g"
+ fi
+ if test "x$GXX" = xyes; then
+ CXXFLAGS="$CXXFLAGS -g"
+ fi
+fi
dnl
dnl library names