1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
--- configure.ac.orig 2011-01-29 21:51:17.724952231 +0100
+++ configure.ac 2011-01-29 21:52:29.969745013 +0100
@@ -146,4 +146,14 @@
# Check for Python support
###########################
+AC_ARG_ENABLE([python],
+ AC_HELP_STRING([--disable-python], [Disable Python bindings generation]),
+ [enable_python=$enableval], [enable_python=auto])
+AM_CONDITIONAL([WANT_PYTHON], [test "x$enable_python" != "xno"])
+
+AS_IF([test "x$enable_python" != "xno"],[
+ AS_IF([test "x$have_gtk" != "xyes"],[
+ AC_MSG_ERROR([Python bindings require GTK support, please --enable-gtk])
+ ])
+
AM_PATH_PYTHON(2.3.5)
@@ -156,2 +166,4 @@
- pygobject-2.0 >= $PYGOBJECT_REQUIRED])
+ pygobject-2.0 >= $PYGOBJECT_REQUIRED],
+ [have_python=yes]
+)
@@ -171,6 +183,7 @@
PYGTK_CODEGEN="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/codegen.py"
AC_SUBST(PYGTK_CODEGEN)
AC_MSG_RESULT($PYGTK_CODEGEN)
+])
###########################
# GTK Doc
@@ -271,2 +284,7 @@
- GObject Introspection: $enable_introspection
-])
+ GObject Introspection: $enable_introspection
+])
+
+AS_IF([test "x$have_python" = "xyes"],
+ [AC_MSG_NOTICE([ Python bindings: yes])],
+ [AC_MSG_NOTICE([ Python bindings: no])]
+)
--- bindings/Makefile.am.orig 2011-01-29 21:53:17.826282713 +0100
+++ bindings/Makefile.am 2011-01-29 21:53:52.951209371 +0100
@@ -1,2 +1,6 @@
+if WANT_PYTHON
+PYTHON_SUBDIR = python
+endif
+
-SUBDIRS = mono python
+SUBDIRS = mono $(PYTHON_SUBDIR)
|