[gtk+] build: Add --without-atk-bridge, only check for it on X11 platforms



commit 71e0e72c69260b7ddcf91c76cb80ff27705832db
Author: Colin Walters <walters verbum org>
Date:   Fri Jun 22 13:29:03 2012 -0400

    build: Add --without-atk-bridge, only check for it on X11 platforms
    
    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    |   14 ++++++++++++--
 gtk/a11y/gail.c |    4 ++++
 2 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f390430..67e9ae5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/gtk/a11y/gail.c b/gtk/a11y/gail.c
index ed5d190..4f5028b 100644
--- a/gtk/a11y/gail.c
+++ b/gtk/a11y/gail.c
@@ -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);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]