diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-07-19 19:55:24 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-07-19 19:55:24 +0100 |
commit | d82438431c1551610eb7d9945fa76d6387534582 (patch) | |
tree | b4b5875fab36acdf674b21c4dfe82df60cf81eff | |
parent | a6f99dd9326c2da66f6b7e49d94901fffdddd6ea (diff) | |
download | libguestfs-d82438431c1551610eb7d9945fa76d6387534582.tar.gz libguestfs-d82438431c1551610eb7d9945fa76d6387534582.tar.xz libguestfs-d82438431c1551610eb7d9945fa76d6387534582.zip |
build: Fix virtio-serial test for qemu 0.15.
Now qemu 0.15 won't even start up unless the -machine accel=... option
is specified. Essentially this is a regression in qemu.
-rw-r--r-- | configure.ac | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index ae50e76b..456ed4d7 100644 --- a/configure.ac +++ b/configure.ac @@ -310,8 +310,31 @@ AC_DEFINE_UNQUOTED([QEMU],["$QEMU"],[Location of qemu binary.]) dnl Check that the chosen qemu has virtio-serial support. if test "x$vmchannel_test" != "xno"; then + AC_MSG_CHECKING([that $QEMU -help works]) + if $QEMU -help > /dev/null 2>&1; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + AC_MSG_FAILURE( +[$QEMU -help: command failed. + +This could be a very old version of qemu, or qemu might not be +working. +]) + fi + + # qemu since 0.15 requires the -machine accel=tcg option, otherwise + # it won't start up. QEMU DEVELOPERS, PLEASE ADD CAPABILITIES TESTING. + AC_MSG_CHECKING([if this qemu has the -machine accel=tcg option]) + if $QEMU -help 2>&1 | grep -sq -- '-machine.*accel.*tcg'; then + qemu_machine_accel_tcg="-machine accel=tcg" + AC_MSG_RESULT([$qemu_machine_accel_tcg]) + else + AC_MSG_RESULT([no]) + fi + AC_MSG_CHECKING([for virtio-serial support in $QEMU]) - if $QEMU -nographic -device \? 2>&1 | grep -sq virtio-serial; then + if $QEMU $qemu_machine_accel_tcg -nographic -device \? 2>&1 | grep -sq virtio-serial; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) |