Skip to content

Commit 83b48c8

Browse files
committed
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)
1 parent 5121c68 commit 83b48c8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

configure.ac

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,13 @@ AC_ARG_ENABLE([debug],
147147
[enable_debug=no])
148148

149149
if test "x$enable_debug" = xyes; then
150+
CPPFLAGS="$CPPFLAGS -DDEBUG -DDEBUG_LOCKORDER"
150151
if test "x$GCC" = xyes; then
151-
CFLAGS="-g3 -O0 -DDEBUG"
152+
CFLAGS="$CFLAGS -g3 -O0"
152153
fi
153154

154155
if test "x$GXX" = xyes; then
155-
CXXFLAGS="-g3 -O0 -DDEBUG"
156+
CXXFLAGS="$CXXFLAGS -g3 -O0"
156157
fi
157158
fi
158159

0 commit comments

Comments
 (0)