]> xenbits.xensource.com Git - libvirt.git/commitdiff
configure: Disable FS storage driver if mntent.h is not available
authorMatthias Bolte <matthias.bolte@googlemail.com>
Sat, 13 Nov 2010 11:33:44 +0000 (12:33 +0100)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Sun, 14 Nov 2010 21:21:26 +0000 (22:21 +0100)
This is the case on FreeBSD.

configure.ac

index 66237e10daa79ec2f32d21a3f15616d346eee1ab..d21d558a70f9dbb6803f2160c250f8753d93673e 100644 (file)
@@ -1496,6 +1496,18 @@ if test "$with_osx" = "yes"; then
   with_storage_fs=no
 fi
 
+if test "$with_storage_fs" = "yes" || test "$with_storage_fs" = "check"; then
+    AC_CHECK_HEADER([mntent.h],,
+    [
+        if test "$with_storage_fs" = "check"; then
+            with_storage_fs=no
+            AC_MSG_NOTICE([<mntent.h> is required for the FS storage driver, disabling it])
+        else
+            AC_MSG_ERROR([<mntent.h> is required for the FS storage driver])
+        fi
+    ])
+fi
+
 if test "$with_storage_fs" = "yes" || test "$with_storage_fs" = "check"; then
   AC_PATH_PROG([MOUNT], [mount], [], [$PATH:/sbin:/usr/sbin])
   AC_PATH_PROG([UMOUNT], [umount], [], [$PATH:/sbin:/usr/sbin])