From: Richard W.M. Jones Date: Tue, 20 Aug 2013 19:04:06 +0000 (+0100) Subject: configure: Allow the default qemu list to be overridden by the packager. X-Git-Tag: v1.1.2~3 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=e8d7a7e5416392babb4f2e68c995dc8555e3d6c1;p=qemu-sanity-check.git configure: Allow the default qemu list to be overridden by the packager. --- diff --git a/configure.ac b/configure.ac index c4b9dfe..7c7fa96 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,20 @@ test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant]) AM_PROG_CC_C_O +dnl Allow the package to override the default list of qemu binary +dnl names which are tried, since this heavily depends on how qemu +dnl has been packaged in the downstream distro. +dnl +dnl Note that "$canonical_arch" and "$arch" are variables in the +dnl qemu-sanity-check shell script. Absolute paths could be used +dnl here as well. +AC_ARG_WITH([qemu-list], + [AS_HELP_STRING([--with-qemu-list], + [list of qemu binaries to try @<:@default=qemu-kvm qemu-system-\$canonical_arch qemu kvm@:>@])], + [QEMU_LIST="$withval"], + [QEMU_LIST="qemu-kvm qemu-system-\$canonical_arch qemu kvm"]) +AC_SUBST([QEMU_LIST]) + AC_PROG_SED AC_MSG_CHECKING([that a static binary can be built]) diff --git a/qemu-sanity-check.in b/qemu-sanity-check.in index bda6cc7..4a13b07 100644 --- a/qemu-sanity-check.in +++ b/qemu-sanity-check.in @@ -113,7 +113,7 @@ fi # Locate qemu if not specified. if [ -z "$qemu" ]; then - for q in qemu-kvm qemu-system-$canonical_arch qemu kvm; do + for q in @QEMU_LIST@; do if "$q" --help >/dev/null 2>&1; then qemu="$q" break