[systemd-devel] [PATCH 2/2] configure.ac: Disable the QEMU BIOS test when cross compiling

Darren Hart dvhart at linux.intel.com
Wed Aug 21 15:38:08 PDT 2013


When cross-compiling, AC_CHECK_FILE aborts configure. Skip it when
cross compiling.

Signed-off-by: Darren Hart <dvhart at linux.intel.com>
Cc: Colin Walters <walters at verbum.org>
---
 configure.ac | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 137580a..a9534be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,10 +65,12 @@ AM_COND_IF(ARCH_X86_64, [
 AC_SUBST([ARCH])
 AC_SUBST([MACHINE_TYPE_NAME])
 
-# test bios
-AC_CHECK_FILE([/usr/lib/qemu-bios],        [BIOS=/usr/lib/qemu-bios])
-AC_CHECK_FILE([/usr/share/qemu-ovmf/bios], [BIOS=/usr/share/qemu-ovmf/bios])
-AC_SUBST([BIOS])
+dnl Do not test for bios when cross compiling
+AS_IF([test "x$cross_compiling" = xno], [
+	AC_CHECK_FILE([/usr/lib/qemu-bios],        [BIOS=/usr/lib/qemu-bios])
+	AC_CHECK_FILE([/usr/share/qemu-ovmf/bios], [BIOS=/usr/share/qemu-ovmf/bios])
+	AC_SUBST([BIOS])
+])
 
 # ------------------------------------------------------------------------------
 dnl GNU EFI doesn't use relative paths: efi.h includes efibind.h which is in
-- 
1.8.3.1



More information about the systemd-devel mailing list