Update to gmp-6.1.0.
[linux_from_scratch.git] / chapter06 / gmp.xml
blob7d353d90c69a2d304e8cc20438b6634abf23520a
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4   <!ENTITY % general-entities SYSTEM "../general.ent">
5   %general-entities;
6 ]>
8 <sect1 id="ch-system-gmp" role="wrap">
9   <?dbhtml filename="gmp.html"?>
11   <sect1info condition="script">
12     <productname>gmp</productname>
13     <productnumber>&gmp-version;</productnumber>
14     <address>&gmp-url;</address>
15   </sect1info>
17   <title>GMP-&gmp-version;</title>
19   <indexterm zone="ch-system-gmp">
20     <primary sortas="a-GMP">GMP</primary>
21   </indexterm>
23   <sect2 role="package">
24     <title/>
26     <para>The GMP package contains math libraries. These have useful functions
27     for arbitrary precision arithmetic.</para>
29     <segmentedlist>
30       <segtitle>&buildtime;</segtitle>
31       <segtitle>&diskspace;</segtitle>
33       <seglistitem>
34         <seg>&gmp-ch6-sbu;</seg>
35         <seg>&gmp-ch6-du;</seg>
36       </seglistitem>
37     </segmentedlist>
39   </sect2>
41   <sect2 role="installation">
42     <title>Installation of GMP</title>
44     <note>
45       <para>If you are building for 32-bit x86, but you have a CPU which is
46       capable of running 64-bit code <emphasis>and</emphasis> you have specified
47       <envar>CFLAGS</envar> in the environment, the configure script will
48       attempt to configure for 64-bits and fail.
49       Avoid this by invoking the configure command below with
50 <screen role="nodump"><userinput><parameter>ABI=32</parameter> ./configure ...</userinput></screen></para>
51     </note>
53     <para>Prepare GMP for compilation:</para>
55 <screen><userinput remap="configure">./configure --prefix=/usr    \
56             --enable-cxx     \
57             --disable-static \
58             --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen>
60     <variablelist>
61       <title>The meaning of the new configure options:</title>
63       <varlistentry>
64         <term><parameter>--enable-cxx</parameter></term>
65         <listitem>
66           <para>This parameter enables C++ support</para>
67         </listitem>
68       </varlistentry>
70       <varlistentry>
71         <term><parameter>--docdir=/usr/share/doc/gmp-&gmp-version;</parameter></term>
72         <listitem>
73           <para>This variable specifies the correct place for the
74           documentation.</para>
75         </listitem>
76       </varlistentry>
78     </variablelist>
80     <para>Compile the package and generate the HTML documentation:</para>
82 <screen><userinput remap="make">make
83 make html</userinput></screen>
85     <important>
86       <para>The test suite for GMP in this section is considered critical.
87       Do not skip it under any circumstances.</para>
88     </important>
90     <para>Test the results:</para>
92 <screen><userinput remap="test">make check 2>&amp;1 | tee gmp-check-log</userinput></screen>
94     <para>Ensure that all 190 tests in the test suite passed.
95     Check the results by issuing the following command:</para>
97 <screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
99     <para>Install the package and its documentation:</para>
101 <screen><userinput remap="install">make install
102 make install-html</userinput></screen>
104   </sect2>
106   <sect2 id="contents-gmp" role="content">
107     <title>Contents of GMP</title>
109     <segmentedlist>
110       <segtitle>Installed Libraries</segtitle>
111       <segtitle>Installed directory</segtitle>
113       <seglistitem>
114         <seg>libgmp.so and libgmpxx.so</seg>
115         <seg>/usr/share/doc/gmp-&gmp-version;</seg>
116       </seglistitem>
117     </segmentedlist>
119     <variablelist>
120       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
121       <?dbfo list-presentation="list"?>
122       <?dbhtml list-presentation="table"?>
124       <varlistentry id="libgmp">
125         <term><filename class="libraryfile">libgmp</filename></term>
126         <listitem>
127           <para>Contains precision math functions</para>
128           <indexterm zone="ch-system-gmp libgmp">
129             <primary sortas="c-libgmp">libgmp</primary>
130           </indexterm>
131         </listitem>
132       </varlistentry>
134       <varlistentry id="libgmpxx">
135         <term><filename class="libraryfile">libgmpxx</filename></term>
136         <listitem>
137           <para>Contains C++ precision math functions</para>
138           <indexterm zone="ch-system-gmp libgmpxx">
139             <primary sortas="c-libgmpxx">libgmpxx</primary>
140           </indexterm>
141         </listitem>
142       </varlistentry>
143     </variablelist>
145   </sect2>
147 </sect1>