zlib.xml 3.1 KB

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