diff options
author | Sebastien Bacher <seb128@ubuntu.com> | 2007-06-17 09:16:58 +0000 |
---|---|---|
committer | Sebastien Bacher <sbacher@src.gnome.org> | 2007-06-17 09:16:58 +0000 |
commit | d2f8d7d3e54b8a22f3c4e19c322c7c7ead0e8583 (patch) | |
tree | f1876f0b608a8f224e523048221436ab03828444 /m4/python.m4 | |
parent | 599dbc210b59f58018c89ebb2d34b2255ea61d05 (diff) | |
download | pygobject-d2f8d7d3e54b8a22f3c4e19c322c7c7ead0e8583.tar.gz |
use python-config to get python includes (Closes #448173)
2007-06-17 Sebastien Bacher <seb128@ubuntu.com>
* m4/python.m4: use python-config to get python includes
(Closes #448173)
svn path=/trunk/; revision=676
Diffstat (limited to 'm4/python.m4')
-rw-r--r-- | m4/python.m4 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/m4/python.m4 b/m4/python.m4 index e1c5266d..fe901562 100644 --- a/m4/python.m4 +++ b/m4/python.m4 @@ -45,10 +45,14 @@ 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"` +if test -x "$PYTHON-config"; 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: save_CPPFLAGS="$CPPFLAGS" |