readline.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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. ]>
  7. <sect1 id="ch-system-readline" role="wrap">
  8. <?dbhtml filename="readline.html"?>
  9. <sect1info condition="script">
  10. <productname>readline</productname>
  11. <productnumber>&readline-version;</productnumber>
  12. <address>&readline-url;</address>
  13. </sect1info>
  14. <title>Readline-&readline-version;</title>
  15. <indexterm zone="ch-system-readline">
  16. <primary sortas="a-Readline">Readline</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Readline package is a set of libraries that offers command-line
  21. editing and history capabilities.</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&readline-ch6-sbu;</seg>
  27. <seg>&readline-ch6-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>Installation of Readline</title>
  33. <para>Reinstalling Readline will cause the old libraries to be moved to
  34. &lt;libraryname&gt;.old. While this is normally not a problem, in some cases
  35. it can trigger a linking bug in <command>ldconfig</command>. This can be
  36. avoided by issuing the following two seds:</para>
  37. <screen><userinput remap="pre">sed -i '/MV.*old/d' Makefile.in
  38. sed -i '/{OLDSUFF}/c:' support/shlib-install</userinput></screen>
  39. <para>Prepare Readline for compilation:</para>
  40. <screen><userinput remap="configure">./configure --prefix=/usr \
  41. --disable-static \
  42. --with-curses \
  43. --docdir=/usr/share/doc/readline-&readline-version;</userinput></screen>
  44. <variablelist>
  45. <title>The meaning of the configure option:</title>
  46. <varlistentry>
  47. <term><parameter>--with-curses"</parameter></term>
  48. <listitem>
  49. <para>This option tells Readline that it can find the termcap
  50. library functions in the curses library, rather than a separate
  51. termcap library. It allows generating a correct
  52. <filename>readline.pc</filename> file.</para>
  53. </listitem>
  54. </varlistentry>
  55. </variablelist>
  56. <para>Compile the package:</para>
  57. <screen><userinput remap="make">make SHLIB_LIBS="-L/tools/lib -lncursesw"</userinput></screen>
  58. <variablelist>
  59. <title>The meaning of the make option:</title>
  60. <varlistentry>
  61. <term><parameter>SHLIB_LIBS="-L/tools/lib -lncursesw"</parameter></term>
  62. <listitem>
  63. <para>This option forces Readline to link against the
  64. <filename class="libraryfile">libncursesw</filename> library.</para>
  65. </listitem>
  66. </varlistentry>
  67. </variablelist>
  68. <para>This package does not come with a test suite.</para>
  69. <para>Install the package:</para>
  70. <screen><userinput remap="install">make SHLIB_LIBS="-L/tools/lib -lncursesw" install</userinput></screen>
  71. <para>Now move the dynamic libraries to a more appropriate location
  72. and fix up some permissions and symbolic links:</para>
  73. <screen><userinput remap="install">mv -v /usr/lib/lib{readline,history}.so.* /lib
  74. chmod -v u+w /lib/lib{readline,history}.so.*
  75. ln -sfv ../../lib/$(readlink /usr/lib/libreadline.so) /usr/lib/libreadline.so
  76. ln -sfv ../../lib/$(readlink /usr/lib/libhistory.so ) /usr/lib/libhistory.so</userinput></screen>
  77. <para>If desired, install the documentation:</para>
  78. <screen><userinput remap="install">install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-&readline-version;</userinput></screen>
  79. </sect2>
  80. <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ -->
  81. <sect2 arch="ml_32,ml_all" role="installation">
  82. <title>Installation of Readline - 32-bit</title>
  83. <para>Clean previous build:</para>
  84. <screen><userinput remap="pre">make distclean</userinput></screen>
  85. <para>Prepare Readline for compilation:</para>
  86. <screen><userinput remap="configure">CC="gcc -m32 -march=i686" ./configure \
  87. --prefix=/usr \
  88. --libdir=/usr/lib32 \
  89. --disable-static \
  90. --host=i686-pc-linux-gnu</userinput></screen>
  91. <para>Compile the package:</para>
  92. <screen><userinput remap="make">make</userinput></screen>
  93. <para>Install the package:</para>
  94. <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
  95. cp -Rv DESTDIR/usr/lib32/* /usr/lib32
  96. rm -rf DESTDIR</userinput></screen>
  97. </sect2>
  98. <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ -->
  99. <sect2 arch="ml_x32,ml_all" role="installation">
  100. <title>Installation of Readline - x32-bit</title>
  101. <para>Clean previous build:</para>
  102. <screen><userinput remap="pre">make distclean</userinput></screen>
  103. <para>Prepare Readline for compilation:</para>
  104. <screen><userinput remap="configure">CC="gcc -mx32" ./configure \
  105. --prefix=/usr \
  106. --libdir=/usr/libx32 \
  107. --disable-static \
  108. --host=x86_64-pc-linux-gnux32</userinput></screen>
  109. <para>Compile the package:</para>
  110. <screen><userinput remap="make">make</userinput></screen>
  111. <para>Install the package:</para>
  112. <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
  113. cp -Rv DESTDIR/usr/libx32/* /usr/libx32
  114. rm -rf DESTDIR</userinput></screen>
  115. </sect2>
  116. <sect2 id="contents-readline" role="content">
  117. <title>Contents of Readline</title>
  118. <segmentedlist>
  119. <segtitle>Installed libraries</segtitle>
  120. <segtitle>Installed directories</segtitle>
  121. <seglistitem>
  122. <seg>libhistory.so and libreadline.so</seg>
  123. <seg>/usr/include/readline and
  124. /usr/share/doc/readline-&readline-version;</seg>
  125. </seglistitem>
  126. </segmentedlist>
  127. <variablelist>
  128. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  129. <?dbfo list-presentation="list"?>
  130. <?dbhtml list-presentation="table"?>
  131. <varlistentry id="libhistory">
  132. <term><filename class="libraryfile">libhistory</filename></term>
  133. <listitem>
  134. <para>Provides a consistent user interface for recalling lines
  135. of history</para>
  136. <indexterm zone="ch-system-readline libhistory">
  137. <primary sortas="c-libhistory">libhistory</primary>
  138. </indexterm>
  139. </listitem>
  140. </varlistentry>
  141. <varlistentry id="libreadline">
  142. <term><filename class="libraryfile">libreadline</filename></term>
  143. <listitem>
  144. <para>Provides a set of commands for manipulating text entered in an
  145. interactive session of a program.</para>
  146. <indexterm zone="ch-system-readline libreadline">
  147. <primary sortas="c-libreadline">libreadline</primary>
  148. </indexterm>
  149. </listitem>
  150. </varlistentry>
  151. </variablelist>
  152. </sect2>
  153. </sect1>