build: Fix virtio-serial test for qemu 0.15.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 19 Jul 2011 18:55:24 +0000 (19:55 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 27 Jul 2011 13:49:25 +0000 (14:49 +0100)
(Cherry picked and combined
commit d82438431c1551610eb7d9945fa76d6387534582 and
commit 5dec7842655dd872bb0fd9fe07f6a9eab6b13bfd)

configure.ac

index f7b1c99..3830161 100644 (file)
@@ -310,6 +310,19 @@ 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
+
     AC_MSG_CHECKING([for virtio-serial support in $QEMU])
     if $QEMU -nographic -device \? 2>&1 | grep -sq virtio-serial; then
         AC_MSG_RESULT([yes])