Ticket #47833: patch-python.diff

File patch-python.diff, 4.0 KB (added by harciga, 9 years ago)
  • src/configure.in

    old new  
    10691069  fi
    10701070
    10711071  dnl -- find the python executable
    1072   AC_PATH_PROGS(vi_cv_path_python, python2 python)
     1072  AC_MSG_CHECKING(--with-python argument)
     1073  AC_ARG_WITH(python, [  --with-python=PATH       which python to use (default: python)],
     1074        python_name="$withval"; AC_MSG_RESULT($python_name),
     1075        python_name="python"; AC_MSG_RESULT(no))
     1076  AC_SUBST(vi_cv_path_python, $python_name)
    10731077  if test "X$vi_cv_path_python" != "X"; then
    10741078
    10751079    dnl -- get its version number
     
    11561160            dnl -- delete the lines from make about Entering/Leaving directory
    11571161            eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
    11581162            rm -f -- "${tmp_mkf}"
    1159             if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
    1160                 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
    1161               vi_cv_path_python_plibs="-framework Python"
    1162               if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
    1163                   vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
    1164               fi
    1165             else
    1166               if test "${vi_cv_var_python_version}" = "1.4"; then
    1167                   vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a"
    1168               else
    1169                   vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
    1170               fi
    1171               dnl -- Check if the path contained in python_LINKFORSHARED is
    1172               dnl    usable for vim build. If not, make and try other
    1173               dnl    candidates.
    1174               if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
    1175                 python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([[^ \t]][[^ \t]]*[[ \t]][[ \t]]*[[^ \t]][[^ \t]]*\)[[ \t]].*/\1/'`
    1176                 python_link_path=`echo ${python_LINKFORSHARED} |   sed 's/\([[^ \t]][[^ \t]]*[[ \t]][[ \t]]*[[^ \t]][[^ \t]]*\)[[ \t]][[ \t]]*\(.*\)/\2/'`
    1177                 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
    1178                   dnl -- The path looks relative. Guess the absolute one using
    1179                   dnl    the prefix and try that.
    1180                   python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
    1181                   if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
    1182                     dnl -- A last resort.
    1183                     python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
    1184                     dnl -- No check is done. The last word is left to the
    1185                     dnl    "sanity" test on link flags that follows shortly.
    1186                   fi
    1187                   python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
    1188                 fi
    1189               fi
    1190               vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
    1191               dnl remove -ltermcap, it can conflict with an earlier -lncurses
    1192               vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
    1193             fi
     1163            vi_cv_path_python_plibs="`${vi_cv_path_python}-config --ldflags`"
     1164            dnl remove -ltermcap, it can conflict with an earlier -lncurses
     1165            vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
    11941166        ])
    11951167        AC_CACHE_VAL(vi_cv_dll_name_python,
    11961168        [
     
    12021174        ])
    12031175
    12041176        PYTHON_LIBS="${vi_cv_path_python_plibs}"
    1205         if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
    1206           PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
    1207         else
    1208           PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
    1209         fi
     1177        PYTHON_CFLAGS="`${vi_cv_path_python}-config --includes` -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
    12101178        PYTHON_SRC="if_python.c"
    12111179        PYTHON_OBJ="objects/if_python.o"
    12121180        if test "${vi_cv_var_python_version}" = "1.4"; then