diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-05 20:03:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-05 20:28:38 +0300 |
commit | 5b4774d352787626061752e8dba6377b25b64f66 (patch) | |
tree | 0f82cfa69eda9424f75336e9b0bf7b837b14bb54 | |
parent | cfc63060bb553e8be91949e16d04b5801a7527eb (diff) | |
download | plus-5b4774d352787626061752e8dba6377b25b64f66.tar.gz plus-5b4774d352787626061752e8dba6377b25b64f66.tar.bz2 plus-5b4774d352787626061752e8dba6377b25b64f66.tar.xz plus-5b4774d352787626061752e8dba6377b25b64f66.zip |
Add configure option --enable-glibcdebug for enable libcstdc++ debug mode.
By default this option disabled.
-rwxr-xr-x | configure.ac | 13 | ||||
-rw-r--r-- | src/Makefile.am | 9 |
2 files changed, 21 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 3c91519a3..a44573698 100755 --- a/configure.ac +++ b/configure.ac @@ -29,6 +29,19 @@ esac],[asserts_enabled=true]) AM_CONDITIONAL(ENABLE_ASSERTS, test x$asserts_enabled = xtrue) +# Enable -D_GLIBCXX_DEBUG +AC_ARG_ENABLE(glibcdebug, +[ --enable-glibcdebug Enable glibc++ debug mode], +[case "${enableval}" in + yes) glibcdebug_enabled=true + ;; + no) glibcdebug_enabled=false + ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-glibcdebug) ;; +esac],[glibcdebug_enabled=false]) + +AM_CONDITIONAL(ENABLE_GLIBCDEBUG, test x$glibcdebug_enabled = xtrue) + # Checks for android. AC_ARG_ENABLE(androidbuild, [ --enable-androidbuild Turn on android building], diff --git a/src/Makefile.am b/src/Makefile.am index 0f0bae0f0..51c49cb99 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,6 +26,11 @@ manaplus_CXXFLAGS += -Werror dyecmd_CXXFLAGS += -Werror endif +if ENABLE_GLIBCDEBUG +manaplus_CXXFLAGS += -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC +dyecmd_CXXFLAGS += -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC +endif + if USE_X11 manaplus_CXXFLAGS += -DUSE_X11 dyecmd_CXXFLAGS += -DUSE_X11 @@ -1887,7 +1892,9 @@ if ENABLE_ASSERTS manaplustests_CXXFLAGS += -DENABLE_ASSERTS manaplustests_LDFLAGS = -rdynamic endif - +if ENABLE_GLIBCDEBUG +manaplustests_CXXFLAGS += -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC +endif if USE_X11 manaplustests_CXXFLAGS += -DUSE_X11 endif |