mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Adds support to libmemcached into the build system
Libmemcached will be further used to handle centralized collections.
This commit is contained in:
parent
5a1a3fd616
commit
39caeedf14
@ -37,6 +37,7 @@ mod_security2_la_CFLAGS = @APR_CFLAGS@ \
|
||||
@APU_CFLAGS@ \
|
||||
@APXS_CFLAGS@ \
|
||||
@CURL_CFLAGS@ \
|
||||
@LIBMEMCACHED_CFLAGS@ \
|
||||
@LIBXML2_CFLAGS@ \
|
||||
@LUA_CFLAGS@ \
|
||||
@MODSEC_EXTRA_CFLAGS@ \
|
||||
@ -51,6 +52,7 @@ mod_security2_la_CPPFLAGS = @APR_CPPFLAGS@ \
|
||||
|
||||
mod_security2_la_LIBADD = @APR_LDADD@ \
|
||||
@APU_LDADD@ \
|
||||
@LIBMEMCACHED_LDADD@ \
|
||||
@LIBXML2_LDADD@ \
|
||||
@LUA_LDADD@ \
|
||||
@PCRE_LDADD@ \
|
||||
@ -61,6 +63,7 @@ mod_security2_la_LDFLAGS = -module -avoid-version \
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
@ -73,6 +76,7 @@ mod_security2_la_LDFLAGS = -module -avoid-version \
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
@ -85,6 +89,7 @@ mod_security2_la_LDFLAGS = -module -avoid-version \
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
@ -97,6 +102,7 @@ mod_security2_la_LDFLAGS = -module -avoid-version \
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
@ -109,6 +115,7 @@ mod_security2_la_LDFLAGS = -no-undefined -module -avoid-version -R @PCRE_LD_PATH
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
@ -121,6 +128,7 @@ mod_security2_la_LDFLAGS = -no-undefined -module -avoid-version \
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
@ -133,6 +141,7 @@ mod_security2_la_LDFLAGS = -no-undefined -module -avoid-version \
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
@ -145,6 +154,7 @@ mod_security2_la_LDFLAGS = -no-undefined -module -avoid-version \
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
|
82
build/find_libmemcache.m4
Normal file
82
build/find_libmemcache.m4
Normal file
@ -0,0 +1,82 @@
|
||||
dnl Check for LIBMEMCACHED Libraries
|
||||
dnl CHECK_LIBMEMCACHED(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
|
||||
dnl Sets:
|
||||
dnl LIBMEMCACHED_CFLAGS
|
||||
dnl LIBMEMCACHED_LDFLAGS
|
||||
dnl LIBMEMCACHED_LDADD
|
||||
|
||||
AC_DEFUN([CHECK_LIBMEMCACHED],
|
||||
[dnl
|
||||
|
||||
LIBMEMCACHED_CFLAGS=""
|
||||
LIBMEMCACHED_LDFLAGS=""
|
||||
LIBMEMCACHED_LDADD=""
|
||||
|
||||
AC_ARG_WITH(
|
||||
libmemcached,
|
||||
[AC_HELP_STRING([--with-libmemcached=PATH],[Path to libmemcached prefix])]
|
||||
,, with_libmemcached=yes)
|
||||
|
||||
AS_CASE(["${with_libmemcached}"],
|
||||
[no], [test_paths=],
|
||||
[yes], [test_paths="/usr/lib /usr/local/lib /usr/local/libmemcached /usr/local/libmemcached /usr/local /opt/libmemcached /opt/libmemcached /opt /usr /usr/lib/x86_64-linux-gnu/"],
|
||||
[test_paths="${with_libmemcached}"])
|
||||
|
||||
AS_IF([test "x${test_paths}" != "x"], [
|
||||
AC_MSG_CHECKING([for libmemcached path])
|
||||
|
||||
LIBMEMCACHED_LIB_NAME="memcached"
|
||||
LIBMEMCACHED_LIB_FILENAME="lib$LIBMEMCACHED_LIB_NAME.so"
|
||||
|
||||
if test -z "$withlibmemcached" -o "$withlibmemcached" = "yes"; then
|
||||
for i in ${test_paths}; do
|
||||
if test -f "$i/$LIBMEMCACHED_LIB_FILENAME"; then
|
||||
LIBMEMCACHED_LIB_DIR="$i"
|
||||
fi
|
||||
done
|
||||
else
|
||||
if test -f "$withlibmemcached/$LIBMEMCACHED_LIB_FILENAME"; then
|
||||
LIBMEMCACHED_LIB_DIR="$withlibmemcached"
|
||||
else
|
||||
if test -f "$withlibmemcached/.libs/$LIBMEMCACHED_LIB_FILENAME"; then
|
||||
LIBMEMCACHED_LIB_DIR="$withlibmemcached/.libs/"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
LIBMEMCACHED_LDFLAGS="-l$LIBMEMCACHED_LIB_NAME"
|
||||
LIBMEMCACHED_LDADD="-l$LIBMEMCACHED_LIB_NAME"
|
||||
|
||||
if test -z "$withlibmemcached" -o "$withlibmemcached" = "yes"; then
|
||||
for i in /usr/include /usr/local/include /usr/include/libmemcached; do
|
||||
if test -f "$i/$LIBMEMCACHED_LIB_NAME.h"; then
|
||||
LIBMEMCACHED_CFLAGS="-I$i"
|
||||
fi
|
||||
done
|
||||
else
|
||||
if test -f "$withlibmemcached/../$LIBMEMCACHED_LIB_NAME.h"; then
|
||||
LIBMEMCACHED_CFLAGS="-I$withlibmemcached/../"
|
||||
else
|
||||
if test -f "$withlibmemcached/$LIBMEMCACHED_LIB_NAME.h"; then
|
||||
LIBMEMCACHED_CFLAGS="-I$withlibmemcached"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
])
|
||||
|
||||
if test -z "${LIBMEMCACHED_CFLAGS}"; then
|
||||
AC_MSG_NOTICE([optional libmemcached library not found])
|
||||
LIBMEMCACHED_LDFLAGS=""
|
||||
LIBMEMCACHED_LDADD=""
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
LIBMEMCACHED_CFLAGS="-DWITH_LIBMEMCACHED ${LIBMEMCACHED_CFLAGS}"
|
||||
AC_SUBST(LIBMEMCACHED_LDFLAGS)
|
||||
AC_SUBST(LIBMEMCACHED_LDADD)
|
||||
AC_SUBST(LIBMEMCACHED_CFLAGS)
|
||||
|
||||
AC_MSG_RESULT([${LIBMEMCACHED_LDFLAGS} ${LIBMEMCACHED_CFLAGS}])
|
||||
fi
|
||||
|
||||
])
|
@ -694,6 +694,7 @@ CHECK_APU()
|
||||
fi
|
||||
CHECK_LIBXML2()
|
||||
CHECK_LUA()
|
||||
CHECK_LIBMEMCACHED()
|
||||
if test "$build_mlogc" -ne 0; then
|
||||
CHECK_CURL()
|
||||
fi
|
||||
|
@ -3,6 +3,7 @@ EXT_CFLAGS = -I../apache2 \
|
||||
@APR_CFLAGS@ \
|
||||
@APU_CFLAGS@ \
|
||||
@APXS_CFLAGS@ \
|
||||
@LIBMEMCACHED_CFLAGS@ \
|
||||
@LIBXML2_CFLAGS@ \
|
||||
@LUA_CFLAGS@ \
|
||||
@SSDEEP_CFLAGS@
|
||||
@ -12,6 +13,7 @@ EXT_CPPFLAGS = @APR_CPPFLAGS@ \
|
||||
|
||||
EXT_LIBADD = @APR_LDADD@ \
|
||||
@APU_LDADD@ \
|
||||
@LIBMEMCACHED_LDADD@ \
|
||||
@LIBXML2_LDADD@ \
|
||||
@LUA_LDADD@
|
||||
|
||||
@ -19,6 +21,7 @@ EXT_LDFLAGS = -no-undefined -module -avoid-version \
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@SSDEEP_LDFLAGS@
|
||||
|
@ -47,6 +47,7 @@ standalone_la_CFLAGS = -DVERSION_NGINX \
|
||||
@APU_CFLAGS@ \
|
||||
@APXS_CFLAGS@ \
|
||||
@CURL_CFLAGS@ \
|
||||
@LIBMEMCACHED_CFLAGS@ \
|
||||
@LIBXML2_CFLAGS@ \
|
||||
@LUA_CFLAGS@ \
|
||||
@MODSEC_EXTRA_CFLAGS@ \
|
||||
@ -60,6 +61,7 @@ standalone_la_CPPFLAGS = @APR_CPPFLAGS@ \
|
||||
|
||||
standalone_la_LIBADD = @APR_LDADD@ \
|
||||
@APU_LDADD@ \
|
||||
@LIBMEMCACHED_LDADD@ \
|
||||
@LIBXML2_LDADD@ \
|
||||
@LUA_LDADD@ \
|
||||
@PCRE_LDADD@ \
|
||||
@ -71,6 +73,7 @@ standalone_la_LDFLAGS = -module -avoid-version \
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
@ -83,6 +86,7 @@ standalone_la_LDFLAGS = -module -avoid-version \
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
@ -95,6 +99,7 @@ standalone_la_LDFLAGS = -module -avoid-version \
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
@ -107,6 +112,7 @@ standalone_la_LDFLAGS = -module -avoid-version \
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
@ -119,6 +125,7 @@ standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
@ -131,6 +138,7 @@ standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
@ -143,6 +151,7 @@ standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
@ -155,6 +164,7 @@ standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
|
||||
@APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
|
@ -32,6 +32,7 @@ msc_test_SOURCES = msc_test.c \
|
||||
msc_test_CFLAGS = @APR_CFLAGS@ \
|
||||
@APU_CFLAGS@ \
|
||||
@APXS_CFLAGS@ \
|
||||
@LIBMEMCACHED_CFLAGS@ \
|
||||
@LIBXML2_CFLAGS@ \
|
||||
@LUA_CFLAGS@ \
|
||||
@MODSEC_EXTRA_CFLAGS@ \
|
||||
@ -46,6 +47,7 @@ msc_test_CPPFLAGS = -I$(top_srcdir)/apache2 \
|
||||
|
||||
msc_test_LDADD = @APR_LDADD@ \
|
||||
@APU_LDADD@ \
|
||||
@LIBMEMCACHED_LDADD@ \
|
||||
@LIBXML2_LDADD@ \
|
||||
@LUA_LDADD@ \
|
||||
@PCRE_LDADD@ \
|
||||
@ -55,6 +57,7 @@ msc_test_LDADD = @APR_LDADD@ \
|
||||
msc_test_LDFLAGS = @APR_LDFLAGS@ \
|
||||
@APU_LDFLAGS@ \
|
||||
@APXS_LDFLAGS@ \
|
||||
@LIBMEMCACHED_LDFLAGS@ \
|
||||
@LIBXML2_LDFLAGS@ \
|
||||
@LUA_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ \
|
||||
|
Loading…
x
Reference in New Issue
Block a user