summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-04-25 08:36:52 +0100
committerRichard Jones <rjones@redhat.com>2009-04-25 08:36:52 +0100
commit2b21eec8d423d15c97227567834ce978f8cae42c (patch)
treeff66b498280f73ad724f7f98ce5ac0fb2aea121d /configure.ac
parentae5be84decf1a40e1de22176c747e110b77829a2 (diff)
downloadlibguestfs-2b21eec8d423d15c97227567834ce978f8cae42c.tar.gz
libguestfs-2b21eec8d423d15c97227567834ce978f8cae42c.tar.xz
libguestfs-2b21eec8d423d15c97227567834ce978f8cae42c.zip
Added configure test for qemu vmchannel support.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d21c1658..41b6646e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,6 +73,34 @@ AC_PATH_PROGS([QEMU],[$with_qemu],[no],
test "x$QEMU" = "xno" && AC_MSG_ERROR([qemu must be installed])
AC_DEFINE_UNQUOTED([QEMU],["$QEMU"],[Location of qemu binary.])
+dnl Check that the chosen qemu has vmchannel support.
+dnl http://lists.gnu.org/archive/html/qemu-devel/2009-02/msg01042.html
+if test "x$vmchannel_test" != "xno"; then
+ AC_MSG_CHECKING([for vmchannel support in $QEMU])
+ vmchannelout=`$QEMU -net channel /dev/zero 2>&1 ||:`
+ echo "vmchannel test command output: $vmchannelout" >&AS_MESSAGE_LOG_FD
+ if ! echo $vmchannelout | grep -sq "vmchannel wrong port number" ; then
+ AC_MSG_RESULT([no])
+ AC_MSG_FAILURE(
+[I did not find vmchannel support in $QEMU.
+
+vmchannel support is vital for libguestfs to operate. You need a version
+of qemu >= 0.10, or the following patch backported to earlier versions:
+
+http://lists.gnu.org/archive/html/qemu-devel/2009-02/msg01042.html
+
+You can override this test by setting the environment variable
+vmchannel_test=no However if you don't have vmchannel support
+in your qemu, then this just delays the pain.
+
+If I am using the wrong qemu or you want to compile qemu from source
+and install it in another location, then you should configure with
+the --with-qemu option.
+])
+ fi
+ AC_MSG_RESULT([yes])
+fi
+
dnl Check for febootstrap etc.
AC_CHECK_PROG([FEBOOTSTRAP],
[febootstrap],[febootstrap],[no])