summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac48
1 files changed, 48 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f639707..8ecc110 100644
--- a/configure.ac
+++ b/configure.ac
@@ -264,6 +264,54 @@ AC_CHECK_LIB(z, deflate, Z_LIBS='-lz', AC_MSG_ERROR([zlib not found]))
AC_SUBST(Z_LIBS)
GOBJECT_INTROSPECTION_CHECK([0.6.7])
+PKG_CHECK_MODULES([GOBJECT_INTROSPECTION],
+ [gobject-introspection-1.0 >= 0.9.4],
+ [has_symbol_prefix=yes], [:])
+AM_CONDITIONAL([G_IR_SCANNER_SYMBOL_PREFIX], [test "x$has_symbol_prefix" = "xyes"])
+
+AC_ARG_WITH(python,
+[ --with-python build python bindings],
+[case "${withval}" in
+ yes|no) ;;
+ *) AC_MSG_ERROR([bad value ${withval} for python option]) ;;
+ esac],[withval=yes])
+
+if test "$with_gtk" = "3.0"
+then
+ WITH_PYTHON=no
+else
+ WITH_PYTHON=$withval
+fi
+
+if test "$WITH_PYTHON" = "yes"; then
+ PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= 2.0.0)
+ AC_SUBST(PYGTK_CFLAGS)
+ AC_SUBST(PYGTK_LIBS)
+
+ AM_PATH_PYTHON
+
+ AC_MSG_CHECKING([whether $PYTHON version >= 2.0])
+ HAVE_PYTHON_REQUIRED=no
+ AM_PYTHON_CHECK_VERSION([$PYTHON], [2.0],
+ [HAVE_PYTHON_REQUIRED="yes"],
+ [HAVE_PYTHON_REQUIRED="no"])
+
+ AC_MSG_RESULT($HAVE_PYTHON_REQUIRED)
+
+ if test "x$HAVE_PYTHON_REQUIRED" != "xyes"
+ then
+ AC_MSG_ERROR("No suitable python found")
+ fi
+
+ AM_CHECK_PYTHON_HEADERS(have_python_headers=yes,have_python_headers=no)
+
+ if test "x$have_python_headers" != "xyes"
+ then
+ AC_MSG_ERROR("No python development headers found")
+ fi
+fi
+
+AM_CONDITIONAL(WITH_PYTHON, [test "$WITH_PYTHON" = "yes"])
dnl ===========================================================================
dnl check compiler flags