readline.xml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. <!ENTITY % patches-entities SYSTEM "../patches.ent">
  5. %general-entities;
  6. %patches-entities;
  7. ]>
  8. <sect1 id="ch-system-readline" role="wrap">
  9. <title>Readline-&readline-version;</title>
  10. <?dbhtml filename="readline.html"?>
  11. <indexterm zone="ch-system-readline"><primary sortas="a-Readline">Readline</primary></indexterm>
  12. <sect2 role="package"><title/>
  13. <para>The Readline package is a set of libraries that offers command-line
  14. editing and history capabilities.</para>
  15. <segmentedlist>
  16. <segtitle>&buildtime;</segtitle>
  17. <segtitle>&diskspace;</segtitle>
  18. <seglistitem><seg>0.11 SBU</seg><seg>9.1 MB</seg></seglistitem>
  19. </segmentedlist>
  20. <segmentedlist>
  21. <segtitle>&dependencies;</segtitle>
  22. <seglistitem><seg>Binutils, Coreutils, Diffutils, Gawk,
  23. GCC, Glibc, Grep, Make, Ncurses, and Sed</seg></seglistitem>
  24. </segmentedlist>
  25. </sect2>
  26. <sect2 role="installation">
  27. <title>Installation of Readline</title>
  28. <para>The following patch includes a fix for a problem where Readline sometimes
  29. only shows 33 characters on a line and then wraps to the next line. It also
  30. includes other fixes recommended by the Readline author.</para>
  31. <screen><userinput>patch -Np1 -i ../&readline-fixes-patch;</userinput></screen>
  32. <para>Prepare Readline for compilation:</para>
  33. <screen><userinput>./configure --prefix=/usr --libdir=/lib</userinput></screen>
  34. <para>Compile the package:</para>
  35. <screen><userinput>make SHLIB_XLDFLAGS=-lncurses</userinput></screen>
  36. <para>The meaning of the make option:</para>
  37. <variablelist>
  38. <varlistentry>
  39. <term><parameter>SHLIB_XLDFLAGS=-lncurses</parameter></term>
  40. <listitem><para>This option forces Readline to link against the
  41. <filename class="libraryfile">libncurses</filename> library.</para></listitem>
  42. </varlistentry>
  43. </variablelist>
  44. <para>Install the package:</para>
  45. <screen><userinput>make install</userinput></screen>
  46. <para>Give Readline's dynamic libraries more appropriate permissions:</para>
  47. <screen><userinput>chmod 755 /lib/lib{readline,history}.so*</userinput></screen>
  48. <para>Now move the static libraries to a more appropriate location:</para>
  49. <screen><userinput>mv /lib/lib{readline,history}.a /usr/lib</userinput></screen>
  50. <para>Next, remove the <filename class="extension">.so</filename> files in
  51. <filename class="directory">/lib</filename> and relink them into <filename
  52. class="directory">/usr/lib</filename>.</para>
  53. <screen><userinput>rm /lib/lib{readline,history}.so
  54. ln -sf ../../lib/libreadline.so.5 /usr/lib/libreadline.so
  55. ln -sf ../../lib/libhistory.so.5 /usr/lib/libhistory.so</userinput></screen>
  56. </sect2>
  57. <sect2 id="contents-readline" role="content"><title>Contents of Readline</title>
  58. <segmentedlist>
  59. <segtitle>Installed libraries</segtitle>
  60. <seglistitem><seg>libhistory.[a,so], and libreadline.[a,so]</seg></seglistitem>
  61. </segmentedlist>
  62. <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
  63. <?dbfo list-presentation="list"?>
  64. <?dbhtml list-presentation="table"?>
  65. <varlistentry id="libhistory">
  66. <term><filename class="libraryfile">libhistory</filename></term>
  67. <listitem>
  68. <para>Provides a consistent user interface
  69. for recalling lines of history</para>
  70. <indexterm zone="ch-system-readline libhistory"><primary sortas="c-libhistory">libhistory</primary></indexterm>
  71. </listitem>
  72. </varlistentry>
  73. <varlistentry id="libreadline">
  74. <term><filename class="libraryfile">libreadline</filename></term>
  75. <listitem>
  76. <para>Aids in the consistency of user interface
  77. across discrete programs that need to provide a command line
  78. interface</para>
  79. <indexterm zone="ch-system-readline libreadline"><primary sortas="c-libreadline">libreadline</primary></indexterm>
  80. </listitem>
  81. </varlistentry>
  82. </variablelist>
  83. </sect2>
  84. </sect1>