summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMatt Clarkson <mattyclarkson@gmail.com>2017-04-06 14:12:11 +0100
committerMatt Clarkson <mattyclarkson@gmail.com>2017-04-06 14:32:41 +0100
commitcba49f2deab481045408d5452ac8c84fc03bccd5 (patch)
tree28120b228b38d9fa74c7d2c86e870761d82bc79a /configure.ac
parentd60c527009133a1ed3d69c14b8c837c790e78d10 (diff)
build-sys: correctly search for gnu-efi header
When the user provides the --with-efi-includedir we incorrectly search for the header at /usr/include not the provided location. This patch changes the check to use the provided value so that non-standard header locations are supported. This situation occurs commonly when cross-compiling systemd because the GNU EFI headers and library will not be installed into the root locations but highly likely a temporary system root.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 7 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 3835413ad5..a95e984375 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1306,7 +1306,13 @@ AC_SUBST([EFI_MACHINE_TYPE_NAME])
have_gnuefi=no
AC_ARG_ENABLE(gnuefi, AS_HELP_STRING([--enable-gnuefi], [enable optional gnuefi support]))
AS_IF([test "x$enable_gnuefi" != "xno"], [
- AC_CHECK_HEADERS(efi/${EFI_ARCH}/efibind.h,
+ AC_ARG_WITH(efi-includedir,
+ AS_HELP_STRING([--with-efi-includedir=PATH], [path to EFI include directory]),
+ [EFI_INC_DIR="$withval"], [EFI_INC_DIR="/usr/include"]
+ )
+ AC_SUBST([EFI_INC_DIR])
+
+ AC_CHECK_HEADERS(${EFI_INC_DIR}/efi/${EFI_ARCH}/efibind.h,
[AC_DEFINE(HAVE_GNUEFI, 1, [Define if gnuefi is available])
have_gnuefi=yes],
[AS_IF([test "x$enable_gnuefi" = xyes],
@@ -1335,12 +1341,6 @@ AS_IF([test "x$enable_gnuefi" != "xno"], [
[AS_IF([test "x$enable_gnuefi" = xyes],
[AC_MSG_ERROR([*** gnuefi support requested but files not found])],
[have_gnuefi=no])])
-
- AC_ARG_WITH(efi-includedir,
- AS_HELP_STRING([--with-efi-includedir=PATH], [path to EFI include directory]),
- [EFI_INC_DIR="$withval"], [EFI_INC_DIR="/usr/include"]
- )
- AC_SUBST([EFI_INC_DIR])
])
AM_CONDITIONAL(HAVE_GNUEFI, [test "x$have_gnuefi" = xyes])