diff options
author | Hans Petter Jansson <hpj@cl.no> | 2013-02-26 02:43:37 +0100 |
---|---|---|
committer | Bertrand Lorentz <bertrand.lorentz@gmail.com> | 2013-04-07 15:23:38 +0200 |
commit | f9b90f3e50122d86b9fbb07072b7c1e8feef6c09 (patch) | |
tree | f427732d388fb38ec6369888b2b3e0006e60a6d6 /build/m4 | |
parent | ac6c2f49ca8fb0554e5f35a920be4e9eeba17819 (diff) |
Avoid race when using GConf and DBus with threads (bgo#692374)
GConf causes us to make indirect calls to libdbus from multiple threads,
resulting in crashes if threads are not initialized explictly. As a
workaround, we initialize dbus-glib for multithreading.
This fixes adds an optional build-time dependency on dbus-glib, and will
only be enabled if that dependency is satisfied.
Some distros have addressed this issue by patching the underlying
llibraries (gconf or gconf-sharp), so they don't have to enable that
fix. But it should not conflict with those patches, as
dbus_g_thread_init can be called multiple time, contrary to what the
API documentation says.
Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
Diffstat (limited to 'build/m4')
-rw-r--r-- | build/m4/banshee/gconf.m4 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/build/m4/banshee/gconf.m4 b/build/m4/banshee/gconf.m4 index 16239dbcd..fbf1ce679 100644 --- a/build/m4/banshee/gconf.m4 +++ b/build/m4/banshee/gconf.m4 @@ -9,4 +9,12 @@ AC_DEFUN([BANSHEE_CHECK_GCONF], m4_pattern_allow([AM_GCONF_SOURCE_2]) AM_GCONF_SOURCE_2 + + # dbus-glib is needed for the workaround for bgo#692374 + PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.80, have_dbus_glib="yes", have_dbus_glib="no") + if test "x$have_dbus_glib" = "xyes"; then + AM_CONDITIONAL(HAVE_DBUS_GLIB, true) + else + AM_CONDITIONAL(HAVE_DBUS_GLIB, false) + fi ]) |