summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMirco Tischler <mt-ml@gmx.de>2015-03-05 01:22:01 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-03-04 19:33:29 -0500
commitefbef0036d33da7d61deae13477d2f44752ced74 (patch)
tree387152b89e6a0791f3e546a65aded56b036bb636 /configure.ac
parent3a867c6a2361c8af943d3ed452da6e8623a3f65d (diff)
build-sys: fix check for efi-lds file
Using the DIR macro breaks caching and has no benefit as it only offers performance improvements when AS_FOR is used with a single element list. Also --with-lds-dir= was broken as we never set have_efi_lds in this case. Fix this and check if PATH actually contains the efi-lds file.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 419b5d4e8d..14518bc52b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1182,9 +1182,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"],
+ [EFI_LDS_DIR="$withval" && AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
+ [have_efi_lds=yes])],
[AS_FOR([DIR], [EFI_LDS_DIR], ["${efiroot}/gnuefi" "${efiroot}"],
- [AC_CHECK_FILE([DIR/elf_${EFI_ARCH}_efi.lds],
+ [AC_CHECK_FILE([${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])],