Skip to content

Commit 8af8cad

Browse files
chuckwolberFelipe Zimmerle
authored andcommitted
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
1 parent a9e9da8 commit 8af8cad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

configure.ac

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ AC_PROG_MAKE_SET
5555
# AX_CXX_COMPILE_STDCXX_11(,mandatory)
5656

5757
# Check for libinjection
58-
AC_CHECK_FILE("others/libinjection/src/libinjection_html5.c", HAS_LIBINJECTION=1)
59-
test "x$HAS_LIBINJECTION" = "x" && AC_MSG_ERROR([\
58+
if ! test -f "others/libinjection/src/libinjection_html5.c"; then
59+
AC_MSG_ERROR([\
6060
6161
6262
libInjection was not found within ModSecurity source directory.
@@ -71,6 +71,7 @@ test "x$HAS_LIBINJECTION" = "x" && AC_MSG_ERROR([\
7171
$ git submodule update
7272
7373
])
74+
fi
7475
# Libinjection version
7576
AC_DEFUN([LIBINJECTION_VERSION], m4_esyscmd_s(cd "others/libinjection" && git describe && cd ../..))
7677

0 commit comments

Comments
 (0)