diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -221,6 +221,10 @@ if test "x$enable_debug" = xyes; then CPPFLAGS="$CPPFLAGS -DDEBUG -DDEBUG_LOCKORDER" + # Clear default -g -O2 flags + if test "x$CXXFLAGS_overridden" = xno; then + CXXFLAGS="" + fi if test "x$GCC" = xyes; then CFLAGS="$CFLAGS -g3 -O0" fi