Fix some build issues

Optional dependencies were temporarily marked as mandatory, in order
to sort any build problem, later it will be marked as optional again.
This commit is contained in:
Felipe Zimmerle
2015-08-25 00:11:49 -03:00
parent fd8578351d
commit e94226f1d8
8 changed files with 221 additions and 18 deletions

View File

@@ -34,6 +34,29 @@ AC_PROG_YACC
AC_PROG_LEX
AC_PROG_MAKE_SET
AC_PATH_PROG([FLEX], [flex])
test "x$FLEX" = "x" && AC_MSG_ERROR([flex is needed to build ModSecurity])
AC_PATH_PROG([BISON], [bison])
test "x$BISON" = "x" && AC_MSG_ERROR([bison is needed to build ModSecurity])
AC_PATH_PROG([YACC_INST], $YACC)
if test ! -f "$srcdir/gram.c"; then
if test -z "$YACC_INST"; then
AC_MSG_ERROR([yacc not found - unable to compile ModSecurity])
fi
fi
# Check if the compiler is c++11 compatible.
AX_CXX_COMPILE_STDCXX_11(,mandatory)
# Check for libinjection
AC_CHECK_FILE("others/libinjection/src/libinjection_html5.c", HAS_LIBINJECTION=1)
test "x$HAS_LIBINJECTION" = "x" && AC_MSG_ERROR([libinjection is needed to build ModSecurity, make sure you have downloaded all the git submodules])
# Check for yajl
PROG_YAJL
@@ -49,9 +72,7 @@ AM_CONDITIONAL([GEOIP_VERSION], [test "$GEOIP_VERSION" != ""])
#
CHECK_CURL
if test -z "${CURL_VERSION}"; then
AC_MSG_NOTICE([NOTE: curl was not found. SecRemoteRules support was disabled.])
else
if ! test -z "${CURL_VERSION}"; then
AC_DEFINE([MSC_WITH_CURL], [1], [Define if libcurl is available])
fi
@@ -162,4 +183,3 @@ DX_INIT_DOXYGEN([ModSecurity],[doc/doxygen.cfg])
# Generate the files.
AC_OUTPUT