mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Add the ability to build mlogc if it is in the mlogc-src subdir.
This commit is contained in:
@@ -84,10 +84,10 @@ VERSION_OK
|
||||
[AC_MSG_NOTICE(httpd is recent enough)],
|
||||
[AC_MSG_ERROR(apache is too old, mmn must be at least $HTTPD_WANTED_MMN)])
|
||||
fi
|
||||
APXS_INCLUDES="`$APXS -q EXTRA_INCLUDES`"
|
||||
APXS_CFLAGS="`$APXS -q CFLAGS`"
|
||||
APXS_LDFLAGS="`$APXS -q LDFLAGS`"
|
||||
APXS_LIBS="`$APXS -q LIBS`"
|
||||
APXS_INCLUDES="`$APXS -q INCLUDES` `$APXS -q EXTRA_INCLUDES`"
|
||||
APXS_CFLAGS="`$APXS -q CFLAGS` `$APXS -q EXTRA_CFLAGS`"
|
||||
APXS_LDFLAGS="`$APXS -q LDFLAGS` `$APXS -q EXTRA_LDFLAGS`"
|
||||
APXS_LIBS="`$APXS -q LIBS` `$APXS -q EXTRA_LIBS`"
|
||||
else
|
||||
AC_MSG_ERROR(couldn't find APXS)
|
||||
fi
|
||||
@@ -112,11 +112,7 @@ sinclude(build/find_apr.m4)
|
||||
sinclude(build/find_apu.m4)
|
||||
sinclude(build/find_xml.m4)
|
||||
sinclude(build/find_lua.m4)
|
||||
|
||||
|
||||
### Defaults
|
||||
|
||||
EXTRA_CFLAGS="-Wc,-O2 -Wc,-g -Wc,-Wall -Wc,-Werror"
|
||||
sinclude(build/find_curl.m4)
|
||||
|
||||
|
||||
### Configure Options
|
||||
@@ -127,7 +123,7 @@ AC_ARG_ENABLE(debug-conf,
|
||||
[Enable debug during configuration.]),
|
||||
[
|
||||
if test "$enableval" != "no"; then
|
||||
debug_conf="-Wc,-DDEBUG_CONF"
|
||||
debug_conf="-DDEBUG_CONF"
|
||||
else
|
||||
debug_conf=
|
||||
fi
|
||||
@@ -142,7 +138,7 @@ AC_ARG_ENABLE(debug-cache,
|
||||
[Enable debug for transformation caching.]),
|
||||
[
|
||||
if test "$enableval" != "no"; then
|
||||
debug_cache="-Wc,-DCACHE_DEBUG"
|
||||
debug_cache="-DCACHE_DEBUG"
|
||||
else
|
||||
debug_cache=
|
||||
fi
|
||||
@@ -157,7 +153,7 @@ AC_ARG_ENABLE(performance-measurement,
|
||||
[Enable performance-measurement stats.]),
|
||||
[
|
||||
if test "$enableval" != "no"; then
|
||||
perf_meas="-Wc,-DPERFORMANCE_MEASUREMENT"
|
||||
perf_meas="-DPERFORMANCE_MEASUREMENT"
|
||||
else
|
||||
perf_meas=
|
||||
fi
|
||||
@@ -172,7 +168,7 @@ AC_ARG_ENABLE(modsec-api,
|
||||
[Disable the API; compiling against some older Apache versions require this.]),
|
||||
[
|
||||
if test "$enableval" != "yes"; then
|
||||
modsec_api="-Wc,-DNO_MODSEC_API"
|
||||
modsec_api="-DNO_MODSEC_API"
|
||||
else
|
||||
modsec_api=
|
||||
fi
|
||||
@@ -181,8 +177,19 @@ AC_ARG_ENABLE(modsec-api,
|
||||
modsec_api=
|
||||
])
|
||||
|
||||
### Build *EXTRA_CFLAGS vars
|
||||
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $debug_conf $debug_cache $perf_meas $modsec_api"
|
||||
EXTRA_CFLAGS="-O2 -g -Wall -Werror"
|
||||
MODSEC_EXTRA_CFLAGS="$debug_conf $debug_cache $perf_meas $modsec_api"
|
||||
|
||||
APXS_EXTRA_CFLAGS=""
|
||||
for f in $EXTRA_CFLAGS; do
|
||||
APXS_EXTRA_CFLAGS="$APXS_EXTRA_CFLAGS -Wc,$f"
|
||||
done;
|
||||
MODSEC_APXS_EXTRA_CFLAGS=""
|
||||
for f in $MODSEC_EXTRA_CFLAGS; do
|
||||
MODSEC_APXS_EXTRA_CFLAGS="$MODSEC_APXS_EXTRA_CFLAGS -Wc,$f"
|
||||
done;
|
||||
|
||||
### Substitute the vars
|
||||
|
||||
@@ -190,19 +197,26 @@ save_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS="$APXS_INCLUDES $CPPFLAGS"
|
||||
CPPFLAGS=$save_CPPFLAGS
|
||||
|
||||
AC_SUBST(EXTRA_CFLAGS)
|
||||
AC_SUBST(MODSEC_EXTRA_CFLAGS)
|
||||
AC_SUBST(APXS)
|
||||
AC_SUBST(APXS_INCLUDES)
|
||||
AC_SUBST(APXS_CFLAGS)
|
||||
AC_SUBST(APXS_EXTRA_CFLAGS)
|
||||
AC_SUBST(MODSEC_APXS_EXTRA_CFLAGS)
|
||||
AC_SUBST(APXS_LDFLAGS)
|
||||
AC_SUBST(APXS_LIBS)
|
||||
AC_SUBST(EXTRA_CFLAGS)
|
||||
AC_SUBST(APXS_CFLAGS)
|
||||
|
||||
CHECK_PCRE()
|
||||
CHECK_APR()
|
||||
CHECK_APU()
|
||||
CHECK_LIBXML()
|
||||
CHECK_LUA()
|
||||
CHECK_CURL()
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
if test -e "mlogc-src/Makefile.in"; then
|
||||
AC_CONFIG_FILES([mlogc-src/Makefile])
|
||||
fi
|
||||
|
||||
AC_OUTPUT
|
||||
|
Reference in New Issue
Block a user