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:
parent
a9f2220176
commit
3c7ad013fb
221
src/auto/configure
vendored
221
src/auto/configure
vendored
@ -5431,6 +5431,9 @@ $as_echo_n "checking if -pthread should be used... " >&6; }
|
|||||||
threadsafe_flag="-D_THREAD_SAFE"
|
threadsafe_flag="-D_THREAD_SAFE"
|
||||||
thread_lib="-pthread"
|
thread_lib="-pthread"
|
||||||
fi
|
fi
|
||||||
|
if test "`(uname) 2>/dev/null`" = SunOS; then
|
||||||
|
threadsafe_flag="-pthreads"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
libs_save_old=$LIBS
|
libs_save_old=$LIBS
|
||||||
if test -n "$threadsafe_flag"; then
|
if test -n "$threadsafe_flag"; then
|
||||||
@ -5502,7 +5505,6 @@ rm -f core conftest.err conftest.$ac_objext \
|
|||||||
PYTHON_LIBS=
|
PYTHON_LIBS=
|
||||||
PYTHON_CFLAGS=
|
PYTHON_CFLAGS=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: too old" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: too old" >&5
|
||||||
@ -5594,55 +5596,63 @@ fi
|
|||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
|
||||||
$as_echo "$vi_cv_var_python3_version" >&6; }
|
$as_echo "$vi_cv_var_python3_version" >&6; }
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
|
{ $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; }
|
$as_echo_n "checking Python's abiflags... " >&6; }
|
||||||
if test "${vi_cv_var_python3_abiflags+set}" = set; then :
|
if test "${vi_cv_var_python3_abiflags+set}" = set; then :
|
||||||
$as_echo_n "(cached) " >&6
|
$as_echo_n "(cached) " >&6
|
||||||
else
|
else
|
||||||
|
|
||||||
vi_cv_var_python3_abiflags=
|
vi_cv_var_python3_abiflags=
|
||||||
if ${vi_cv_path_python3} -c \
|
if ${vi_cv_path_python3} -c \
|
||||||
"import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
|
"import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
|
||||||
then
|
then
|
||||||
vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
|
vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
|
||||||
"import sys; print(sys.abiflags)"`
|
"import sys; print(sys.abiflags)"`
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5
|
||||||
$as_echo "$vi_cv_var_python3_abiflags" >&6; }
|
$as_echo "$vi_cv_var_python3_abiflags" >&6; }
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
|
||||||
$as_echo_n "checking Python's install prefix... " >&6; }
|
$as_echo_n "checking Python's install prefix... " >&6; }
|
||||||
if test "${vi_cv_path_python3_pfx+set}" = set; then :
|
if test "${vi_cv_path_python3_pfx+set}" = set; then :
|
||||||
$as_echo_n "(cached) " >&6
|
$as_echo_n "(cached) " >&6
|
||||||
else
|
else
|
||||||
vi_cv_path_python3_pfx=`
|
vi_cv_path_python3_pfx=`
|
||||||
${vi_cv_path_python3} -c \
|
${vi_cv_path_python3} -c \
|
||||||
"import sys; print(sys.prefix)"`
|
"import sys; print(sys.prefix)"`
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_pfx" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_pfx" >&5
|
||||||
$as_echo "$vi_cv_path_python3_pfx" >&6; }
|
$as_echo "$vi_cv_path_python3_pfx" >&6; }
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
|
||||||
$as_echo_n "checking Python's execution prefix... " >&6; }
|
$as_echo_n "checking Python's execution prefix... " >&6; }
|
||||||
if test "${vi_cv_path_python3_epfx+set}" = set; then :
|
if test "${vi_cv_path_python3_epfx+set}" = set; then :
|
||||||
$as_echo_n "(cached) " >&6
|
$as_echo_n "(cached) " >&6
|
||||||
else
|
else
|
||||||
vi_cv_path_python3_epfx=`
|
vi_cv_path_python3_epfx=`
|
||||||
${vi_cv_path_python3} -c \
|
${vi_cv_path_python3} -c \
|
||||||
"import sys; print(sys.exec_prefix)"`
|
"import sys; print(sys.exec_prefix)"`
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_epfx" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_epfx" >&5
|
||||||
$as_echo "$vi_cv_path_python3_epfx" >&6; }
|
$as_echo "$vi_cv_path_python3_epfx" >&6; }
|
||||||
|
|
||||||
|
|
||||||
if test "${vi_cv_path_python3path+set}" = set; then :
|
if test "${vi_cv_path_python3path+set}" = set; then :
|
||||||
$as_echo_n "(cached) " >&6
|
$as_echo_n "(cached) " >&6
|
||||||
else
|
else
|
||||||
vi_cv_path_python3path=`
|
vi_cv_path_python3path=`
|
||||||
unset PYTHONPATH;
|
unset PYTHONPATH;
|
||||||
${vi_cv_path_python3} -c \
|
${vi_cv_path_python3} -c \
|
||||||
"import sys, string; print(':'.join(sys.path))"`
|
"import sys, string; print(':'.join(sys.path))"`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -5654,49 +5664,49 @@ if test "${with_python3_config_dir+set}" = set; then :
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
|
||||||
$as_echo_n "checking Python's configuration directory... " >&6; }
|
$as_echo_n "checking Python's configuration directory... " >&6; }
|
||||||
if test "${vi_cv_path_python3_conf+set}" = set; then :
|
if test "${vi_cv_path_python3_conf+set}" = set; then :
|
||||||
$as_echo_n "(cached) " >&6
|
$as_echo_n "(cached) " >&6
|
||||||
else
|
else
|
||||||
|
|
||||||
vi_cv_path_python3_conf=
|
vi_cv_path_python3_conf=
|
||||||
config_dir="config"
|
config_dir="config"
|
||||||
if test "${vi_cv_var_python3_abiflags}" != ""; then
|
if test "${vi_cv_var_python3_abiflags}" != ""; then
|
||||||
config_dir="${config_dir}-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
|
config_dir="${config_dir}-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
|
||||||
fi
|
fi
|
||||||
d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
|
d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
|
||||||
if test -d "$d" && test -f "$d/config.c"; then
|
if test -d "$d" && test -f "$d/config.c"; then
|
||||||
vi_cv_path_python3_conf="$d"
|
vi_cv_path_python3_conf="$d"
|
||||||
else
|
else
|
||||||
for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
|
for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
|
||||||
for subdir in lib64 lib share; do
|
for subdir in lib64 lib share; do
|
||||||
d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
|
d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
|
||||||
if test -d "$d" && test -f "$d/config.c"; then
|
if test -d "$d" && test -f "$d/config.c"; then
|
||||||
vi_cv_path_python3_conf="$d"
|
vi_cv_path_python3_conf="$d"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5
|
||||||
$as_echo "$vi_cv_path_python3_conf" >&6; }
|
$as_echo "$vi_cv_path_python3_conf" >&6; }
|
||||||
|
|
||||||
PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
|
PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
|
||||||
|
|
||||||
if test "X$PYTHON3_CONFDIR" = "X"; then
|
if test "X$PYTHON3_CONFDIR" = "X"; then
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
|
||||||
$as_echo "can't find it!" >&6; }
|
$as_echo "can't find it!" >&6; }
|
||||||
else
|
else
|
||||||
|
|
||||||
if test "${vi_cv_path_python3_plibs+set}" = set; then :
|
if test "${vi_cv_path_python3_plibs+set}" = set; then :
|
||||||
$as_echo_n "(cached) " >&6
|
$as_echo_n "(cached) " >&6
|
||||||
else
|
else
|
||||||
|
|
||||||
pwd=`pwd`
|
pwd=`pwd`
|
||||||
tmp_mkf="$pwd/config-PyMake$$"
|
tmp_mkf="$pwd/config-PyMake$$"
|
||||||
cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
|
cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
|
||||||
__:
|
__:
|
||||||
@echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
|
@echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
|
||||||
@echo "python3_LIBS='$(LIBS)'"
|
@echo "python3_LIBS='$(LIBS)'"
|
||||||
@ -5704,45 +5714,48 @@ __:
|
|||||||
@echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
|
@echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
|
||||||
@echo "python3_INSTSONAME='$(INSTSONAME)'"
|
@echo "python3_INSTSONAME='$(INSTSONAME)'"
|
||||||
eof
|
eof
|
||||||
eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
|
eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
|
||||||
rm -f -- "${tmp_mkf}"
|
rm -f -- "${tmp_mkf}"
|
||||||
vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
|
vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
|
||||||
vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
|
vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
|
||||||
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
|
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
|
||||||
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
|
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if test "X$python3_DLLLIBRARY" != "X"; then
|
if test "X$python3_DLLLIBRARY" != "X"; then
|
||||||
python3_INSTSONAME="$python3_DLLLIBRARY"
|
python3_INSTSONAME="$python3_DLLLIBRARY"
|
||||||
fi
|
|
||||||
PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
|
|
||||||
if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
|
|
||||||
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
|
|
||||||
else
|
|
||||||
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
|
|
||||||
fi
|
|
||||||
PYTHON3_SRC="if_python3.c"
|
|
||||||
PYTHON3_OBJ="objects/if_python3.o"
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
|
|
||||||
$as_echo_n "checking if -pthread should be used... " >&6; }
|
|
||||||
threadsafe_flag=
|
|
||||||
thread_lib=
|
|
||||||
if test "`(uname) 2>/dev/null`" != Darwin; then
|
|
||||||
test "$GCC" = yes && threadsafe_flag="-pthread"
|
|
||||||
if test "`(uname) 2>/dev/null`" = FreeBSD; then
|
|
||||||
threadsafe_flag="-D_THREAD_SAFE"
|
|
||||||
thread_lib="-pthread"
|
|
||||||
fi
|
fi
|
||||||
fi
|
PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
|
||||||
libs_save_old=$LIBS
|
if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
|
||||||
if test -n "$threadsafe_flag"; then
|
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
|
||||||
cflags_save=$CFLAGS
|
else
|
||||||
CFLAGS="$CFLAGS $threadsafe_flag"
|
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
|
||||||
LIBS="$LIBS $thread_lib"
|
fi
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
PYTHON3_SRC="if_python3.c"
|
||||||
|
PYTHON3_OBJ="objects/if_python3.o"
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
|
||||||
|
$as_echo_n "checking if -pthread should be used... " >&6; }
|
||||||
|
threadsafe_flag=
|
||||||
|
thread_lib=
|
||||||
|
if test "`(uname) 2>/dev/null`" != Darwin; then
|
||||||
|
test "$GCC" = yes && threadsafe_flag="-pthread"
|
||||||
|
if test "`(uname) 2>/dev/null`" = FreeBSD; then
|
||||||
|
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
|
||||||
|
cflags_save=$CFLAGS
|
||||||
|
CFLAGS="$CFLAGS $threadsafe_flag"
|
||||||
|
LIBS="$LIBS $thread_lib"
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -5763,19 +5776,19 @@ $as_echo "no" >&6; }; LIBS=$libs_save_old
|
|||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS=$cflags_save
|
CFLAGS=$cflags_save
|
||||||
else
|
else
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
$as_echo "no" >&6; }
|
$as_echo "no" >&6; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python 3 are sane" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python 3 are sane" >&5
|
||||||
$as_echo_n "checking if compile and link flags for Python 3 are sane... " >&6; }
|
$as_echo_n "checking if compile and link flags for Python 3 are sane... " >&6; }
|
||||||
cflags_save=$CFLAGS
|
cflags_save=$CFLAGS
|
||||||
libs_save=$LIBS
|
libs_save=$LIBS
|
||||||
CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
|
CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
|
||||||
LIBS="$LIBS $PYTHON3_LIBS"
|
LIBS="$LIBS $PYTHON3_LIBS"
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -5795,18 +5808,22 @@ $as_echo "no: PYTHON3 DISABLED" >&6; }; python3_ok=no
|
|||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS=$cflags_save
|
CFLAGS=$cflags_save
|
||||||
LIBS=$libs_save
|
LIBS=$libs_save
|
||||||
if test "$python3_ok" = yes; then
|
if test "$python3_ok" = yes; then
|
||||||
$as_echo "#define FEAT_PYTHON3 1" >>confdefs.h
|
$as_echo "#define FEAT_PYTHON3 1" >>confdefs.h
|
||||||
|
|
||||||
else
|
else
|
||||||
LIBS=$libs_save_old
|
LIBS=$libs_save_old
|
||||||
PYTHON3_SRC=
|
PYTHON3_SRC=
|
||||||
PYTHON3_OBJ=
|
PYTHON3_OBJ=
|
||||||
PYTHON3_LIBS=
|
PYTHON3_LIBS=
|
||||||
PYTHON3_CFLAGS=
|
PYTHON3_CFLAGS=
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: too old" >&5
|
||||||
|
$as_echo "too old" >&6; }
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -8780,7 +8797,7 @@ if test -z "$SKIP_MOTIF"; then
|
|||||||
xmheader="Xm/Xm.h"
|
xmheader="Xm/Xm.h"
|
||||||
else
|
else
|
||||||
xmheader="Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h
|
xmheader="Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h
|
||||||
Xm/UnhighlightT.h Xm/Notebook.h"
|
Xm/UnhighlightT.h Xm/Notebook.h"
|
||||||
fi
|
fi
|
||||||
for ac_header in $xmheader
|
for ac_header in $xmheader
|
||||||
do :
|
do :
|
||||||
@ -11777,7 +11794,7 @@ int
|
|||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
struct sysinfo sinfo;
|
struct sysinfo sinfo;
|
||||||
sinfo.mem_unit = 1;
|
sinfo.mem_unit = 1;
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
|
303
src/configure.in
303
src/configure.in
@ -986,6 +986,9 @@ eof
|
|||||||
threadsafe_flag="-D_THREAD_SAFE"
|
threadsafe_flag="-D_THREAD_SAFE"
|
||||||
thread_lib="-pthread"
|
thread_lib="-pthread"
|
||||||
fi
|
fi
|
||||||
|
if test "`(uname) 2>/dev/null`" = SunOS; then
|
||||||
|
threadsafe_flag="-pthreads"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
libs_save_old=$LIBS
|
libs_save_old=$LIBS
|
||||||
if test -n "$threadsafe_flag"; then
|
if test -n "$threadsafe_flag"; then
|
||||||
@ -1022,7 +1025,6 @@ eof
|
|||||||
PYTHON_LIBS=
|
PYTHON_LIBS=
|
||||||
PYTHON_CFLAGS=
|
PYTHON_CFLAGS=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(too old)
|
AC_MSG_RESULT(too old)
|
||||||
@ -1058,78 +1060,85 @@ if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic";
|
|||||||
${vi_cv_path_python3} -c 'import sys; print(sys.version[:3])'`
|
${vi_cv_path_python3} -c 'import sys; print(sys.version[:3])'`
|
||||||
]])
|
]])
|
||||||
|
|
||||||
dnl -- get abiflags for python 3.2 or higher (PEP 3149)
|
dnl -- it must be at least version 3
|
||||||
AC_CACHE_CHECK(Python's abiflags,vi_cv_var_python3_abiflags,
|
AC_MSG_CHECKING(Python is 3.0 or better)
|
||||||
[
|
if ${vi_cv_path_python3} -c \
|
||||||
vi_cv_var_python3_abiflags=
|
"import sys; sys.exit(${vi_cv_var_python3_version} < 3.0)"
|
||||||
if ${vi_cv_path_python3} -c \
|
then
|
||||||
"import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
|
AC_MSG_RESULT(yep)
|
||||||
then
|
|
||||||
vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
|
|
||||||
"import sys; print(sys.abiflags)"`
|
|
||||||
fi ])
|
|
||||||
|
|
||||||
dnl -- find where python3 thinks it was installed
|
dnl -- get abiflags for python 3.2 or higher (PEP 3149)
|
||||||
AC_CACHE_CHECK(Python's install prefix,vi_cv_path_python3_pfx,
|
AC_CACHE_CHECK(Python's abiflags,vi_cv_var_python3_abiflags,
|
||||||
[ vi_cv_path_python3_pfx=`
|
|
||||||
${vi_cv_path_python3} -c \
|
|
||||||
"import sys; print(sys.prefix)"` ])
|
|
||||||
|
|
||||||
dnl -- and where it thinks it runs
|
|
||||||
AC_CACHE_CHECK(Python's execution prefix,vi_cv_path_python3_epfx,
|
|
||||||
[ vi_cv_path_python3_epfx=`
|
|
||||||
${vi_cv_path_python3} -c \
|
|
||||||
"import sys; print(sys.exec_prefix)"` ])
|
|
||||||
|
|
||||||
dnl -- python3's internal library path
|
|
||||||
|
|
||||||
AC_CACHE_VAL(vi_cv_path_python3path,
|
|
||||||
[ vi_cv_path_python3path=`
|
|
||||||
unset PYTHONPATH;
|
|
||||||
${vi_cv_path_python3} -c \
|
|
||||||
"import sys, string; print(':'.join(sys.path))"` ])
|
|
||||||
|
|
||||||
dnl -- where the Python implementation library archives are
|
|
||||||
|
|
||||||
AC_ARG_WITH(python3-config-dir,
|
|
||||||
[ --with-python3-config-dir=PATH Python's config directory],
|
|
||||||
[ vi_cv_path_python3_conf="${withval}" ] )
|
|
||||||
|
|
||||||
AC_CACHE_CHECK(Python's configuration directory,vi_cv_path_python3_conf,
|
|
||||||
[
|
|
||||||
vi_cv_path_python3_conf=
|
|
||||||
config_dir="config"
|
|
||||||
if test "${vi_cv_var_python3_abiflags}" != ""; then
|
|
||||||
config_dir="${config_dir}-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
|
|
||||||
fi
|
|
||||||
d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
|
|
||||||
if test -d "$d" && test -f "$d/config.c"; then
|
|
||||||
vi_cv_path_python3_conf="$d"
|
|
||||||
else
|
|
||||||
for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
|
|
||||||
for subdir in lib64 lib share; do
|
|
||||||
d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
|
|
||||||
if test -d "$d" && test -f "$d/config.c"; then
|
|
||||||
vi_cv_path_python3_conf="$d"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
|
|
||||||
|
|
||||||
if test "X$PYTHON3_CONFDIR" = "X"; then
|
|
||||||
AC_MSG_RESULT([can't find it!])
|
|
||||||
else
|
|
||||||
|
|
||||||
dnl -- we need to examine Python's config/Makefile too
|
|
||||||
dnl see what the interpreter is built from
|
|
||||||
AC_CACHE_VAL(vi_cv_path_python3_plibs,
|
|
||||||
[
|
[
|
||||||
pwd=`pwd`
|
vi_cv_var_python3_abiflags=
|
||||||
tmp_mkf="$pwd/config-PyMake$$"
|
if ${vi_cv_path_python3} -c \
|
||||||
cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
|
"import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
|
||||||
|
then
|
||||||
|
vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
|
||||||
|
"import sys; print(sys.abiflags)"`
|
||||||
|
fi ])
|
||||||
|
|
||||||
|
dnl -- find where python3 thinks it was installed
|
||||||
|
AC_CACHE_CHECK(Python's install prefix,vi_cv_path_python3_pfx,
|
||||||
|
[ vi_cv_path_python3_pfx=`
|
||||||
|
${vi_cv_path_python3} -c \
|
||||||
|
"import sys; print(sys.prefix)"` ])
|
||||||
|
|
||||||
|
dnl -- and where it thinks it runs
|
||||||
|
AC_CACHE_CHECK(Python's execution prefix,vi_cv_path_python3_epfx,
|
||||||
|
[ vi_cv_path_python3_epfx=`
|
||||||
|
${vi_cv_path_python3} -c \
|
||||||
|
"import sys; print(sys.exec_prefix)"` ])
|
||||||
|
|
||||||
|
dnl -- python3's internal library path
|
||||||
|
|
||||||
|
AC_CACHE_VAL(vi_cv_path_python3path,
|
||||||
|
[ vi_cv_path_python3path=`
|
||||||
|
unset PYTHONPATH;
|
||||||
|
${vi_cv_path_python3} -c \
|
||||||
|
"import sys, string; print(':'.join(sys.path))"` ])
|
||||||
|
|
||||||
|
dnl -- where the Python implementation library archives are
|
||||||
|
|
||||||
|
AC_ARG_WITH(python3-config-dir,
|
||||||
|
[ --with-python3-config-dir=PATH Python's config directory],
|
||||||
|
[ vi_cv_path_python3_conf="${withval}" ] )
|
||||||
|
|
||||||
|
AC_CACHE_CHECK(Python's configuration directory,vi_cv_path_python3_conf,
|
||||||
|
[
|
||||||
|
vi_cv_path_python3_conf=
|
||||||
|
config_dir="config"
|
||||||
|
if test "${vi_cv_var_python3_abiflags}" != ""; then
|
||||||
|
config_dir="${config_dir}-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
|
||||||
|
fi
|
||||||
|
d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
|
||||||
|
if test -d "$d" && test -f "$d/config.c"; then
|
||||||
|
vi_cv_path_python3_conf="$d"
|
||||||
|
else
|
||||||
|
for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
|
||||||
|
for subdir in lib64 lib share; do
|
||||||
|
d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
|
||||||
|
if test -d "$d" && test -f "$d/config.c"; then
|
||||||
|
vi_cv_path_python3_conf="$d"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
|
||||||
|
|
||||||
|
if test "X$PYTHON3_CONFDIR" = "X"; then
|
||||||
|
AC_MSG_RESULT([can't find it!])
|
||||||
|
else
|
||||||
|
|
||||||
|
dnl -- we need to examine Python's config/Makefile too
|
||||||
|
dnl see what the interpreter is built from
|
||||||
|
AC_CACHE_VAL(vi_cv_path_python3_plibs,
|
||||||
|
[
|
||||||
|
pwd=`pwd`
|
||||||
|
tmp_mkf="$pwd/config-PyMake$$"
|
||||||
|
cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
|
||||||
__:
|
__:
|
||||||
@echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
|
@echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
|
||||||
@echo "python3_LIBS='$(LIBS)'"
|
@echo "python3_LIBS='$(LIBS)'"
|
||||||
@ -1137,81 +1146,87 @@ __:
|
|||||||
@echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
|
@echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
|
||||||
@echo "python3_INSTSONAME='$(INSTSONAME)'"
|
@echo "python3_INSTSONAME='$(INSTSONAME)'"
|
||||||
eof
|
eof
|
||||||
dnl -- delete the lines from make about Entering/Leaving directory
|
dnl -- delete the lines from make about Entering/Leaving directory
|
||||||
eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
|
eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
|
||||||
rm -f -- "${tmp_mkf}"
|
rm -f -- "${tmp_mkf}"
|
||||||
vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
|
vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
|
||||||
vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
|
vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
|
||||||
dnl remove -ltermcap, it can conflict with an earlier -lncurses
|
dnl remove -ltermcap, it can conflict with an earlier -lncurses
|
||||||
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
|
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
|
||||||
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
|
vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
|
||||||
])
|
])
|
||||||
|
|
||||||
if test "X$python3_DLLLIBRARY" != "X"; then
|
if test "X$python3_DLLLIBRARY" != "X"; then
|
||||||
python3_INSTSONAME="$python3_DLLLIBRARY"
|
python3_INSTSONAME="$python3_DLLLIBRARY"
|
||||||
fi
|
fi
|
||||||
PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
|
PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
|
||||||
if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
|
if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
|
||||||
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
|
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
|
||||||
else
|
else
|
||||||
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
|
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\""
|
||||||
fi
|
fi
|
||||||
PYTHON3_SRC="if_python3.c"
|
PYTHON3_SRC="if_python3.c"
|
||||||
PYTHON3_OBJ="objects/if_python3.o"
|
PYTHON3_OBJ="objects/if_python3.o"
|
||||||
|
|
||||||
dnl On FreeBSD linking with "-pthread" is required to use threads.
|
dnl On FreeBSD linking with "-pthread" is required to use threads.
|
||||||
dnl _THREAD_SAFE must be used for compiling then.
|
dnl _THREAD_SAFE must be used for compiling then.
|
||||||
dnl The "-pthread" is added to $LIBS, so that the following check for
|
dnl The "-pthread" is added to $LIBS, so that the following check for
|
||||||
dnl sigaltstack() will look in libc_r (it's there in libc!).
|
dnl sigaltstack() will look in libc_r (it's there in libc!).
|
||||||
dnl Otherwise, when using GCC, try adding -pthread to $CFLAGS. GCC
|
dnl Otherwise, when using GCC, try adding -pthread to $CFLAGS. GCC
|
||||||
dnl will then define target-specific defines, e.g., -D_REENTRANT.
|
dnl will then define target-specific defines, e.g., -D_REENTRANT.
|
||||||
dnl Don't do this for Mac OSX, -pthread will generate a warning.
|
dnl Don't do this for Mac OSX, -pthread will generate a warning.
|
||||||
AC_MSG_CHECKING([if -pthread should be used])
|
AC_MSG_CHECKING([if -pthread should be used])
|
||||||
threadsafe_flag=
|
threadsafe_flag=
|
||||||
thread_lib=
|
thread_lib=
|
||||||
dnl if test "x$MACOSX" != "xyes"; then
|
dnl if test "x$MACOSX" != "xyes"; then
|
||||||
if test "`(uname) 2>/dev/null`" != Darwin; then
|
if test "`(uname) 2>/dev/null`" != Darwin; then
|
||||||
test "$GCC" = yes && threadsafe_flag="-pthread"
|
test "$GCC" = yes && threadsafe_flag="-pthread"
|
||||||
if test "`(uname) 2>/dev/null`" = FreeBSD; then
|
if test "`(uname) 2>/dev/null`" = FreeBSD; then
|
||||||
threadsafe_flag="-D_THREAD_SAFE"
|
threadsafe_flag="-D_THREAD_SAFE"
|
||||||
thread_lib="-pthread"
|
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
|
||||||
|
cflags_save=$CFLAGS
|
||||||
|
CFLAGS="$CFLAGS $threadsafe_flag"
|
||||||
|
LIBS="$LIBS $thread_lib"
|
||||||
|
AC_TRY_LINK(,[ ],
|
||||||
|
AC_MSG_RESULT(yes); PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag",
|
||||||
|
AC_MSG_RESULT(no); LIBS=$libs_save_old
|
||||||
|
)
|
||||||
|
CFLAGS=$cflags_save
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl check that compiling a simple program still works with the flags
|
||||||
|
dnl added for Python.
|
||||||
|
AC_MSG_CHECKING([if compile and link flags for Python 3 are sane])
|
||||||
|
cflags_save=$CFLAGS
|
||||||
|
libs_save=$LIBS
|
||||||
|
CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
|
||||||
|
LIBS="$LIBS $PYTHON3_LIBS"
|
||||||
|
AC_TRY_LINK(,[ ],
|
||||||
|
AC_MSG_RESULT(yes); python3_ok=yes,
|
||||||
|
AC_MSG_RESULT(no: PYTHON3 DISABLED); python3_ok=no)
|
||||||
|
CFLAGS=$cflags_save
|
||||||
|
LIBS=$libs_save
|
||||||
|
if test "$python3_ok" = yes; then
|
||||||
|
AC_DEFINE(FEAT_PYTHON3)
|
||||||
|
else
|
||||||
|
LIBS=$libs_save_old
|
||||||
|
PYTHON3_SRC=
|
||||||
|
PYTHON3_OBJ=
|
||||||
|
PYTHON3_LIBS=
|
||||||
|
PYTHON3_CFLAGS=
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
libs_save_old=$LIBS
|
else
|
||||||
if test -n "$threadsafe_flag"; then
|
AC_MSG_RESULT(too old)
|
||||||
cflags_save=$CFLAGS
|
|
||||||
CFLAGS="$CFLAGS $threadsafe_flag"
|
|
||||||
LIBS="$LIBS $thread_lib"
|
|
||||||
AC_TRY_LINK(,[ ],
|
|
||||||
AC_MSG_RESULT(yes); PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag",
|
|
||||||
AC_MSG_RESULT(no); LIBS=$libs_save_old
|
|
||||||
)
|
|
||||||
CFLAGS=$cflags_save
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl check that compiling a simple program still works with the flags
|
|
||||||
dnl added for Python.
|
|
||||||
AC_MSG_CHECKING([if compile and link flags for Python 3 are sane])
|
|
||||||
cflags_save=$CFLAGS
|
|
||||||
libs_save=$LIBS
|
|
||||||
CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
|
|
||||||
LIBS="$LIBS $PYTHON3_LIBS"
|
|
||||||
AC_TRY_LINK(,[ ],
|
|
||||||
AC_MSG_RESULT(yes); python3_ok=yes,
|
|
||||||
AC_MSG_RESULT(no: PYTHON3 DISABLED); python3_ok=no)
|
|
||||||
CFLAGS=$cflags_save
|
|
||||||
LIBS=$libs_save
|
|
||||||
if test "$python3_ok" = yes; then
|
|
||||||
AC_DEFINE(FEAT_PYTHON3)
|
|
||||||
else
|
|
||||||
LIBS=$libs_save_old
|
|
||||||
PYTHON3_SRC=
|
|
||||||
PYTHON3_OBJ=
|
|
||||||
PYTHON3_LIBS=
|
|
||||||
PYTHON3_CFLAGS=
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -2442,7 +2457,7 @@ if test -z "$SKIP_MOTIF"; then
|
|||||||
xmheader="Xm/Xm.h"
|
xmheader="Xm/Xm.h"
|
||||||
else
|
else
|
||||||
xmheader="Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h
|
xmheader="Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h
|
||||||
Xm/UnhighlightT.h Xm/Notebook.h"
|
Xm/UnhighlightT.h Xm/Notebook.h"
|
||||||
fi
|
fi
|
||||||
AC_CHECK_HEADERS($xmheader)
|
AC_CHECK_HEADERS($xmheader)
|
||||||
|
|
||||||
@ -3356,7 +3371,7 @@ AC_TRY_COMPILE(
|
|||||||
[#include <sys/types.h>
|
[#include <sys/types.h>
|
||||||
#include <sys/sysinfo.h>],
|
#include <sys/sysinfo.h>],
|
||||||
[ struct sysinfo sinfo;
|
[ struct sysinfo sinfo;
|
||||||
sinfo.mem_unit = 1;
|
sinfo.mem_unit = 1;
|
||||||
],
|
],
|
||||||
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_MEM_UNIT),
|
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_MEM_UNIT),
|
||||||
AC_MSG_RESULT(no))
|
AC_MSG_RESULT(no))
|
||||||
|
@ -728,6 +728,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1167,
|
||||||
/**/
|
/**/
|
||||||
1166,
|
1166,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user