[test] Always initialize gthread such that our mutex() stuff is tested
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 10 May 2011 23:11:27 +0000 (19:11 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 10 May 2011 23:11:52 +0000 (19:11 -0400)
Now the test/object test deadlocks as expected.  Fix coming.

configure.ac
test/Makefile.am
test/hb-test.h

index 2eb6c11..96dbca5 100644 (file)
@@ -58,6 +58,7 @@ fi
 dnl ==========================================================================
 
 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, have_glib=true, have_glib=false)
+PKG_CHECK_MODULES(GTHREAD, gthread-2.0, , have_glib=false)
 if $have_glib; then
        AC_DEFINE(HAVE_GLIB, 1, [Have glib2 library])
 fi
index cc4519c..e58a91a 100644 (file)
@@ -3,8 +3,8 @@ include Makefile.decl
 NULL =
 
 if HAVE_GLIB
-AM_CPPFLAGS = -I$(top_srcdir)/src/ $(GLIB_CFLAGS)
-LDADD = $(top_builddir)/src/libharfbuzz.la $(GLIB_LIBS)
+AM_CPPFLAGS = -I$(top_srcdir)/src/ $(GLIB_CFLAGS) $(GTHREAD_CFLAGS)
+LDADD = $(top_builddir)/src/libharfbuzz.la $(GLIB_LIBS) $(GTHREAD_LIBS)
 
 EXTRA_DIST += hb-test.h
 
index 5f72a05..938b700 100644 (file)
@@ -54,6 +54,7 @@ HB_BEGIN_DECLS
 static inline void
 hb_test_init (int *argc, char ***argv)
 {
+  g_thread_init (NULL);
   g_test_init (argc, argv, NULL);
 }