Permalink
Browse files

Patch python checks [781333].

git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@433 893a96be-7f27-4fdf-9d1e-6aeec9d3cce1
  • Loading branch information...
1 parent e46265a commit dfa1b1e21f56b6edd3a8caafd077d56aa83f8b9e zed committed Aug 1, 2003
Showing with 7 additions and 6 deletions.
  1. +7 −6 configure.in
View
@@ -282,18 +282,19 @@ if test "$python" = yes; then
else
AC_MSG_CHECKING(Python version)
changequote(<<, >>)dnl
- PY_VERSION=`$pythonpath -c 'import sys; print sys.version[:3]'`
- PY_PATH=`$pythonpath -c 'import sys ; print sys.path[1][5:]'`
+ 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_config_vars("LIBDEST")[0];'`
+ PY_INC=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_config_vars("INCLUDEPY")[0];'`
$pythonpath -c "import sys; map(int,sys.version[:3].split('.')) >= [2,2] or sys.exit(1)"
changequote([, ])dnl
- AC_MSG_RESULT($PY_VERSION)
+ 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_PREFIX/include/python$PY_VERSION/Python.h; then
- PY_LIBS="-L$PY_EXEC_PREFIX/$PY_PATH/config -lpython$PY_VERSION -lpthread -lutil"
- PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
+ if test -f $PY_INC/Python.h; then
+ PY_LIBS="-L$PY_LIB/config -lpython$PY_VER -lpthread -lutil"
+ PY_CFLAGS="-I$PY_INC"
AC_MSG_RESULT(ok)
else
python=no

0 comments on commit dfa1b1e

Please sign in to comment.