gvim コンパイルメモ(+clientserver)
configure で --enable-gui=no していると clientserver は入らない。
configure の --enable-* と feature.h の FEAT_* が対応しているようで(Makefile の流儀なのかな?)feature.h の マクロ追ってみたらそうなっていた。のだが、このへんは詳しくないので間違ってたら教えてくだちい。
該当ソース。FEAT_CLIENTSERVER を得るために FEAT_GUI が必要な構造になっている。
/* * +clipboard Clipboard support. Always used for the GUI. * +xterm_clipboard Unix only: Include code for handling the clipboard * in an xterm like in the GUI. */ #ifdef FEAT_GUI # ifndef FEAT_CLIPBOARD # define FEAT_CLIPBOARD # ifndef FEAT_VISUAL # define FEAT_VISUAL # endif # endif #endif # #if defined(FEAT_NORMAL) && defined(FEAT_VISUAL) \ && (defined(UNIX) || defined(VMS)) \ && defined(WANT_X11) && defined(HAVE_X11) # define FEAT_XCLIPBOARD # ifndef FEAT_CLIPBOARD # define FEAT_CLIPBOARD # endif #endif (snip) /* * +clientserver Remote control via the remote_send() function * and the --remote argument */ #if (defined(WIN32) || defined(FEAT_XCLIPBOARD)) && defined(FEAT_EVAL) # define FEAT_CLIENTSERVER #endif
ちなみに FEAT_EVAL は FEAT_NORMAL なら入るようになってるので、ほとんどの場合気にしなくていいみたい。
というか、:version で出てくる FEATURE の一覧がずらって出てくるのに、コンパイル時にそれを直接指定できないのはテンパってしまったなぁ。vim な人には常識だったのだろうか。
教訓:vim の FEATURE をいじりたい場合は feature.h を読め