diff options
Diffstat (limited to 'm4/am-check-python-headers.m4')
-rw-r--r-- | m4/am-check-python-headers.m4 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/m4/am-check-python-headers.m4 b/m4/am-check-python-headers.m4 index e7e9032..1e0f2b6 100644 --- a/m4/am-check-python-headers.m4 +++ b/m4/am-check-python-headers.m4 @@ -7,7 +7,10 @@ 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=`$PYTHON-config --includes 2>/dev/null` +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" |