vim 编译安装
Tips:vim 无法同时支持 python2 和 python3。
-
获取源码:
git clone https://github.com/vim/vim.git ./vim
-
安装依赖:
python-dev
、python3-dev
、libncurses5-dev
-
进入源码目录:
cd ./vim/src
-
配置自定义选项:
./configure [option]
Configuration: -h, --help 显示帮助并退出 --help=short 简短显示此软件包的选项 --help=recursive 显示所有包含的软件包的简短帮助 -V, --version 显示版本信息并退出 -q, --quiet, --silent 不打印检查信息 --cache-file=FILE 缓存测试结果到文件 -C, --config-cache 上一个选项的别名 -n, --no-create 不创建输出文件 --srcdir=DIR 指定源文件路径 安装目录: --prefix=PREFIX 将文件安装到指定文件夹 --exec-prefix=EPREFIX 将可执行文件安装到指定文件夹 By default, `make install' will install all the files in `/usr/local/bin', `/usr/local/lib' etc. You can specify an installation prefix other than `/usr/local' using `--prefix', for instance `--prefix=$HOME'. 可选功能: --disable-option-checking 忽略无法识别的选项 --disable-FEATURE 不包含指定的功能 (和--enable-FEATURE=no一样) --enable-FEATURE[=ARG] 包含指定的功能 [ARG=yes] --enable-fail-if-missing 命令中如果缺少对指定功能的依赖,则失败 --disable-darwin 禁用 Darwin (Mac OS X) 支持. --disable-smack 不检查Smack的支持. --disable-selinux 不检查关于SELinux的支持. --disable-xsmp 关闭XSMP会话管理 --disable-xsmp-interact 关闭XSMP交互 --enable-luainterp=OPTS 包含Lua解释器. default=no OPTS=no/yes/dynamic --enable-mzschemeinterp 包含MzScheme解释器. --enable-perlinterp=OPTS 包含Perl解释器. default=no OPTS=no/yes/dynamic --enable-pythoninterp=OPTS 包含Python解释器. default=no OPTS=no/yes/dynamic --enable-python3interp=OPTS 包含Python3解释器. default=no OPTS=no/yes/dynamic --enable-tclinterp=OPTS 包含Tcl解释器. default=no OPTS=no/yes/dynamic --enable-rubyinterp=OPTS 包含Ruby解释器. default=no OPTS=no/yes/dynamic --enable-cscope 包含cscope接口. --disable-netbeans 禁用NetBeans集成支持. --disable-channel 禁用过程通信支持. --enable-terminal 开启仿真终端支持. --enable-autoservername 在vim启动时自动定义服务名. --enable-multibyte 包含多字节编辑的支持(中文). --disable-rightleft 不包括从右到左的语言支持. --disable-arabic 不包括阿拉伯语言的支持. --enable-hangulinput 包含韩文输入的支持. --enable-xim 包含XIM输入的支持. --enable-fontset 包含X字体集输出支持. --enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/photon/carbon --enable-gtk2-check 如果自动选择GUI,检查GTK+2 default=yes --enable-gnome-check 如果是GTK GUI,检查是否是GNOME default=no --enable-gtk3-check 如果自动选择GUI,检查GTK+ 3 default=yes --enable-motif-check 如果自动选择GUI,检查Motif default=yes --enable-athena-check 如果自动选择GUI,检查Athena default=yes --enable-nextaw-check 如果自动选择GUI,检查neXtaw default=yes --enable-carbon-check 如果自动选择GUI,检查Carbon default=yes --disable-gtktest 不尝试编译和运行测试GTK程序 --disable-icon-cache-update 禁用更新 --disable-desktop-database-update 禁用更新 --disable-largefile 忽略对大文件的支持 --disable-canberra 不使用libcanberra. --disable-acl 不检查是否支持ACL. --disable-gpm 不使用gpm(Linux鼠标守护程序). --disable-sysmouse 不使用sysmouse(*BSD控制台中的鼠标). --disable-nls 不支持NLS (gettext()). Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-mac-arch=ARCH current, intel, ppc or both --with-developer-dir=PATH use PATH as location for Xcode developer tools --with-local-dir=PATH search PATH instead of /usr/local for local libraries. --without-local-dir do not search /usr/local for local libraries. --with-vim-name=NAME what to call the Vim executable --with-ex-name=NAME what to call the Ex executable --with-view-name=NAME what to call the View executable --with-global-runtime=DIR global runtime directory in 'runtimepath', comma-separated for multiple directories --with-modified-by=NAME name of who modified a release version --with-features=TYPE tiny, small, normal, big or huge (default: huge) --with-compiledby=NAME name to show in :version message --with-lua-prefix=PFX Prefix where Lua is installed. --with-luajit Link with LuaJIT instead of Lua. --with-plthome=PLTHOME Use PLTHOME. --with-python-command=NAME name of the Python 2 command (default: python2 or python) --with-python-config-dir=PATH Python's config directory (deprecated) --with-python3-command=NAME name of the Python 3 command (default: python3 or python) --with-python3-config-dir=PATH Python's config directory (deprecated) --with-tclsh=PATH which tclsh to use (default: tclsh8.0) --with-ruby-command=RUBY name of the Ruby command (default: ruby) --with-x use the X Window System --with-gnome-includes=DIR Specify location of GNOME headers --with-gnome-libs=DIR Specify location of GNOME libs --with-gnome Specify prefix for GNOME files --with-motif-lib=STRING Library for Motif --with-tlib=library terminal library to be used Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor XMKMF Path to xmkmf, Makefile generator for X Window System
-
编译安装:
make install