]> Pileus Git - ~andy/gtk/commitdiff
build: Add --without-atk-bridge, only check for it on X11 platforms
authorColin Walters <walters@verbum.org>
Fri, 22 Jun 2012 17:29:03 +0000 (13:29 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 23 Jun 2012 03:49:24 +0000 (23:49 -0400)
Some builders using gtk3 outside of the GNOME cycle want an option to
avoid linking to atk-bridge-2.0.  Provide that, and at the same time
ensure we're only looking for it on X11 platforms.

https://bugzilla.gnome.org/show_bug.cgi?id=677491

configure.ac
gtk/a11y/gail.c

index f390430c957d6276a107e0959803892e02fba704..67e9ae5162d19bf3773b56c92b0954d2779d0bed 100644 (file)
@@ -1278,11 +1278,21 @@ AC_SUBST(GDK_DEP_CFLAGS)
 # Check for Accessibility Toolkit flags
 ########################################
 
-ATK_PACKAGES="atk atk-bridge-2.0"
+AC_ARG_WITH(atk-bridge,
+           AS_HELP_STRING([--without-atk-bridge], [Do not use atk-bridge-2.0]),
+           :, with_atk_bridge=$enable_x11_backend)
+
+if test x$with_atk_bridge != xno; then
+   ATK_PACKAGES="atk atk-bridge-2.0"
+   AC_DEFINE([HAVE_ATK_BRIDGE], [1], [Define if we're using atk-bridge-2.0])
+else
+   ATK_PACKAGES="atk"
+fi
+
 PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
 
 GTK_PACKAGES="atk cairo cairo-gobject gdk-pixbuf-2.0 gio-2.0"
-GTK_PRIVATE_PACKAGES="atk-bridge-2.0"
+GTK_PRIVATE_PACKAGES="$ATK_PACKAGES"
 if test "x$enable_x11_backend" = xyes; then
   GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2"
 fi
index ed5d19075f0bb4444d9b3d7d90ece9c69b4f2455..4f5028b040192861fc0167d437245e2c6658fdee 100644 (file)
@@ -33,7 +33,9 @@
 #include "gailutil.h"
 #include "gailmisc.h"
 
+#ifdef HAVE_ATK_BRIDGE
 #include <atk-bridge.h>
+#endif
 
 static gboolean gail_focus_watcher      (GSignalInvocationHint *ihint,
                                          guint                  n_param_values,
@@ -807,7 +809,9 @@ _gtk_accessibility_init (void)
   focus_tracker_id = atk_add_focus_tracker (gail_focus_tracker);
 
   _gail_util_install ();
+#ifdef HAVE_ATK_BRIDGE
   atk_bridge_adaptor_init (NULL, NULL);
+#endif
 
   atk_misc_instance = g_object_new (GAIL_TYPE_MISC, NULL);
 }