summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-24 16:27:29 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-24 16:27:29 +0200
commit082dc6be483d66444ba983306aa2471c4fd5037f (patch)
treeb1b61d1e9382c214c04119e389bf387085618076 /configure.ac
parent8ddb4ae9ec09ce3d3cc6c2e3564b146b1239f061 (diff)
downloadcppunit-082dc6be483d66444ba983306aa2471c4fd5037f.tar.gz
support easy way to add debug information
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 71c5f50..379f47c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,6 +87,21 @@ AC_SUBST(LT_AGE)
# Check for cflags
# ================
+# =====
+# Debug
+# =====
+AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug], [Build with debug features in mind.])],
+ [enable_debug="$enableval"],
+ [enable_debug=no]
+)
+AS_IF([test "x$enable_debug" != "xno"], [
+ CFLAGS="$CFLAGS -g"
+ CXXFLAGS="$CXXFLAGS -g"
+], [
+ AC_DEFINE([NDEBUG], [], [Disable debugging information])
+])
+
AC_ARG_ENABLE([werror],
[AS_HELP_STRING([--disable-werror], [Treat all warnings as errors, useful for development])],
[enable_werror="$enableval"],
@@ -151,6 +166,7 @@ AC_OUTPUT
AC_MSG_NOTICE([
==============================================================================
Build configuration:
+ debug: ${enable_debug}
docs: ${enable_doc}
werror: ${enable_werror}
typeinfo-name: ${use_typeinfo}