2003-02-27 Alexander Larsson <alexl@redhat.com>
authorAlexander Larsson <alexl@redhat.com>
Thu, 27 Feb 2003 14:22:36 +0000 (14:22 +0000)
committerAlexander Larsson <alexl@redhat.com>
Thu, 27 Feb 2003 14:22:36 +0000 (14:22 +0000)
* glib/Makefile.am:
* configure.in:
Make gthreads-2.0 dependency optional. Don't build thread test if
its not found.

ChangeLog
configure.in
glib/Makefile.am

index 7061761..f533891 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-02-27  Alexander Larsson  <alexl@redhat.com>
+
+       * glib/Makefile.am: 
+       * configure.in:
+       Make gthreads-2.0 dependency optional. Don't build thread test if
+       its not found.
+
 2003-02-27  Havoc Pennington  <hp@pobox.com>
 
        * dbus/dbus-connection.c
index 281da37..9b969ba 100644 (file)
@@ -218,7 +218,7 @@ AC_SUBST(DBUS_TEST_LIBS)
 
 # Glib detection
 PKG_CHECK_MODULES(DBUS_GLIB, glib-2.0, have_glib=yes, have_glib=no)
-PKG_CHECK_MODULES(DBUS_GLIB_THREADS, glib-2.0 gthread-2.0)
+PKG_CHECK_MODULES(DBUS_GLIB_THREADS, glib-2.0 gthread-2.0, have_glib_threads=yes, have_glib_threads=no)
 
 if test x$have_glib = xno ; then
     AC_MSG_WARN([GLib development libraries not found])
@@ -235,6 +235,7 @@ if test x$enable_glib = xno; then
 fi
 
 AM_CONDITIONAL(HAVE_GLIB, test x$have_glib = xyes)
+AM_CONDITIONAL(HAVE_GLIB_THREADS, test x$have_glib_threads = xyes)
 
 dnl GLib flags
 AC_SUBST(DBUS_GLIB_CFLAGS)
index 63d2edb..d9edf6f 100644 (file)
@@ -16,13 +16,18 @@ libdbus_glib_1_la_LIBADD= $(DBUS_GLIB_LIBS) $(top_builddir)/dbus/libdbus-1.la
 
 if DBUS_BUILD_TESTS
 
-noinst_PROGRAMS= test-dbus-glib test-thread-server test-thread-client
+if HAVE_GLIB_THREADS
+    THREAD_APPS=test-thread-server test-thread-client
+endif
+
+noinst_PROGRAMS= test-dbus-glib $(THREAD_APPS)
 
 test_dbus_glib_SOURCES=                                \
        test-dbus-glib.c
 
 test_dbus_glib_LDADD= $(top_builddir)/glib/libdbus-glib-1.la
 
+if HAVE_GLIB_THREADS
 test_thread_server_SOURCES=                            \
        test-thread-server.c                            \
        test-thread.h
@@ -34,5 +39,6 @@ test_thread_client_SOURCES=                           \
        test-thread.h
 
 test_thread_client_LDADD= $(DBUS_GLIB_THREADS_LIBS) $(top_builddir)/glib/libdbus-glib-1.la 
+endif
 
 endif