From: Matt Clarkson Date: Thu, 6 Apr 2017 13:12:11 +0000 (+0100) Subject: build-sys: correctly search for gnu-efi header X-Git-Tag: v234~320^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cba49f2deab481045408d5452ac8c84fc03bccd5;p=thirdparty%2Fsystemd.git 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. --- diff --git a/configure.ac b/configure.ac index 3835413ad59..a95e9843750 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])