1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

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
This commit is contained in:
Johannes Nixdorf 2015-07-16 12:49:53 +02:00
parent 0810bc568a
commit 182247ea92

View 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])],