]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Skip libxl driver on Xen 4.2
authorEric Blake <eblake@redhat.com>
Mon, 6 May 2013 14:18:39 +0000 (08:18 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 6 May 2013 14:18:39 +0000 (08:18 -0600)
Specific to v0.9.11.  This is the opposite of commit dfa1e1dd,
and done for the purposes of minimal code changes to allow
compilation of libxl on Fedora 17 which still has experimental
libxl 4.1, while still being able to compile the branch (minus
libxl code) on Fedora 18 and later.

Signed-off-by: Eric Blake <eblake@redhat.com>
configure.ac

index e3cf4e2d1abac4c73f1c50ac7ae6ca715da556c3..dbd61196bb356629915cb754feecafa2269206dc 100644 (file)
@@ -639,9 +639,16 @@ if test "$with_libxl" != "no" ; then
     CFLAGS="$CFLAGS $LIBXL_CFLAGS"
     LIBS="$LIBS $LIBXL_LIBS"
     AC_CHECK_LIB([xenlight], [libxl_domain_create_new], [
-        with_libxl=yes
+        dnl The v0.9.11-maint branch of libvirt is designed for Fedora 17, where
+        dnl libxl 4.1 was still experimental.  Make sure we don't try to compile
+        dnl against libxl 4.2 or greater (opposite what newer libvirt does).
+        AC_CHECK_LIB([xenlight], [libxl_ctx_alloc], [
+          if test "$with_libxl" = "yes"; then
+              fail=1
+          fi
+          with_libxl=no], [with_libxl=yes])
         LIBXL_LIBS="$LIBXL_LIBS -lxenlight -lxenstore -lxenctrl -lxenguest -luuid -lutil -lblktapctl"
-    ],[
+        ],[
         if test "$with_libxl" = "yes"; then
             fail=1
         fi