summary refs log tree commit diff stats
path: root/configure.ac
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2012-12-29 05:33:59 -0800
committerTingPing <tingping@tingping.se>2012-12-29 05:33:59 -0800
commit4adb0b386b03db1e7da01be30428c171908a5c1d (patch)
tree5988d1f6581da98de44e818ef8ca99dda691fed8 /configure.ac
parent1a0396dcae91d01312e971a805900c54b028fb5a (diff)
parent2406c45077fde76b37d6676ad76823d096764087 (diff)
Merge pull request #343 from bui/master
fix configure error related to Python headers on Ubuntu 13.04
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 5e129180..e30887aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -341,7 +341,8 @@ if test "$python" = yes; then
                 changequote(<<, >>)dnl
                 PY_VER=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_config_vars("VERSION")[0];'`
                 PY_LIB=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(standard_lib=1);'`
-                PY_INC=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_config_vars("INCLUDEPY")[0];'`
+                PY_INC=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc();'`
+                PYPLAT_INC=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc(plat_specific=True);'`
                 $pythonpath -c "import sys; map(int,sys.version[:3].split('.')) >= [2,2] or sys.exit(1)"
                 changequote([, ])dnl
                 AC_MSG_RESULT($PY_VER)
@@ -349,9 +350,9 @@ if test "$python" = yes; then
                         AC_MSG_CHECKING(Python compile flags)
                         PY_PREFIX=`$pythonpath -c 'import sys; print sys.prefix'`
                         PY_EXEC_PREFIX=`$pythonpath -c 'import sys; print sys.exec_prefix'`
-                        if test -f $PY_INC/Python.h; then
+                        if test -f $PY_INC/Python.h || test -f $PYPLAT_INC/Python.h; then
                                 PY_LIBS="-L$PY_LIB/config -lpython$PY_VER -lpthread -lutil"
-                                PY_CFLAGS="-I$PY_INC"
+                                PY_CFLAGS="-I$PY_INC -I$PYPLAT_INC"
                                 AC_MSG_RESULT(ok)
                         else
                                 python=no