[glib] Turn on libmount by default on linux



commit 496cd8aac640203808dc1b9a8d125d97a79cfb15
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Wed Sep 14 11:35:43 2016 -0400

    Turn on libmount by default on linux
    
    The libmount code produces somewhat different results than the older
    Linux code that would parse /proc/mounts; for example, bind mounts
    appear in the libmount output. To try and get as many GLib users
    as possible to have the same behavior, on Linux, make GLib error out
    on missing libmount unless --disable-libmount is passed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771438

 configure.ac |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 91699b4..1bd1293 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1733,11 +1733,15 @@ fi
 dnl ************************
 dnl *** check for libmount ***
 dnl ************************
+
+dnl The fallback code doesn't really implement the same behaviors - e.g.
+dnl so on linux we want to require libmount unless specifically disabled
+dnl
+enable_libmount_default=${glib_os_linux:-no}
 AC_ARG_ENABLE(libmount,
               [AS_HELP_STRING([--enable-libmount],
-                              [build with libmount support [default=no]])],,
-              [enable_libmount=no])
-
+                              [build with libmount support [default for Linux]])],,
+              [enable_libmount=$enable_libmount_default])
 AS_IF([ test "x$enable_libmount" = "xyes"],[
 PKG_CHECK_MODULES([LIBMOUNT], [mount >= 2.28], [have_libmount=yes], [have_libmount=maybe])
 AS_IF([ test $have_libmount = maybe ], [
@@ -1750,6 +1754,9 @@ AS_IF([ test $have_libmount = maybe ], [
     have_libmount=yes
   fi
 ])
+if test $have_libmount = no ; then
+   AC_MSG_ERROR([*** Could not find libmount])
+fi
 ])
 
 if test x$have_libmount = xyes; then


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]