123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
- ]>
- <sect1 id="ch-system-readline" role="wrap">
- <?dbhtml filename="readline.html"?>
- <sect1info condition="script">
- <productname>readline</productname>
- <productnumber>&readline-version;</productnumber>
- <address>&readline-url;</address>
- </sect1info>
- <title>Readline-&readline-version;</title>
- <indexterm zone="ch-system-readline">
- <primary sortas="a-Readline">Readline</primary>
- </indexterm>
- <sect2 role="package">
- <title/>
- <para>Readline 软件包包含一些提供命令行编辑和历史记录功能的库。</para>
- <segmentedlist>
- <segtitle>&buildtime;</segtitle>
- <segtitle>&diskspace;</segtitle>
- <seglistitem>
- <seg>&readline-ch6-sbu;</seg>
- <seg>&readline-ch6-du;</seg>
- </seglistitem>
- </segmentedlist>
- </sect2>
- <sect2 role="installation">
- <title>安装 Readline</title>
- <!--para>Reinstalling Readline will cause the old libraries to be moved to
- <libraryname>.old. While this is normally not a problem, in some cases
- it can trigger a linking bug in <command>ldconfig</command>. This can be
- avoided by issuing the following two seds:</para-->
- <para>重新安装 Readline 会导致旧版本的库被重命名为
- <库名称>.old 。这一般不是问题,但某些情况下会触发
- <command>ldconfig</command> 的一个链接 bug 。
- 运行以下两条 sed 命令防止这种情况:</para>
- <screen><userinput remap="pre">sed -i '/MV.*old/d' Makefile.in
- sed -i '/{OLDSUFF}/c:' support/shlib-install</userinput></screen>
- <para>准备安装 Readline:</para>
- <screen><userinput remap="configure">./configure --prefix=/usr \
- --disable-static \
- --docdir=/usr/share/doc/readline-&readline-version;</userinput></screen>
- <para>编译该软件包:</para>
- <screen><userinput remap="make">make SHLIB_LIBS="-L/tools/lib -lncursesw"</userinput></screen>
- <variablelist>
- <title>make 命令选项的含义</title>
- <varlistentry>
- <term><parameter>SHLIB_LIBS="-L/tools/lib -lncursesw"</parameter></term>
- <listitem>
- <para>该选项强制 Readline 链接到
- <filename class="libraryfile">libncursesw</filename> 库。</para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>该软件包不包含测试套件。</para>
- <para>安装该软件包:</para>
- <screen><userinput remap="install">make SHLIB_LIBS="-L/tools/lib -lncurses" install</userinput></screen>
- <!--para>Now move the dynamic libraries to a more appropriate location
- and fix up some permissions and symbolic links:</para-->
- <para>下面将动态库移动到更合适的位置,并修正访问权限和符号链接:</para>
- <screen><userinput remap="install">mv -v /usr/lib/lib{readline,history}.so.* /lib
- chmod -v u+w /lib/lib{readline,history}.so.*
- ln -sfv ../../lib/$(readlink /usr/lib/libreadline.so) /usr/lib/libreadline.so
- ln -sfv ../../lib/$(readlink /usr/lib/libhistory.so ) /usr/lib/libhistory.so</userinput></screen>
- <para>如果您希望的话,可以安装文档:</para>
- <screen><userinput remap="install">install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-&readline-version;</userinput></screen>
- </sect2>
- <sect2 id="contents-readline" role="content">
- <title>Readline 的内容</title>
- <segmentedlist>
- <segtitle>安装的库</segtitle>
- <segtitle>安装的目录</segtitle>
- <seglistitem>
- <seg>libhistory.so 和 libreadline.so</seg>
- <seg>/usr/include/readline, /usr/share/readline, 以及
- /usr/share/doc/readline-&readline-version;</seg>
- </seglistitem>
- </segmentedlist>
- <variablelist>
- <bridgehead renderas="sect3">简要描述</bridgehead>
- <?dbfo list-presentation="list"?>
- <?dbhtml list-presentation="table"?>
- <varlistentry id="libhistory">
- <term><filename class="libraryfile">libhistory</filename></term>
- <listitem>
- <para>提供一个查询之前输入行的一致用户接口</para>
- <indexterm zone="ch-system-readline libhistory">
- <primary sortas="c-libhistory">libhistory</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="libreadline">
- <term><filename class="libraryfile">libreadline</filename></term>
- <listitem>
- <para>提供一组在程序的交互会话中操纵输入的文本的命令</para>
- <indexterm zone="ch-system-readline libreadline">
- <primary sortas="c-libreadline">libreadline</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- </variablelist>
- </sect2>
- </sect1>
|