summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2013-02-21 20:40:31 -0800
committerMatt Turner <mattst88@gmail.com>2013-02-21 20:47:25 -0800
commit069211570c32a8d5848e127975a2943e9d8fc6b9 (patch)
treece9ad3fac3254594f63c8e91da5e9ed3d3b6bee3
parentbfdf99d6ff64b9c2d840e8a5767eaa57e4363c79 (diff)
Add -D(N)DEBUG to CFLAGS dependent on --enable-debug
Tested-by: Blaž Hrastnik <speed.the.bboy@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61003
-rw-r--r--configure.ac7
1 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index cbfd047..45abf17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,9 +42,10 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[Enable debugging information]),
- [CFLAGS="$CFLAGS -g -O0"
- CXXFLAGS="$CXXFLAGS -g -O0"],
- [])
+ [CFLAGS="$CFLAGS -g -O0 -DDEBUG"
+ CXXFLAGS="$CXXFLAGS -g -O0 -DDEBUG"],
+ [CFLAGS="$CFLAGS -DNDEBUG"
+ CXXFLAGS="$CXXFLAGS -DNDEBUG"])
dnl Make sure the pkg-config macros are defined
m4_ifndef([PKG_PROG_PKG_CONFIG],