Commit 1fd4ed8e authored by Chad MILLER's avatar Chad MILLER

Using autoconf definitions instead of manually appending to CFLAGS is

smarter, and according to a contributer, it is necessary for plugin authors
using "--with-debug".
parent 16d13fe5
...@@ -1678,14 +1678,17 @@ if test "$with_debug" = "yes" ...@@ -1678,14 +1678,17 @@ if test "$with_debug" = "yes"
then then
# Medium debug. # Medium debug.
AC_DEFINE([DBUG_ON], [1], [Use libdbug]) AC_DEFINE([DBUG_ON], [1], [Use libdbug])
CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC -DSAFE_MUTEX $CFLAGS" AC_DEFINE([SAFE_MUTEX], [1], [Use safe mutexes])
CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX -DSAFE_MUTEX $CXXFLAGS" CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC $CFLAGS"
CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX $CXXFLAGS"
elif test "$with_debug" = "full" elif test "$with_debug" = "full"
then then
# Full debug. Very slow in some cases # Full debug. Very slow in some cases
AC_DEFINE([DBUG_ON], [1], [Use libdbug]) AC_DEFINE([DBUG_ON], [1], [Use libdbug])
CFLAGS="$DEBUG_CFLAGS -DSAFE_MUTEX -DSAFEMALLOC $CFLAGS" AC_DEFINE([SAFE_MUTEX], [1], [Use safe mutexes])
CXXFLAGS="$DEBUG_CXXFLAGS -DSAFE_MUTEX -DSAFEMALLOC $CXXFLAGS" AC_DEFINE([SAFEMALLOC], [1], [Use safe malloc])
CFLAGS="$DEBUG_CFLAGS $CFLAGS"
CXXFLAGS="$DEBUG_CXXFLAGS $CXXFLAGS"
else else
# Optimized version. No debug # Optimized version. No debug
AC_DEFINE([DBUG_OFF], [1], [Don't use libdbug]) AC_DEFINE([DBUG_OFF], [1], [Don't use libdbug])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment