从源代码构建ncurses时如何为terminfo数据库设置自定义搜索路径

Pád*_*aig 5 search path ncurses terminfo

从源代码构建ncurses时,如何为terminfo数据库设置自定义搜索路径?

更具体地说,如何强制在“〜/ .terminfo”中搜索主目录?

Luc*_*ano 5

--datadir在 中定义标志configure,例如:

configure --datadir=/usr/customshare
Run Code Online (Sandbox Code Playgroud)

阅读位于 ncurses 文件根目录下的 INSTALL 文件中的注释:

...

terminfo 的位置由“--datadir”配置选项间接设置,例如,给定 datadir 为 /usr/share 时,为 /usr/share/terminfo。如果您在非标准位置安装 ncurses 库,但希望共享 terminfo 数据库,您可能需要覆盖此设置。

...

--with-terminfo-dirs=XXX 指定将被编译到 ncurses 库中的 terminfo 目录的搜索列表(默认值:DATADIR/terminfo)


she*_*ter 4

来自terminfo 联机帮助页

获取编译描述 如果设置了环境变量 TERMINFO,它将被解释为包含您正在处理的编译描述的目录的路径名。仅搜索该目录。

  If TERMINFO is not set, the ncurses version of the terminfo reader code
  will  instead  look  in  the  directory  $HOME/.terminfo for a compiled
  description. 
Run Code Online (Sandbox Code Playgroud)

您可能需要查阅联机帮助页以获取有关如何编译 terminfo 文件的信息。

我希望这有帮助。