[patch/7] fix build failure with glib-2.0 2.31.x

Matthias Klose doko at ubuntu.com
Wed Feb 22 05:33:00 PST 2012


Recent glib-2.0/gtk-2.0 don't add -lgthread to the linker flags anymore. the 
gthread-2.0 module has to be checked explicitly (g_thread_init is not found). 
The gthread-2.0 module is available for some years, and should be available in 
all distros.

Checked that a 2.1 build does succeed.

   Matthias
-------------- next part --------------
diff -r 47858baedb86 acinclude.m4
--- a/acinclude.m4	Thu Feb 16 14:52:54 2012 +0100
+++ b/acinclude.m4	Wed Feb 22 14:14:52 2012 +0100
@@ -2011,7 +2011,7 @@
   AC_MSG_RESULT(${ENABLE_SYSTEM_GTK})
   if test x"${ENABLE_SYSTEM_GTK}" = "xyes"; then
     dnl Check for Gtk+ headers and libraries.
-    PKG_CHECK_MODULES(GTK, gtk+-2.0,[GTK_FOUND=yes],[GTK_FOUND=no])
+    PKG_CHECK_MODULES(GTK, gtk+-2.0 gthread-2.0,[GTK_FOUND=yes],[GTK_FOUND=no])
     if test "x${GTK_FOUND}" = xno
     then
       AC_MSG_ERROR([Could not find Gtk+; install Gtk+ or build with --disable-system-gtk to use the in-tree headers.])


More information about the distro-pkg-dev mailing list