]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
configure.ac: remove AC_CHECK_FILE
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sat, 26 Oct 2019 11:30:43 +0000 (13:30 +0200)
committerJason Ish <jason.ish@oisf.net>
Fri, 6 Dec 2019 17:18:52 +0000 (11:18 -0600)
The use of AC_CHECK_FILE and AC_CHECK_FILES cause 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.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
configure.ac

index 08aac16e64cbae006d2a888abc3d4a0369fa8594..978c51b16129db2b10c8b3bf4dd2ea7191b2c479 100644 (file)
     ruledirprefix="$sysconfdir"
 
     if test "$enable_suricata_update" = "yes"; then
-      AC_CHECK_FILE([$srcdir/suricata-update/setup.py], [
-          have_suricata_update="yes"], [])
+        if test -f "$srcdir/suricata-update/setup.py"; then
+          have_suricata_update="yes"
+       fi
     fi
 
     if test "$have_suricata_update" = "yes"; then
@@ -2437,10 +2438,8 @@ fi
     AC_SUBST([RUSTUP_HOME_PATH], [$rustup_home_path])
     AC_SUBST([rustup_home])
 
-    if test "x$cross_compiling" != "xyes"; then
-      AC_CHECK_FILES([$srcdir/rust/vendor], [have_rust_vendor="yes"])
-    else
-      AS_IF([test -d "$srcdir/rust/vendor"], have_rust_vendor="yes", [])
+    if test -f "$srcdir/rust/vendor"; then
+      have_rust_vendor="yes"
     fi
 
     if test "x$have_rust_vendor" = "xyes"; then