Added check for pygobject >= 3.3.2

svn: r20065
This commit is contained in:
Doug Blank 2012-07-24 15:36:06 +00:00
parent d57b63ac6d
commit 868d00a67f

View File

@ -45,10 +45,10 @@ dnl We first only check for python >= 2.6
AM_PATH_PYTHON(2.6) AM_PATH_PYTHON(2.6)
AC_PATH_PROG(BINSH, sh) AC_PATH_PROG(BINSH, sh)
pygtk_require=" AC_MSG_CHECKING(Python bindings for gtk 3.3.2 (pygobject>=3.3.2))
cat > conftest.py <<EOF
try: try:
import pygtk from gi.repository import Gtk
pygtk.require('2.0')
except ImportError: except ImportError:
pass pass
@ -56,22 +56,17 @@ def out(line):
f = open('conftest.out', 'w') f = open('conftest.out', 'w')
f.write(line) f.write(line)
f.close() f.close()
"
AC_MSG_CHECKING(Python bindings for gtk 2.10 (pygtk2>=2.10.0))
cat > conftest.py <<EOF
$pygtk_require
try: try:
import gobject gtk_ver = (Gtk.get_major_version(),
version = gobject.pygtk_version Gtk.get_minor_version(),
if version >= (2,10,0): Gtk.get_micro_version())
print_version = '.'.join([[str(i) for i in version]]) if gtk_ver >= (3, 3, 2):
print_version = '.'.join([str(i) for i in gtk_ver])
out(print_version) out(print_version)
else: else:
out("NO") out("NO")
except ImportError: except:
out("NO")
except AttributeError:
out("NO") out("NO")
EOF EOF
$PYTHON conftest.py $PYTHON conftest.py
@ -81,7 +76,7 @@ if test NO = "$has_pygtk"
then then
AC_MSG_ERROR([ AC_MSG_ERROR([
**** The python bindings for gtk 2.10 (pygtk2>=2.10.0) could not be found.]) **** The python bindings for pygobect 3.3.2 (pygobject>=3.3.2) could not be found.])
fi fi
AC_MSG_RESULT($has_pygtk) AC_MSG_RESULT($has_pygtk)