From beccc6ec73af048833f1b95b4b7e6e29cfabce13 Mon Sep 17 00:00:00 2001 From: Willie Walker Date: Fri, 6 Nov 2009 12:39:35 -0500 Subject: [PATCH] Add --enable-relocate option This option is similar to what we did for AT-SPI/CORBA. The default value is to not enable relocation. If enabled, however, the atk-bridge module is relocated and a *.desktop file is installed to initialize GTK_PATH in gnome-session so the new module can be found by GTK+. --- atk-adaptor/Makefile.am | 6 +++++- atk-adaptor/atk-bridge.desktop.in | 2 +- configure.ac | 11 ++++------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/atk-adaptor/Makefile.am b/atk-adaptor/Makefile.am index d21176b..5d89a2d 100644 --- a/atk-adaptor/Makefile.am +++ b/atk-adaptor/Makefile.am @@ -1,4 +1,8 @@ -gtkmoduledir = $(libdir)/$(GTK_MODULE_DIR) +if RELOCATE + gtkmoduledir = $(libdir)/gtk-2.0/modules/at-spi-dbus/modules +else + gtkmoduledir = $(libdir)/gtk-2.0/modules +endif gtkmodule_LTLIBRARIES = libatk-bridge.la libatk_bridge_la_CFLAGS = $(DBUS_GLIB_CFLAGS) \ diff --git a/atk-adaptor/atk-bridge.desktop.in b/atk-adaptor/atk-bridge.desktop.in index 016a2d3..851d1ca 100644 --- a/atk-adaptor/atk-bridge.desktop.in +++ b/atk-adaptor/atk-bridge.desktop.in @@ -4,5 +4,5 @@ Name=GNOME D-Bus atk-bridge locator Comment=Sets GTK_PATH for gnome-session to pick up D-Bus atk-bridge module Exec=dbus-send --session --dest="org.gnome.SessionManager" /org/gnome/SessionManager org.gnome.SessionManager.Setenv string:"GTK_PATH" string:"@gtkpathdir@" OnlyShowIn=GNOME; -AutostartCondition=GNOME /desktop/gnome/interface/atspi-dbus +AutostartCondition=GNOME /desktop/gnome/interface/at-spi-dbus X-GNOME-Autostart-Phase=Initialization diff --git a/configure.ac b/configure.ac index f9df83a..81e2af0 100644 --- a/configure.ac +++ b/configure.ac @@ -78,14 +78,11 @@ if test -z "$DEFAULT_ATSPI_INTROSPECTION_PATH"; then DEFAULT_ATSPI_INTROSPECTION_PATH=dbus fi -AC_ARG_VAR([GTK_MODULE_DIR], - [Where to place the atk-adaptor gtk module]) -if test -z "$GTK_MODULE_DIR"; then - GTK_MODULE_DIR=gtk-2.0/modules - AM_CONDITIONAL(RELOCATE, false) -else - AM_CONDITIONAL(RELOCATE, true) +AC_ARG_ENABLE(relocate, [ --enable-relocate Relocate to coexist with CORBA [default=no]], enable_relocate="$enableval", enable_relocate=no) +if test x$enable_relocate = xyes ; then + AC_DEFINE(RELOCATE, , [Relocate to coexist with CORBA]) fi +AM_CONDITIONAL(RELOCATE, test x$enable_relocate = xyes) #libtool option to strip symbols starting with cspi LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^cspi]].*"' -- 2.7.4