]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Thu Jul 19 16:35:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 19 Jul 2007 15:37:54 +0000 (15:37 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 19 Jul 2007 15:37:54 +0000 (15:37 +0000)
        * configure.in, src/xen_internal.c: Newer Xen uses
          <xen/sys/privcmd.h>.  Added detection code for this in
          configure.in.

ChangeLog
configure.in
src/xen_internal.c

index 6476171e78ae7ac9985ca52409b94be3c6da6b80..884f4699b527e3fe1768aef9c0ecbf3b0ac955be 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Jul 19 16:35:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
+
+       * configure.in, src/xen_internal.c: Newer Xen uses
+         <xen/sys/privcmd.h>.  Added detection code for this in
+         configure.in.
+
 Thu Jul 19 15:38:44 CEST 2007 Daniel Veillard <veillard@redhat.com>
 
        * src/xen_internal.c: rewrite of range check in credit scheduler
index 7ceebe1fe438e17cafea40eef699bd51aba835e9..78a772c3c40dfb5d28301453eb6c8b0892ab11e2 100644 (file)
@@ -212,6 +212,28 @@ else
     if test "$WITH_XEN" != "0" ; then
         LIBVIRT_FEATURES="$LIBVIRT_FEATURES -DWITH_XEN"
     fi
+
+    AC_CHECK_HEADERS(xen/xen.h xen/version.h xen/dom0_ops.h,,[
+       AC_MSG_ERROR([Cannot find standard Xen headers. Is xen-devel installed?])
+    ],
+[#include <stdio.h>
+#include <stdint.h>
+])
+
+    dnl Search for the location of <xen/{linux,sys}/privcmd.h>.
+    AC_CHECK_HEADERS(xen/sys/privcmd.h,,[
+       AC_CHECK_HEADERS(xen/linux/privcmd.h,,[
+           AC_MSG_ERROR([Cannot find header file <xen/linux/privcmd.h> or <xen/sys/privcmd.h>.  Is xen-devel installed?])
+       ],
+[#include <stdio.h>
+#include <stdint.h>
+#include <xen/xen.h>
+])
+    ],
+[#include <stdio.h>
+#include <stdint.h>
+#include <xen/xen.h>
+])
 fi
 
 dnl
index f3bbf812bb7f1fdf3efeec374303f1a1ee47317d..94c1dc2a75a0015df665236c869eebddcf022338 100644 (file)
@@ -10,6 +10,8 @@
 
 #ifdef WITH_XEN
 
+#include "config.h"
+
 #include <stdio.h>
 #include <string.h>
 /* required for uint8_t, uint32_t, etc ... */
 #include <xen/dom0_ops.h>
 #include <xen/version.h>
 #include <xen/xen.h>
+#ifdef HAVE_XEN_LINUX_PRIVCMD_H
 #include <xen/linux/privcmd.h>
+#else
+#ifdef HAVE_XEN_SYS_PRIVCMD_H
+#include <xen/sys/privcmd.h>
+#endif
+#endif
 
 /* required for shutdown flags */
 #include <xen/sched.h>