zlib.xml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-system-zlib" xreflabel="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 un-compression 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>1.5 MB</seg></seglistitem>
  17. </segmentedlist>
  18. <segmentedlist>
  19. <segtitle>Zlib installation depends on</segtitle>
  20. <seglistitem><seg>Binutils, Coreutils, GCC, Glibc, Make, 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 CFLAGS is
  26. specified in the environment. If you are using your own CFLAGS variable, be
  27. sure to add the <parameter>-fPIC</parameter> directive to your CFLAGS for the
  28. duration of the below <command>configure</command> command, then remove it
  29. afterwards.</para></note>
  30. <para>Prepare Zlib for compilation:</para>
  31. <screen><userinput>./configure --prefix=/usr --shared --libdir=/lib</userinput></screen>
  32. <para>Compile the package:</para>
  33. <screen><userinput>make</userinput></screen>
  34. <para>To test the results, issue:
  35. <userinput>make check</userinput>.</para>
  36. <para>Install the shared library:</para>
  37. <screen><userinput>make install</userinput></screen>
  38. <para>Now we will remove the old, .so files in /lib and relink them into /usr/lib.</para>
  39. <screen><userinput>rm /lib/libz.so
  40. ln -sf ../../lib/libz.so.&zlib-version; /usr/lib/libz.so</userinput></screen>
  41. <para>Now also build the non-shared (static) library:</para>
  42. <screen><userinput>make clean
  43. ./configure --prefix=/usr
  44. make</userinput></screen>
  45. <para>To again test the results, issue:
  46. <userinput>make check</userinput>.</para>
  47. <para>Install the static library:</para>
  48. <screen><userinput>make install</userinput></screen>
  49. <para>And fix the permissions on the static library:</para>
  50. <screen><userinput>chmod 644 /usr/lib/libz.a</userinput></screen>
  51. </sect2>
  52. <sect2 id="contents-zlib" role="content"><title>Contents of Zlib</title>
  53. <segmentedlist>
  54. <segtitle>Installed libraries</segtitle>
  55. <seglistitem><seg>libz[a,so]</seg></seglistitem>
  56. </segmentedlist>
  57. <variablelist><title>Short description</title>
  58. <varlistentry id="libz">
  59. <term><filename class="libraryfile">libz*</filename></term>
  60. <listitem>
  61. <indexterm zone="ch-system-zlib libz"><primary sortas="c-libz*">libz*</primary></indexterm>
  62. <para>contains compression and un-compression
  63. functions used by some programs.</para>
  64. </listitem>
  65. </varlistentry>
  66. </variablelist>
  67. </sect2>
  68. </sect1>