mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
Add --enable-FEATURE options to configure.
This commit is contained in:
parent
4473e483c1
commit
7baf949929
@ -10,7 +10,7 @@ MOD_SECURITY2_H = re.h modsecurity.h msc_logging.h msc_multipart.h msc_parsers.h
|
||||
msc_geo.h acmp.h utf8tables.h msc_lua.h
|
||||
|
||||
### Must be in APXS format: -Wc,-flag
|
||||
EXTRA_CFLAGS = -Wc,-O2 -Wc,-g -Wc,-Wall -Wc,-Werror
|
||||
EXTRA_CFLAGS = @EXTRA_CFLAGS@
|
||||
|
||||
|
||||
APXS = @APXS@
|
||||
|
@ -98,6 +98,71 @@ else
|
||||
AC_MSG_ERROR(couldn't find APXS)
|
||||
fi
|
||||
|
||||
|
||||
### Defaults
|
||||
|
||||
EXTRA_CFLAGS="-Wc,-O2 -Wc,-g -Wc,-Wall -Wc,-Werror"
|
||||
|
||||
|
||||
### Configure Options
|
||||
|
||||
# DEBUG_CONF
|
||||
AC_ARG_ENABLE(debug-conf,AS_HELP_STRING(--enable-debug-conf,Enable debug during configuration (testing only)),
|
||||
[
|
||||
if test "$enableval" != "no"; then
|
||||
debug_conf="-Wc,-DDEBUG_CONF"
|
||||
else
|
||||
debug_conf=
|
||||
fi
|
||||
],
|
||||
[
|
||||
debug_conf=
|
||||
])
|
||||
|
||||
# CACHE_DEBUG
|
||||
AC_ARG_ENABLE(debug-cache,AS_HELP_STRING(--enable-debug-cache,Enable debug for transformation caching (testing only)),
|
||||
[
|
||||
if test "$enableval" != "no"; then
|
||||
debug_cache="-Wc,-DCACHE_DEBUG"
|
||||
else
|
||||
debug_cache=
|
||||
fi
|
||||
],
|
||||
[
|
||||
debug_cache=
|
||||
])
|
||||
|
||||
# PERFORMANCE_MEASUREMENT
|
||||
AC_ARG_ENABLE(performance-measurement,AS_HELP_STRING(--enable-performance-measurement,Enable performance-measurement stats (testing only)),
|
||||
[
|
||||
if test "$enableval" != "no"; then
|
||||
perf_meas="-Wc,-DPERFORMANCE_MEASUREMENT"
|
||||
else
|
||||
perf_meas=
|
||||
fi
|
||||
],
|
||||
[
|
||||
perf_meas=
|
||||
])
|
||||
|
||||
# NO_MODSEC_API
|
||||
AC_ARG_ENABLE(modsec-api,AS_HELP_STRING(--disable-modsec-api,Disable the API (compiling against some older Apache versions require this)),
|
||||
[
|
||||
if test "$enableval" != "yes"; then
|
||||
modsec_api="-Wc,-DNO_MODSEC_API"
|
||||
else
|
||||
modsec_api=
|
||||
fi
|
||||
],
|
||||
[
|
||||
modsec_api=
|
||||
])
|
||||
|
||||
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $debug_conf $debug_cache $perf_meas $modsec_api"
|
||||
|
||||
### Substitute the vars
|
||||
|
||||
save_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS="$APXS_INCLUDES $CPPFLAGS"
|
||||
CPPFLAGS=$save_CPPFLAGS
|
||||
@ -107,6 +172,7 @@ AC_SUBST(APXS_INCLUDES)
|
||||
AC_SUBST(APXS_CFLAGS)
|
||||
AC_SUBST(APXS_LDFLAGS)
|
||||
AC_SUBST(APXS_LIBS)
|
||||
AC_SUBST(EXTRA_CFLAGS)
|
||||
|
||||
CHECK_PCRE()
|
||||
CHECK_APR()
|
||||
|
Loading…
x
Reference in New Issue
Block a user