[libvirt] [PATCH] configure: Disable FS storage driver if mntent.h is not available

This is the case on FreeBSD. --- configure.ac | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 66237e1..d21d558 100644 --- a/configure.ac +++ b/configure.ac @@ -1497,6 +1497,18 @@ if test "$with_osx" = "yes"; then 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]) if test "$with_storage_fs" = "yes" ; then -- 1.7.0.4

On 11/13/2010 08:52 AM, Matthias Bolte wrote:
This is the case on FreeBSD. --- configure.ac | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac index 66237e1..d21d558 100644 --- a/configure.ac +++ b/configure.ac @@ -1497,6 +1497,18 @@ if test "$with_osx" = "yes"; then 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
ACK. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

2010/11/13 Eric Blake <eblake@redhat.com>:
On 11/13/2010 08:52 AM, Matthias Bolte wrote:
This is the case on FreeBSD. --- configure.ac | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac index 66237e1..d21d558 100644 --- a/configure.ac +++ b/configure.ac @@ -1497,6 +1497,18 @@ if test "$with_osx" = "yes"; then 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
ACK.
Thanks, pushed. Matthias
participants (2)
-
Eric Blake
-
Matthias Bolte