[pyatspi2/mgorse] Add --enable-relocate option



commit 9fd7b4a15721e3434cc1d1e4ea12529e096920f3
Author: Willie Walker <william walker sun com>
Date:   Fri Nov 6 12:46:44 2009 -0500

    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 pyatspi
    module is relocated under a pyatspi-dbus subdirectory and a
    pyatspi-dbus.pth file is used to prefix python's path if the
    /desktop/gnome/interface/at-spi-dbus gconf key is set.

 configure.ac                |    9 +++++----
 pyatspi/Makefile.am         |    6 +++---
 pyatspi/pyatspi-dbus.pth.in |    2 +-
 3 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e08c66a..f63204d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,10 +82,11 @@ fi
 
 AC_PATH_XTRA
 
-AC_ARG_VAR([PYATSPI_SUBDIR],
-           [Optional subdirectory for installing pyatspi])
-AC_SUBST(PYATSPI_SUBDIR)
-AM_CONDITIONAL(RELOCATE_PYATSPI, test x"$PYATSPI_SUBDIR" != x)
+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)
 
 AC_CONFIG_FILES([Makefile
 		 tests/Makefile
diff --git a/pyatspi/Makefile.am b/pyatspi/Makefile.am
index 7e775ce..55f1b72 100644
--- a/pyatspi/Makefile.am
+++ b/pyatspi/Makefile.am
@@ -1,6 +1,6 @@
 
-if RELOCATE_PYATSPI
-pyatspidir = $(pythondir)/$(PYATSPI_SUBDIR)/pyatspi
+if RELOCATE
+pyatspidir = $(pythondir)/pyatspi-dbus/pyatspi
 else
 pyatspidir = $(pythondir)/pyatspi
 endif
@@ -39,7 +39,7 @@ pyatspi_PYTHON = \
 		utils.py		\
 		value.py
 
-if RELOCATE_PYATSPI
+if RELOCATE
 install-exec-local: Makefile
 	@$(MKDIR_P) $(DESTDIR)$(pyexecdir)
 	cp pyatspi-dbus.pth $(DESTDIR)$(pyexecdir)
diff --git a/pyatspi/pyatspi-dbus.pth.in b/pyatspi/pyatspi-dbus.pth.in
index 46be624..1a768ce 100644
--- a/pyatspi/pyatspi-dbus.pth.in
+++ b/pyatspi/pyatspi-dbus.pth.in
@@ -1 +1 @@
-import commands, sys; a = commands.getoutput('gconftool-2 --get /desktop/gnome/interface/accessibility2'); (a == 'true') and sys.path.insert(0, '@prefix@/lib/python PYTHON_VERSION@/site-packages/pyatspi2')
+import commands, sys; a = commands.getoutput('gconftool-2 --get /desktop/gnome/interface/at-spi-dbus'); (a == 'true') and sys.path.insert(0, '@prefix@/lib/python PYTHON_VERSION@/site-packages/pyatspi2')



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