]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Xen Inotify support needs sys/inotify.h
authorMaximilian Wilhelm <max@rfc2324.org>
Wed, 5 Aug 2009 08:57:40 +0000 (10:57 +0200)
committerDaniel Veillard <veillard@redhat.com>
Wed, 5 Aug 2009 08:57:40 +0000 (10:57 +0200)
* configure.in: to activate Xen Inotify checking we need to check for
  sys/inotify.h availability

configure.in

index 64244f3aadcd06c0c00ac10a8bb3ba76d8d925a8..a8daef078b1944d4f4a003ae3822dfdb9b41369e 100644 (file)
@@ -180,7 +180,7 @@ dnl Allow to build without Xen, QEMU/KVM, test or remote driver
 AC_ARG_WITH([xen],
 [  --with-xen              add XEN support (on)],[],[with_xen=yes])
 AC_ARG_WITH([xen-inotify],
-[  --with-xen-inotify      add XEN inotify support (on)],[],[with_xen_inotify=yes])
+[  --with-xen-inotify      add XEN inotify support (on)],[],[with_xen_inotify=check])
 AC_ARG_WITH([qemu],
 [  --with-qemu             add QEMU/KVM support (on)],[],[with_qemu=yes])
 AC_ARG_WITH([uml],
@@ -409,7 +409,16 @@ if test "$with_xen" != "yes"; then
     with_xen_inotify=no
 fi
 if test "$with_xen_inotify" != "no"; then
-    AC_CHECK_HEADER([linux/inotify.h],[],[with_xen_inotify=no])
+    AC_CHECK_HEADER([sys/inotify.h], [
+        with_xen_inotify=yes
+    ], [
+        if test "$with_xen_inotify" = "check"; then
+            with_xen_inotify=no
+            AC_MSG_NOTICE([Header file <sys/inotify.h> is required for Xen Inotify support, disabling it])
+        else
+            AC_MSG_ERROR([Header file <sys/inotify.h> is required for Xen Inotify support!])
+        fi
+    0])
 fi
 if test "$with_xen_inotify" = "yes"; then
     AC_DEFINE_UNQUOTED([WITH_XEN_INOTIFY], 1,[whether Xen inotify sub-driver is enabled])