]> git.draconx.ca Git - upkg.git/blobdiff - m4/glib.m4
package: Get rid of separate mechanisms for opening packages.
[upkg.git] / m4 / glib.m4
index 261c5fd6a2d97fb022cc38304ad46854bcdf6036..9d90f6f301f79a8c4609eae4e9ff88237b6e8994 100644 (file)
@@ -1,3 +1,9 @@
+dnl Copyright (C) 2009 Nick Bowler
+dnl Copying and distribution of this file, with or without modification,
+dnl are permitted in any medium without royalty provided the copyright
+dnl notice and this notice are preserved.  This file is offered as-is,
+dnl without any warranty.
+
 dnl _GLIB_TRY_VERSION(min-version)
 AC_DEFUN([_GLIB_TRY_VERSION], [dnl
 sedhead='s/@<:@0-9@:>@@<:@0-9@:>@*/<<<&>>>/'
@@ -37,6 +43,12 @@ g_type_init();
 ])
 ])
 
+ifelse([$1], [gthread], [dnl
+       m4_append([_GLIB_MAIN], [dnl
+g_thread_init(NULL);
+])
+])
+
 if test x"$PKG_CONFIG" != x; then
        AC_MSG_CHECKING([pkg-config database for $1-2.0])
        _PKG_CONFIG([lib$1_cflags], [cflags], [$1-2.0])
@@ -75,6 +87,7 @@ GLIB_LIBS=
 
 _GLIB_MODULE([glib], [glib])
 _GLIB_MODULE([gobject], [$2])
+_GLIB_MODULE([gthread], [$2])
 
 AC_LANG_PUSH([C])
 old_cflags=$CFLAGS