From 530eb189892ac08c4d53b47930db6592523b304c Mon Sep 17 00:00:00 2001 From: Christian Beer Date: Fri, 6 Nov 2015 13:57:02 +0100 Subject: [PATCH] Build: fix --disable-wx-debug configure option Debug support is by default enabled since wxWidgets 2.9.1 and can be explicitly disabled by setting the compiler flag -DNDEBUG. --- configure.ac | 13 +++++-------- m4/boinc_wxwidgets.m4 | 36 ++++++------------------------------ 2 files changed, 11 insertions(+), 38 deletions(-) diff --git a/configure.ac b/configure.ac index c3f4ffb9fe..f6585e8831 100644 --- a/configure.ac +++ b/configure.ac @@ -1223,17 +1223,14 @@ AC_SUBST(CLIENTLIBS) ## -------------------- ## some more tweaking to turn non-standard libs into statically linked ones -if test "${enable_debug}" = yes; then +if test "${enable_debug}" = "yes" ; then CLIENTGUIFLAGS="${CLIENTGUIFLAGS} -D_DEBUG -DDEBUG" fi -AC_ARG_ENABLE(wx-debug, - AS_HELP_STRING([--enable-wx-debug], - [ use wxWidgets debug libraries ]), - [enable_wx_debug="yes" - AC_DEFINE(USE_WX_DEBUG,[1],[Define to 1 to use the wxWidgets debug libraries]) - ], - [enable_wx_debug="no"]) +# disable wxWidgets debug support which is by default enabled since 2.9.1 +if test "${enable_wx_debug}" = "no" ; then + CLIENTGUIFLAGS="${CLIENTGUIFLAGS} -DNDEBUG" +fi CLIENTGUILIBS="${WX_LIBS} ${SQLITE3_LIBS}" diff --git a/m4/boinc_wxwidgets.m4 b/m4/boinc_wxwidgets.m4 index 527e6d3433..0ffcd8f04a 100644 --- a/m4/boinc_wxwidgets.m4 +++ b/m4/boinc_wxwidgets.m4 @@ -8,11 +8,11 @@ AC_DEFUN([BOINC_OPTIONS_WXWIDGETS],[ [enable_unicode="$enableval"], []) - AC_ARG_ENABLE(debug, - AS_HELP_STRING([--enable-debug/--disable-debug], - [enable/disable building the manager with debug support]), - [enable_debug="$enableval"], - []) + AC_ARG_ENABLE(wx-debug, + AS_HELP_STRING([--disable-wx-debug], + [disable wxWidgets debug support]), + [enable_wx_debug="$enableval"], + [enable_wx_debug=yes]) AM_OPTIONS_WXCONFIG AM_PATH_WXCONFIG($1, [_ac_cv_have_wxwidgets=yes], [_ac_cv_have_wxwidgets=no]) @@ -55,31 +55,7 @@ dnl Find the default wxWidgets options. AC_MSG_WARN([ =============================================================================== WARNING: No ${uprf} libraries for wxWidgets are installed. - ==> building with nprf libraries. - - You requested a ${uprf} build, but configure is unable to find ${uprf} - wxWidgets libraries. We will build with the default ${nprf} libraries. -=============================================================================== -]) - ac_cv_wxwidgets_options="${ac_cv_wxwidgets_options}" - fi - fi - wx_default_config="`$WX_CONFIG ${ac_cv_wxwidgets_options} --selected-config`" - if test "x${enable_wx_debug}" != x ; then - if $WX_CONFIG ${ac_cv_wxwidgets_options} --debug=${enable_debug} --selected-config 2>&1 >/dev/null ; then - ac_cv_wxwidgets_options="${ac_cv_wxwidgets_options} --debug=${enable_debug}" - else - if test "x${enable_debug}" = xno ; then - uprf="non-debug" - nprf="debug" - else - uprf="debug" - nprf="non-debug" - fi - AC_MSG_WARN([ -=============================================================================== -WARNING: No ${uprf} libraries for wxWidgets are installed. - ==> building with nprf libraries. + ==> building with ${nprf} libraries. You requested a ${uprf} build, but configure is unable to find ${uprf} wxWidgets libraries. We will build with the default ${nprf} libraries.