diff options
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index a6b9ebe..8c75106 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -228,7 +228,12 @@ 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 -PYTHON_INCLUDES="$PYTHON_INCLUDES `python-config --includes`" +py_prefix=`$PYTHON -c "import sys; print sys.prefix"` +py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` +PYTHON_INCLUDES="`$PYTHON-config --includes`" +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" |