build: Add --enable-debug configure flag

Appends -g -O0 to CFLAGS and CXXFLAGS.
This commit is contained in:
Matt Turner
2012-08-29 09:36:53 -07:00
parent 181ad9bf4f
commit f98fdc4d8a

View File

@@ -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.