]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.676 v7.4.676
authorBram Moolenaar <Bram@vim.org>
Tue, 24 Mar 2015 11:21:33 +0000 (12:21 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 24 Mar 2015 11:21:33 +0000 (12:21 +0100)
Problem:    On Mac, when not using the default Python framework configure
            doesn't do the right thing.
Solution:   Use a linker search path. (Kazunobu Kuriyama)

src/auto/configure
src/configure.in
src/version.c

index 0258a9ed61208c20e3536a7d559db8b1942c2690..b5d17829835b24abe9f45132b5eb097ad46b0d24 100755 (executable)
@@ -5888,17 +5888,34 @@ __:
        @echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
        @echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
        @echo "python_INSTSONAME='$(INSTSONAME)'"
+       @echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
+       @echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
+       @echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
 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"
+             if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
+                 vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
+             fi
            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
+                                     if test -n "${python_LINKFORSHARED}"; then
+               python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
+               python_link_path=`echo ${python_LINKFORSHARED} |   sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t][ \t]*\(.*\)/\2/'`
+               if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
+                                                 python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
+                 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
+                                   python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
+                                                 fi
+                 python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
+               fi
              fi
              vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
                      vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
index 7fa4297393093c49b7b9e12c30d70883a7d18cf1..9d8121530e25edd05714706f4ecfd6d3185665ce 100644 (file)
@@ -1126,6 +1126,9 @@ __:
        @echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
        @echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
        @echo "python_INSTSONAME='$(INSTSONAME)'"
+       @echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
+       @echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
+       @echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
 eof
            dnl -- delete the lines from make about Entering/Leaving directory
            eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
@@ -1133,12 +1136,34 @@ eof
            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"
+             if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
+                 vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
+             fi
            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
+             dnl -- Check if the path contained in python_LINKFORSHARED is
+             dnl    usable for vim build. If not, make and try other
+             dnl    candidates.
+             if test -n "${python_LINKFORSHARED}"; then
+               python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([[^ \t]][[^ \t]]*[[ \t]][[ \t]]*[[^ \t]][[^ \t]]*\)[[ \t]].*/\1/'`
+               python_link_path=`echo ${python_LINKFORSHARED} |   sed 's/\([[^ \t]][[^ \t]]*[[ \t]][[ \t]]*[[^ \t]][[^ \t]]*\)[[ \t]][[ \t]]*\(.*\)/\2/'`
+               if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
+                 dnl -- The path looks relative. Guess the absolute one using
+                 dnl    the prefix and try that.
+                 python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
+                 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
+                   dnl -- A last resort.
+                   python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
+                   dnl -- No check is done. The last word is left to the
+                   dnl    "sanity" test on link flags that follows shortly.
+                 fi
+                 python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
+               fi
+             fi
              vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${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//`
index bb19cb75e97aa4e6612afea3a1564a7be158af7b..86a59978d31628b64f9420262cd52a62783be8dc 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    676,
 /**/
     675,
 /**/