zlib.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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-zlib" role="wrap">
  8. <?dbhtml filename="zlib.html"?>
  9. <sect1info condition="script">
  10. <productname>zlib</productname>
  11. <productnumber>&zlib-version;</productnumber>
  12. <address>&zlib-url;</address>
  13. </sect1info>
  14. <title>Zlib-&zlib-version;</title>
  15. <indexterm zone="ch-system-zlib">
  16. <primary sortas="a-Zlib">Zlib</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Zlib package contains compression and decompression routines used by
  21. some programs.</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&zlib-ch6-sbu;</seg>
  27. <seg>&zlib-ch6-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>Installation of Zlib</title>
  33. <note>
  34. <para>Zlib is known to build its shared library incorrectly if
  35. <envar>CFLAGS</envar> is specified in the environment. If using
  36. a specified <envar>CFLAGS</envar> variable, be sure to add the
  37. <parameter>-fPIC</parameter> directive to the <envar>CFLAGS</envar>
  38. variable for the duration of the configure command below, then
  39. remove it afterwards.</para>
  40. </note>
  41. <para>Prepare Zlib for compilation:</para>
  42. <screen><userinput remap="configure">./configure --prefix=/usr --shared --libdir=/lib</userinput></screen>
  43. <para>Compile the package:</para>
  44. <screen><userinput remap="make">make</userinput></screen>
  45. <para>To test the results, issue:</para>
  46. <screen><userinput remap="test">make check</userinput></screen>
  47. <para>Install the shared library:</para>
  48. <screen><userinput remap="install">make install</userinput></screen>
  49. <para>The previous command installed a <filename
  50. class="extension">.so</filename> file in <filename
  51. class="directory">/lib</filename>. We will remove it and relink it into
  52. <filename class="directory">/usr/lib</filename>:</para>
  53. <screen><userinput remap="install">rm -v /lib/libz.so
  54. ln -sfv ../../lib/libz.so.&zlib-version; /usr/lib/libz.so</userinput></screen>
  55. <para>Build the static library:</para>
  56. <screen><userinput remap="make">make clean
  57. ./configure --prefix=/usr
  58. make</userinput></screen>
  59. <para>To test the results again, issue:</para>
  60. <screen><userinput remap="test">make check</userinput></screen>
  61. <para>Install the static library:</para>
  62. <screen><userinput remap="install">make install</userinput></screen>
  63. <para>Fix the permissions on the static library:</para>
  64. <screen><userinput remap="install">chmod -v 644 /usr/lib/libz.a</userinput></screen>
  65. </sect2>
  66. <sect2 id="contents-zlib" role="content">
  67. <title>Contents of Zlib</title>
  68. <segmentedlist>
  69. <segtitle>Installed libraries</segtitle>
  70. <seglistitem>
  71. <seg>libz.{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="libz">
  79. <term><filename class="libraryfile">libz</filename></term>
  80. <listitem>
  81. <para>Contains compression and decompression functions used by
  82. some programs</para>
  83. <indexterm zone="ch-system-zlib libz">
  84. <primary sortas="c-libz">libz</primary>
  85. </indexterm>
  86. </listitem>
  87. </varlistentry>
  88. </variablelist>
  89. </sect2>
  90. </sect1>