mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 13:26:01 +03:00
Removes the depency on bison/flex if it is not a parser build
This commit is contained in:
parent
3eccfaf1f6
commit
1e8b374117
32
configure.ac
32
configure.ac
@ -38,25 +38,9 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
|
||||
# Check for dependencies (C++, AR, Lex, Yacc and Make)
|
||||
AC_PROG_CXX
|
||||
AM_PROG_AR
|
||||
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)
|
||||
|
||||
@ -261,6 +245,22 @@ AC_ARG_ENABLE(parser-generation,
|
||||
)
|
||||
|
||||
|
||||
if test $buildParser = true; then
|
||||
AC_PROG_YACC
|
||||
AC_PROG_LEX
|
||||
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
|
||||
fi
|
||||
|
||||
|
||||
# Decide if we want to build the tests or not.
|
||||
|
@ -287,7 +287,6 @@ libmodsecurity_la_LIBADD = \
|
||||
$(GLOBAL_LDADD) \
|
||||
$(CURL_LDADD) \
|
||||
$(GEOIP_LDFLAGS) $(GEOIP_LDADD) \
|
||||
@LEXLIB@ \
|
||||
$(PCRE_LDADD) \
|
||||
$(YAJL_LDFLAGS) $(YAJL_LDADD) \
|
||||
$(LMDB_LDFLAGS) $(LMDB_LDADD) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user