Skip to content

Commit 1795c69

Browse files
committed
Merge pull request #3833
f5f157b add --enable-debug for configure (daniel)
2 parents 70b8cb9 + f5f157b commit 1795c69

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

configure.ac

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,23 @@ AC_PATH_PROG(XGETTEXT,xgettext)
137137
AC_PATH_PROG(HEXDUMP,hexdump)
138138
PKG_PROG_PKG_CONFIG
139139

140+
# Enable debug
141+
AC_ARG_ENABLE([debug],
142+
[AS_HELP_STRING([--enable-debug],
143+
[use debug compiler flags and macros (default is no)])],
144+
[enable_debug=$enableval],
145+
[enable_debug=no])
146+
147+
if test "x$enable_debug" = xyes; then
148+
if test "x$GCC" = xyes; then
149+
CFLAGS="-g3 -O0 -DDEBUG"
150+
fi
151+
152+
if test "x$GXX" = xyes; then
153+
CXXFLAGS="-g3 -O0 -DDEBUG"
154+
fi
155+
fi
156+
140157
## TODO: Remove these hard-coded paths and flags. They are here for the sake of
141158
## compatibility with the legacy buildsystem.
142159
##

0 commit comments

Comments
 (0)