orca r4148 - in trunk: . src/orca
- From: wwalker svn gnome org
- To: svn-commits-list gnome org
- Subject: orca r4148 - in trunk: . src/orca
- Date: Wed, 3 Sep 2008 14:31:54 +0000 (UTC)
Author: wwalker
Date: Wed Sep 3 14:31:54 2008
New Revision: 4148
URL: http://svn.gnome.org/viewvc/orca?rev=4148&view=rev
Log:
Fix for bug #550249 - orca doesn't use find bonobo python
Modified:
trunk/ChangeLog
trunk/acinclude.m4
trunk/configure.in
trunk/src/orca/orca.py
Modified: trunk/acinclude.m4
==============================================================================
--- trunk/acinclude.m4 (original)
+++ trunk/acinclude.m4 Wed Sep 3 14:31:54 2008
@@ -23,6 +23,40 @@
CPPFLAGS="$save_CPPFLAGS"
])
+dnl AM_CHECK_PYGTK(VERSION [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]])
+dnl Check if pygtk supports the given version.
+AC_DEFUN([AM_CHECK_PYGTK],
+[AC_REQUIRE([AM_PATH_PYTHON])
+AC_MSG_CHECKING(for pygtk version $1)
+py_mod_var=`echo $1 | sed 'y%./+-%__p_%'`
+AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
+prog="
+import sys
+try:
+ import pygtk
+ pygtk.require('$1')
+except:
+ sys.exit(1)
+sys.exit(0)"
+if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
+ then
+ eval "py_cv_mod_$py_mod_var=yes"
+ else
+ eval "py_cv_mod_$py_mod_var=no"
+ fi
+])
+py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
+if test "x$py_val" != xno; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], [],, [$2
+])dnl
+else
+ AC_MSG_RESULT(no)
+ ifelse([$3], [],, [$3
+])dnl
+fi
+])
+
dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
dnl Check if a module containing a given symbol is visible to python.
AC_DEFUN([AM_CHECK_PYMOD],
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Wed Sep 3 14:31:54 2008
@@ -93,6 +93,10 @@
AM_PATH_PYTHON(2.4)
+# Check for PyGTK 2.0
+
+AM_CHECK_PYGTK(2.0,,[AC_MSG_ERROR(Could not find pygtk 2.0)])
+
# Find the headers needed to build extensions
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(Could not find python headers needed to build Python extensions)])
Modified: trunk/src/orca/orca.py
==============================================================================
--- trunk/src/orca/orca.py (original)
+++ trunk/src/orca/orca.py Wed Sep 3 14:31:54 2008
@@ -34,6 +34,11 @@
import sys
sys.argv[0] = "orca"
+# Tell Orca to find/use the right version of pygtk.
+#
+import pygtk
+pygtk.require('2.0')
+
try:
# This can fail due to gtk not being available. We want to
# be able to recover from that if possible. The main driver
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]