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) |
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//` |