-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Refactor/default pcre2 #3321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor/default pcre2 #3321
Changes from all commits
4fb2246
c6433df
106ed22
a07d0c7
784cf0b
e925078
10d1c2b
6a2eee6
b97b61b
d68aef3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,10 +29,12 @@ if test "x${with_pcre2}" == "xno"; then | |
AC_MSG_NOTICE([Support for PCRE2 was disabled by the utilization of --without-pcre2 or --with-pcre2=no]) | ||
PCRE2_DISABLED=yes | ||
else | ||
if test "x${with_pcre2}" == "xyes"; then | ||
PCRE2_MANDATORY=yes | ||
AC_MSG_NOTICE([PCRE2 support was marked as mandatory by the utilization of --with-pcre2=yes]) | ||
fi | ||
PCRE2_MANDATORY=yes | ||
AC_MSG_NOTICE([PCRE2 is enabled by default.]) | ||
# if test "x${with_pcre2}" == "xyes"; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove commented code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also remove the closing (commented) |
||
# PCRE2_MANDATORY=yes | ||
# AC_MSG_NOTICE([PCRE2 support was marked as mandatory by the utilization of --with-pcre2=yes]) | ||
# fi | ||
# for x in ${PCRE2_POSSIBLE_LIB_NAMES}; do | ||
# CHECK_FOR_PCRE2_AT(${x}) | ||
# if test -n "${PCRE2_VERSION}"; then | ||
|
@@ -96,9 +98,14 @@ else | |
AC_MSG_NOTICE([PCRE2 is disabled by default.]) | ||
else | ||
PCRE2_FOUND=1 | ||
AC_MSG_NOTICE([using PCRE2 v${PCRE2_VERSION}]) | ||
PCRE2_CFLAGS="-DWITH_PCRE2 ${PCRE2_CFLAGS}" | ||
PCRE2_CFLAGS="${PCRE2_CFLAGS}" | ||
PCRE2_DISPLAY="${PCRE2_LDADD}, ${PCRE2_CFLAGS}" | ||
AC_MSG_NOTICE([using PCRE2_VERSION ${PCRE2_VERSION}]) | ||
AC_MSG_NOTICE([using PCRE2_LDADD ${PCRE2_LDADD}]) | ||
AC_MSG_NOTICE([using PCRE2_LIBS ${PCRE2_LIBS}]) | ||
AC_MSG_NOTICE([using PCRE2_LDFLAGS ${PCRE2_LDFLAGS}]) | ||
AC_MSG_NOTICE([using PCRE2_CFLAGS ${PCRE2_CFLAGS}]) | ||
AC_MSG_NOTICE([using PCRE2_DISPLAY ${PCRE2_DISPLAY}]) | ||
AC_SUBST(PCRE2_VERSION) | ||
AC_SUBST(PCRE2_LDADD) | ||
AC_SUBST(PCRE2_LIBS) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,24 +109,19 @@ AM_CONDITIONAL([YAJL_VERSION], [test "$YAJL_VERSION" != ""]) | |
|
||
# Check for LibGeoIP | ||
PROG_GEOIP | ||
AM_CONDITIONAL([GEOIP_CFLAGS], [test "GEOIP_CFLAGS" != ""]) | ||
|
||
# Check for MaxMind | ||
PROG_MAXMIND | ||
AM_CONDITIONAL([MAXMIND_CFLAGS], [test "MAXMIND_CFLAGS" != ""]) | ||
|
||
|
||
# Check for LMDB | ||
PROG_LMDB | ||
AM_CONDITIONAL([LMDB_CFLAGS], [test "LMDB_CFLAGS" != ""]) | ||
|
||
# Check for SSDEEP | ||
CHECK_SSDEEP | ||
AM_CONDITIONAL([SSDEEP_CFLAGS], [test "SSDEEP_CFLAGS" != ""]) | ||
|
||
# Check for LUA | ||
CHECK_LUA | ||
AM_CONDITIONAL([LUA_CFLAGS], [test "LUA_CFLAGS" != ""]) | ||
|
||
|
||
# | ||
|
@@ -146,16 +141,16 @@ CHECK_LIBXML2 | |
|
||
|
||
# | ||
# Check for libpcre | ||
# Check for libpcre only if explicitly requested | ||
# | ||
CHECK_PCRE | ||
|
||
|
||
# | ||
# Check for pcre2 | ||
# | ||
PROG_PCRE2 | ||
AM_CONDITIONAL([PCRE2_CFLAGS], [test "PCRE2_CFLAGS" != ""]) | ||
if test "x${with_pcre}" != "x" && test "x${with_pcre}" != "xno"; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While this test is correct, it omits the possibility of |
||
CHECK_PCRE | ||
else | ||
# | ||
# Check for pcre2 | ||
# | ||
PROG_PCRE2 | ||
fi | ||
|
||
|
||
# Checks for header files. | ||
|
@@ -587,6 +582,17 @@ if test "x$LUA_FOUND" = "x2"; then | |
echo " + LUA ....disabled" | ||
fi | ||
|
||
##PCRE | ||
if test "x${with_pcre}" != "x" \ | ||
&& test "x${with_pcre}" != "xno" \ | ||
&& test "x${PCRE_VERSION}" == "x"; then | ||
AC_MSG_NOTICE([*** pcre library not found.]) | ||
else | ||
echo " + PCRE ....found " | ||
echo " using pcre v${PCRE_VERSION}" | ||
echo " ${PCRE_LDADD}, ${PCRE_CFLAGS}" | ||
fi | ||
|
||
|
||
## PCRE2 | ||
if test "x$PCRE2_FOUND" = "x0"; then | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@airween the
&&
doesn't make sense here. When the first condition is true, the second condition will also always be true.