mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Added autotools support for libmount
Check whether libmount is available at configuration time and provide an option to explicitly enable or disable it, similar to libelf. https://bugzilla.gnome.org/show_bug.cgi?id=522053
This commit is contained in:
parent
496c52ec79
commit
4f9cddaeb8
24
configure.ac
24
configure.ac
@ -1730,6 +1730,30 @@ if test x$have_libelf = xyes; then
|
||||
AC_DEFINE(HAVE_LIBELF, 1, [Define if libelf is available])
|
||||
fi
|
||||
|
||||
dnl ************************
|
||||
dnl *** check for libmount ***
|
||||
dnl ************************
|
||||
AC_ARG_ENABLE(mount,
|
||||
AS_HELP_STRING([--disable-libmount], [build without libmount support]))
|
||||
AS_IF([ test "x$enable_libmount" != "xno"],[
|
||||
PKG_CHECK_MODULES([LIBMOUNT], [mount >= 2.28], [have_libmount=yes], [have_libmount=maybe])
|
||||
AS_IF([ test $have_libmount = maybe ], [
|
||||
glib_save_LIBS=$LIBS
|
||||
AC_CHECK_HEADER([libmount/libmount.h], [:], [have_libmount=no])
|
||||
LIBS=$glib_save_LIBS
|
||||
|
||||
if test $have_libmount != no; then
|
||||
LIBMOUNT_LIBS=-lmount
|
||||
have_libmount=yes
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
if test x$have_libmount = xyes; then
|
||||
AC_DEFINE(HAVE_LIBMOUNT, 1, [Define if libmount is available])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_LIBMOUNT, [test x$have_libmount = xyes])
|
||||
|
||||
dnl ****************************************
|
||||
dnl *** platform dependent source checks ***
|
||||
dnl ****************************************
|
||||
|
@ -586,6 +586,11 @@ libgio_2_0_la_CFLAGS += -xobjective-c
|
||||
libgio_2_0_la_LDFLAGS += -Wl,-framework,Foundation -Wl,-framework,AppKit
|
||||
endif
|
||||
|
||||
if HAVE_LIBMOUNT
|
||||
libgio_2_0_la_CFLAGS += $(LIBMOUNT_CFLAGS)
|
||||
libgio_2_0_la_LIBADD += $(LIBMOUNT_LIBS)
|
||||
endif
|
||||
|
||||
libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
|
||||
|
||||
gio-win32-res.o: gio.rc
|
||||
|
Loading…
Reference in New Issue
Block a user