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
This commit is contained in:
Owen W. Taylor 2016-09-14 11:35:43 -04:00 committed by Matthias Clasen
parent 063e279a56
commit 496cd8aac6

View File

@ -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