From f98fdc4d8a77497d1921e3dc26cab0e28abb92fc Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Wed, 29 Aug 2012 09:36:53 -0700 Subject: build: Add --enable-debug configure flag Appends -g -O0 to CFLAGS and CXXFLAGS. --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) 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. -- cgit v1.2.1