Tag LFS-7.9-systemd-rc2
[linux_from_scratch.git] / chapter06 / readline.xml
blob3b162d5eafbfae9c37fcd207a32e4b665a356834
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4   <!ENTITY % general-entities SYSTEM "../general.ent">
5   %general-entities;
6 ]>
8 <sect1 id="ch-system-readline" role="wrap">
9   <?dbhtml filename="readline.html"?>
11   <sect1info condition="script">
12     <productname>readline</productname>
13     <productnumber>&readline-version;</productnumber>
14     <address>&readline-url;</address>
15   </sect1info>
17   <title>Readline-&readline-version;</title>
19   <indexterm zone="ch-system-readline">
20     <primary sortas="a-Readline">Readline</primary>
21   </indexterm>
23   <sect2 role="package">
24     <title/>
26     <para>The Readline package is a set of libraries that offers command-line
27     editing and history capabilities.</para>
29     <segmentedlist>
30       <segtitle>&buildtime;</segtitle>
31       <segtitle>&diskspace;</segtitle>
33       <seglistitem>
34         <seg>&readline-ch6-sbu;</seg>
35         <seg>&readline-ch6-du;</seg>
36       </seglistitem>
37     </segmentedlist>
39   </sect2>
41   <sect2 role="installation">
42     <title>Installation of Readline</title>
44     <para>First install some patches to fix various bugs that have been
45     addressed upstream:</para>
47 <screen><userinput remap="pre">patch -Np1 -i ../&readline-fixes-patch;</userinput></screen>
49     <para>Reinstalling Readline will cause the old libraries to be moved to
50     &lt;libraryname&gt;.old. While this is normally not a problem, in some cases
51     it can trigger a linking bug in <command>ldconfig</command>. This can be
52     avoided by issuing the following two seds:</para>
54 <screen><userinput remap="pre">sed -i '/MV.*old/d' Makefile.in
55 sed -i '/{OLDSUFF}/c:' support/shlib-install</userinput></screen>
57     <para>Prepare Readline for compilation:</para>
59 <screen><userinput remap="configure">./configure --prefix=/usr    \
60             --disable-static \
61             --docdir=/usr/share/doc/readline-&readline-version;</userinput></screen>
63     <para>Compile the package:</para>
65 <screen><userinput remap="make">make SHLIB_LIBS=-lncurses</userinput></screen>
67     <variablelist>
68       <title>The meaning of the make option:</title>
70       <varlistentry>
71         <term><parameter>SHLIB_LIBS=-lncurses</parameter></term>
72         <listitem>
73           <para>This option forces Readline to link against the
74           <filename class="libraryfile">libncurses</filename> (really,
75           <filename class="libraryfile">libncursesw</filename>) library.</para>
76         </listitem>
77       </varlistentry>
79     </variablelist>
81     <para>This package does not come with a test suite.</para>
83     <para>Install the package:</para>
85 <screen><userinput remap="install">make SHLIB_LIBS=-lncurses install</userinput></screen>
87     <para>Now move the dynamic libraries to a more appropriate location
88     and fix up some symbolic links:</para>
90 <screen><userinput remap="install">mv -v /usr/lib/lib{readline,history}.so.* /lib
91 ln -sfv ../../lib/$(readlink /usr/lib/libreadline.so) /usr/lib/libreadline.so
92 ln -sfv ../../lib/$(readlink /usr/lib/libhistory.so ) /usr/lib/libhistory.so</userinput></screen>
94     <para>If desired, install the documentation:</para>
96 <screen><userinput remap="install">install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-&readline-version;</userinput></screen>
98   </sect2>
100   <sect2 id="contents-readline" role="content">
101     <title>Contents of Readline</title>
103     <segmentedlist>
104       <segtitle>Installed libraries</segtitle>
105       <segtitle>Installed directories</segtitle>
107       <seglistitem>
108         <seg>libhistory.so and libreadline.so</seg>
109         <seg>/usr/include/readline, /usr/share/readline, and
110         /usr/share/doc/readline-&readline-version;</seg>
111       </seglistitem>
112     </segmentedlist>
114     <variablelist>
115       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
116       <?dbfo list-presentation="list"?>
117       <?dbhtml list-presentation="table"?>
119       <varlistentry id="libhistory">
120         <term><filename class="libraryfile">libhistory</filename></term>
121         <listitem>
122           <para>Provides a consistent user interface for recalling lines
123           of history</para>
124           <indexterm zone="ch-system-readline libhistory">
125             <primary sortas="c-libhistory">libhistory</primary>
126           </indexterm>
127         </listitem>
128       </varlistentry>
130       <varlistentry id="libreadline">
131         <term><filename class="libraryfile">libreadline</filename></term>
132         <listitem>
133           <para>Aids in the consistency of user interface across discrete
134           programs that need to provide a command line interface</para>
135           <indexterm zone="ch-system-readline libreadline">
136             <primary sortas="c-libreadline">libreadline</primary>
137           </indexterm>
138         </listitem>
139       </varlistentry>
141     </variablelist>
143   </sect2>
145 </sect1>