From 5377c0de0108d292ea3e23fa6d90410f9ac9fa00 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 15 Jan 2012 22:15:10 -0500 Subject: [PATCH] Beef up Libs.private in glib-2.0.pc This should help getting static builds working on mingw. Based on a patch by Volker Grabsch, bug 619126. At the same time, drop the unnecessary GLIB_RT_LIBS variable; we are already adding -lrt to G_THREAD_LIBS. --- configure.ac | 4 +--- gio-2.0.pc.in | 2 +- glib-2.0.pc.in | 2 +- glib/Makefile.am | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 2225520f2..4b13eac58 100644 --- a/configure.ac +++ b/configure.ac @@ -2286,10 +2286,8 @@ AC_CHECK_FUNCS(clock_gettime, [], [ AC_DEFINE(HAVE_CLOCK_GETTIME, 1) G_THREAD_LIBS="$G_THREAD_LIBS -lrt" G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS_FOR_GTHREAD -lrt" - GLIB_RT_LIBS="-lrt" ]) ]) -AC_SUBST(GLIB_RT_LIBS) dnl ************************ @@ -2526,7 +2524,7 @@ case $host in G_LIBS_EXTRA="-luser32 -lkernel32" ;; *-*-mingw*) - G_LIBS_EXTRA="-lws2_32 -lole32 -lwinmm" + G_LIBS_EXTRA="-lws2_32 -lole32 -lwinmm -lshlwapi" ;; *) G_LIBS_EXTRA="" diff --git a/gio-2.0.pc.in b/gio-2.0.pc.in index 78dabf3ef..6a706742f 100644 --- a/gio-2.0.pc.in +++ b/gio-2.0.pc.in @@ -10,7 +10,7 @@ glib_compile_resources=@bindir@/glib-compile-resources@EXEEXT@ Name: GIO Description: glib I/O library Version: @VERSION@ -Requires: glib-2.0,gobject-2.0 +Requires: glib-2.0 gobject-2.0 Requires.private: gmodule-no-export-2.0 Libs: -L${libdir} -lgio-2.0 Libs.private: @ZLIB_LIBS@ @NETWORK_LIBS@ diff --git a/glib-2.0.pc.in b/glib-2.0.pc.in index 2e638f6ca..4a8898e66 100644 --- a/glib-2.0.pc.in +++ b/glib-2.0.pc.in @@ -12,5 +12,5 @@ Description: C Utility Library Version: @VERSION@ Requires.private: @PCRE_REQUIRES@ Libs: -L${libdir} -lglib-2.0 @INTLLIBS@ -Libs.private: @ICONV_LIBS@ @GLIB_RT_LIBS@ +Libs.private: @G_THREAD_LIBS@ @G_LIBS_EXTRA@ @PCRE_LIBS@ @INTLLIBS@ @ICONV_LIBS@ Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include @GLIB_EXTRA_CFLAGS@ diff --git a/glib/Makefile.am b/glib/Makefile.am index 1b427c30e..c6aa2b93f 100644 --- a/glib/Makefile.am +++ b/glib/Makefile.am @@ -380,7 +380,7 @@ pcre_lib = pcre_inc = endif -libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib) $(GLIB_RT_LIBS) $(G_THREAD_LIBS_EXTRA) $(G_THREAD_LIBS_FOR_GTHREAD) +libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib) $(G_THREAD_LIBS_EXTRA) $(G_THREAD_LIBS_FOR_GTHREAD) libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def) libglib_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \