Skip to content

Commit

Permalink
Build: fix --disable-wx-debug configure option
Browse files Browse the repository at this point in the history
Debug support is by default enabled since wxWidgets 2.9.1 and can be explicitly disabled by setting the compiler flag -DNDEBUG.
  • Loading branch information
ChristianBeer committed Nov 6, 2015
1 parent fdaff40 commit 530eb18
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 38 deletions.
13 changes: 5 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
36 changes: 6 additions & 30 deletions m4/boinc_wxwidgets.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 530eb18

Please sign in to comment.