From a7b73b44ca3b86a0ccf0a58e2c1fdee205633657 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 31 Jul 2007 17:40:20 +0100 Subject: [PATCH] Revert "Use python-config to get Python cppflags (patch from Ubuntu, fd.o #11282)." Python < 2.5 didn't have python-config (although some distributions, e.g. Debian and Ubuntu, shipped it as an add-on). Even for 2.5, some distributions install it under gratuitously different names (hi, Gentoo). As a result, this patch needs replacing with one that doesn't rely on having python-config. This reverts commit 7c9d08d1ba7f5b0a9aa4a37118e56b1725cdaef9. --- m4/am-check-python-headers.m4 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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" -- 2.11.4.GIT