zlib.xml 3.2 KB

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