readline.xml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. <title>Readline-&readline-version;</title>
  10. <indexterm zone="ch-system-readline">
  11. <primary sortas="a-Readline">Readline</primary>
  12. </indexterm>
  13. <sect2 role="package">
  14. <title/>
  15. <para>The Readline package is a set of libraries that offers command-line
  16. editing and history capabilities.</para>
  17. <segmentedlist>
  18. <segtitle>&buildtime;</segtitle>
  19. <segtitle>&diskspace;</segtitle>
  20. <seglistitem>
  21. <seg>&readline-ch6-sbu;</seg>
  22. <seg>&readline-ch6-du;</seg>
  23. </seglistitem>
  24. </segmentedlist>
  25. </sect2>
  26. <sect2 role="installation">
  27. <title>Installation of Readline</title>
  28. <para>Reinstalling Readline will cause the old libraries to be moved to
  29. &lt;libraryname&gt;.old. While this is normally not a problem, in some cases
  30. it can trigger a linking bug in <command>ldconfig</command>. This can be
  31. avoided by issuing the following two seds:</para>
  32. <screen><userinput>sed -i '/MV.*old/d' Makefile.in
  33. sed -i '/{OLDSUFF}/c:' support/shlib-install</userinput></screen>
  34. <para>Readline contains a bug in its handling of non-multibyte characters,
  35. which can lead to incorrect display calculations and incorrect redisplay.
  36. Fix this issue by applying the following patch from the upstream maintainer:
  37. </para>
  38. <screen><userinput>patch -Np1 -i ../&readline-fixes-patch;</userinput></screen>
  39. <para>Prepare Readline for compilation:</para>
  40. <screen><userinput>./configure --prefix=/usr --libdir=/lib</userinput></screen>
  41. <para>Compile the package:</para>
  42. <screen><userinput>make SHLIB_LIBS=-lncurses</userinput></screen>
  43. <variablelist>
  44. <title>The meaning of the make option:</title>
  45. <varlistentry>
  46. <term><parameter>SHLIB_LIBS=-lncurses</parameter></term>
  47. <listitem>
  48. <para>This option forces Readline to link against the
  49. <filename class="libraryfile">libncurses</filename> (really,
  50. <filename class="libraryfile">libncursesw</filename>) library.</para>
  51. </listitem>
  52. </varlistentry>
  53. </variablelist>
  54. <para>This package does not come with a test suite.</para>
  55. <para>Install the package:</para>
  56. <screen><userinput>make install</userinput></screen>
  57. <para>Now move the static libraries to a more appropriate location:</para>
  58. <screen><userinput>mv -v /lib/lib{readline,history}.a /usr/lib</userinput></screen>
  59. <para>Next, remove the <filename class="extension">.so</filename> files in
  60. <filename class="directory">/lib</filename> and relink them into <filename
  61. class="directory">/usr/lib</filename>:</para>
  62. <screen><userinput>rm -v /lib/lib{readline,history}.so
  63. ln -sfv ../../lib/libreadline.so.5 /usr/lib/libreadline.so
  64. ln -sfv ../../lib/libhistory.so.5 /usr/lib/libhistory.so</userinput></screen>
  65. </sect2>
  66. <sect2 id="contents-readline" role="content">
  67. <title>Contents of Readline</title>
  68. <segmentedlist>
  69. <segtitle>Installed libraries</segtitle>
  70. <seglistitem>
  71. <seg>libhistory.{a,so}, and libreadline.{a,so}</seg>
  72. </seglistitem>
  73. </segmentedlist>
  74. <variablelist>
  75. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  76. <?dbfo list-presentation="list"?>
  77. <?dbhtml list-presentation="table"?>
  78. <varlistentry id="libhistory">
  79. <term><filename class="libraryfile">libhistory</filename></term>
  80. <listitem>
  81. <para>Provides a consistent user interface for recalling lines
  82. of history</para>
  83. <indexterm zone="ch-system-readline libhistory">
  84. <primary sortas="c-libhistory">libhistory</primary>
  85. </indexterm>
  86. </listitem>
  87. </varlistentry>
  88. <varlistentry id="libreadline">
  89. <term><filename class="libraryfile">libreadline</filename></term>
  90. <listitem>
  91. <para>Aids in the consistency of user interface across discrete
  92. programs that need to provide a command line interface</para>
  93. <indexterm zone="ch-system-readline libreadline">
  94. <primary sortas="c-libreadline">libreadline</primary>
  95. </indexterm>
  96. </listitem>
  97. </varlistentry>
  98. </variablelist>
  99. </sect2>
  100. </sect1>