mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 11:16:33 +03:00
Makes Curl no longer a mandatory depedency for ModSecurity core
As reported by Rainer Jung, Curl may not be mandatory to build ModSecurity core. This patch make it optional by: - Concentrate all downloads using curl on msc_remote_rules.c - Split Curl build definitions checks into: WITH_CURL, WITH_REMOTE_RULES and WITH_CRYPTO. - WITH_CURL: Contains Culr headers and binaries during the build time. - WITH_REMOTE_RULES: Currently enabled if Curl is present. - WITH_CRYPTO: Set if apr tool was compiled with crypto support. - Renames msc_remote_grab_content to msc_remote_download_content
This commit is contained in:
22
configure.ac
22
configure.ac
@@ -702,7 +702,27 @@ CHECK_CURL()
|
||||
CHECK_YAJL()
|
||||
#AC_SEARCH_LIBS([yajl_alloc], [yajl])
|
||||
CHECK_SSDEEP()
|
||||
AC_SEARCH_LIBS([fuzzy_hash_buf], [fuzzy])
|
||||
#AC_SEARCH_LIBS([fuzzy_hash_buf], [fuzzy])
|
||||
|
||||
CFLAGS="$CFLAGS $APU_CFLAGS"
|
||||
AC_TRY_COMPILE(
|
||||
[#include <apr_crypto.h>],
|
||||
[
|
||||
#if APU_HAVE_CRYPTO == 0
|
||||
#error APR util was not compiled with crypto support.
|
||||
#endif
|
||||
],
|
||||
[ AC_DEFINE([WITH_APU_CRYPTO], [1], [APR util was compiled with crypto support])
|
||||
MODSEC_EXTRA_CFLAGS="$MODSEC_EXTRA_CFLAGS -DWITH_APU_CRYPTO"
|
||||
],
|
||||
[ AC_MSG_WARN([APR util was not compiled with crypto support. SecRemoteRule will not support the parameter 'crypto']) ]
|
||||
)
|
||||
|
||||
# Current our unique download backend is curl, furhter we can support more.
|
||||
if test ! -z "${CURL_VERSION}"; then
|
||||
AC_DEFINE([WITH_REMOTE_RULES], [1], [Enables SecRemoteRules support])
|
||||
MODSEC_EXTRA_CFLAGS="$MODSEC_EXTRA_CFLAGS -DWITH_REMOTE_RULES"
|
||||
fi
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_CONFIG_FILES([tools/Makefile])
|
||||
|
Reference in New Issue
Block a user