[PATCH 3/3] build: link gthread-2.0 to wc-test



Since glib 2.31 g_thread_init() was exported in libgthread-2.0.so, so we need
to link to it. In further versions of glib we shall remove it since it is
already deprecated.

More info:

http://developer.gnome.org/glib/2.31/glib-Deprecated-Thread-APIs.html#g-thread-init
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez igalia com>
---
 configure.ac         |    3 +++
 libs/net/Makefile.am |    6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7d7b4c5..47d5973 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,6 +120,9 @@ PKG_CHECK_MODULES(NET, libsoup-2.4,
 PKG_CHECK_EXISTS([libsoup-2.4 >= 2.33.4],
 		 [HAVE_CACHED_LIBSOUP=yes],
 		 [HAVE_CACHED_LIBSOUP=no])
+
+PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
+
 AC_ARG_ENABLE([grl_net],
         AS_HELP_STRING([--enable-grl-net],
                 [Enable Grilo Net library (default: auto)]),
diff --git a/libs/net/Makefile.am b/libs/net/Makefile.am
index 7aa853e..505066d 100644
--- a/libs/net/Makefile.am
+++ b/libs/net/Makefile.am
@@ -44,12 +44,14 @@ libgrlnet_@GRL_MAJORMINOR@include_HEADERS =	\
 wc_test_SOURCES = 	\
 	wc-test.c
 
-wc_test_CFLAGS = 	\
-	$(DEPS_CFLAGS)	\
+wc_test_CFLAGS = 		\
+	$(DEPS_CFLAGS)		\
+	$(GTHREAD_CFLAGS)	\
 	-D_GNU_SOURCE
 
 wc_test_LDADD =				\
 	libgrlnet-@GRL_MAJORMINOR@.la	\
+	$(GTHREAD_LIBS)			\
 	$(DEPS_LIBS)
 
 MAINTAINERCLEANFILES =	\
-- 
1.7.7.1



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