configure.ac: search for efi-ldsdir in multiple places
authorHarald Hoyer <harald@redhat.com>
Thu, 29 Aug 2013 10:39:55 +0000 (12:39 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 29 Aug 2013 10:39:55 +0000 (12:39 +0200)
configure.ac

index 34c82ac..d85efba 100644 (file)
@@ -91,7 +91,14 @@ AC_SUBST([EFI_LIB_DIR])
 dnl extra objects and linker scripts
 AC_ARG_WITH(efi-ldsdir,
         AS_HELP_STRING([--with-efi-ldsdir=PATH], [Path to efi lds directory]),
-        [EFI_LDS_DIR="$withval"], [EFI_LDS_DIR="${efiroot}/gnuefi"]
+        [EFI_LDS_DIR="$withval"],
+        [
+                for EFI_LDS_DIR in "${efiroot}/gnuefi" "${efiroot}"; do
+                    for lds in ${EFI_LDS_DIR}/elf_${ARCH}_efi.lds; do
+                            test -f ${lds} && break
+                    done
+                done
+        ]
 )
 AC_SUBST([EFI_LDS_DIR])