summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@carbon.pseudorandom.co.uk>2007-07-31 17:40:20 +0100
committerSimon McVittie <smcv@carbon.pseudorandom.co.uk>2007-07-31 17:40:20 +0100
commita7b73b44ca3b86a0ccf0a58e2c1fdee205633657 (patch)
tree21fca94de3a0a1c47d9b8596d1013da0e4987bb2
parent66ebaa801a13be7403e6ec47de1f322ccf310346 (diff)
downloaddbus-python-a7b73b44ca3b86a0ccf0a58e2c1fdee205633657.tar.gz
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.
-rw-r--r--m4/am-check-python-headers.m45
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"