zlib.xml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.4/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. <title>Zlib-&zlib-version;</title>
  10. <indexterm zone="ch-system-zlib">
  11. <primary sortas="a-Zlib">Zlib</primary>
  12. </indexterm>
  13. <sect2 role="package">
  14. <title/>
  15. <para>The Zlib package contains compression and decompression routines used by
  16. some programs.</para>
  17. <segmentedlist>
  18. <segtitle>&buildtime;</segtitle>
  19. <segtitle>&diskspace;</segtitle>
  20. <seglistitem>
  21. <seg>0.1 SBU</seg>
  22. <seg>2.7 MB</seg>
  23. </seglistitem>
  24. </segmentedlist>
  25. <segmentedlist>
  26. <segtitle>&dependencies;</segtitle>
  27. <seglistitem>
  28. <seg>Binutils, Coreutils, GCC, Glibc, Make, and Sed</seg>
  29. </seglistitem>
  30. </segmentedlist>
  31. </sect2>
  32. <sect2 role="installation">
  33. <title>Installation of Zlib</title>
  34. <note>
  35. <para>Zlib is known to build its shared library incorrectly if
  36. <envar>CFLAGS</envar> is specified in the environment. If using
  37. a specified <envar>CFLAGS</envar> variable, be sure to add the
  38. <parameter>-fPIC</parameter> directive to the <envar>CFLAGS</envar>
  39. variable for the duration of the configure command below, then
  40. remove it afterwards.</para>
  41. </note>
  42. <para>Prepare Zlib for compilation:</para>
  43. <screen><userinput>./configure --prefix=/usr --shared --libdir=/lib</userinput></screen>
  44. <para>Compile the package:</para>
  45. <screen><userinput>make</userinput></screen>
  46. <para>To test the results, issue:
  47. <userinput>make check</userinput>.</para>
  48. <para>Install the shared library:</para>
  49. <screen><userinput>make install</userinput></screen>
  50. <para>The previous command installed a <filename
  51. class="extension">.so</filename> file in <filename
  52. class="directory">/lib</filename>. We will remove it and relink it into
  53. <filename class="directory">/usr/lib</filename>:</para>
  54. <screen><userinput>rm -v /lib/libz.so
  55. ln -sfv ../../lib/libz.so.&zlib-version; /usr/lib/libz.so</userinput></screen>
  56. <para>Build the static library:</para>
  57. <screen><userinput>make clean
  58. ./configure --prefix=/usr
  59. make</userinput></screen>
  60. <para>To test the results again, issue:
  61. <userinput>make check</userinput>.</para>
  62. <para>Install the static library:</para>
  63. <screen><userinput>make install</userinput></screen>
  64. <para>Fix the permissions on the static library:</para>
  65. <screen><userinput>chmod -v 644 /usr/lib/libz.a</userinput></screen>
  66. </sect2>
  67. <sect2 id="contents-zlib" role="content">
  68. <title>Contents of Zlib</title>
  69. <segmentedlist>
  70. <segtitle>Installed libraries</segtitle>
  71. <seglistitem>
  72. <seg>libz.[a,so]</seg>
  73. </seglistitem>
  74. </segmentedlist>
  75. <variablelist>
  76. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  77. <?dbfo list-presentation="list"?>
  78. <?dbhtml list-presentation="table"?>
  79. <varlistentry id="libz">
  80. <term><filename class="libraryfile">libz</filename></term>
  81. <listitem>
  82. <para>Contains compression and decompression functions used by
  83. some programs</para>
  84. <indexterm zone="ch-system-zlib libz">
  85. <primary sortas="c-libz">libz</primary>
  86. </indexterm>
  87. </listitem>
  88. </varlistentry>
  89. </variablelist>
  90. </sect2>
  91. </sect1>