[Pkg-libvirt-commits] [libguestfs] 51/59: configure: simplify the qemu cpu mapping

Hilko Bengen bengen at moszumanska.debian.org
Wed Nov 26 22:04:07 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch master
in repository libguestfs.

commit 085a1f035f59b1fe669e96586dac399b978f5240
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Mon Nov 10 14:53:07 2014 +0100

    configure: simplify the qemu cpu mapping
    
    Use AS_CASE to properly map from the host cpu to the qemu cpu suffix;
    this avoids doing multiple string replacements using sed, and it is
    possible to use case-like syntax.
    
    (cherry picked from commit e698daabbcb3c9d7e08e571fbd661369d4d52194)
---
 configure.ac | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index cc84c72..d3ea8a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -749,15 +749,13 @@ AC_DEFINE_UNQUOTED([UNZIP],["$UNZIP"],[Name of unzip program.])
 
 dnl Check for QEMU for running binaries on this $host_cpu, fall
 dnl back to basic 'qemu'.  Allow the user to override it.
-qemu_system="$(
-    echo qemu-system-$host_cpu |
-    $SED -e 's/-i@<:@456@:>@86/-i386/g' \
-         -e 's/-arm.*/-arm/g' \
-         -e 's/-amd64/-x86_64/g' \
-         -e 's/-powerpc64/-ppc64/g' \
-         -e 's/-ppc64le/-ppc64/g'
-    )"
-default_qemu="qemu-kvm kvm $qemu_system qemu"
+AS_CASE([$host_cpu],
+        [i@<:@456@:>@86],[qemu_cpu=i386],
+        [arm*],[qemu_cpu=arm],
+        [amd64],[qemu_cpu=x86_64],
+        [powerpc64 | ppc64le],[qemu_cpu=ppc64],
+        [qemu_cpu=$host_cpu])
+default_qemu="qemu-kvm kvm qemu-system-$qemu_cpu qemu"
 AC_ARG_WITH([qemu],
     [AS_HELP_STRING([--with-qemu="bin1 bin2 ..."],
         [set default QEMU binary @<:@default="[qemu-kvm] qemu-system-<host> qemu"@:>@])],

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list