[PATCH] Use pkg-config for libpci cflags

3 views
Skip to first unread message

Jan Kiszka

unread,
Aug 23, 2021, 11:21:59 AM8/23/21
to efibootguard-dev
From: Jan Kiszka <jan.k...@siemens.com>

This fixes building against multiarch libpci-dev packages in Debian 11
and Ubuntu 20.04+.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
Makefile.am | 3 ++-
configure.ac | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 12dcb19..83da343 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -152,7 +152,8 @@ efi_cppflags = \
-I$(GNUEFI_SYS_DIR)/usr/include \
-I$(GNUEFI_INC_DIR) \
-I$(GNUEFI_INC_DIR)/$(ARCH) \
- -I$(GNUEFI_INC_DIR)/$(MACHINE_TYPE_NAME)
+ -I$(GNUEFI_INC_DIR)/$(MACHINE_TYPE_NAME) \
+ $(LIBPCI_CFLAGS)

efi_cflags = \
-Wall \
diff --git a/configure.ac b/configure.ac
index d7a7451..83fa86b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -177,6 +177,9 @@ if test "x$PKG_CONFIG" = "xno"; then
fi
PKG_PROG_PKG_CONFIG()
PKG_CHECK_MODULES(LIBCHECK, check)
+if test "$ARCH" = "x86_64" || test "$ARCH" = "ia32"; then
+ PKG_CHECK_MODULES(LIBPCI, libpci)
+fi
# ------------------------------------------------------------------------------
AC_CONFIG_FILES([
Makefile
--
2.31.1
Reply all
Reply to author
Forward
0 new messages