To: vim-dev@vim.org Subject: Patch 6.2.140 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.140 (after 6.2.121) Problem: Mac: Compiling with Python and Perl doesn't work. Solution: Adjust the configure check for Python to use "-framework Python" for Python 2.3 on Mac OS/X. Move "-ldl" after "DynaLoader.a" in the link command. Change "perllibs" to "PERL_LIBS". Files: src/auto/configure, src/configure.in, src/config.mk.in *** ../vim-6.2.139/src/auto/configure Thu Oct 23 14:10:16 2003 --- src/auto/configure Wed Oct 29 13:31:11 2003 *************** *** 1179,1185 **** MACOSX=yes OS_EXTRA_SCR="os_macosx.c"; OS_EXTRA_OBJ="objects/os_macosx.o" ! CFLAGS="$CFLAGS -DMACOS_X_UNIX" ac_safe=`echo "Carbon/Carbon.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Carbon/Carbon.h""... $ac_c" 1>&6 --- 1179,1185 ---- MACOSX=yes OS_EXTRA_SCR="os_macosx.c"; OS_EXTRA_OBJ="objects/os_macosx.o" ! CFLAGS="$CFLAGS -DMACOS_X_UNIX -no-cpp-precomp" ac_safe=`echo "Carbon/Carbon.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Carbon/Carbon.h""... $ac_c" 1>&6 *************** *** 1547,1553 **** if test "X$perlcppflags" != "X"; then PERL_CFLAGS="$perlcppflags" fi ! perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \ sed -e '/Warning/d' -e '/Note (probably harmless)/d' \ -e 's/-bE:perl.exp//' -e 's/-lc //'` --- 1547,1553 ---- if test "X$perlcppflags" != "X"; then PERL_CFLAGS="$perlcppflags" fi ! PERL_LIBS=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \ sed -e '/Warning/d' -e '/Note (probably harmless)/d' \ -e 's/-bE:perl.exp//' -e 's/-lc //'` *************** *** 1587,1593 **** PERL_DIR=$dir PERL_CFLAGS=-DFEAT_PERL -I$darwindir/CORE PERL_OBJ=if_perl.o if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a ! PERL_LIBS=-lperl -L$darwindir/CORE fi fi fi --- 1587,1593 ---- PERL_DIR=$dir PERL_CFLAGS=-DFEAT_PERL -I$darwindir/CORE PERL_OBJ=if_perl.o if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a ! PERL_LIBS=-L$darwindir/CORE -lperl fi fi fi *************** *** 1748,1760 **** eof eval "`cd ${PYTHON_CONFDIR} && make -f ${tmp_mkf} __ | sed '/ directory /d'`" rm -f ${tmp_mkf} ! if test "${vi_cv_var_python_version}" = "1.4"; then ! vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a" else ! vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}" fi - vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_MODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}" - vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//` fi --- 1748,1765 ---- eof eval "`cd ${PYTHON_CONFDIR} && make -f ${tmp_mkf} __ | sed '/ directory /d'`" rm -f ${tmp_mkf} ! if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \ ! "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then ! vi_cv_path_python_plibs="-framework Python" else ! if test "${vi_cv_var_python_version}" = "1.4"; then ! vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a" ! else ! vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}" ! fi ! vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_MODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}" ! vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//` fi fi *************** *** 8008,8013 **** --- 8016,8028 ---- done + if test "x$MACOSX" = "xyes" -a -n "$PERL"; then + if echo $LIBS | grep -e '-ldl' >/dev/null; then + LIBS=`echo $LIBS | sed s/-ldl//` + PERL_LIBS="$PERL_LIBS -ldl" + fi + fi + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure *************** *** 8158,8164 **** s%@compiledby@%$compiledby%g s%@vi_cv_path_perl@%$vi_cv_path_perl%g s%@vi_cv_perllib@%$vi_cv_perllib%g ! s%@perllibs@%$perllibs%g s%@shrpenv@%$shrpenv%g s%@PERL_SRC@%$PERL_SRC%g s%@PERL_OBJ@%$PERL_OBJ%g --- 8173,8179 ---- s%@compiledby@%$compiledby%g s%@vi_cv_path_perl@%$vi_cv_path_perl%g s%@vi_cv_perllib@%$vi_cv_perllib%g ! s%@PERL_LIBS@%$PERL_LIBS%g s%@shrpenv@%$shrpenv%g s%@PERL_SRC@%$PERL_SRC%g s%@PERL_OBJ@%$PERL_OBJ%g *** ../vim-6.2.139/src/configure.in Fri Oct 17 12:01:21 2003 --- src/configure.in Wed Oct 29 13:30:12 2003 *************** *** 85,91 **** MACOSX=yes OS_EXTRA_SCR="os_macosx.c"; OS_EXTRA_OBJ="objects/os_macosx.o" ! CFLAGS="$CFLAGS -DMACOS_X_UNIX" dnl If Carbon is found, assume we don't want X11 dnl unless it was specifically asked for (--with-x) --- 85,91 ---- MACOSX=yes OS_EXTRA_SCR="os_macosx.c"; OS_EXTRA_OBJ="objects/os_macosx.o" ! CFLAGS="$CFLAGS -DMACOS_X_UNIX -no-cpp-precomp" dnl If Carbon is found, assume we don't want X11 dnl unless it was specifically asked for (--with-x) *************** *** 298,307 **** PERL_CFLAGS="$perlcppflags" fi dnl Remove "-lc", it breaks on FreeBSD when using "-pthread". ! perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \ sed -e '/Warning/d' -e '/Note (probably harmless)/d' \ -e 's/-bE:perl.exp//' -e 's/-lc //'` ! AC_SUBST(perllibs) dnl Don't add perl lib to $LIBS: if it's not in LD_LIBRARY_PATH dnl a test in configure may fail because of that. perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \ --- 298,307 ---- PERL_CFLAGS="$perlcppflags" fi dnl Remove "-lc", it breaks on FreeBSD when using "-pthread". ! PERL_LIBS=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \ sed -e '/Warning/d' -e '/Note (probably harmless)/d' \ -e 's/-bE:perl.exp//' -e 's/-lc //'` ! AC_SUBST(PERL_LIBS) dnl Don't add perl lib to $LIBS: if it's not in LD_LIBRARY_PATH dnl a test in configure may fail because of that. perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \ *************** *** 339,345 **** PERL_DIR=$dir PERL_CFLAGS=-DFEAT_PERL -I$darwindir/CORE PERL_OBJ=if_perl.o if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a ! PERL_LIBS=-lperl -L$darwindir/CORE fi fi fi --- 339,345 ---- PERL_DIR=$dir PERL_CFLAGS=-DFEAT_PERL -I$darwindir/CORE PERL_OBJ=if_perl.o if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a ! PERL_LIBS=-L$darwindir/CORE -lperl fi fi fi *************** *** 432,445 **** dnl -- delete the lines from make about Entering/Leaving directory eval "`cd ${PYTHON_CONFDIR} && make -f ${tmp_mkf} __ | sed '/ directory /d'`" rm -f ${tmp_mkf} ! if test "${vi_cv_var_python_version}" = "1.4"; then ! vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a" else ! vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}" fi - vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_MODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}" - dnl remove -ltermcap, it can conflict with an earlier -lncurses - vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//` ]) PYTHON_LIBS="${vi_cv_path_python_plibs}" --- 432,450 ---- dnl -- delete the lines from make about Entering/Leaving directory eval "`cd ${PYTHON_CONFDIR} && make -f ${tmp_mkf} __ | sed '/ directory /d'`" rm -f ${tmp_mkf} ! if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \ ! "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then ! vi_cv_path_python_plibs="-framework Python" else ! if test "${vi_cv_var_python_version}" = "1.4"; then ! vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a" ! else ! vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}" ! fi ! vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_MODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}" ! dnl remove -ltermcap, it can conflict with an earlier -lncurses ! vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//` fi ]) PYTHON_LIBS="${vi_cv_path_python_plibs}" *************** *** 2510,2515 **** --- 2515,2528 ---- LIBS=$olibs)) fi AC_CHECK_HEADERS(setjmp.h) + + if test "x$MACOSX" = "xyes" -a -n "$PERL"; then + dnl -ldl must come after DynaLoader.a + if echo $LIBS | grep -e '-ldl' >/dev/null; then + LIBS=`echo $LIBS | sed s/-ldl//` + PERL_LIBS="$PERL_LIBS -ldl" + fi + fi dnl write output files AC_OUTPUT(auto/config.mk:config.mk.in) *** ../vim-6.2.139/src/config.mk.in Mon Oct 13 22:21:06 2003 --- src/config.mk.in Wed Oct 29 13:30:46 2003 *************** *** 37,43 **** PERL = @vi_cv_path_perl@ PERLLIB = @vi_cv_perllib@ ! PERL_LIBS = @perllibs@ SHRPENV = @shrpenv@ PERL_SRC = @PERL_SRC@ PERL_OBJ = @PERL_OBJ@ --- 37,43 ---- PERL = @vi_cv_path_perl@ PERLLIB = @vi_cv_perllib@ ! PERL_LIBS = @PERL_LIBS@ SHRPENV = @shrpenv@ PERL_SRC = @PERL_SRC@ PERL_OBJ = @PERL_OBJ@ *** ../vim-6.2.139/src/version.c Wed Oct 29 14:45:27 2003 --- src/version.c Wed Oct 29 14:47:22 2003 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 140, /**/ -- TIM: To the north there lies a cave, the cave of Caerbannog, wherein, carved in mystic runes, upon the very living rock, the last words of Olfin Bedwere of Rheged make plain the last resting place of the most Holy Grail. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///