From: Quirin Gylstorff <
quirin.g...@siemens.com>
This fixes debian bug #1125737.
gnu-efi still installs to /usr/lib and that's
not a location pkg-config searches during cross compilation. The
solution here is to move its files to multiarch. Once doing that,
efibootguard fails to build from source, because it hard codes the
assumption that gnu-efi is installed to /usr/lib.
Reported-by: Helmut Grohne <
hel...@subdivi.de>
Signed-off-by: Quirin Gylstorff <
quirin.g...@siemens.com>
---
configure.ac | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/
configure.ac b/
configure.ac
index 8f78875..c05f107 100644
--- a/
configure.ac
+++ b/
configure.ac
@@ -72,7 +72,11 @@ AC_ARG_WITH([gnuefi-include-dir],
AC_SUBST(GNUEFI_INC_DIR)
AC_DEFINE_UNQUOTED(GNUEFI_INC_DIR, ["$GNUEFI_INC_DIR"], [The include directory for gnuefi])
-efiroot=$(echo $(cd $GNUEFI_SYS_DIR/usr/lib/$($CC -print-multi-os-directory); pwd))
+PKG_PROG_PKG_CONFIG
+efiroot=$($PKG_CONFIG --variable=libdir gnu-efi)
+if test "x$efiroot" = x; then
+ efiroot=$(echo $(cd $GNUEFI_SYS_DIR/usr/lib/$($CC -print-multi-os-directory); pwd))
+fi
AC_ARG_WITH([gnuefi-lib-dir],
AS_HELP_STRING([--with-gnuefi-lib-dir=DIRECTORY],
--
2.53.0