To: vim_dev@googlegroups.com Subject: Patch 7.4.299 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.299 Problem: When running configure twice DYNAMIC_PYTHON_DLL may become empty. Solution: Use AC_CACHE_VAL. (Ken Takata) Files: src/configure.in, src/auto/configure *** ../vim-7.4.298/src/configure.in 2014-04-12 13:11:58.260430356 +0200 --- src/configure.in 2014-05-22 14:39:39.326486611 +0200 *************** *** 1132,1141 **** vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//` fi ]) - if test "X$python_DLLLIBRARY" != "X"; then - python_INSTSONAME="$python_DLLLIBRARY" - fi PYTHON_LIBS="${vi_cv_path_python_plibs}" if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'" --- 1132,1146 ---- vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//` fi ]) + AC_CACHE_VAL(vi_cv_dll_name_python, + [ + if test "X$python_DLLLIBRARY" != "X"; then + vi_cv_dll_name_python="$python_DLLLIBRARY" + else + vi_cv_dll_name_python="$python_INSTSONAME" + fi + ]) PYTHON_LIBS="${vi_cv_path_python_plibs}" if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'" *************** *** 1323,1341 **** @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'" @echo "python3_INSTSONAME='$(INSTSONAME)'" eof ! dnl -- delete the lines from make about Entering/Leaving directory ! eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" ! 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="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" ! 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/-lffi//` ! ]) ! ! if test "X$python3_DLLLIBRARY" != "X"; then ! 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}\"'" --- 1328,1351 ---- @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'" @echo "python3_INSTSONAME='$(INSTSONAME)'" eof ! dnl -- delete the lines from make about Entering/Leaving directory ! eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" ! 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="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" ! 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/-lffi//` ! ]) ! AC_CACHE_VAL(vi_cv_dll_name_python3, ! [ ! if test "X$python3_DLLLIBRARY" != "X"; then ! vi_cv_dll_name_python3="$python3_DLLLIBRARY" ! else ! vi_cv_dll_name_python3="$python3_INSTSONAME" ! 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}\"'" *************** *** 1458,1464 **** int main(int argc, char** argv) { int not_needed = 0; ! if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}")) not_needed = 1; return !not_needed; }])], --- 1468,1474 ---- int main(int argc, char** argv) { int not_needed = 0; ! if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}")) not_needed = 1; return !not_needed; }])], *************** *** 1504,1510 **** int main(int argc, char** argv) { int not_needed = 0; ! if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}")) not_needed = 1; return !not_needed; }])], --- 1514,1520 ---- int main(int argc, char** argv) { int not_needed = 0; ! if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}")) not_needed = 1; return !not_needed; }])], *************** *** 1515,1531 **** PYTHON_SRC="if_python.c" PYTHON_OBJ="objects/if_python.o" ! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\"" PYTHON_LIBS= PYTHON3_SRC="if_python3.c" PYTHON3_OBJ="objects/if_python3.o" ! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\"" PYTHON3_LIBS= elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then AC_DEFINE(DYNAMIC_PYTHON) PYTHON_SRC="if_python.c" PYTHON_OBJ="objects/if_python.o" ! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\"" PYTHON_LIBS= elif test "$python_ok" = yes; then dnl Check that adding -fPIE works. It may be needed when using a static --- 1525,1541 ---- PYTHON_SRC="if_python.c" PYTHON_OBJ="objects/if_python.o" ! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\"" PYTHON_LIBS= PYTHON3_SRC="if_python3.c" PYTHON3_OBJ="objects/if_python3.o" ! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\"" PYTHON3_LIBS= elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then AC_DEFINE(DYNAMIC_PYTHON) PYTHON_SRC="if_python.c" PYTHON_OBJ="objects/if_python.o" ! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\"" PYTHON_LIBS= elif test "$python_ok" = yes; then dnl Check that adding -fPIE works. It may be needed when using a static *************** *** 1547,1553 **** AC_DEFINE(DYNAMIC_PYTHON3) PYTHON3_SRC="if_python3.c" PYTHON3_OBJ="objects/if_python3.o" ! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\"" PYTHON3_LIBS= elif test "$python3_ok" = yes; then dnl Check that adding -fPIE works. It may be needed when using a static --- 1557,1563 ---- AC_DEFINE(DYNAMIC_PYTHON3) PYTHON3_SRC="if_python3.c" PYTHON3_OBJ="objects/if_python3.o" ! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\"" PYTHON3_LIBS= elif test "$python3_ok" = yes; then dnl Check that adding -fPIE works. It may be needed when using a static *** ../vim-7.4.298/src/auto/configure 2014-04-12 13:11:58.268430356 +0200 --- src/auto/configure 2014-05-22 14:40:05.146486086 +0200 *************** *** 5893,5902 **** fi - if test "X$python_DLLLIBRARY" != "X"; then - python_INSTSONAME="$python_DLLLIBRARY" - fi PYTHON_LIBS="${vi_cv_path_python_plibs}" if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'" --- 5893,5911 ---- fi + if ${vi_cv_dll_name_python+:} false; then : + $as_echo_n "(cached) " >&6 + else + + if test "X$python_DLLLIBRARY" != "X"; then + vi_cv_dll_name_python="$python_DLLLIBRARY" + else + vi_cv_dll_name_python="$python_INSTSONAME" + fi + + fi + PYTHON_LIBS="${vi_cv_path_python_plibs}" if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'" *************** *** 6200,6218 **** @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'" @echo "python3_INSTSONAME='$(INSTSONAME)'" eof ! eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" ! 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="${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/-lffi//` fi - if test "X$python3_DLLLIBRARY" != "X"; then - 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}\"'" --- 6209,6236 ---- @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'" @echo "python3_INSTSONAME='$(INSTSONAME)'" eof ! eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" ! 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="${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/-lffi//` ! ! fi ! ! if ${vi_cv_dll_name_python3+:} false; then : ! $as_echo_n "(cached) " >&6 ! else ! ! if test "X$python3_DLLLIBRARY" != "X"; then ! vi_cv_dll_name_python3="$python3_DLLLIBRARY" ! else ! vi_cv_dll_name_python3="$python3_INSTSONAME" ! fi 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}\"'" *************** *** 6372,6378 **** int main(int argc, char** argv) { int not_needed = 0; ! if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}")) not_needed = 1; return !not_needed; } --- 6390,6396 ---- int main(int argc, char** argv) { int not_needed = 0; ! if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}")) not_needed = 1; return !not_needed; } *************** *** 6438,6444 **** int main(int argc, char** argv) { int not_needed = 0; ! if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}")) not_needed = 1; return !not_needed; } --- 6456,6462 ---- int main(int argc, char** argv) { int not_needed = 0; ! if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}")) not_needed = 1; return !not_needed; } *************** *** 6461,6478 **** PYTHON_SRC="if_python.c" PYTHON_OBJ="objects/if_python.o" ! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\"" PYTHON_LIBS= PYTHON3_SRC="if_python3.c" PYTHON3_OBJ="objects/if_python3.o" ! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\"" PYTHON3_LIBS= elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h PYTHON_SRC="if_python.c" PYTHON_OBJ="objects/if_python.o" ! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\"" PYTHON_LIBS= elif test "$python_ok" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5 --- 6479,6496 ---- PYTHON_SRC="if_python.c" PYTHON_OBJ="objects/if_python.o" ! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\"" PYTHON_LIBS= PYTHON3_SRC="if_python3.c" PYTHON3_OBJ="objects/if_python3.o" ! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\"" PYTHON3_LIBS= elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h PYTHON_SRC="if_python.c" PYTHON_OBJ="objects/if_python.o" ! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\"" PYTHON_LIBS= elif test "$python_ok" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5 *************** *** 6511,6517 **** PYTHON3_SRC="if_python3.c" PYTHON3_OBJ="objects/if_python3.o" ! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\"" PYTHON3_LIBS= elif test "$python3_ok" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5 --- 6529,6535 ---- PYTHON3_SRC="if_python3.c" PYTHON3_OBJ="objects/if_python3.o" ! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\"" PYTHON3_LIBS= elif test "$python3_ok" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5 *************** *** 11420,11426 **** We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ ! #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; --- 11438,11444 ---- We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ ! #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; *************** *** 11466,11472 **** We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ ! #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; --- 11484,11490 ---- We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ ! #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; *************** *** 11490,11496 **** We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ ! #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; --- 11508,11514 ---- We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ ! #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; *************** *** 11535,11541 **** We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ ! #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; --- 11553,11559 ---- We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ ! #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; *************** *** 11559,11565 **** We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ ! #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; --- 11577,11583 ---- We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ ! #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; *** ../vim-7.4.298/src/version.c 2014-05-22 14:19:51.674510749 +0200 --- src/version.c 2014-05-22 14:36:44.634490162 +0200 *************** *** 736,737 **** --- 736,739 ---- { /* Add new patch number below this line */ + /**/ + 299, /**/ -- hundred-and-one symptoms of being an internet addict: 190. You quickly hand over your wallet, leather jacket, and car keys during a mugging, then proceed to beat the crap out of your assailant when he asks for your laptop. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///