Fix build/re2.m4 file lookup

There's no such include file as "re2/re2_parse.h",
and there was a typo in RE2_POSSIBLE_PATHS.
This commit is contained in:
WGH
2019-01-25 21:31:47 +03:00
committed by Felipe Zimmerle
parent d349fa0c56
commit a2dc896520
2 changed files with 61 additions and 45 deletions

View File

@@ -31,7 +31,7 @@ AC_ARG_WITH(
)
if test "x${with_re2}" == "xno"; then
AC_DEFINE(HAVE_GEOIP, 0, [Support for RE2 was disabled by the utilization of --without-re2 or --with-re2=no])
AC_DEFINE(HAVE_RE2, 0, [Support for RE2 was disabled by the utilization of --without-re2 or --with-re2=no])
AC_MSG_NOTICE([Support for RE2 was disabled by the utilization of --without-re2 or --with-re2=no])
RE2_DISABLED=yes
else
@@ -48,7 +48,7 @@ else
# if test "x${with_re2}" != "xyes" or test "x${with_re2}" == "xyes"; then
if test "x${with_re2}" == "x" || test "x${with_re2}" == "xyes"; then
# Nothing about GeoIP was informed, using the pkg-config to figure things out.
# Nothing about RE2 was informed, using the pkg-config to figure things out.
if test -n "${PKG_CONFIG}"; then
RE2_PKG_NAME=""
for x in ${RE2_POSSIBLE_LIB_NAMES}; do
@@ -58,7 +58,7 @@ else
fi
done
fi
AC_MSG_NOTICE([Nothing about GeoIP was informed during the configure phase. Trying to detect it on the platform...])
AC_MSG_NOTICE([Nothing about RE2 was informed during the configure phase. Trying to detect it on the platform...])
if test -n "${RE2_PKG_NAME}"; then
# Package was found using the pkg-config scripts
RE2_VERSION="`${PKG_CONFIG} ${RE2_PKG_NAME} --modversion`"
@@ -68,7 +68,7 @@ else
RE2_DISPLAY="${RE2_LDADD}, ${RE2_CFLAGS}"
else
# If pkg-config did not find anything useful, go over file lookup.
for x in ${RE2_POSSIBLE_LIB_NAMES}; do
for x in ${RE2_POSSIBLE_PATHS}; do
CHECK_FOR_RE2_AT(${x})
if test -n "${RE2_VERSION}"; then
break
@@ -149,11 +149,11 @@ AC_DEFUN([CHECK_FOR_RE2_AT], [
break
fi
done
if test -e "${path}/include/re2_parse.h"; then
if test -e "${path}/include/re2.h"; then
re2_inc_path="${path}/include"
elif test -e "${path}/re2_parse.h"; then
elif test -e "${path}/re2.h"; then
re2_inc_path="${path}"
elif test -e "${path}/include/re2/re2_parse.h"; then
elif test -e "${path}/include/re2/re2.h"; then
re2_inc_path="${path}/include"
fi