[glib/glib-2-58: 52/55] Autotools: Move libmount from Libs.private to Requires.private



commit 55b17dccfccfe0420d91e3c421c524e0fed812fb
Author: Simon McVittie <smcv collabora com>
Date:   Wed Sep 26 10:07:34 2018 +0100

    Autotools: Move libmount from Libs.private to Requires.private
    
    libmount depends on libblkid, so if we statically link a trivial
    executable to GIO, we need to pull in both libmount and libblkid.
    Linking with -lmount is not enough to achieve that, but recursing
    into mount.pc is.
    
    This makes the Autotools build a bit more like the Meson build,
    which already puts mount in Requires.private.
    
    Signed-off-by: Simon McVittie <smcv collabora com>

 configure.ac  | 4 ++++
 gio-2.0.pc.in | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 206169320..5a1cab287 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1787,9 +1787,13 @@ fi
 ])
 
 if test x$have_libmount = xyes; then
+  LIBMOUNT_REQUIRES="mount >= 2.23"
   AC_DEFINE(HAVE_LIBMOUNT, 1, [Define if libmount is available])
+else
+  LIBMOUNT_REQUIRES=""
 fi
 AM_CONDITIONAL(HAVE_LIBMOUNT, [test x$have_libmount = xyes])
+AC_SUBST([LIBMOUNT_REQUIRES])
 
 dnl ****************************************
 dnl *** platform dependent source checks ***
diff --git a/gio-2.0.pc.in b/gio-2.0.pc.in
index afd3a40a6..d67e80839 100644
--- a/gio-2.0.pc.in
+++ b/gio-2.0.pc.in
@@ -15,7 +15,7 @@ Name: GIO
 Description: glib I/O library
 Version: @VERSION@
 Requires: glib-2.0 gobject-2.0
-Requires.private: gmodule-no-export-2.0
+Requires.private: gmodule-no-export-2.0 @LIBMOUNT_REQUIRES@
 Libs: -L${libdir} -lgio-2.0
-Libs.private: @ZLIB_LIBS@ @NETWORK_LIBS@ @SELINUX_LIBS@ @COCOA_LIBS@ @CARBON_LIBS@ @LIBMOUNT_LIBS@
+Libs.private: @ZLIB_LIBS@ @NETWORK_LIBS@ @SELINUX_LIBS@ @COCOA_LIBS@ @CARBON_LIBS@
 Cflags:


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