Permalink
Browse files

fix configure error related to Python headers on Ubuntu 13.04

  • Loading branch information...
Bui
Bui committed Dec 26, 2012
1 parent 8fe3c40 commit 2406c45077fde76b37d6676ad76823d096764087
Showing with 4 additions and 3 deletions.
  1. +4 −3 configure.ac
View
@@ -341,17 +341,18 @@ 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)
if test "$?" != "1"; 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

0 comments on commit 2406c45

Please sign in to comment.