gmp.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. ]>
  7. <sect1 id="ch-system-gmp" role="wrap">
  8. <?dbhtml filename="gmp.html"?>
  9. <sect1info condition="script">
  10. <productname>gmp</productname>
  11. <productnumber>&gmp-version;</productnumber>
  12. <address>&gmp-url;</address>
  13. </sect1info>
  14. <title>GMP-&gmp-version;</title>
  15. <indexterm zone="ch-system-gmp">
  16. <primary sortas="a-GMP">GMP</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The GMP package contains math libraries. These have useful functions
  21. for arbitrary precision arithmetic.</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&gmp-ch6-sbu;</seg>
  27. <seg>&gmp-ch6-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>Installation of GMP</title>
  33. <note>
  34. <para>If you are building for 32-bit x86, but you have a CPU which is
  35. capable of running 64-bit code <emphasis>and</emphasis> you have specified
  36. <envar>CFLAGS</envar> in the environment, the configure script will
  37. attempt to configure for 64-bits and fail.
  38. Avoid this by invoking the configure command below with
  39. <screen role="nodump"><userinput><parameter>ABI=32</parameter> ./configure ...</userinput></screen></para>
  40. </note>
  41. <para>Prepare GMP for compilation:</para>
  42. <screen><userinput remap="configure">./configure --prefix=/usr --enable-cxx --enable-mpbsd</userinput></screen>
  43. <variablelist>
  44. <title>The meaning of the new configure options:</title>
  45. <varlistentry>
  46. <term><parameter>--enable-cxx</parameter></term>
  47. <listitem>
  48. <para>This parameter enables C++ support</para>
  49. </listitem>
  50. </varlistentry>
  51. <varlistentry>
  52. <term><parameter>--enable-mpbsd</parameter></term>
  53. <listitem>
  54. <para>This builds the Berkeley MP compatibility library</para>
  55. </listitem>
  56. </varlistentry>
  57. </variablelist>
  58. <para>Compile the package:</para>
  59. <screen><userinput remap="make">make</userinput></screen>
  60. <important>
  61. <para>The test suite for GMP in this section is considered critical.
  62. Do not skip it under any circumstances.</para>
  63. </important>
  64. <para>Test the results:</para>
  65. <screen><userinput remap="test">make check 2>&amp;1 | tee gmp-check-log</userinput></screen>
  66. <para>Ensure that all 166 tests in the test suite passed.
  67. Check the results by issuing the following command:</para>
  68. <screen><userinput remap="test">awk '/tests passed/{total+=$2} ; END{print total}' gmp-check-log</userinput></screen>
  69. <para>Install the package:</para>
  70. <screen><userinput remap="install">make install</userinput></screen>
  71. <para>If desired, install the documentation:</para>
  72. <screen><userinput remap="install">mkdir -v /usr/share/doc/gmp-&gmp-version;
  73. cp -v doc/{isa_abi_headache,configuration} doc/*.html \
  74. /usr/share/doc/gmp-&gmp-version;</userinput></screen>
  75. </sect2>
  76. <sect2 id="contents-gmp" role="content">
  77. <title>Contents of GMP</title>
  78. <segmentedlist>
  79. <segtitle>Installed Libraries</segtitle>
  80. <segtitle>Installed directory</segtitle>
  81. <seglistitem>
  82. <seg>libgmp.{a,so}, libgmpxx.{a,so}, and libmp.{a,so}</seg>
  83. <seg>/usr/share/doc/gmp-&gmp-version;</seg>
  84. </seglistitem>
  85. </segmentedlist>
  86. <variablelist>
  87. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  88. <?dbfo list-presentation="list"?>
  89. <?dbhtml list-presentation="table"?>
  90. <varlistentry id="libgmp">
  91. <term><filename class="libraryfile">libgmp</filename></term>
  92. <listitem>
  93. <para>Contains precision math functions.</para>
  94. <indexterm zone="ch-system-gmp libgmp">
  95. <primary sortas="c-libgmp">libgmp</primary>
  96. </indexterm>
  97. </listitem>
  98. </varlistentry>
  99. <varlistentry id="libgmpxx">
  100. <term><filename class="libraryfile">libgmpxx</filename></term>
  101. <listitem>
  102. <para>Contains C++ precision math functions.</para>
  103. <indexterm zone="ch-system-gmp libgmpxx">
  104. <primary sortas="c-libgmpxx">libgmpxx</primary>
  105. </indexterm>
  106. </listitem>
  107. </varlistentry>
  108. <varlistentry id="libmp">
  109. <term><filename class="libraryfile">libmp</filename></term>
  110. <listitem>
  111. <para>Contains the Berkeley MP math functions.</para>
  112. <indexterm zone="ch-system-gmp libmp">
  113. <primary sortas="c-libmp">libmp</primary>
  114. </indexterm>
  115. </listitem>
  116. </varlistentry>
  117. </variablelist>
  118. </sect2>
  119. </sect1>