0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.3.1167

Problem:    Python configure check doesn't reject Python 2 when requesting
            Python 3.  Some systems need -pthreads instead of -pthread.
Solution:   Adjust configure accordingly. (Andrei Olsen)
This commit is contained in:
Bram Moolenaar 2013-06-11 19:53:45 +02:00
parent a9f2220176
commit 3c7ad013fb
3 changed files with 282 additions and 248 deletions

19
src/auto/configure vendored
View File

@ -5431,6 +5431,9 @@ $as_echo_n "checking if -pthread should be used... " >&6; }
threadsafe_flag="-D_THREAD_SAFE"
thread_lib="-pthread"
fi
if test "`(uname) 2>/dev/null`" = SunOS; then
threadsafe_flag="-pthreads"
fi
fi
libs_save_old=$LIBS
if test -n "$threadsafe_flag"; then
@ -5502,7 +5505,6 @@ rm -f core conftest.err conftest.$ac_objext \
PYTHON_LIBS=
PYTHON_CFLAGS=
fi
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: too old" >&5
@ -5594,6 +5596,14 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
$as_echo "$vi_cv_var_python3_version" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python is 3.0 or better" >&5
$as_echo_n "checking Python is 3.0 or better... " >&6; }
if ${vi_cv_path_python3} -c \
"import sys; sys.exit(${vi_cv_var_python3_version} < 3.0)"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yep" >&5
$as_echo "yep" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
$as_echo_n "checking Python's abiflags... " >&6; }
if test "${vi_cv_var_python3_abiflags+set}" = set; then :
@ -5736,6 +5746,9 @@ $as_echo_n "checking if -pthread should be used... " >&6; }
threadsafe_flag="-D_THREAD_SAFE"
thread_lib="-pthread"
fi
if test "`(uname) 2>/dev/null`" = SunOS; then
threadsafe_flag="-pthreads"
fi
fi
libs_save_old=$LIBS
if test -n "$threadsafe_flag"; then
@ -5808,6 +5821,10 @@ rm -f core conftest.err conftest.$ac_objext \
PYTHON3_CFLAGS=
fi
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: too old" >&5
$as_echo "too old" >&6; }
fi
fi
fi

View File

@ -986,6 +986,9 @@ eof
threadsafe_flag="-D_THREAD_SAFE"
thread_lib="-pthread"
fi
if test "`(uname) 2>/dev/null`" = SunOS; then
threadsafe_flag="-pthreads"
fi
fi
libs_save_old=$LIBS
if test -n "$threadsafe_flag"; then
@ -1022,7 +1025,6 @@ eof
PYTHON_LIBS=
PYTHON_CFLAGS=
fi
fi
else
AC_MSG_RESULT(too old)
@ -1058,6 +1060,13 @@ if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic";
${vi_cv_path_python3} -c 'import sys; print(sys.version[:3])'`
]])
dnl -- it must be at least version 3
AC_MSG_CHECKING(Python is 3.0 or better)
if ${vi_cv_path_python3} -c \
"import sys; sys.exit(${vi_cv_var_python3_version} < 3.0)"
then
AC_MSG_RESULT(yep)
dnl -- get abiflags for python 3.2 or higher (PEP 3149)
AC_CACHE_CHECK(Python's abiflags,vi_cv_var_python3_abiflags,
[
@ -1176,6 +1185,9 @@ eof
threadsafe_flag="-D_THREAD_SAFE"
thread_lib="-pthread"
fi
if test "`(uname) 2>/dev/null`" = SunOS; then
threadsafe_flag="-pthreads"
fi
fi
libs_save_old=$LIBS
if test -n "$threadsafe_flag"; then
@ -1213,6 +1225,9 @@ eof
PYTHON3_CFLAGS=
fi
fi
else
AC_MSG_RESULT(too old)
fi
fi
fi

View File

@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1167,
/**/
1166,
/**/