gmp.xml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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 have a CPU which is capable of running 64-bit code
  35. and you have specified <envar>CFLAGS</envar> in the environment,
  36. the configure script will attempt to configure for 64-bits and fail.
  37. Avoid this by adding <parameter>ABI=32</parameter> to the
  38. <envar>CFLAGS</envar> variable for the duration of the configure
  39. command below, then remove it afterwards.</para>
  40. </note>
  41. <para>Prepare Zlib for compilation:</para>
  42. <para>Prepare GMP for compilation:</para>
  43. <screen><userinput remap="configure">./configure --prefix=/usr --enable-cxx --enable-mpbsd</userinput></screen>
  44. <variablelist>
  45. <title>The meaning of the new configure option:</title>
  46. <varlistentry>
  47. <term><parameter>--enable-cxx</parameter></term>
  48. <listitem>
  49. <para>This parameter enables C++ support</para>
  50. </listitem>
  51. </varlistentry>
  52. </variablelist>
  53. <para>Compile the package:</para>
  54. <screen><userinput remap="make">make</userinput></screen>
  55. <important>
  56. <para>The test suite for GMP in this section is considered critical.
  57. Do not skip it under any circumstances.</para>
  58. </important>
  59. <para>Test the results:</para>
  60. <screen><userinput remap="test">make check 2>&amp;1 | tee gmp-check-log</userinput></screen>
  61. <para>Ensure that all 139 tests in the test suite ran successfully by
  62. issuing the following command:</para>
  63. <screen><userinput remap="test">awk '/tests passed/{total+=$2} ; END{print total}' gmp-check-log</userinput></screen>
  64. <para>Install the package:</para>
  65. <screen><userinput remap="install">make install</userinput></screen>
  66. <para>If desired, install the documentation:</para>
  67. <screen><userinput remap="install">mkdir -v /usr/share/doc/gmp-&gmp-version;
  68. cp -v doc/{isa_abi_headache,configuration} doc/*.html \
  69. /usr/share/doc/gmp-&gmp-version;</userinput></screen>
  70. </sect2>
  71. <sect2 id="contents-gmp" role="content">
  72. <title>Contents of GMP</title>
  73. <segmentedlist>
  74. <segtitle>Installed Libraries</segtitle>
  75. <seglistitem>
  76. <seg>libgmp.{a,so}, libgmpxx.{a,so}, and libmp.{a,so}</seg>
  77. </seglistitem>
  78. </segmentedlist>
  79. <variablelist>
  80. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  81. <?dbfo list-presentation="list"?>
  82. <?dbhtml list-presentation="table"?>
  83. <varlistentry id="libgmp">
  84. <term><command>libgmp</command></term>
  85. <listitem>
  86. <para>Contains precision math functions.</para>
  87. <indexterm zone="ch-system-gmp libgmp">
  88. <primary sortas="c-libgmp">libgmp</primary>
  89. </indexterm>
  90. </listitem>
  91. </varlistentry>
  92. <varlistentry id="libgmpxx">
  93. <term><command>libgmpxx</command></term>
  94. <listitem>
  95. <para>Contains C++ precision math functions.</para>
  96. <indexterm zone="ch-system-gmp libgmpxx">
  97. <primary sortas="c-libgmpxx">libgmpxx</primary>
  98. </indexterm>
  99. </listitem>
  100. </varlistentry>
  101. <varlistentry id="libmp">
  102. <term><command>libmp</command></term>
  103. <listitem>
  104. <para>Contains the Berkeley MP math functions.</para>
  105. <indexterm zone="ch-system-gmp libmp">
  106. <primary sortas="c-libmp">libmp</primary>
  107. </indexterm>
  108. </listitem>
  109. </varlistentry>
  110. </variablelist>
  111. </sect2>
  112. </sect1>