The main loop switching code will result in a hang in dbus-glib 0.88 and
earlier because of FDO#30574, so added a configure check to warn and disable
p2p for older dbus-glib versions.
$(ATK_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/atk-adaptor/adaptors \
$(ATK_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/atk-adaptor/adaptors \
libatk_bridge_la_LDFLAGS = -no-undefined \
-module \
libatk_bridge_la_LDFLAGS = -no-undefined \
-module \
$(ATK_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/atk-adaptor \
$(ATK_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/atk-adaptor \
libatk_bridge_adaptors_la_LIBADD =\
$(DBUS_GLIB_LIBS) \
libatk_bridge_adaptors_la_LIBADD =\
$(DBUS_GLIB_LIBS) \
/* make sure the directory exists */
mkdir("/tmp/at-spi2/", S_IRWXU);
app->app_bus_addr = g_malloc(max_addr_length * sizeof(char));
/* make sure the directory exists */
mkdir("/tmp/at-spi2/", S_IRWXU);
app->app_bus_addr = g_malloc(max_addr_length * sizeof(char));
sprintf(app->app_bus_addr, "unix:path=/tmp/at-spi2/socket-%d-%d", getpid(),
rand());
sprintf(app->app_bus_addr, "unix:path=/tmp/at-spi2/socket-%d-%d", getpid(),
rand());
static int
setup_bus (void)
{
static int
setup_bus (void)
{
DBusServer *server;
DBusError err;
DBusServer *server;
DBusError err;
dbus_server_set_new_connection_function(server, new_connection_cb, NULL, NULL);
spi_global_app_data->server = server;
dbus_server_set_new_connection_function(server, new_connection_cb, NULL, NULL);
spi_global_app_data->server = server;
static void
switch_main_context (GMainContext *cnx)
{
static void
switch_main_context (GMainContext *cnx)
{
+#ifndef DISABLE_P2P
+/* This code won't work on dbus-glib earlier than 0.9.0 because of FDO#30574 */
GList *list;
dbus_server_setup_with_g_main (spi_global_app_data->server, cnx);
dbus_connection_setup_with_g_main (spi_global_app_data->bus, cnx);
for (list = spi_global_app_data->direct_connections; list; list = list->next)
dbus_connection_setup_with_g_main (list->data, cnx);
GList *list;
dbus_server_setup_with_g_main (spi_global_app_data->server, cnx);
dbus_connection_setup_with_g_main (spi_global_app_data->bus, cnx);
for (list = spi_global_app_data->direct_connections; list; list = list->next)
dbus_connection_setup_with_g_main (list->data, cnx);
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_CFLAGS)
-PKG_CHECK_MODULES(DBUS_GLIB, [dbus-glib-1 >= 0.7.0])
+PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.90, dbus_glib=yes, dbus_glib=no)
+if test "x$dbus_glib" = "xno"; then
+ PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.7.0, dbus_glib_old=yes)
+fi
AC_SUBST(DBUS_GLIB_LIBS)
AC_SUBST(DBUS_GLIB_CFLAGS)
AC_SUBST(DBUS_GLIB_LIBS)
AC_SUBST(DBUS_GLIB_CFLAGS)
DBIND_CHECK_ALIGNOF(dbind_struct)
CPPFLAGS=$orig_CPPFLAGS
DBIND_CHECK_ALIGNOF(dbind_struct)
CPPFLAGS=$orig_CPPFLAGS
+if test "x$dbus_glib_old" = "xyes"; then
+ P2P_CFLAGS=-DDISABLE_P2P
+ AC_MSG_WARN([found dbus-glib older than 0.9.0; disabling peer-to-peer support])
+fi
+AC_SUBST(P2P_CFLAGS)
+
AC_CONFIG_FILES([Makefile
dbind/dbind-config.h
dbind/Makefile
AC_CONFIG_FILES([Makefile
dbind/dbind-config.h
dbind/Makefile
libdroute_la_CFLAGS = $(DBUS_GLIB_CFLAGS) \
-I$(top_builddir)\
libdroute_la_CFLAGS = $(DBUS_GLIB_CFLAGS) \
-I$(top_builddir)\
- -I$(top_srcdir) \
- -DG_DISABLE_DEPRECATED
libdroute_la_SOURCES =\
droute.c\
libdroute_la_SOURCES =\
droute.c\
droute_test_SOURCES = droute-test.c
droute_test_CFLAGS = $(DBUS_GLIB_CFLAGS) \
-I$(top_builddir)\
droute_test_SOURCES = droute-test.c
droute_test_CFLAGS = $(DBUS_GLIB_CFLAGS) \
-I$(top_builddir)\
- -I$(top_srcdir) \
- -DG_DISABLE_DEPRECATED
droute_test_LDFLAGS = $(top_builddir)/dbind/libdbind.la\
libdroute.la\
droute_test_LDFLAGS = $(top_builddir)/dbind/libdbind.la\
libdroute.la\