Check for a recent enough libmount

We need mnt_unref_table() in order to use libmount, but we also need to
keep the fallback code for installations of libmount without a
pkg-config file.

https://bugzilla.gnome.org/show_bug.cgi?id=782628
This commit is contained in:
Emmanuele Bassi 2017-05-14 20:33:00 +01:00
parent 9ba17d511e
commit 5faaaac92c

View File

@ -1755,6 +1755,9 @@ PKG_CHECK_MODULES([LIBMOUNT], [mount >= 2.28], [have_libmount=yes], [have_libmou
AS_IF([ test $have_libmount = maybe ], [
glib_save_LIBS=$LIBS
AC_CHECK_HEADER([libmount/libmount.h], [:], [have_libmount=no])
# Check for a recent enough libmount
AC_CHECK_LIB([mount], [mnt_unref_table], [:], [have_libmount=no])
LIBS=$glib_save_LIBS
if test $have_libmount != no; then