zlib.xml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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>&zlib-ch6-sbu;</seg>
  22. <seg>&zlib-ch6-du;</seg>
  23. </seglistitem>
  24. </segmentedlist>
  25. </sect2>
  26. <sect2 role="installation">
  27. <title>Installation of Zlib</title>
  28. <note>
  29. <para>Zlib is known to build its shared library incorrectly if
  30. <envar>CFLAGS</envar> is specified in the environment. If using
  31. a specified <envar>CFLAGS</envar> variable, be sure to add the
  32. <parameter>-fPIC</parameter> directive to the <envar>CFLAGS</envar>
  33. variable for the duration of the configure command below, then
  34. remove it afterwards.</para>
  35. </note>
  36. <para>Prepare Zlib for compilation:</para>
  37. <screen><userinput>./configure --prefix=/usr --shared --libdir=/lib</userinput></screen>
  38. <para>Compile the package:</para>
  39. <screen><userinput>make</userinput></screen>
  40. <para>To test the results, issue:
  41. <userinput>make check</userinput>.</para>
  42. <para>Install the shared library:</para>
  43. <screen><userinput>make install</userinput></screen>
  44. <para>The previous command installed a <filename
  45. class="extension">.so</filename> file in <filename
  46. class="directory">/lib</filename>. We will remove it and relink it into
  47. <filename class="directory">/usr/lib</filename>:</para>
  48. <screen><userinput>rm -v /lib/libz.so
  49. ln -sfv ../../lib/libz.so.&zlib-version; /usr/lib/libz.so</userinput></screen>
  50. <para>Build the static library:</para>
  51. <screen><userinput>make clean
  52. ./configure --prefix=/usr
  53. make</userinput></screen>
  54. <para>To test the results again, issue:
  55. <userinput>make check</userinput>.</para>
  56. <para>Install the static library:</para>
  57. <screen><userinput>make install</userinput></screen>
  58. <para>Fix the permissions on the static library:</para>
  59. <screen><userinput>chmod -v 644 /usr/lib/libz.a</userinput></screen>
  60. </sect2>
  61. <sect2 id="contents-zlib" role="content">
  62. <title>Contents of Zlib</title>
  63. <segmentedlist>
  64. <segtitle>Installed libraries</segtitle>
  65. <seglistitem>
  66. <seg>libz.{a,so}</seg>
  67. </seglistitem>
  68. </segmentedlist>
  69. <variablelist>
  70. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  71. <?dbfo list-presentation="list"?>
  72. <?dbhtml list-presentation="table"?>
  73. <varlistentry id="libz">
  74. <term><filename class="libraryfile">libz</filename></term>
  75. <listitem>
  76. <para>Contains compression and decompression functions used by
  77. some programs</para>
  78. <indexterm zone="ch-system-zlib libz">
  79. <primary sortas="c-libz">libz</primary>
  80. </indexterm>
  81. </listitem>
  82. </varlistentry>
  83. </variablelist>
  84. </sect2>
  85. </sect1>