diff options
author | Johannes Nixdorf <mixi@exherbo.org> | 2015-07-16 12:49:53 +0200 |
---|---|---|
committer | Johannes Nixdorf <mixi@exherbo.org> | 2015-07-31 13:38:49 +0200 |
commit | 182247ea923895e6078a292c2a2754af222d1d27 (patch) | |
tree | 8b5c31c81252d87cdac5fc677b55573f92904104 | |
parent | 0810bc568ace619b16e440805e93256730d45541 (diff) |
build-sys: use 'test -f' instead of AC_CHECK_FILE
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
-rw-r--r-- | configure.ac | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index a16ca6396b..7a10211095 100644 --- a/configure.ac +++ b/configure.ac @@ -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])], |