diff options
author | Johan Dahlin <johan@gnome.org> | 2008-03-25 21:47:47 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2008-03-25 21:47:47 +0000 |
commit | a310fd859d42006253d8541f366ca458bdb09493 (patch) | |
tree | 777b485f61419a9c0ea04d002ce32251ed596bc2 /m4 | |
parent | 66ab1202b6499e030c32c9d0d3432e0b09bee7db (diff) | |
download | gobject-introspection-a310fd859d42006253d8541f366ca458bdb09493.tar.gz |
Add initial python bindings for the scanner and depend on python 2.5.
2008-03-25 Johan Dahlin <johan@gnome.org>
* configure.ac:
* giscanner:
* giscanner/__init__.py:
* giscanner/giscannermodule.c:
* giscanner/Makefile.am:
Add initial python bindings for the scanner and
depend on python 2.5.
svn path=/trunk/; revision=165
Diffstat (limited to 'm4')
-rw-r--r-- | m4/python.m4 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/m4/python.m4 b/m4/python.m4 new file mode 100644 index 00000000..aff55371 --- /dev/null +++ b/m4/python.m4 @@ -0,0 +1,25 @@ +## this one is commonly used with AM_PATH_PYTHONDIR ... +dnl a macro to check for ability to create python extensions +dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) +dnl function also defines PYTHON_INCLUDES +AC_DEFUN([AM_CHECK_PYTHON_HEADERS], +[AC_REQUIRE([AM_PATH_PYTHON]) +AC_MSG_CHECKING(for headers required to compile python extensions) +dnl deduce PYTHON_INCLUDES +py_prefix=`$PYTHON -c "import sys; print sys.prefix"` +py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` +PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" +if test "$py_prefix" != "$py_exec_prefix"; then + PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" +fi +AC_SUBST(PYTHON_INCLUDES) +dnl check if the headers exist: +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" +AC_TRY_CPP([#include <Python.h>],dnl +[AC_MSG_RESULT(found) +$1],dnl +[AC_MSG_RESULT(not found) +$2]) +CPPFLAGS="$save_CPPFLAGS" +]) |