从源代码构建 ncurses 时,如何为 terminfo 数据库设置自定义搜索路径?
更具体地说,如何强制在“~/.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.
您可能需要查阅手册页以获取有关如何编译 terminfo 文件的信息。
我希望这有帮助。
在 中定义--datadir
标志configure
,例如:
configure --datadir=/usr/customshare
阅读位于 ncurses 文件根目录中的 INSTALL 文件中的注释:
...
terminfo 的位置由“--datadir”配置选项间接设置,例如,/usr/share/terminfo,给定数据目录/usr/share。如果您在非标准位置安装 ncurses 库,但希望共享 terminfo 数据库,您可能希望覆盖它。
...
--with-terminfo-dirs=XXX 指定将编译到 ncurses 库中的 terminfo 目录的搜索列表(默认值:DATADIR/terminfo)