configure --enable-debug changes

Three changes to how configure --enable-debug behaves:

1. Preserve user-passed CXXFLAGS/CFLAGS
2. Compile with -DDEBUG_LOCKORDER
3. Add -DDEBUG -DDEBUG_LOCKORDER to CPPFLAGS (since they are preprocessor options)
This commit is contained in:
Gavin Andresen 2015-07-13 14:28:03 -04:00
parent 5121c68657
commit 83b48c8971
No known key found for this signature in database
GPG Key ID: 7588242FBE38D3A8

View File

@ -147,12 +147,13 @@ AC_ARG_ENABLE([debug],
[enable_debug=no]) [enable_debug=no])
if test "x$enable_debug" = xyes; then if test "x$enable_debug" = xyes; then
CPPFLAGS="$CPPFLAGS -DDEBUG -DDEBUG_LOCKORDER"
if test "x$GCC" = xyes; then if test "x$GCC" = xyes; then
CFLAGS="-g3 -O0 -DDEBUG" CFLAGS="$CFLAGS -g3 -O0"
fi fi
if test "x$GXX" = xyes; then if test "x$GXX" = xyes; then
CXXFLAGS="-g3 -O0 -DDEBUG" CXXFLAGS="$CXXFLAGS -g3 -O0"
fi fi
fi fi