Add --enable-debug configure option to define DEBUGBUILD macro

This commit is contained in:
Tatsuhiro Tsujikawa 2014-02-20 23:19:55 +09:00
parent f152dd8881
commit dc82a6026e
1 changed files with 9 additions and 0 deletions

View File

@ -53,6 +53,11 @@ AC_ARG_ENABLE([werror],
[Turn on compile time warnings])], [Turn on compile time warnings])],
[werror=$enableval], [werror=no]) [werror=$enableval], [werror=no])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[Turn on debug output])],
[debug=$enableval], [debug=no])
AC_ARG_ENABLE([app], AC_ARG_ENABLE([app],
[AS_HELP_STRING([--enable-app], [AS_HELP_STRING([--enable-app],
[Build applications (nghttp, nghttpd and nghttpx) [default=check]])], [Build applications (nghttp, nghttpd and nghttpx) [default=check]])],
@ -382,6 +387,10 @@ if test "x$werror" != "xno"; then
CFLAGS="$CFLAGS -Wno-unused-parameter" CFLAGS="$CFLAGS -Wno-unused-parameter"
fi fi
if test "x$debug" != "xno"; then
CFLAGS="$CFLAGS -DDEBUGBUILD"
fi
AC_SUBST([TESTS_LIBS]) AC_SUBST([TESTS_LIBS])
AC_SUBST([SRC_LIBS]) AC_SUBST([SRC_LIBS])