summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2012-08-29 09:36:53 -0700
committerMatt Turner <mattst88@gmail.com>2012-08-29 09:36:53 -0700
commitf98fdc4d8a77497d1921e3dc26cab0e28abb92fc (patch)
tree1daa697672eb6378904c580c3cce615306d126c0
parent181ad9bf4f80775cfaa9b3f32f12694dd49ea480 (diff)
downloadglu-f98fdc4d8a77497d1921e3dc26cab0e28abb92fc.tar.gz
build: Add --enable-debug configure flag
Appends -g -O0 to CFLAGS and CXXFLAGS.
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 0357f32..c5db09d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,13 @@ AC_PROG_CXX
dnl Enable quiet compiles on automake 1.11.
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"],
+ [])
+
dnl Make sure the pkg-config macros are defined
m4_ifndef([PKG_PROG_PKG_CONFIG],
[m4_fatal([Could not locate the pkg-config autoconf macros.