Skip to content

Commit bd43527

Browse files
author
Marc Stern
committed
Added --enable-assertions configure flag
1 parent a01b9b5 commit bd43527

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

configure.ac

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,20 @@ if test "$build_docs" -eq 1; then
304304
AC_CONFIG_FILES([doc/Makefile])
305305
fi
306306

307-
307+
AC_ARG_ENABLE(assertions,
308+
AS_HELP_STRING([--enable-assertions],
309+
[Turn on assertions checks (undefine NDEBUG])),
310+
[
311+
if test "${enableval}" = "yes"; then
312+
assertions=-UNDEBUG
313+
MODSEC_EXTRA_CFLAGS="$MODSEC_EXTRA_CFLAGS $assertions"
314+
else
315+
assertions=
316+
fi
317+
]],
318+
[
319+
assertions=
320+
])
308321
# Add PCRE Studying
309322

310323
AC_ARG_ENABLE(pcre-study,
@@ -827,7 +840,8 @@ else
827840
EXTRA_CFLAGS="-O2 -g -Wall $strict_compile"
828841
fi
829842
fi
830-
843+
EXTRA_CFLAGS="$EXTRA_CFLAGS $assertions"
844+
831845
MODSEC_EXTRA_CFLAGS="$pcre_study $pcre_match_limit $pcre_match_limit_recursion $pcre_jit $request_early $htaccess_config $lua_cache $debug_conf $debug_cache $debug_acmp $debug_mem $perf_meas $modsec_api $cpu_type $unique_id $log_filename $log_server $log_collection_delete_problem $log_dechunk $log_stopwatch $log_handler $log_server_context $collection_global_lock $large_stream_input"
832846

833847
APXS_WRAPPER=build/apxs-wrapper
@@ -905,7 +919,7 @@ AC_LINK_IFELSE(
905919
CFLAGS="$ORIG_CFLAGS"
906920
CPPFLAGS="$ORIG_CPPFLAGS"
907921

908-
# Current our unique download backend is curl, furhter we can support more.
922+
# Currently our unique download backend is curl, further we can support more.
909923
if test ! -z "${CURL_VERSION}"; then
910924
AC_DEFINE([WITH_REMOTE_RULES], [1], [Enables SecRemoteRules support])
911925
MODSEC_EXTRA_CFLAGS="$MODSEC_EXTRA_CFLAGS -DWITH_REMOTE_RULES"

0 commit comments

Comments
 (0)