mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Cleanup configure and add support for using apache src included libs (--with-httpd-src).
This commit is contained in:
@@ -37,13 +37,7 @@ AC_FUNC_MALLOC
|
||||
AC_FUNC_MEMCMP
|
||||
AC_CHECK_FUNCS([atexit getcwd memset strcasecmp strchr strdup strerror strncasecmp strrchr strstr strtol])
|
||||
|
||||
# Include M4 macros
|
||||
sinclude(build/find_pcre.m4)
|
||||
sinclude(build/find_lua.m4)
|
||||
sinclude(build/find_xml.m4)
|
||||
sinclude(build/find_apr.m4)
|
||||
sinclude(build/find_apu.m4)
|
||||
|
||||
# Find apxs
|
||||
AC_MSG_NOTICE(looking for Apache module support via DSO through APXS)
|
||||
AC_ARG_WITH(apxs,
|
||||
[AS_HELP_STRING([[--with-apxs=FILE]],
|
||||
@@ -98,6 +92,27 @@ else
|
||||
AC_MSG_ERROR(couldn't find APXS)
|
||||
fi
|
||||
|
||||
# Use Apache httpd source srclib as base for pcre, apr and apu config scripts
|
||||
AC_ARG_WITH(httpd-src,
|
||||
[AS_HELP_STRING([[--with-httpd-src=PATH]],
|
||||
[PATH is to the Apache httpd source tree where srclib will be used as a base for pcre, apr and apu config scripts.])],
|
||||
[
|
||||
if test -n "$withval"; then
|
||||
pcre_path="$withval/srclib/pcre"
|
||||
apr_path="$withval/srclib/apr"
|
||||
apu_path="$withval/srclib/apr-util"
|
||||
else
|
||||
AC_MSG_ERROR(--with-httpd-src requires a path)
|
||||
fi
|
||||
])
|
||||
|
||||
# Include M4 macros
|
||||
sinclude(build/find_pcre.m4)
|
||||
sinclude(build/find_apr.m4)
|
||||
sinclude(build/find_apu.m4)
|
||||
sinclude(build/find_xml.m4)
|
||||
sinclude(build/find_lua.m4)
|
||||
|
||||
|
||||
### Defaults
|
||||
|
||||
@@ -107,7 +122,9 @@ 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)),
|
||||
AC_ARG_ENABLE(debug-conf,
|
||||
AS_HELP_STRING([--enable-debug-conf],
|
||||
[Enable debug during configuration.]),
|
||||
[
|
||||
if test "$enableval" != "no"; then
|
||||
debug_conf="-Wc,-DDEBUG_CONF"
|
||||
@@ -120,7 +137,9 @@ AC_ARG_ENABLE(debug-conf,AS_HELP_STRING(--enable-debug-conf,Enable debug during
|
||||
])
|
||||
|
||||
# CACHE_DEBUG
|
||||
AC_ARG_ENABLE(debug-cache,AS_HELP_STRING(--enable-debug-cache,Enable debug for transformation caching (testing only)),
|
||||
AC_ARG_ENABLE(debug-cache,
|
||||
AS_HELP_STRING([--enable-debug-cache],
|
||||
[Enable debug for transformation caching.]),
|
||||
[
|
||||
if test "$enableval" != "no"; then
|
||||
debug_cache="-Wc,-DCACHE_DEBUG"
|
||||
@@ -133,7 +152,9 @@ AC_ARG_ENABLE(debug-cache,AS_HELP_STRING(--enable-debug-cache,Enable debug for t
|
||||
])
|
||||
|
||||
# PERFORMANCE_MEASUREMENT
|
||||
AC_ARG_ENABLE(performance-measurement,AS_HELP_STRING(--enable-performance-measurement,Enable performance-measurement stats (testing only)),
|
||||
AC_ARG_ENABLE(performance-measurement,
|
||||
AS_HELP_STRING([--enable-performance-measurement],
|
||||
[Enable performance-measurement stats.]),
|
||||
[
|
||||
if test "$enableval" != "no"; then
|
||||
perf_meas="-Wc,-DPERFORMANCE_MEASUREMENT"
|
||||
@@ -146,7 +167,9 @@ AC_ARG_ENABLE(performance-measurement,AS_HELP_STRING(--enable-performance-measur
|
||||
])
|
||||
|
||||
# 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)),
|
||||
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"
|
||||
|
Reference in New Issue
Block a user