diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-03-10 12:34:47 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-03-10 12:34:53 +0100 |
commit | 1795c69aaaed814d5fcf5a1c27984a190f155353 (patch) | |
tree | 19831ec8a298fc081940d94ee247cbe427c1b211 /configure.ac | |
parent | 70b8cb9ce895d099d5dadf4a49c318440e7cf486 (diff) | |
parent | f5f157b83fdcf4f70c40f47a5001d3e37dbb384a (diff) |
Merge pull request #3833
f5f157b add --enable-debug for configure (daniel)
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 9d5457f03b..7ce5f683ee 100644 --- a/configure.ac +++ b/configure.ac @@ -137,6 +137,23 @@ AC_PATH_PROG(XGETTEXT,xgettext) AC_PATH_PROG(HEXDUMP,hexdump) PKG_PROG_PKG_CONFIG +# Enable debug +AC_ARG_ENABLE([debug], + [AS_HELP_STRING([--enable-debug], + [use debug compiler flags and macros (default is no)])], + [enable_debug=$enableval], + [enable_debug=no]) + +if test "x$enable_debug" = xyes; then + if test "x$GCC" = xyes; then + CFLAGS="-g3 -O0 -DDEBUG" + fi + + if test "x$GXX" = xyes; then + CXXFLAGS="-g3 -O0 -DDEBUG" + fi +fi + ## TODO: Remove these hard-coded paths and flags. They are here for the sake of ## compatibility with the legacy buildsystem. ## |