From ae1565b52f9d1c48a6e754bae8fd9839ce90df6b Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Mon, 13 Jul 2015 14:28:03 -0400 Subject: [PATCH] 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) --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 54d92c238..84c66624b 100644 --- a/configure.ac +++ b/configure.ac @@ -178,12 +178,13 @@ AC_ARG_ENABLE([debug], [enable_debug=no]) if test "x$enable_debug" = xyes; then + CPPFLAGS="$CPPFLAGS -DDEBUG -DDEBUG_LOCKORDER" if test "x$GCC" = xyes; then - CFLAGS="-g3 -O0 -DDEBUG" + CFLAGS="$CFLAGS -g3 -O0" fi if test "x$GXX" = xyes; then - CXXFLAGS="-g3 -O0 -DDEBUG" + CXXFLAGS="$CXXFLAGS -g3 -O0" fi fi