Use of AC_CHECK_FILE prevents cross compilation.

The use of AC_CHECK_FILE causes the following error when cross compiling:

  configure: error: cannot check for file existence when cross compiling

The solution is to check for the file directly instead of using a macro.

Resolves: #1983
This commit is contained in:
chuckwolber 2018-12-14 13:15:22 -08:00 committed by Felipe Zimmerle
parent a9e9da8694
commit 8af8cad907
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -55,8 +55,8 @@ AC_PROG_MAKE_SET
# 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([\
if ! test -f "others/libinjection/src/libinjection_html5.c"; then
AC_MSG_ERROR([\
libInjection was not found within ModSecurity source directory.
@ -71,6 +71,7 @@ test "x$HAS_LIBINJECTION" = "x" && AC_MSG_ERROR([\
$ git submodule update
])
fi
# Libinjection version
AC_DEFUN([LIBINJECTION_VERSION], m4_esyscmd_s(cd "others/libinjection" && git describe && cd ../..))