diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 9f573c76..7f296ec0 100644 --- a/configure.in +++ b/configure.in @@ -130,6 +130,54 @@ AC_CHECK_PROG(PERL, perl, perl, false) AM_CONDITIONAL(WITH_PERL, test "$PERL" != "false") dnl +dnl check for python +dnl + +PYTHON= +PYTHON_VERSION= +PYTHON_INCLUDES= +PYTHON_SITE_PACKAGES= +AC_ARG_WITH(python, [ --with-python[=DIR] Build Python bindings if found]) +if test "$with_python" != "no" ; then + if test -x "$with_python/bin/python" + then + echo Found python in $with_python/bin/python + PYTHON="$with_python/bin/python" + else + AC_PATH_PROG(PYTHON, python python2.2 python2.1 python2.0 python1.6 python1.5) + fi + if test "$PYTHON" != "" + then + PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"` + echo Found Python version $PYTHON_VERSION + fi + if test "$PYTHON_VERSION" != "" + then + if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \ + -d $with_python/lib/python$PYTHON_VERSION/site-packages + then + PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION + PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages + else + if test -r $prefix/include/python$PYTHON_VERSION/Python.h + then + PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)' + PYTHON_SITE_PACKAGES='$(prefix)/lib/python$(PYTHON_VERSION)/site-packages' + else + if test -r /usr/include/python$PYTHON_VERSION/Python.h + then + PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION + PYTHON_SITE_PACKAGES=/usr/lib/python$PYTHON_VERSION/site-packages + else + echo could not find python$PYTHON_VERSION/Python.h + fi + fi + fi + fi +fi +AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "") + +dnl dnl Debug for DV (-Wunreachable-code) dnl if test "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XSLT" ; then @@ -292,6 +340,10 @@ AC_SUBST(XSLTPROCDV) AC_SUBST(XML_CONFIG) AC_SUBST(LIBXML_LIBS) AC_SUBST(LIBXML_CFLAGS) +AC_SUBST(PYTHON) +AC_SUBST(PYTHON_VERSION) +AC_SUBST(PYTHON_INCLUDES) +AC_SUBST(PYTHON_SITE_PACKAGES) XSLT_LIBDIR='-L${libdir}' @@ -322,6 +374,7 @@ breakpoint/Makefile libexslt/Makefile libexslt/exsltconfig.h xsltproc/Makefile +python/Makefile tests/Makefile tests/docs/Makefile tests/REC1/Makefile |