acinclude.m4: Use pythonX.Y-config to detect the include path for the python version and use the old values as fallba...

Original commit message from CVS:
* acinclude.m4:
Use pythonX.Y-config to detect the include path for the python
version and use the old values as fallback if pythonX.Y-config
doesn't exist.
This commit is contained in:
Sebastian Dröge 2007-11-29 15:02:03 +00:00
parent 7e4e9e5a00
commit d4fc743d06
2 changed files with 14 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2007-11-29 Sebastian Dröge <slomo@circular-chaos.org>
* acinclude.m4:
Use pythonX.Y-config to detect the include path for the python
version and use the old values as fallback if pythonX.Y-config
doesn't exist.
2007-11-28 Edward Hervey <bilboed@bilboed.com>
* configure.ac:

View file

@ -45,9 +45,13 @@ 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}"
if $PYTHON-config --help 2>/dev/null; then
PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null`
else
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
fi
AC_SUBST(PYTHON_INCLUDES)
dnl check if the headers exist: