diff --git a/configure.ac b/configure.ac index 6319e93c..d699f2c7 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,11 @@ AC_ARG_ENABLE([werror], [Turn on compile time warnings])], [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], [AS_HELP_STRING([--enable-app], [Build applications (nghttp, nghttpd and nghttpx) [default=check]])], @@ -382,6 +387,10 @@ if test "x$werror" != "xno"; then CFLAGS="$CFLAGS -Wno-unused-parameter" fi +if test "x$debug" != "xno"; then + CFLAGS="$CFLAGS -DDEBUGBUILD" +fi + AC_SUBST([TESTS_LIBS]) AC_SUBST([SRC_LIBS])