| [bf8c11f] | 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 |  | 
|---|
|  | 8 | <sect1 id="ch-system-zlib" role="wrap"> | 
|---|
|  | 9 | <?dbhtml filename="zlib.html"?> | 
|---|
|  | 10 |  | 
|---|
|  | 11 | <title>Zlib-&zlib-version;</title> | 
|---|
|  | 12 |  | 
|---|
|  | 13 | <indexterm zone="ch-system-zlib"> | 
|---|
|  | 14 | <primary sortas="a-Zlib">Zlib</primary> | 
|---|
|  | 15 | </indexterm> | 
|---|
|  | 16 |  | 
|---|
|  | 17 | <sect2 role="package"> | 
|---|
|  | 18 | <title/> | 
|---|
|  | 19 |  | 
|---|
|  | 20 | <para>The Zlib package contains compression and decompression routines | 
|---|
|  | 21 | used by some programs.</para> | 
|---|
|  | 22 |  | 
|---|
|  | 23 | <segmentedlist> | 
|---|
|  | 24 | <segtitle>&dependencies;</segtitle> | 
|---|
|  | 25 |  | 
|---|
|  | 26 | <seglistitem> | 
|---|
|  | 27 | <seg>Binutils, Coreutils, GCC, Glibc, Make, and Sed</seg> | 
|---|
|  | 28 | </seglistitem> | 
|---|
|  | 29 | </segmentedlist> | 
|---|
|  | 30 |  | 
|---|
|  | 31 | </sect2> | 
|---|
|  | 32 |  | 
|---|
|  | 33 | <sect2 role="installation"> | 
|---|
|  | 34 | <title>Installation of Zlib</title> | 
|---|
|  | 35 |  | 
|---|
|  | 36 | <note os="a"> | 
|---|
|  | 37 | <para>Zlib is known to build its shared library incorrectly if | 
|---|
|  | 38 | <envar>CFLAGS</envar> is specified in the environment. If using a | 
|---|
|  | 39 | specified <envar>CFLAGS</envar> variable, be sure to add the | 
|---|
|  | 40 | <option>-fPIC</option> directive to the <envar>CFLAGS</envar> | 
|---|
|  | 41 | variable for the duration of the configure command below, then | 
|---|
|  | 42 | remove it afterwards.</para> | 
|---|
|  | 43 | </note> | 
|---|
|  | 44 |  | 
|---|
|  | 45 | <para os="b">Prepare Zlib for compilation:</para> | 
|---|
|  | 46 |  | 
|---|
| [e6423a01] | 47 | <screen os="c"><userinput>./configure --prefix=/usr --shared --libdir=/lib</userinput></screen> | 
|---|
| [bf8c11f] | 48 |  | 
|---|
| [e6423a01] | 49 | <para os="d">Compile the package:</para> | 
|---|
| [bf8c11f] | 50 |  | 
|---|
| [e6423a01] | 51 | <screen os="e"><userinput>make</userinput></screen> | 
|---|
| [bf8c11f] | 52 |  | 
|---|
| [e6423a01] | 53 | <para os="f">To test the results, issue: | 
|---|
| [bf8c11f] | 54 | <userinput>make check</userinput>.</para> | 
|---|
|  | 55 |  | 
|---|
| [e6423a01] | 56 | <para os="g">Install the shared library:</para> | 
|---|
| [bf8c11f] | 57 |  | 
|---|
| [e6423a01] | 58 | <screen os="h"><userinput>make install</userinput></screen> | 
|---|
| [bf8c11f] | 59 |  | 
|---|
| [e6423a01] | 60 | <para os="i">The previous command installed a <filename | 
|---|
| [bf8c11f] | 61 | class="extension">.so</filename> file in <filename | 
|---|
|  | 62 | class="directory">/lib</filename>. We will remove it and relink it into | 
|---|
|  | 63 | <filename class="directory">/usr/lib</filename>:</para> | 
|---|
|  | 64 |  | 
|---|
| [e6423a01] | 65 | <screen os="j"><userinput>rm /lib/libz.so | 
|---|
| [bf8c11f] | 66 | ln -sf ../../lib/libz.so.&zlib-version; /usr/lib/libz.so</userinput></screen> | 
|---|
|  | 67 |  | 
|---|
| [e6423a01] | 68 | <para os="k">Build the static library:</para> | 
|---|
| [bf8c11f] | 69 |  | 
|---|
| [e6423a01] | 70 | <screen os="l"><userinput>make clean | 
|---|
| [bf8c11f] | 71 | ./configure --prefix=/usr | 
|---|
|  | 72 | make</userinput></screen> | 
|---|
|  | 73 |  | 
|---|
| [e6423a01] | 74 | <para os="m">To test the results again, issue: | 
|---|
| [bf8c11f] | 75 | <userinput>make check</userinput>.</para> | 
|---|
|  | 76 |  | 
|---|
| [e6423a01] | 77 | <para os="n">Install the static library:</para> | 
|---|
| [bf8c11f] | 78 |  | 
|---|
| [e6423a01] | 79 | <screen os="o"><userinput>make install</userinput></screen> | 
|---|
| [bf8c11f] | 80 |  | 
|---|
| [e6423a01] | 81 | <para os="p">Fix the permissions on the static library:</para> | 
|---|
| [bf8c11f] | 82 |  | 
|---|
| [e6423a01] | 83 | <screen os="q"><userinput>chmod 644 /usr/lib/libz.a</userinput></screen> | 
|---|
| [bf8c11f] | 84 |  | 
|---|
|  | 85 | </sect2> | 
|---|
|  | 86 |  | 
|---|
|  | 87 | <sect2 id="contents-zlib" role="content"> | 
|---|
|  | 88 | <title>Contents of Zlib</title> | 
|---|
|  | 89 |  | 
|---|
|  | 90 | <segmentedlist> | 
|---|
|  | 91 | <segtitle>Installed libraries</segtitle> | 
|---|
|  | 92 |  | 
|---|
|  | 93 | <seglistitem> | 
|---|
|  | 94 | <seg>libz.[a,so]</seg> | 
|---|
|  | 95 | </seglistitem> | 
|---|
|  | 96 | </segmentedlist> | 
|---|
|  | 97 |  | 
|---|
|  | 98 | <variablelist> | 
|---|
|  | 99 | <bridgehead renderas="sect3">Short Descriptions</bridgehead> | 
|---|
|  | 100 | <?dbfo list-presentation="list"?> | 
|---|
|  | 101 | <?dbhtml list-presentation="table"?> | 
|---|
|  | 102 |  | 
|---|
|  | 103 | <varlistentry id="libz"> | 
|---|
|  | 104 | <term><filename class="libraryfile">libz</filename></term> | 
|---|
|  | 105 | <listitem> | 
|---|
|  | 106 | <para>Contains compression and decompression | 
|---|
|  | 107 | functions used by some programs</para> | 
|---|
|  | 108 | <indexterm zone="ch-system-zlib libz"> | 
|---|
|  | 109 | <primary sortas="c-libz">libz</primary> | 
|---|
|  | 110 | </indexterm> | 
|---|
|  | 111 | </listitem> | 
|---|
|  | 112 | </varlistentry> | 
|---|
|  | 113 |  | 
|---|
|  | 114 | </variablelist> | 
|---|
|  | 115 |  | 
|---|
|  | 116 | </sect2> | 
|---|
|  | 117 |  | 
|---|
|  | 118 | </sect1> | 
|---|