]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
build-sys: use 'test -f' instead of AC_CHECK_FILE 803/head
authorJohannes Nixdorf <mixi@exherbo.org>
Thu, 16 Jul 2015 10:49:53 +0000 (12:49 +0200)
committerJohannes Nixdorf <mixi@exherbo.org>
Fri, 31 Jul 2015 11:38:49 +0000 (13:38 +0200)
AC_CHECK_FILE fails when cross-compiling. It is intended to be used to
check for files that are used at runtime during build time (e.g.
/etc/passwd, /dev/*) [1]. For files which are only used at build time
'test -f' is sufficient.

[1]: https://lists.gnu.org/archive/html/autoconf/2000-10/msg00018.html

configure.ac

index a16ca6396b2c3b2fed103062df19e78a2ff54fbc..7a1021109502518e44801f762a8c32c8142cefa1 100644 (file)
@@ -1151,10 +1151,10 @@ AS_IF([test "x$enable_gnuefi" != "xno"], [
         have_efi_lds=no
         AC_ARG_WITH(efi-ldsdir,
                 AS_HELP_STRING([--with-efi-ldsdir=PATH], [Path to EFI lds directory]),
-                [EFI_LDS_DIR="$withval" && AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
+                [EFI_LDS_DIR="$withval" && AS_IF([test -f "${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds"],
                         [have_efi_lds=yes])],
                 [AS_FOR([DIR], [EFI_LDS_DIR], ["${EFI_LIB_DIR}/gnuefi" "${EFI_LIB_DIR}"],
-                        [AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
+                        [AS_IF([test -f "${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds"],
                                        [have_efi_lds=yes && break])])])
         AS_IF([test "x$have_efi_lds" = xyes],
               [AC_SUBST([EFI_LDS_DIR])],