Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

initial import GMP 5.1.3 sources. changes include:

fixes for:
- mpn_sbpi1_div_qr_sec and mpn_sbpi1_div_r_sec
- mpz_powm_ui
- AMD family 11h
- mpz_powm_sec and mpn_powm_sec
- ASSERT() fixes
- gcd, gcdext, and invert function fixes
- some PPC division operations
  • Loading branch information...
commit c7293c61a93921bef357920eaab263b44ac7551f 1 parent 75f5237
authored

Showing 194 changed files with 40,828 additions and 13,353 deletions. Show diff stats Hide diff stats

  1. 56  external/lgpl3/gmp/dist/AUTHORS
  2. 5,244  external/lgpl3/gmp/dist/ChangeLog
  3. 169  external/lgpl3/gmp/dist/Makefile.am
  4. 581  external/lgpl3/gmp/dist/Makefile.in
  5. 267  external/lgpl3/gmp/dist/NEWS
  6. 62  external/lgpl3/gmp/dist/acinclude.m4
  7. 2,405  external/lgpl3/gmp/dist/aclocal.m4
  8. 135  external/lgpl3/gmp/dist/bootstrap.c
  9. 190  external/lgpl3/gmp/dist/config.guess
  10. 61  external/lgpl3/gmp/dist/config.in
  11. 18  external/lgpl3/gmp/dist/config.sub
  12. 74  external/lgpl3/gmp/dist/configfsf.guess
  13. 105  external/lgpl3/gmp/dist/configfsf.sub
  14. 8,128  external/lgpl3/gmp/dist/configure
  15. 3,697  external/lgpl3/gmp/dist/configure.ac
  16. 4  external/lgpl3/gmp/dist/cxx/Makefile.am
  17. 75  external/lgpl3/gmp/dist/cxx/Makefile.in
  18. 2  external/lgpl3/gmp/dist/cxx/ismpf.cc
  19. 2  external/lgpl3/gmp/dist/cxx/ismpq.cc
  20. 2  external/lgpl3/gmp/dist/cxx/ismpznw.cc
  21. 51  external/lgpl3/gmp/dist/cxx/limits.cc
  22. 4  external/lgpl3/gmp/dist/cxx/osdoprnti.cc
  23. 4  external/lgpl3/gmp/dist/demos/Makefile.am
  24. 118  external/lgpl3/gmp/dist/demos/Makefile.in
  25. 94  external/lgpl3/gmp/dist/demos/calc/Makefile.in
  26. 751  external/lgpl3/gmp/dist/demos/calc/calc.c
  27. 39  external/lgpl3/gmp/dist/demos/calc/calc.h
  28. 65  external/lgpl3/gmp/dist/demos/calc/calclex.c
  29. 107  external/lgpl3/gmp/dist/demos/expr/Makefile.in
  30. 133  external/lgpl3/gmp/dist/demos/expr/expr-impl.h
  31. 6  external/lgpl3/gmp/dist/demos/expr/expr.c
  32. 34  external/lgpl3/gmp/dist/demos/expr/expr.h
  33. 14  external/lgpl3/gmp/dist/demos/expr/exprf.c
  34. 6  external/lgpl3/gmp/dist/demos/expr/exprfa.c
  35. 14  external/lgpl3/gmp/dist/demos/expr/exprq.c
  36. 6  external/lgpl3/gmp/dist/demos/expr/exprqa.c
  37. 14  external/lgpl3/gmp/dist/demos/expr/exprz.c
  38. 6  external/lgpl3/gmp/dist/demos/expr/exprza.c
  39. 488  external/lgpl3/gmp/dist/demos/factorize.c
  40. 6  external/lgpl3/gmp/dist/demos/isprime.c
  41. 33  external/lgpl3/gmp/dist/demos/pexpr.c
  42. 8  external/lgpl3/gmp/dist/demos/primes.c
  43. 552  external/lgpl3/gmp/dist/demos/primes.h
  44. 99  external/lgpl3/gmp/dist/doc/Makefile.in
  45. 49  external/lgpl3/gmp/dist/doc/configuration
  46. 313  external/lgpl3/gmp/dist/doc/gmp.info
  47. 1,139  external/lgpl3/gmp/dist/doc/gmp.info-1
  48. 994  external/lgpl3/gmp/dist/doc/gmp.info-2
  49. 999  external/lgpl3/gmp/dist/doc/gmp.texi
  50. 203  external/lgpl3/gmp/dist/doc/projects.html
  51. 8  external/lgpl3/gmp/dist/doc/stamp-vti
  52. 50  external/lgpl3/gmp/dist/doc/tasks.html
  53. 8  external/lgpl3/gmp/dist/doc/version.texi
  54. 5  external/lgpl3/gmp/dist/extract-dbl.c
  55. 102  external/lgpl3/gmp/dist/gen-bases.c
  56. 330  external/lgpl3/gmp/dist/gen-fac.c
  57. 8  external/lgpl3/gmp/dist/gen-fib.c
  58. 117  external/lgpl3/gmp/dist/gen-jacobitab.c
  59. 25  external/lgpl3/gmp/dist/gen-psqr.c
  60. 21  external/lgpl3/gmp/dist/gen-trialdivtab.c
  61. 783  external/lgpl3/gmp/dist/gmp-h.in
  62. 2,958  external/lgpl3/gmp/dist/gmp-impl.h
  63. 1,676  external/lgpl3/gmp/dist/gmpxx.h
  64. 316  external/lgpl3/gmp/dist/longlong.h
  65. 4,017  external/lgpl3/gmp/dist/ltmain.sh
  66. 10  external/lgpl3/gmp/dist/memory.c
  67. 66  external/lgpl3/gmp/dist/mini-gmp/README
  68. 4,130  external/lgpl3/gmp/dist/mini-gmp/mini-gmp.c
  69. 256  external/lgpl3/gmp/dist/mini-gmp/mini-gmp.h
  70. 60  external/lgpl3/gmp/dist/mini-gmp/tests/Makefile
  71. 434  external/lgpl3/gmp/dist/mini-gmp/tests/hex-random.c
  72. 50  external/lgpl3/gmp/dist/mini-gmp/tests/hex-random.h
  73. 142  external/lgpl3/gmp/dist/mini-gmp/tests/mini-random.c
  74. 33  external/lgpl3/gmp/dist/mini-gmp/tests/mini-random.h
  75. 123  external/lgpl3/gmp/dist/mini-gmp/tests/run-tests
  76. 65  external/lgpl3/gmp/dist/mini-gmp/tests/t-add.c
  77. 111  external/lgpl3/gmp/dist/mini-gmp/tests/t-bitops.c
  78. 295  external/lgpl3/gmp/dist/mini-gmp/tests/t-cmp_d.c
  79. 164  external/lgpl3/gmp/dist/mini-gmp/tests/t-comb.c
  80. 262  external/lgpl3/gmp/dist/mini-gmp/tests/t-div.c
  81. 90  external/lgpl3/gmp/dist/mini-gmp/tests/t-div_2exp.c
  82. 146  external/lgpl3/gmp/dist/mini-gmp/tests/t-double.c
  83. 184  external/lgpl3/gmp/dist/mini-gmp/tests/t-gcd.c
  84. 107  external/lgpl3/gmp/dist/mini-gmp/tests/t-import.c
  85. 106  external/lgpl3/gmp/dist/mini-gmp/tests/t-invert.c
  86. 81  external/lgpl3/gmp/dist/mini-gmp/tests/t-lcm.c
  87. 120  external/lgpl3/gmp/dist/mini-gmp/tests/t-logops.c
  88. 120  external/lgpl3/gmp/dist/mini-gmp/tests/t-mul.c
  89. 69  external/lgpl3/gmp/dist/mini-gmp/tests/t-powm.c
  90. 663  external/lgpl3/gmp/dist/mini-gmp/tests/t-reuse.c
  91. 103  external/lgpl3/gmp/dist/mini-gmp/tests/t-root.c
  92. 72  external/lgpl3/gmp/dist/mini-gmp/tests/t-scan.c
  93. 142  external/lgpl3/gmp/dist/mini-gmp/tests/t-signed.c
  94. 90  external/lgpl3/gmp/dist/mini-gmp/tests/t-sqrt.c
  95. 315  external/lgpl3/gmp/dist/mini-gmp/tests/t-str.c
  96. 79  external/lgpl3/gmp/dist/mini-gmp/tests/t-sub.c
  97. 153  external/lgpl3/gmp/dist/mini-gmp/tests/testutils.c
  98. 31  external/lgpl3/gmp/dist/mini-gmp/tests/testutils.h
  99. 5  external/lgpl3/gmp/dist/mp_clz_tab.c
  100. 2  external/lgpl3/gmp/dist/mp_get_fns.c
  101. 2  external/lgpl3/gmp/dist/mp_set_fns.c
  102. 260  external/lgpl3/gmp/dist/mpf/Makefile.in
  103. 4  external/lgpl3/gmp/dist/mpf/ceilfloor.c
  104. 2  external/lgpl3/gmp/dist/mpf/cmp.c
  105. 15  external/lgpl3/gmp/dist/mpf/cmp_si.c
  106. 2  external/lgpl3/gmp/dist/mpf/cmp_ui.c
  107. 17  external/lgpl3/gmp/dist/mpf/div.c
  108. 15  external/lgpl3/gmp/dist/mpf/div_ui.c
  109. 4  external/lgpl3/gmp/dist/mpf/eq.c
  110. 2  external/lgpl3/gmp/dist/mpf/fits_s.h
  111. 2  external/lgpl3/gmp/dist/mpf/fits_u.h
  112. 2  external/lgpl3/gmp/dist/mpf/get_dfl_prec.c
  113. 2  external/lgpl3/gmp/dist/mpf/get_prc.c
  114. 4  external/lgpl3/gmp/dist/mpf/get_si.c
  115. 17  external/lgpl3/gmp/dist/mpf/get_str.c
  116. 2  external/lgpl3/gmp/dist/mpf/get_ui.c
  117. 2  external/lgpl3/gmp/dist/mpf/int_p.c
  118. 6  external/lgpl3/gmp/dist/mpf/iset_si.c
  119. 3  external/lgpl3/gmp/dist/mpf/out_str.c
  120. 12  external/lgpl3/gmp/dist/mpf/pow_ui.c
  121. 4  external/lgpl3/gmp/dist/mpf/reldiff.c
  122. 2  external/lgpl3/gmp/dist/mpf/set_dfl_prec.c
  123. 2  external/lgpl3/gmp/dist/mpf/set_prc_raw.c
  124. 6  external/lgpl3/gmp/dist/mpf/set_si.c
  125. 32  external/lgpl3/gmp/dist/mpf/set_str.c
  126. 2  external/lgpl3/gmp/dist/mpf/size.c
  127. 6  external/lgpl3/gmp/dist/mpf/sqrt.c
  128. 12  external/lgpl3/gmp/dist/mpf/sub.c
  129. 2  external/lgpl3/gmp/dist/mpf/swap.c
  130. 9  external/lgpl3/gmp/dist/mpf/ui_div.c
  131. 54  external/lgpl3/gmp/dist/mpn/Makefile.am
  132. 463  external/lgpl3/gmp/dist/mpn/Makefile.in
  133. 19  external/lgpl3/gmp/dist/mpn/alpha/add_n.asm
  134. 98  external/lgpl3/gmp/dist/mpn/alpha/ev5/gmp-mparam.h
  135. 110  external/lgpl3/gmp/dist/mpn/alpha/ev6/gmp-mparam.h
  136. 326  external/lgpl3/gmp/dist/mpn/alpha/ev6/mod_1_4.asm
  137. 6  external/lgpl3/gmp/dist/mpn/alpha/ev6/slot.pl
  138. 401  external/lgpl3/gmp/dist/mpn/alpha/invert_limb.asm
  139. 19  external/lgpl3/gmp/dist/mpn/alpha/sub_n.asm
  140. 18  external/lgpl3/gmp/dist/mpn/arm/README
  141. 100  external/lgpl3/gmp/dist/mpn/arm/aors_n.asm
  142. 121  external/lgpl3/gmp/dist/mpn/arm/aorscnd_n.asm
  143. 155  external/lgpl3/gmp/dist/mpn/arm/aorslsh1_n.asm
  144. 123  external/lgpl3/gmp/dist/mpn/arm/aorsmul_1.asm
  145. 34  external/lgpl3/gmp/dist/mpn/arm/arm-defs.m4
  146. 101  external/lgpl3/gmp/dist/mpn/arm/bdiv_dbm1c.asm
  147. 63  external/lgpl3/gmp/dist/mpn/arm/com.asm
  148. 31  external/lgpl3/gmp/dist/mpn/arm/copyd.asm
  149. 31  external/lgpl3/gmp/dist/mpn/arm/copyi.asm
  150. 160  external/lgpl3/gmp/dist/mpn/arm/gmp-mparam.h
  151. 32  external/lgpl3/gmp/dist/mpn/arm/invert_limb.asm
  152. 127  external/lgpl3/gmp/dist/mpn/arm/logops_n.asm
  153. 76  external/lgpl3/gmp/dist/mpn/arm/lshift.asm
  154. 83  external/lgpl3/gmp/dist/mpn/arm/lshiftc.asm
  155. 109  external/lgpl3/gmp/dist/mpn/arm/mod_34lsub1.asm
  156. 72  external/lgpl3/gmp/dist/mpn/arm/mode1o.asm
  157. 26  external/lgpl3/gmp/dist/mpn/arm/mul_1.asm
  158. 112  external/lgpl3/gmp/dist/mpn/arm/rsh1aors_n.asm
  159. 74  external/lgpl3/gmp/dist/mpn/arm/rshift.asm
  160. 8  external/lgpl3/gmp/dist/mpn/arm/udiv.asm
  161. 109  external/lgpl3/gmp/dist/mpn/arm/v5/gcd_1.asm
  162. 117  external/lgpl3/gmp/dist/mpn/arm/v5/mod_1_1.asm
  163. 144  external/lgpl3/gmp/dist/mpn/arm/v5/mod_1_2.asm
  164. 99  external/lgpl3/gmp/dist/mpn/arm/v6/addmul_1.asm
  165. 119  external/lgpl3/gmp/dist/mpn/arm/v6/addmul_2.asm
  166. 146  external/lgpl3/gmp/dist/mpn/arm/v6/gmp-mparam.h
  167. 102  external/lgpl3/gmp/dist/mpn/arm/v6/mul_1.asm
  168. 119  external/lgpl3/gmp/dist/mpn/arm/v6/mul_2.asm
  169. 507  external/lgpl3/gmp/dist/mpn/arm/v6/sqr_basecase.asm
  170. 200  external/lgpl3/gmp/dist/mpn/arm/v6t2/divrem_1.asm
  171. 103  external/lgpl3/gmp/dist/mpn/arm/v6t2/gcd_1.asm
  172. 75  external/lgpl3/gmp/dist/mpn/arm/v6t2/mode1o.asm
  173. 167  external/lgpl3/gmp/dist/mpn/arm/v7a/cora15/gmp-mparam.h
  174. 95  external/lgpl3/gmp/dist/mpn/asm-defs.m4
  175. 90  external/lgpl3/gmp/dist/mpn/generic/add_err1_n.c
  176. 106  external/lgpl3/gmp/dist/mpn/generic/add_err2_n.c
  177. 121  external/lgpl3/gmp/dist/mpn/generic/add_err3_n.c
  178. 162  external/lgpl3/gmp/dist/mpn/generic/add_n_sub_n.c
  179. 62  external/lgpl3/gmp/dist/mpn/generic/addcnd_n.c
  180. 5  external/lgpl3/gmp/dist/mpn/generic/bdiv_qr.c
  181. 11  external/lgpl3/gmp/dist/mpn/generic/binvert.c
  182. 186  external/lgpl3/gmp/dist/mpn/generic/broot.c
  183. 131  external/lgpl3/gmp/dist/mpn/generic/brootinv.c
  184. 37  external/lgpl3/gmp/dist/mpn/generic/bsqrt.c
  185. 94  external/lgpl3/gmp/dist/mpn/generic/bsqrtinv.c
  186. 37  external/lgpl3/gmp/dist/mpn/generic/comb_tables.c
  187. 5  external/lgpl3/gmp/dist/mpn/generic/dcpi1_bdiv_q.c
  188. 323  external/lgpl3/gmp/dist/mpn/generic/div_qr_2.c
  189. 76  external/lgpl3/gmp/dist/mpn/generic/div_qr_2n_pi1.c
  190. 67  external/lgpl3/gmp/dist/mpn/generic/div_qr_2u_pi1.c
  191. 14  external/lgpl3/gmp/dist/mpn/generic/divexact.c
  192. 16  external/lgpl3/gmp/dist/mpn/generic/divis.c
  193. 3  external/lgpl3/gmp/dist/mpn/generic/divrem.c
56  external/lgpl3/gmp/dist/AUTHORS
@@ -4,20 +4,21 @@ Torbj
4 4
 
5 5
 John Amanatides		Original version of mpz/pprime_p.c
6 6
 
7  
-Paul Zimmermann		mpn/generic/mul_fft.c, dc_divrem_n.c, rootrem.c,
8  
-			old mpz/powm.c, old toom3 code.
  7
+Paul Zimmermann		mpn/generic/mul_fft.c, now defunct dc_divrem_n.c,
  8
+			rootrem.c, old mpz/powm.c, old toom3 code.
9 9
 
10  
-Ken Weber		mpn/generic/bdivmod.c, old mpn/generic/gcd.c
  10
+Ken Weber		Now defunct mpn/generic/bdivmod.c, old mpn/generic/gcd.c
11 11
 
12  
-Bennet Yee		mpz/jacobi.c mpz/legendre.c
  12
+Bennet Yee		Previous versions of mpz/jacobi.c mpz/legendre.c
13 13
 
14 14
 Andreas Schwab		mpn/m68k/lshift.asm, mpn/m68k/rshift.asm
15 15
 
16  
-Robert Harley		Old mpn/generic/mul_n.c, many files in mpn/arm
  16
+Robert Harley		Old mpn/generic/mul_n.c, previous versions of files in
  17
+			mpn/arm
17 18
 
18 19
 Linus Nordberg		Random number framework, original autoconfery
19 20
 
20  
-Kent Boortz		MacOS 9 port
  21
+Kent Boortz		MacOS 9 port, now defunct.
21 22
 
22 23
 Kevin Ryde		Most x86 assembly, new autoconfery, and countless other
23 24
 			things (please see the GMP manual for complete list)
@@ -27,29 +28,52 @@ Gerardo Ballabio	gmpxx.h and C++ istream input
27 28
 Pedro Gimeno		Mersenne Twister random generator, other random number
28 29
 			revisions
29 30
 
30  
-Jason Moxham		mpz/fac_ui.c and gen-fac_ui.c
  31
+Jason Moxham		Previous versions of mpz/fac_ui.c and gen-fac_ui.c
31 32
 
32  
-Niels Möller		mpn/generic/hgcd2.c, gcd.c, gcdext.c, matrix22_mul.c,
33  
-			hgcd.c, gcdext_1.c, gcd_subdiv_step.c, gcd_lehmer.c,
  33
+Niels Möller		gen-jacobitab.c,
  34
+			mpn/generic/hgcd2.c, hgcd.c, hgcd_step.c,
  35
+			hgcd_appr.c, hgcd_matrix.c, hgcd_reduce.c,
  36
+			gcd.c, gcdext.c, matrix22_mul.c,
  37
+			gcdext_1.c, gcd_subdiv_step.c, gcd_lehmer.c,
34 38
 			gcdext_subdiv_step.c, gcdext_lehmer.c,
  39
+			jacobi_2.c, jacbase.c, hgcd_jacobi.c, hgcd2_jacobi.c
  40
+			matrix22_mul1_inverse_vector.c,
35 41
 			toom_interpolate_7pts, mulmod_bnm1.c, dcpi1_bdiv_qr.c,
36 42
 			dcpi1_bdiv_q.c, sbpi1_bdiv_qr.c, sbpi1_bdiv_q.c,
37 43
 			toom_eval_dgr3_pm1.c, toom_eval_dgr3_pm2.c,
38 44
 			toom_eval_pm1.c, toom_eval_pm2.c, toom_eval_pm2exp.c,
39  
-			divexact.c, mpn/x86/invert_limb.asm,
40  
-			mpn/x86_64/invert_limb.asm, mpz/nextprime.c,
41  
-			mpz/divexact.c.
  45
+			divexact.c, mod_1_1.c, div_qr_2.c,
  46
+			div_qr_2n_pi1.c, div_qr_2u_pi1.c, broot.c,
  47
+			brootinv.c,
  48
+			mpn/x86/k7/invert_limb.asm, mod_1_1.asm,
  49
+			mpn/x86_64/invert_limb.asm,
  50
+			invert_limb_table.asm, mod_1_1.asm,
  51
+			div_qr_2n_pi1.asm, div_qr_2u_pi1.asm,
  52
+			mpn/x86_64/core2/aorsmul_1.asm,
  53
+			mpz/nextprime.c, divexact.c, gcd.c, gcdext.c,
  54
+			jacobi.c, combit.c, mini-gmp/mini-gmp.c.
42 55
 
43 56
 Marco Bodrato		mpn/generic/toom44_mul.c, toom4_sqr.c, toom53_mul.c,
44  
-			toom62_mul.c, toom43_mul.c, toom52_mul.c,
  57
+			toom62_mul.c, toom43_mul.c, toom52_mul.c, toom54_mul.c,
45 58
 			toom_interpolate_6pts.c, toom_couple_handling.c,
46 59
 			toom63_mul.c, toom_interpolate_8pts.c,
47 60
 			toom6h_mul.c, toom6_sqr.c, toom_interpolate_12pts.c,
48 61
 			toom8h_mul.c, toom8_sqr.c, toom_interpolate_16pts.c,
49 62
 			mulmod_bnm1.c, sqrmod_bnm1.c, nussbaumer_mul.c,
50 63
 			toom_eval_pm2.c, toom_eval_pm2rexp.c,
51  
-			mullo_n.c, invert.c, invertappr.c.
52  
-
53  
-David Harvey		mpn/x86_64/mul_basecase.asm
  64
+			mullo_n.c, invert.c, invertappr.c;
  65
+			mpz/fac_ui.c, 2fac_ui.c, mfac_uiui.c, oddfac_1.c,
  66
+			primorial_ui.c, prodlimbs.c, goetgheluck_bin_uiui.c.
  67
+
  68
+David Harvey		mpn/generic/add_err1_n.c, add_err2_n.c,
  69
+			add_err3_n.c, sub_err1_n.c, sub_err2_n.c,
  70
+			sub_err3_n.c, mulmid_basecase.c, mulmid_n.c,
  71
+			toom42_mulmid.c,
  72
+			mpn/x86_64/mul_basecase.asm, aors_err1_n.asm,
  73
+			aors_err2_n.asm, aors_err3_n.asm,
  74
+			mulmid_basecase.asm,
  75
+			mpn/x86_64/core2/aors_err1_n.asm.
54 76
 
55 77
 Martin Boij		mpn/generic/perfpow.c
  78
+
  79
+Marc Glisse		gmpxx.h improvements
5,244  external/lgpl3/gmp/dist/ChangeLog
5167 additions, 77 deletions not shown
169  external/lgpl3/gmp/dist/Makefile.am
@@ -2,7 +2,7 @@
2 2
 
3 3
 
4 4
 # Copyright 1991, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
5  
-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
  5
+# 2006, 2007, 2008, 2009, 2011, 2012, 2013 Free Software Foundation, Inc.
6 6
 #
7 7
 # This file is part of the GNU MP Library.
8 8
 #
@@ -25,7 +25,7 @@
25 25
 # Makefiles in subdirectories, but here we must omit it so automake gives
26 26
 # the actual ansi2knr build rule, not "cd $(top_builddir) && make ansi2knr".
27 27
 #
28  
-AUTOMAKE_OPTIONS = 1.8 gnu no-dependencies ansi2knr
  28
+# AUTOMAKE_OPTIONS = 1.8 gnu no-dependencies
29 29
 
30 30
 
31 31
 # Libtool -version-info for libgmp.la and libmp.la.  See "Versioning" in the
@@ -68,6 +68,13 @@ AUTOMAKE_OPTIONS = 1.8 gnu no-dependencies ansi2knr
68 68
 #        5.0.0    9:0:6    6:0:2   4:20:1	Should have been 10:0:0
69 69
 #        5.0.1   10:1:0    6:1:2   4:21:1
70 70
 #        5.0.2   10:2:0    6:2:2   4:22:1
  71
+#        5.0.3   10:3:0    6:3:2   4:23:1
  72
+#        5.0.4   10:4:0    6:4:2   4:24:1
  73
+#        5.0.5   10:5:0    6:5:2   4:25:1
  74
+#        5.1.0   11:0:1    7:0:3     -
  75
+#        5.1.1   11:1:1    7:1:3     -
  76
+#        5.1.2   11:2:1    7:2:3     -
  77
+#        5.1.3   11:3:1    7:3:3     -
71 78
 #
72 79
 # Starting at 3:0:0 is a slight abuse of the versioning system, but it
73 80
 # ensures we're past soname libgmp.so.2, which was used on Debian GNU/Linux
@@ -80,20 +87,16 @@ AUTOMAKE_OPTIONS = 1.8 gnu no-dependencies ansi2knr
80 87
 # it's still good to get the shared library filename (like
81 88
 # libgmpxx.so.3.0.4) incrementing, to make it clear which GMP it's from.
82 89
 
83  
-LIBGMP_LT_CURRENT =  10
84  
-LIBGMP_LT_REVISION = 2
85  
-LIBGMP_LT_AGE =      0
  90
+LIBGMP_LT_CURRENT    = 11
  91
+LIBGMP_LT_REVISION   = 3
  92
+LIBGMP_LT_AGE        = 1
86 93
 
87  
-LIBGMPXX_LT_CURRENT =  6
88  
-LIBGMPXX_LT_REVISION = 2
89  
-LIBGMPXX_LT_AGE =      2
  94
+LIBGMPXX_LT_CURRENT  = 7
  95
+LIBGMPXX_LT_REVISION = 3
  96
+LIBGMPXX_LT_AGE      = 3
90 97
 
91  
-LIBMP_LT_CURRENT =  4
92  
-LIBMP_LT_REVISION = 22
93  
-LIBMP_LT_AGE =      1
94 98
 
95  
-
96  
-SUBDIRS = tests mpn mpz mpq mpf printf scanf cxx mpbsd demos tune doc
  99
+SUBDIRS = tests mpn mpz mpq mpf printf scanf rand cxx demos tune doc
97 100
 
98 101
 EXTRA_DIST = configfsf.guess configfsf.sub .gdbinit INSTALL.autoconf
99 102
 
@@ -113,8 +116,8 @@ EXTRA_DIST += gmpxx.h
113 116
 #
114 117
 includeexecdir = $(exec_prefix)/include
115 118
 include_HEADERS = $(GMPXX_HEADERS_OPTION)
116  
-nodist_includeexec_HEADERS = gmp.h $(MPBSD_HEADERS_OPTION)
117  
-lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION) $(MPBSD_LTLIBRARIES_OPTION)
  119
+nodist_includeexec_HEADERS = gmp.h
  120
+lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION)
118 121
 
119 122
 BUILT_SOURCES = gmp.h
120 123
 
@@ -158,16 +161,17 @@ MPZ_OBJECTS = mpz/abs$U.lo mpz/add$U.lo mpz/add_ui$U.lo			\
158 161
   mpz/cong$U.lo mpz/cong_2exp$U.lo mpz/cong_ui$U.lo			\
159 162
   mpz/divexact$U.lo mpz/divegcd$U.lo mpz/dive_ui$U.lo			\
160 163
   mpz/divis$U.lo mpz/divis_ui$U.lo mpz/divis_2exp$U.lo mpz/dump$U.lo	\
161  
-  mpz/export$U.lo mpz/fac_ui$U.lo mpz/fdiv_q$U.lo			\
  164
+  mpz/export$U.lo mpz/mfac_uiui$U.lo					\
  165
+  mpz/2fac_ui$U.lo mpz/fac_ui$U.lo mpz/oddfac_1$U.lo mpz/prodlimbs$U.lo	\
162 166
   mpz/fdiv_q_ui$U.lo mpz/fdiv_qr$U.lo mpz/fdiv_qr_ui$U.lo		\
163  
-  mpz/fdiv_r$U.lo mpz/fdiv_r_ui$U.lo					\
  167
+  mpz/fdiv_r$U.lo mpz/fdiv_r_ui$U.lo mpz/fdiv_q$U.lo			\
164 168
   mpz/fdiv_ui$U.lo mpz/fib_ui$U.lo mpz/fib2_ui$U.lo mpz/fits_sint$U.lo	\
165 169
   mpz/fits_slong$U.lo mpz/fits_sshort$U.lo mpz/fits_uint$U.lo		\
166 170
   mpz/fits_ulong$U.lo mpz/fits_ushort$U.lo mpz/gcd$U.lo			\
167 171
   mpz/gcd_ui$U.lo mpz/gcdext$U.lo mpz/get_d$U.lo mpz/get_d_2exp$U.lo	\
168 172
   mpz/get_si$U.lo mpz/get_str$U.lo mpz/get_ui$U.lo mpz/getlimbn$U.lo	\
169 173
   mpz/hamdist$U.lo							\
170  
-  mpz/import$U.lo mpz/init$U.lo mpz/init2$U.lo mpz/inits$U.lo 		\
  174
+  mpz/import$U.lo mpz/init$U.lo mpz/init2$U.lo mpz/inits$U.lo		\
171 175
   mpz/inp_raw$U.lo mpz/inp_str$U.lo mpz/invert$U.lo			\
172 176
   mpz/ior$U.lo mpz/iset$U.lo mpz/iset_d$U.lo mpz/iset_si$U.lo		\
173 177
   mpz/iset_str$U.lo mpz/iset_ui$U.lo mpz/jacobi$U.lo mpz/kronsz$U.lo	\
@@ -178,7 +182,8 @@ MPZ_OBJECTS = mpz/abs$U.lo mpz/add$U.lo mpz/add_ui$U.lo			\
178 182
   mpz/n_pow_ui$U.lo mpz/neg$U.lo mpz/nextprime$U.lo			\
179 183
   mpz/out_raw$U.lo mpz/out_str$U.lo mpz/perfpow$U.lo mpz/perfsqr$U.lo	\
180 184
   mpz/popcount$U.lo mpz/pow_ui$U.lo mpz/powm$U.lo mpz/powm_sec$U.lo	\
181  
-  mpz/powm_ui$U.lo mpz/pprime_p$U.lo mpz/random$U.lo mpz/random2$U.lo	\
  185
+  mpz/powm_ui$U.lo mpz/primorial_ui$U.lo				\
  186
+  mpz/pprime_p$U.lo mpz/random$U.lo mpz/random2$U.lo			\
182 187
   mpz/realloc$U.lo mpz/realloc2$U.lo mpz/remove$U.lo			\
183 188
   mpz/root$U.lo mpz/rootrem$U.lo mpz/rrandomb$U.lo mpz/scan0$U.lo	\
184 189
   mpz/scan1$U.lo mpz/set$U.lo mpz/set_d$U.lo mpz/set_f$U.lo		\
@@ -222,19 +227,18 @@ SCANF_OBJECTS =							\
222 227
   scanf/scanf$U.lo scanf/sscanf$U.lo scanf/sscanffuns$U.lo	\
223 228
   scanf/vfscanf$U.lo scanf/vscanf$U.lo scanf/vsscanf$U.lo
224 229
 
  230
+RANDOM_OBJECTS =							\
  231
+  rand/rand$U.lo rand/randclr$U.lo rand/randdef$U.lo rand/randiset$U.lo	\
  232
+  rand/randlc2s$U.lo rand/randlc2x$U.lo rand/randmt$U.lo		\
  233
+  rand/randmts$U.lo rand/rands$U.lo rand/randsd$U.lo rand/randsdui$U.lo	\
  234
+  rand/randbui$U.lo rand/randmui$U.lo
  235
+
225 236
 # no $U for C++ files
226 237
 CXX_OBJECTS =								\
227 238
   cxx/isfuns.lo cxx/ismpf.lo cxx/ismpq.lo cxx/ismpz.lo cxx/ismpznw.lo	\
228  
-  cxx/osdoprnti.lo cxx/osfuns.lo					\
  239
+  cxx/limits.lo cxx/osdoprnti.lo cxx/osfuns.lo				\
229 240
   cxx/osmpf.lo cxx/osmpq.lo cxx/osmpz.lo
230 241
 
231  
-MPBSD_OBJECTS = mpbsd/add$U.lo mpbsd/tdiv_qr$U.lo mpbsd/set$U.lo	\
232  
-  mpbsd/powm$U.lo mpbsd/sub$U.lo mpbsd/cmp$U.lo mpbsd/mfree$U.lo	\
233  
-  mpbsd/mtox$U.lo mpbsd/realloc$U.lo mpbsd/gcd$U.lo mpbsd/itom$U.lo	\
234  
-  mpbsd/min$U.lo mpbsd/mul$U.lo mpbsd/mout$U.lo mpbsd/rpow$U.lo		\
235  
-  mpbsd/sdiv$U.lo mpbsd/sqrtrem$U.lo mpbsd/xtom$U.lo
236  
-
237  
-
238 242
 # In libtool 1.5 it doesn't work to build libgmp.la from the convenience
239 243
 # libraries like mpz/libmpz.la.  Or rather it works, but it ends up putting
240 244
 # PIC objects into libgmp.a if shared and static are both built.  (The PIC
@@ -249,17 +253,15 @@ MPBSD_OBJECTS = mpbsd/add$U.lo mpbsd/tdiv_qr$U.lo mpbsd/set$U.lo	\
249 253
 # -export-symbols, since the tune and speed programs, and perhaps some of
250 254
 # the test programs, want to access undocumented symbols.
251 255
 
252  
-libgmp_la_SOURCES = gmp-impl.h longlong.h randmt.h			\
  256
+libgmp_la_SOURCES = gmp-impl.h longlong.h				\
253 257
   assert.c compat.c errno.c extract-dbl.c invalid.c memory.c		\
254 258
   mp_bpl.c mp_clz_tab.c mp_dv_tab.c mp_minv_tab.c mp_get_fns.c mp_set_fns.c \
255  
-  rand.c randclr.c randdef.c randiset.c randlc2s.c randlc2x.c randmt.c	\
256  
-  randmts.c rands.c randsd.c randsdui.c randbui.c randmui.c version.c	\
257  
-  nextprime.c
  259
+  version.c nextprime.c primesieve.c
258 260
 EXTRA_libgmp_la_SOURCES = tal-debug.c tal-notreent.c tal-reent.c
259 261
 libgmp_la_DEPENDENCIES = @TAL_OBJECT@		\
260 262
   $(MPF_OBJECTS) $(MPZ_OBJECTS) $(MPQ_OBJECTS)	\
261 263
   $(MPN_OBJECTS) @mpn_objs_in_libgmp@		\
262  
-  $(PRINTF_OBJECTS)  $(SCANF_OBJECTS)
  264
+  $(PRINTF_OBJECTS)  $(SCANF_OBJECTS) $(RANDOM_OBJECTS)
263 265
 libgmp_la_LIBADD = $(libgmp_la_DEPENDENCIES)
264 266
 libgmp_la_LDFLAGS = $(GMP_LDFLAGS) $(LIBGMP_LDFLAGS) \
265 267
   -version-info $(LIBGMP_LT_CURRENT):$(LIBGMP_LT_REVISION):$(LIBGMP_LT_AGE)
@@ -279,28 +281,6 @@ libgmpxx_la_LDFLAGS = $(GMP_LDFLAGS) $(LIBGMPXX_LDFLAGS) \
279 281
   -version-info $(LIBGMPXX_LT_CURRENT):$(LIBGMPXX_LT_REVISION):$(LIBGMPXX_LT_AGE)
280 282
 
281 283
 
282  
-# The selected mpz objects here support mpz/powm.c (built as mpbsd/powm.lo)
283  
-# and can probably be removed when that switches to an mpn implementation.
284  
-# (Apart from mpz/n_pow_ui$U.lo, which supports mpbsd/rpow.c)
285  
-
286  
-if WANT_MPBSD
287  
-MPBSD_HEADERS_OPTION = mp.h
288  
-MPBSD_LTLIBRARIES_OPTION = libmp.la
289  
-endif
290  
-BUILT_SOURCES += mp.h
291  
-libmp_la_SOURCES = assert.c errno.c memory.c mp_bpl.c mp_clz_tab.c	\
292  
-  mp_dv_tab.c mp_minv_tab.c mp_get_fns.c mp_set_fns.c nextprime.c
293  
-libmp_la_DEPENDENCIES = $(srcdir)/libmp.sym				\
294  
-  @TAL_OBJECT@ $(MPBSD_OBJECTS) $(MPN_OBJECTS) @mpn_objs_in_libmp@	\
295  
-  mpz/add$U.lo mpz/gcdext$U.lo mpz/invert$U.lo mpz/mul$U.lo		\
296  
-  mpz/n_pow_ui$U.lo mpz/realloc$U.lo mpz/set$U.lo mpz/sub$U.lo		\
297  
-  mpz/tdiv_q$U.lo
298  
-libmp_la_LIBADD = $(libmp_la_DEPENDENCIES)
299  
-libmp_la_LDFLAGS = $(GMP_LDFLAGS) \
300  
-  -version-info $(LIBMP_LT_CURRENT):$(LIBMP_LT_REVISION):$(LIBMP_LT_AGE) \
301  
-  -export-symbols $(srcdir)/libmp.sym
302  
-EXTRA_DIST += libmp.sym
303  
-
304 284
 
305 285
 install-data-hook:
306 286
 	@echo ''
@@ -319,9 +299,6 @@ install-data-hook:
319 299
 	@echo ''
320 300
 
321 301
 
322  
-# The ansi2knr setups for the build programs are the same as the normal
323  
-# automake ansi2knr rules, but using $(CC_FOR_BUILD) instead of $(CC).
324  
-#
325 302
 # The "test -f" support for srcdir!=builddir is similar to the automake .c.o
326 303
 # etc rules, but with each foo.c explicitly, since $< is not portable
327 304
 # outside an inference rule.
@@ -338,19 +315,16 @@ install-data-hook:
338 315
 # the .h files are not properly expressed for the various objects that use
339 316
 # them.
340 317
 
341  
-EXTRA_DIST += dumbmp.c
342  
-
343  
-mpz/fac_ui.h: gen-fac_ui$(EXEEXT_FOR_BUILD)
344  
-	./gen-fac_ui $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mpz/fac_ui.h || (rm -f mpz/fac_ui.h; exit 1)
345  
-BUILT_SOURCES += mpz/fac_ui.h
  318
+EXTRA_DIST += bootstrap.c
346 319
 
347  
-gen-fac_ui$(EXEEXT_FOR_BUILD): gen-fac_ui$(U_FOR_BUILD).c dumbmp.c
348  
-	$(CC_FOR_BUILD) `test -f 'gen-fac_ui$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-fac_ui$(U_FOR_BUILD).c -o gen-fac_ui$(EXEEXT_FOR_BUILD)
349  
-DISTCLEANFILES += gen-fac_ui$(EXEEXT_FOR_BUILD)
350  
-EXTRA_DIST += gen-fac_ui.c
  320
+fac_table.h: gen-fac$(EXEEXT_FOR_BUILD)
  321
+	./gen-fac $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >fac_table.h || (rm -f fac_table.h; exit 1)
  322
+BUILT_SOURCES += fac_table.h
351 323
 
352  
-gen-fac_ui_.c: gen-fac_ui.c $(ANSI2KNR)
353  
-	$(CPP_FOR_BUILD) `if test -f $(srcdir)/gen-fac_ui.c; then echo $(srcdir)/gen-fac_ui.c; else echo gen-fac_ui.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gen-fac_ui_.c || rm -f gen-fac_ui_.c
  324
+gen-fac$(EXEEXT_FOR_BUILD): gen-fac$(U_FOR_BUILD).c bootstrap.c
  325
+	$(CC_FOR_BUILD) `test -f 'gen-fac$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-fac$(U_FOR_BUILD).c -o gen-fac$(EXEEXT_FOR_BUILD)
  326
+DISTCLEANFILES += gen-fac$(EXEEXT_FOR_BUILD)
  327
+EXTRA_DIST += gen-fac.c
354 328
 
355 329
 
356 330
 fib_table.h: gen-fib$(EXEEXT_FOR_BUILD)
@@ -361,14 +335,11 @@ mpn/fib_table.c: gen-fib$(EXEEXT_FOR_BUILD)
361 335
 	./gen-fib table $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mpn/fib_table.c || (rm -f mpn/fib_table.c; exit 1)
362 336
 BUILT_SOURCES += mpn/fib_table.c
363 337
 
364  
-gen-fib$(EXEEXT_FOR_BUILD): gen-fib$(U_FOR_BUILD).c dumbmp.c
  338
+gen-fib$(EXEEXT_FOR_BUILD): gen-fib$(U_FOR_BUILD).c bootstrap.c
365 339
 	$(CC_FOR_BUILD) `test -f 'gen-fib$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-fib$(U_FOR_BUILD).c -o gen-fib$(EXEEXT_FOR_BUILD)
366 340
 DISTCLEANFILES += gen-fib$(EXEEXT_FOR_BUILD)
367 341
 EXTRA_DIST += gen-fib.c
368 342
 
369  
-gen-fib_.c: gen-fib.c $(ANSI2KNR)
370  
-	$(CPP_FOR_BUILD) `if test -f $(srcdir)/gen-fib.c; then echo $(srcdir)/gen-fib.c; else echo gen-fib.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gen-fib_.c || rm -f gen-fib_.c
371  
-
372 343
 
373 344
 mp_bases.h: gen-bases$(EXEEXT_FOR_BUILD)
374 345
 	./gen-bases header $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mp_bases.h || (rm -f mp_bases.h; exit 1)
@@ -378,43 +349,44 @@ mpn/mp_bases.c: gen-bases$(EXEEXT_FOR_BUILD)
378 349
 	./gen-bases table $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mpn/mp_bases.c || (rm -f mpn/mp_bases.c; exit 1)
379 350
 BUILT_SOURCES += mpn/mp_bases.c
380 351
 
381  
-gen-bases$(EXEEXT_FOR_BUILD): gen-bases$(U_FOR_BUILD).c dumbmp.c
  352
+gen-bases$(EXEEXT_FOR_BUILD): gen-bases$(U_FOR_BUILD).c bootstrap.c
382 353
 	$(CC_FOR_BUILD) `test -f 'gen-bases$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-bases$(U_FOR_BUILD).c -o gen-bases$(EXEEXT_FOR_BUILD) $(LIBM_FOR_BUILD)
383 354
 DISTCLEANFILES += gen-bases$(EXEEXT_FOR_BUILD)
384 355
 EXTRA_DIST += gen-bases.c
385 356
 
386  
-gen-bases_.c: gen-bases.c $(ANSI2KNR)
387  
-	$(CPP_FOR_BUILD) `if test -f $(srcdir)/gen-bases.c; then echo $(srcdir)/gen-bases.c; else echo gen-bases.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gen-bases_.c || rm -f gen-bases_.c
388  
-
389  
-
390 357
 
391 358
 trialdivtab.h: gen-trialdivtab$(EXEEXT_FOR_BUILD)
392 359
 	./gen-trialdivtab $(GMP_LIMB_BITS) 8000 >trialdivtab.h || (rm -f trialdivtab.h; exit 1)
393 360
 BUILT_SOURCES += trialdivtab.h
394 361
 
395  
-gen-trialdivtab$(EXEEXT_FOR_BUILD): gen-trialdivtab$(U_FOR_BUILD).c dumbmp.c
  362
+gen-trialdivtab$(EXEEXT_FOR_BUILD): gen-trialdivtab$(U_FOR_BUILD).c bootstrap.c
396 363
 	$(CC_FOR_BUILD) `test -f 'gen-trialdivtab$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-trialdivtab$(U_FOR_BUILD).c -o gen-trialdivtab$(EXEEXT_FOR_BUILD) $(LIBM_FOR_BUILD)
397 364
 DISTCLEANFILES += gen-trialdivtab$(EXEEXT_FOR_BUILD)
398 365
 EXTRA_DIST += gen-trialdivtab.c
399 366
 
400  
-gen-trialdivtab_.c: gen-trialdivtab.c $(ANSI2KNR)
401  
-	$(CPP_FOR_BUILD) `if test -f $(srcdir)/gen-trialdivtab.c; then echo $(srcdir)/gen-trialdivtab.c; else echo gen-trialdivtab.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gen-trialdivtab_.c || rm -f gen-trialdivtab_.c
402 367
 
  368
+mpn/jacobitab.h: gen-jacobitab$(EXEEXT_FOR_BUILD)
  369
+	./gen-jacobitab >mpn/jacobitab.h || (rm -f mpn/jacobitab.h; exit 1)
  370
+BUILT_SOURCES += mpn/jacobitab.h
403 371
 
  372
+gen-jacobitab$(EXEEXT_FOR_BUILD): gen-jacobitab$(U_FOR_BUILD).c
  373
+	$(CC_FOR_BUILD) `test -f 'gen-jacobitab$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-jacobitab$(U_FOR_BUILD).c -o gen-jacobitab$(EXEEXT_FOR_BUILD)
  374
+DISTCLEANFILES += gen-jacobitab$(EXEEXT_FOR_BUILD)
  375
+EXTRA_DIST += gen-jacobitab.c
404 376
 
405 377
 
406 378
 mpn/perfsqr.h: gen-psqr$(EXEEXT_FOR_BUILD)
407 379
 	./gen-psqr $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mpn/perfsqr.h || (rm -f mpn/perfsqr.h; exit 1)
408 380
 BUILT_SOURCES += mpn/perfsqr.h
409 381
 
410  
-gen-psqr$(EXEEXT_FOR_BUILD): gen-psqr$(U_FOR_BUILD).c dumbmp.c
  382
+gen-psqr$(EXEEXT_FOR_BUILD): gen-psqr$(U_FOR_BUILD).c bootstrap.c
411 383
 	$(CC_FOR_BUILD) `test -f 'gen-psqr$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-psqr$(U_FOR_BUILD).c -o gen-psqr$(EXEEXT_FOR_BUILD) $(LIBM_FOR_BUILD)
412 384
 DISTCLEANFILES += gen-psqr$(EXEEXT_FOR_BUILD)
413 385
 EXTRA_DIST += gen-psqr.c
414 386
 
415  
-gen-psqr_.c: gen-psqr.c $(ANSI2KNR)
416  
-	$(CPP_FOR_BUILD) `if test -f $(srcdir)/gen-psqr.c; then echo $(srcdir)/gen-psqr.c; else echo gen-psqr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gen-psqr_.c || rm -f gen-psqr_.c
417  
-
  387
+# Distribute mini-gmp. Test sources copied by dist-hook.
  388
+EXTRA_DIST += mini-gmp/README mini-gmp/mini-gmp.c mini-gmp/mini-gmp.h \
  389
+	      mini-gmp/tests/Makefile mini-gmp/tests/run-tests
418 390
 
419 391
 # Avoid: CVS - cvs directories
420 392
 #        *~  - emacs backups
@@ -426,6 +398,33 @@ gen-psqr_.c: gen-psqr.c $(ANSI2KNR)
426 398
 dist-hook:
427 399
 	-find $(distdir) \( -name CVS -type d \) -o -name "*~" -o -name ".#*" \
428 400
 		| xargs rm -rf
  401
+	cp "$(srcdir)"/mini-gmp/tests/*.[ch] "$(distdir)/mini-gmp/tests"
429 402
 #	grep -F $(VERSION) $(srcdir)/Makefile.am \
430  
-#		| grep -q "^# *$(VERSION) *$(LIBGMP_LT_CURRENT):$(LIBGMP_LT_REVISION):$(LIBGMP_LT_AGE) *$(LIBGMPXX_LT_CURRENT):$(LIBGMPXX_LT_REVISION):$(LIBGMPXX_LT_AGE) *$(LIBMP_LT_CURRENT):$(LIBMP_LT_REVISION):$(LIBMP_LT_AGE)"
  403
+#		| grep -q "^# *$(VERSION) *$(LIBGMP_LT_CURRENT):$(LIBGMP_LT_REVISION):$(LIBGMP_LT_AGE) *$(LIBGMPXX_LT_CURRENT):$(LIBGMPXX_LT_REVISION):$(LIBGMPXX_LT_AGE)"
431 404
 #	test -z "`sed -n 's/^# *[0-9]*\.[0-9]*\.[0-9]* *\([0-9]*:[0-9]*:[0-9]*\) *\([0-9]*:[0-9]*:[0-9]*\) *\([0-9]*:[0-9]*:[0-9]*\).*/A\1\nB\2\nC\3/p' $(srcdir)/Makefile.am | grep -v 'A6:3:3\|B3:5:0\|C4:7:1' | sort | uniq -d`"
  405
+
  406
+.PHONY: check-mini-gmp clean-mini-gmp
  407
+
  408
+check-mini-gmp:
  409
+	abs_srcdir="`cd $(srcdir) && pwd`" ; \
  410
+	$(MKDIR_P) mini-gmp/tests \
  411
+	&& cd mini-gmp/tests \
  412
+	&& LD_LIBRARY_PATH="../../.libs:$$LD_LIBRARY_PATH" \
  413
+	   DYLD_LIBRARY_PATH="../../.libs:$$DYLD_LIBRARY_PATH" \
  414
+	   $(MAKE) -f "$$abs_srcdir/mini-gmp/tests/Makefile" \
  415
+		VPATH="$$abs_srcdir/mini-gmp/tests" \
  416
+		srcdir="$$abs_srcdir/mini-gmp/tests" \
  417
+		MINI_GMP_DIR="$$abs_srcdir/mini-gmp" \
  418
+		LDFLAGS="-L../../.libs" \
  419
+		LIBS="-lgmp -lm" \
  420
+		CC="$(CC_FOR_BUILD)" EXTRA_CFLAGS="-g -I../.." check
  421
+
  422
+clean-mini-gmp:
  423
+	if [ -d mini-gmp/tests ] ; then \
  424
+	  abs_srcdir="`cd $(srcdir) && pwd`" ; \
  425
+	  cd mini-gmp/tests \
  426
+	  && $(MAKE) -f "$$abs_srcdir/mini-gmp/tests/Makefile" clean ; \
  427
+	fi
  428
+
  429
+clean-local: clean-mini-gmp
  430
+distclean-local: clean-mini-gmp
581  external/lgpl3/gmp/dist/Makefile.in
... ...
@@ -1,9 +1,9 @@
1  
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
  1
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5  
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
6  
-# Inc.
  5
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  6
+# Foundation, Inc.
7 7
 # This Makefile.in is free software; the Free Software Foundation
8 8
 # gives unlimited permission to copy and/or distribute it,
9 9
 # with or without modifications, as long as this notice is preserved.
@@ -16,7 +16,7 @@
16 16
 @SET_MAKE@
17 17
 
18 18
 # Copyright 1991, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
19  
-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
  19
+# 2006, 2007, 2008, 2009, 2011, 2012, 2013 Free Software Foundation, Inc.
20 20
 #
21 21
 # This file is part of the GNU MP Library.
22 22
 #
@@ -33,8 +33,91 @@
33 33
 # You should have received a copy of the GNU Lesser General Public License
34 34
 # along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.
35 35
 
  36
+# The following options are the same as AM_INIT_AUTOMAKE in configure.in,
  37
+# except no $(top_builddir) on ansi2knr.  That directory is wanted for the
  38
+# Makefiles in subdirectories, but here we must omit it so automake gives
  39
+# the actual ansi2knr build rule, not "cd $(top_builddir) && make ansi2knr".
  40
+#
  41
+# AUTOMAKE_OPTIONS = 1.8 gnu no-dependencies
  42
+
  43
+# Libtool -version-info for libgmp.la and libmp.la.  See "Versioning" in the
  44
+# libtool manual.
  45
+#
  46
+#	CURRENT:REVISION:AGE
  47
+#
  48
+# 1. No interfaces changed, only implementations (good): Increment REVISION.
  49
+#
  50
+# 2. Interfaces added, none removed (good): Increment CURRENT, increment
  51
+#    AGE, set REVISION to 0.
  52
+#
  53
+# 3. Interfaces removed (BAD, breaks upward compatibility): Increment
  54
+#    CURRENT, set AGE and REVISION to 0.
  55
+#
  56
+# Do this separately for libgmp, libgmpxx and libmp, and only for releases.
  57
+#
  58
+#	  GMP	   -version-info
  59
+#       release   libgmp  libgmpxx libmp
  60
+#        2.0.x      -        -       -
  61
+#        3.0      3:0:0      -     3:0:0
  62
+#        3.0.1    3:1:0      -     3:0:0
  63
+#        3.1      4:0:1      -     4:0:1
  64
+#        3.1.1    4:1:1      -     4:1:1
  65
+#        4.0      5:0:2    3:0:0   4:2:1
  66
+#        4.0.1    5:1:2    3:1:0   4:3:1
  67
+#        4.1      6:0:3    3:2:0   4:4:1
  68
+#        4.1.1    6:1:3    3:3:0   4:5:1
  69
+#        4.1.2    6:2:3    3:4:0   4:6:1
  70
+#        4.1.3    6:3:3    3:5:0   4:7:1
  71
+#        4.1.4    6:3:3    3:5:0   4:7:1	WRONG, same as 4.1.3!
  72
+#        4.2      6:0:3    3:2:0   4:4:1	REALLY WRONG, same as 4.1!
  73
+#        4.2.1    7:1:4    4:1:1   4:10:1	WRONG for libgmpxx
  74
+#        4.2.2    7:2:4    4:2:0   4:11:1
  75
+#        4.2.3    7:3:4    4:3:0   4:12:1
  76
+#        4.2.4    7:4:4    4:4:0   4:13:1
  77
+#        4.3.0    8:0:5    5:0:1   4:14:1
  78
+#        4.3.1    8:1:5    5:1:1   4:15:1	WRONG Really used same as 4.3.0
  79
+#        4.3.2    8:2:5    5:2:1   4:16:1
  80
+#        5.0.0    9:0:6    6:0:2   4:20:1	Should have been 10:0:0
  81
+#        5.0.1   10:1:0    6:1:2   4:21:1
  82
+#        5.0.2   10:2:0    6:2:2   4:22:1
  83
+#        5.0.3   10:3:0    6:3:2   4:23:1
  84
+#        5.0.4   10:4:0    6:4:2   4:24:1
  85
+#        5.0.5   10:5:0    6:5:2   4:25:1
  86
+#        5.1.0   11:0:1    7:0:3     -
  87
+#        5.1.1   11:1:1    7:1:3     -
  88
+#        5.1.2   11:2:1    7:2:3     -
  89
+#        5.1.3   11:3:1    7:3:3     -
  90
+#
  91
+# Starting at 3:0:0 is a slight abuse of the versioning system, but it
  92
+# ensures we're past soname libgmp.so.2, which was used on Debian GNU/Linux
  93
+# packages of gmp 2.  Pretend gmp 2 was 2:0:0, so the interface changes for
  94
+# gmp 3 mean 3:0:0 is right.
  95
+#
  96
+# We interpret "implementation changed" in item "1." above as meaning any
  97
+# release, ie. the REVISION is incremented every time (if nothing else).
  98
+# Even if we thought the code generated will be identical on all systems,
  99
+# it's still good to get the shared library filename (like
  100
+# libgmpxx.so.3.0.4) incrementing, to make it clear which GMP it's from.
  101
+
36 102
 
37 103
 VPATH = @srcdir@
  104
+am__make_dryrun = \
  105
+  { \
  106
+    am__dry=no; \
  107
+    case $$MAKEFLAGS in \
  108
+      *\\[\ \	]*) \
  109
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
  110
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
  111
+      *) \
  112
+        for am__flg in $$MAKEFLAGS; do \
  113
+          case $$am__flg in \
  114
+            *=*|--*) ;; \
  115
+            *n*) am__dry=yes; break;; \
  116
+          esac; \
  117
+        done;; \
  118
+    esac; \
  119
+    test $$am__dry = yes; \
  120
+  }
38 121
 pkgdatadir = $(datadir)/@PACKAGE@
39 122
 pkgincludedir = $(includedir)/@PACKAGE@
40 123
 pkglibdir = $(libdir)/@PACKAGE@
@@ -53,24 +136,22 @@ PRE_UNINSTALL = :
53 136
 POST_UNINSTALL = :
54 137
 build_triplet = @build@
55 138
 host_triplet = @host@
56  
-ANSI2KNR = @ANSI2KNR@
57 139
 subdir = .
58 140
 DIST_COMMON = README $(am__configure_deps) $(am__include_HEADERS_DIST) \
59 141
 	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
60  
-	$(srcdir)/config.in $(srcdir)/gmp-h.in $(srcdir)/mp-h.in \
61  
-	$(top_srcdir)/configure AUTHORS COPYING COPYING.LIB ChangeLog \
62  
-	INSTALL NEWS ansi2knr.1 ansi2knr.c config.guess config.sub \
63  
-	install-sh ltmain.sh missing ylwrap
  142
+	$(srcdir)/config.in $(srcdir)/gmp-h.in $(top_srcdir)/configure \
  143
+	AUTHORS COPYING COPYING.LIB ChangeLog INSTALL NEWS \
  144
+	config.guess config.sub install-sh ltmain.sh missing ylwrap
64 145
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
65 146
 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
66  
-	$(top_srcdir)/configure.in
  147
+	$(top_srcdir)/configure.ac
67 148
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
68 149
 	$(ACLOCAL_M4)
69 150
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
70 151
  configure.lineno config.status.lineno
71 152
 mkinstalldirs = $(install_sh) -d
72 153
 CONFIG_HEADER = config.h
73  
-CONFIG_CLEAN_FILES = gmp.h mp.h gmp-mparam.h
  154
+CONFIG_CLEAN_FILES = gmp.h gmp-mparam.h
74 155
 CONFIG_CLEAN_VPATH_FILES =
75 156
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
76 157
 am__vpath_adj = case $$p in \
@@ -93,18 +174,22 @@ am__nobase_list = $(am__nobase_strip_setup); \
93 174
 am__base_list = \
94 175
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
95 176
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
  177
+am__uninstall_files_from_dir = { \
  178
+  test -z "$$files" \
  179
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
  180
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
  181
+         $(am__cd) "$$dir" && rm -f $$files; }; \
  182
+  }
96 183
 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" \
97 184
 	"$(DESTDIR)$(includeexecdir)"
98 185
 LTLIBRARIES = $(lib_LTLIBRARIES)
99 186
 am__DEPENDENCIES_1 = $(MPF_OBJECTS) $(MPZ_OBJECTS) $(MPQ_OBJECTS) \
100  
-	$(MPN_OBJECTS) $(PRINTF_OBJECTS) $(SCANF_OBJECTS)
101  
-am_libgmp_la_OBJECTS = assert$U.lo compat$U.lo errno$U.lo \
102  
-	extract-dbl$U.lo invalid$U.lo memory$U.lo mp_bpl$U.lo \
103  
-	mp_clz_tab$U.lo mp_dv_tab$U.lo mp_minv_tab$U.lo \
104  
-	mp_get_fns$U.lo mp_set_fns$U.lo rand$U.lo randclr$U.lo \
105  
-	randdef$U.lo randiset$U.lo randlc2s$U.lo randlc2x$U.lo \
106  
-	randmt$U.lo randmts$U.lo rands$U.lo randsd$U.lo randsdui$U.lo \
107  
-	randbui$U.lo randmui$U.lo version$U.lo nextprime$U.lo
  187
+	$(MPN_OBJECTS) $(PRINTF_OBJECTS) $(SCANF_OBJECTS) \
  188
+	$(RANDOM_OBJECTS)
  189
+am_libgmp_la_OBJECTS = assert.lo compat.lo errno.lo extract-dbl.lo \
  190
+	invalid.lo memory.lo mp_bpl.lo mp_clz_tab.lo mp_dv_tab.lo \
  191
+	mp_minv_tab.lo mp_get_fns.lo mp_set_fns.lo version.lo \
  192
+	nextprime.lo primesieve.lo
108 193
 libgmp_la_OBJECTS = $(am_libgmp_la_OBJECTS)
109 194
 libgmp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
110 195
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -115,18 +200,6 @@ libgmpxx_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
115 200
 	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
116 201
 	$(CXXFLAGS) $(libgmpxx_la_LDFLAGS) $(LDFLAGS) -o $@
117 202
 @WANT_CXX_TRUE@am_libgmpxx_la_rpath = -rpath $(libdir)
118  
-am__DEPENDENCIES_2 = $(srcdir)/libmp.sym $(MPBSD_OBJECTS) \
119  
-	$(MPN_OBJECTS) mpz/add$U.lo mpz/gcdext$U.lo mpz/invert$U.lo \
120  
-	mpz/mul$U.lo mpz/n_pow_ui$U.lo mpz/realloc$U.lo mpz/set$U.lo \
121  
-	mpz/sub$U.lo mpz/tdiv_q$U.lo
122  
-am_libmp_la_OBJECTS = assert$U.lo errno$U.lo memory$U.lo mp_bpl$U.lo \
123  
-	mp_clz_tab$U.lo mp_dv_tab$U.lo mp_minv_tab$U.lo \
124  
-	mp_get_fns$U.lo mp_set_fns$U.lo nextprime$U.lo
125  
-libmp_la_OBJECTS = $(am_libmp_la_OBJECTS)
126  
-libmp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
127  
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(libmp_la_LDFLAGS) \
128  
-	$(LDFLAGS) -o $@
129  
-@WANT_MPBSD_TRUE@am_libmp_la_rpath = -rpath $(libdir)
130 203
 DEFAULT_INCLUDES = -I.@am__isrc@
131 204
 depcomp =
132 205
 am__depfiles_maybe =
@@ -149,9 +222,9 @@ CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
149 222
 	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
150 223
 	$(LDFLAGS) -o $@
151 224
 SOURCES = $(libgmp_la_SOURCES) $(EXTRA_libgmp_la_SOURCES) \
152  
-	$(libgmpxx_la_SOURCES) $(libmp_la_SOURCES)
  225
+	$(libgmpxx_la_SOURCES)
153 226
 DIST_SOURCES = $(libgmp_la_SOURCES) $(EXTRA_libgmp_la_SOURCES) \
154  
-	$(libgmpxx_la_SOURCES) $(libmp_la_SOURCES)
  227
+	$(libgmpxx_la_SOURCES)
155 228
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
156 229
 	html-recursive info-recursive install-data-recursive \
157 230
 	install-dvi-recursive install-exec-recursive \
@@ -159,6 +232,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
159 232
 	install-pdf-recursive install-ps-recursive install-recursive \
160 233
 	installcheck-recursive installdirs-recursive pdf-recursive \
161 234
 	ps-recursive uninstall-recursive
  235
+am__can_run_installinfo = \
  236
+  case $$AM_UPDATE_INFO_DIR in \
  237
+    n|no|NO) false;; \
  238
+    *) (install-info --version) >/dev/null 2>&1;; \
  239
+  esac
162 240
 am__include_HEADERS_DIST = gmpxx.h
163 241
 HEADERS = $(include_HEADERS) $(nodist_includeexec_HEADERS)
164 242
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
@@ -173,9 +251,11 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
173 251
 distdir = $(PACKAGE)-$(VERSION)
174 252
 top_distdir = $(distdir)
175 253
 am__remove_distdir = \
176  
-  { test ! -d "$(distdir)" \
177  
-    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
178  
-         && rm -fr "$(distdir)"; }; }
  254
+  if test -d "$(distdir)"; then \
  255
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
  256
+      && rm -rf "$(distdir)" \
  257
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
  258
+  else :; fi
179 259
 am__relativize = \
180 260
   dir0=`pwd`; \
181 261
   sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -204,6 +284,8 @@ am__relativize = \
204 284
 DIST_ARCHIVES = $(distdir).tar.gz
205 285
 GZIP_ENV = --best
206 286
 distuninstallcheck_listfiles = find . -type f -print
  287
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
  288
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
207 289
 distcleancheck_listfiles = find . -type f -print
208 290
 ABI = @ABI@
209 291
 ACLOCAL = @ACLOCAL@
@@ -238,8 +320,6 @@ ECHO_T = @ECHO_T@
238 320
 EGREP = @EGREP@
239 321
 EXEEXT = @EXEEXT@
240 322
 EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
241  
-F77 = @F77@
242  
-FFLAGS = @FFLAGS@
243 323
 FGREP = @FGREP@
244 324
 GMP_LDFLAGS = @GMP_LDFLAGS@
245 325
 GMP_LIMB_BITS = @GMP_LIMB_BITS@
@@ -282,6 +362,7 @@ LTLIBOBJS = @LTLIBOBJS@
282 362
 M4 = @M4@
283 363
 MAINT = @MAINT@
284 364
 MAKEINFO = @MAKEINFO@
  365
+MANIFEST_TOOL = @MANIFEST_TOOL@
285 366
 MKDIR_P = @MKDIR_P@
286 367
 NM = @NM@
287 368
 NMEDIT = @NMEDIT@
@@ -304,8 +385,8 @@ SHELL = @SHELL@
304 385
 SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@
305 386
 STRIP = @STRIP@
306 387
 TAL_OBJECT = @TAL_OBJECT@
  388
+TUNE_LIBS = @TUNE_LIBS@
307 389
 TUNE_SQR_OBJ = @TUNE_SQR_OBJ@
308  
-U = @U@
309 390
 U_FOR_BUILD = @U_FOR_BUILD@
310 391
 VERSION = @VERSION@
311 392
 WITH_READLINE_01 = @WITH_READLINE_01@
@@ -315,10 +396,10 @@ abs_builddir = @abs_builddir@
315 396
 abs_srcdir = @abs_srcdir@
316 397
 abs_top_builddir = @abs_top_builddir@
317 398
 abs_top_srcdir = @abs_top_srcdir@
  399
+ac_ct_AR = @ac_ct_AR@
318 400
 ac_ct_CC = @ac_ct_CC@
319 401
 ac_ct_CXX = @ac_ct_CXX@
320 402
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
321  
-ac_ct_F77 = @ac_ct_F77@
322 403
 am__leading_dot = @am__leading_dot@
323 404
 am__tar = @am__tar@
324 405
 am__untar = @am__untar@
@@ -348,12 +429,10 @@ libdir = @libdir@
348 429
 libexecdir = @libexecdir@
349 430
 localedir = @localedir@
350 431
 localstatedir = @localstatedir@
351  
-lt_ECHO = @lt_ECHO@
352 432
 mandir = @mandir@
353 433
 mkdir_p = @mkdir_p@
354 434
 mpn_objects = @mpn_objects@
355 435
 mpn_objs_in_libgmp = @mpn_objs_in_libgmp@
356  
-mpn_objs_in_libmp = @mpn_objs_in_libmp@
357 436
 oldincludedir = @oldincludedir@
358 437
 pdfdir = @pdfdir@
359 438
 prefix = @prefix@
@@ -367,79 +446,14 @@ target_alias = @target_alias@
367 446
 top_build_prefix = @top_build_prefix@
368 447
 top_builddir = @top_builddir@
369 448
 top_srcdir = @top_srcdir@
  449
+LIBGMP_LT_CURRENT = 11
  450
+LIBGMP_LT_REVISION = 3
  451
+LIBGMP_LT_AGE = 1
  452
+LIBGMPXX_LT_CURRENT = 7
  453
+LIBGMPXX_LT_REVISION = 3
  454
+LIBGMPXX_LT_AGE = 3
  455
+SUBDIRS = tests mpn mpz mpq mpf printf scanf rand cxx demos tune doc
370 456
 
371  
-# The following options are the same as AM_INIT_AUTOMAKE in configure.in,
372  
-# except no $(top_builddir) on ansi2knr.  That directory is wanted for the
373  
-# Makefiles in subdirectories, but here we must omit it so automake gives
374  
-# the actual ansi2knr build rule, not "cd $(top_builddir) && make ansi2knr".
375  
-#
376  
-AUTOMAKE_OPTIONS = 1.8 gnu no-dependencies ansi2knr
377  
-
378  
-# Libtool -version-info for libgmp.la and libmp.la.  See "Versioning" in the
379  
-# libtool manual.
380  
-#
381  
-#	CURRENT:REVISION:AGE
382  
-#
383  
-# 1. No interfaces changed, only implementations (good): Increment REVISION.
384  
-#
385  
-# 2. Interfaces added, none removed (good): Increment CURRENT, increment
386  
-#    AGE, set REVISION to 0.
387  
-#
388  
-# 3. Interfaces removed (BAD, breaks upward compatibility): Increment
389  
-#    CURRENT, set AGE and REVISION to 0.
390  
-#
391  
-# Do this separately for libgmp, libgmpxx and libmp, and only for releases.
392  
-#
393  
-#	  GMP	   -version-info
394  
-#       release   libgmp  libgmpxx libmp
395  
-#        2.0.x      -        -       -
396  
-#        3.0      3:0:0      -     3:0:0
397  
-#        3.0.1    3:1:0      -     3:0:0
398  
-#        3.1      4:0:1      -     4:0:1
399  
-#        3.1.1    4:1:1      -     4:1:1
400  
-#        4.0      5:0:2    3:0:0   4:2:1
401  
-#        4.0.1    5:1:2    3:1:0   4:3:1
402  
-#        4.1      6:0:3    3:2:0   4:4:1
403  
-#        4.1.1    6:1:3    3:3:0   4:5:1
404  
-#        4.1.2    6:2:3    3:4:0   4:6:1
405  
-#        4.1.3    6:3:3    3:5:0   4:7:1
406  
-#        4.1.4    6:3:3    3:5:0   4:7:1	WRONG, same as 4.1.3!
407  
-#        4.2      6:0:3    3:2:0   4:4:1	REALLY WRONG, same as 4.1!
408  
-#        4.2.1    7:1:4    4:1:1   4:10:1	WRONG for libgmpxx
409  
-#        4.2.2    7:2:4    4:2:0   4:11:1
410  
-#        4.2.3    7:3:4    4:3:0   4:12:1
411  
-#        4.2.4    7:4:4    4:4:0   4:13:1
412  
-#        4.3.0    8:0:5    5:0:1   4:14:1
413  
-#        4.3.1    8:1:5    5:1:1   4:15:1	WRONG Really used same as 4.3.0
414  
-#        4.3.2    8:2:5    5:2:1   4:16:1
415  
-#        5.0.0    9:0:6    6:0:2   4:20:1	Should have been 10:0:0
416  
-#        5.0.1   10:1:0    6:1:2   4:21:1
417  
-#        5.0.2   10:2:0    6:2:2   4:22:1
418  
-#
419  
-# Starting at 3:0:0 is a slight abuse of the versioning system, but it
420  
-# ensures we're past soname libgmp.so.2, which was used on Debian GNU/Linux
421  
-# packages of gmp 2.  Pretend gmp 2 was 2:0:0, so the interface changes for
422  
-# gmp 3 mean 3:0:0 is right.
423  
-#
424  
-# We interpret "implementation changed" in item "1." above as meaning any
425  
-# release, ie. the REVISION is incremented every time (if nothing else).
426  
-# Even if we thought the code generated will be identical on all systems,
427  
-# it's still good to get the shared library filename (like
428  
-# libgmpxx.so.3.0.4) incrementing, to make it clear which GMP it's from.
429  
-LIBGMP_LT_CURRENT = 10
430  
-LIBGMP_LT_REVISION = 2
431  
-LIBGMP_LT_AGE = 0
432  
-LIBGMPXX_LT_CURRENT = 6
433  
-LIBGMPXX_LT_REVISION = 2
434  
-LIBGMPXX_LT_AGE = 2
435  
-LIBMP_LT_CURRENT = 4
436  
-LIBMP_LT_REVISION = 22
437  
-LIBMP_LT_AGE = 1
438  
-SUBDIRS = tests mpn mpz mpq mpf printf scanf cxx mpbsd demos tune doc
439  
-
440  
-# The ansi2knr setups for the build programs are the same as the normal
441  
-# automake ansi2knr rules, but using $(CC_FOR_BUILD) instead of $(CC).
442  
-#
443 457
 # The "test -f" support for srcdir!=builddir is similar to the automake .c.o
444 458
 # etc rules, but with each foo.c explicitly, since $< is not portable
445 459
 # outside an inference rule.
@@ -455,9 +469,13 @@ SUBDIRS = tests mpn mpz mpq mpf printf scanf cxx mpbsd demos tune doc
455 469
 # build-system stuff over and done with at the start.  Also, dependencies on
456 470
 # the .h files are not properly expressed for the various objects that use
457 471
 # them.
  472
+
  473
+# Distribute mini-gmp. Test sources copied by dist-hook.
458 474
 EXTRA_DIST = configfsf.guess configfsf.sub .gdbinit INSTALL.autoconf \
459  
-	gmpxx.h libmp.sym dumbmp.c gen-fac_ui.c gen-fib.c gen-bases.c \
460  
-	gen-trialdivtab.c gen-psqr.c
  475
+	gmpxx.h bootstrap.c gen-fac.c gen-fib.c gen-bases.c \
  476
+	gen-trialdivtab.c gen-jacobitab.c gen-psqr.c mini-gmp/README \
  477
+	mini-gmp/mini-gmp.c mini-gmp/mini-gmp.h \
  478
+	mini-gmp/tests/Makefile mini-gmp/tests/run-tests
461 479
 @WANT_CXX_TRUE@GMPXX_HEADERS_OPTION = gmpxx.h
462 480
 
463 481
 # gmp.h and mp.h are architecture dependent, mainly since they encode the
@@ -471,14 +489,16 @@ EXTRA_DIST = configfsf.guess configfsf.sub .gdbinit INSTALL.autoconf \
471 489
 #
472 490
 includeexecdir = $(exec_prefix)/include
473 491
 include_HEADERS = $(GMPXX_HEADERS_OPTION)
474  
-nodist_includeexec_HEADERS = gmp.h $(MPBSD_HEADERS_OPTION)
475  
-lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION) $(MPBSD_LTLIBRARIES_OPTION)
476  
-BUILT_SOURCES = gmp.h mp.h mpz/fac_ui.h fib_table.h mpn/fib_table.c \
477  
-	mp_bases.h mpn/mp_bases.c trialdivtab.h mpn/perfsqr.h
  492
+nodist_includeexec_HEADERS = gmp.h
  493
+lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION)
  494
+BUILT_SOURCES = gmp.h fac_table.h fib_table.h mpn/fib_table.c \
  495
+	mp_bases.h mpn/mp_bases.c trialdivtab.h mpn/jacobitab.h \
  496
+	mpn/perfsqr.h
478 497
 DISTCLEANFILES = $(BUILT_SOURCES) config.m4 @gmp_srclinks@ \
479  
-	gen-fac_ui$(EXEEXT_FOR_BUILD) gen-fib$(EXEEXT_FOR_BUILD) \
  498
+	gen-fac$(EXEEXT_FOR_BUILD) gen-fib$(EXEEXT_FOR_BUILD) \
480 499
 	gen-bases$(EXEEXT_FOR_BUILD) \
481  
-	gen-trialdivtab$(EXEEXT_FOR_BUILD) gen-psqr$(EXEEXT_FOR_BUILD)
  500
+	gen-trialdivtab$(EXEEXT_FOR_BUILD) \
  501
+	gen-jacobitab$(EXEEXT_FOR_BUILD) gen-psqr$(EXEEXT_FOR_BUILD)
482 502
 
483 503
 # Tell gmp.h it's building gmp, not an application, used by windows DLL stuff.
484 504
 INCLUDES = -D__GMP_WITHIN_GMP
@@ -516,16 +536,17 @@ MPZ_OBJECTS = mpz/abs$U.lo mpz/add$U.lo mpz/add_ui$U.lo			\
516 536
   mpz/cong$U.lo mpz/cong_2exp$U.lo mpz/cong_ui$U.lo			\
517 537
   mpz/divexact$U.lo mpz/divegcd$U.lo mpz/dive_ui$U.lo			\
518 538
   mpz/divis$U.lo mpz/divis_ui$U.lo mpz/divis_2exp$U.lo mpz/dump$U.lo	\
519  
-  mpz/export$U.lo mpz/fac_ui$U.lo mpz/fdiv_q$U.lo			\
  539
+  mpz/export$U.lo mpz/mfac_uiui$U.lo					\
  540
+  mpz/2fac_ui$U.lo mpz/fac_ui$U.lo mpz/oddfac_1$U.lo mpz/prodlimbs$U.lo	\
520 541
   mpz/fdiv_q_ui$U.lo mpz/fdiv_qr$U.lo mpz/fdiv_qr_ui$U.lo		\
521  
-  mpz/fdiv_r$U.lo mpz/fdiv_r_ui$U.lo					\
  542
+  mpz/fdiv_r$U.lo mpz/fdiv_r_ui$U.lo mpz/fdiv_q$U.lo			\
522 543
   mpz/fdiv_ui$U.lo mpz/fib_ui$U.lo mpz/fib2_ui$U.lo mpz/fits_sint$U.lo	\
523 544
   mpz/fits_slong$U.lo mpz/fits_sshort$U.lo mpz/fits_uint$U.lo		\
524 545
   mpz/fits_ulong$U.lo mpz/fits_ushort$U.lo mpz/gcd$U.lo			\
525 546
   mpz/gcd_ui$U.lo mpz/gcdext$U.lo mpz/get_d$U.lo mpz/get_d_2exp$U.lo	\
526 547
   mpz/get_si$U.lo mpz/get_str$U.lo mpz/get_ui$U.lo mpz/getlimbn$U.lo	\
527 548
   mpz/hamdist$U.lo							\
528  
-  mpz/import$U.lo mpz/init$U.lo mpz/init2$U.lo mpz/inits$U.lo 		\
  549
+  mpz/import$U.lo mpz/init$U.lo mpz/init2$U.lo mpz/inits$U.lo		\
529 550
   mpz/inp_raw$U.lo mpz/inp_str$U.lo mpz/invert$U.lo			\
530 551
   mpz/ior$U.lo mpz/iset$U.lo mpz/iset_d$U.lo mpz/iset_si$U.lo		\
531 552
   mpz/iset_str$U.lo mpz/iset_ui$U.lo mpz/jacobi$U.lo mpz/kronsz$U.lo	\
@@ -536,7 +557,8 @@ MPZ_OBJECTS = mpz/abs$U.lo mpz/add$U.lo mpz/add_ui$U.lo			\
536 557
   mpz/n_pow_ui$U.lo mpz/neg$U.lo mpz/nextprime$U.lo			\
537 558
   mpz/out_raw$U.lo mpz/out_str$U.lo mpz/perfpow$U.lo mpz/perfsqr$U.lo	\
538 559
   mpz/popcount$U.lo mpz/pow_ui$U.lo mpz/powm$U.lo mpz/powm_sec$U.lo	\
539  
-  mpz/powm_ui$U.lo mpz/pprime_p$U.lo mpz/random$U.lo mpz/random2$U.lo	\
  560
+  mpz/powm_ui$U.lo mpz/primorial_ui$U.lo				\
  561
+  mpz/pprime_p$U.lo mpz/random$U.lo mpz/random2$U.lo			\
540 562
   mpz/realloc$U.lo mpz/realloc2$U.lo mpz/remove$U.lo			\
541 563
   mpz/root$U.lo mpz/rootrem$U.lo mpz/rrandomb$U.lo mpz/scan0$U.lo	\
542 564
   mpz/scan1$U.lo mpz/set$U.lo mpz/set_d$U.lo mpz/set_f$U.lo		\
@@ -579,19 +601,19 @@ SCANF_OBJECTS = \
579 601
   scanf/scanf$U.lo scanf/sscanf$U.lo scanf/sscanffuns$U.lo	\
580 602
   scanf/vfscanf$U.lo scanf/vscanf$U.lo scanf/vsscanf$U.lo
581 603
 
  604
+RANDOM_OBJECTS = \
  605
+  rand/rand$U.lo rand/randclr$U.lo rand/randdef$U.lo rand/randiset$U.lo	\
  606
+  rand/randlc2s$U.lo rand/randlc2x$U.lo rand/randmt$U.lo		\
  607
+  rand/randmts$U.lo rand/rands$U.lo rand/randsd$U.lo rand/randsdui$U.lo	\
  608
+  rand/randbui$U.lo rand/randmui$U.lo
  609
+
582 610
 
583 611
 # no $U for C++ files
584 612
 CXX_OBJECTS = \
585 613
   cxx/isfuns.lo cxx/ismpf.lo cxx/ismpq.lo cxx/ismpz.lo cxx/ismpznw.lo	\
586  
-  cxx/osdoprnti.lo cxx/osfuns.lo					\
  614
+  cxx/limits.lo cxx/osdoprnti.lo cxx/osfuns.lo				\
587 615
   cxx/osmpf.lo cxx/osmpq.lo cxx/osmpz.lo
588 616
 
589  
-MPBSD_OBJECTS = mpbsd/add$U.lo mpbsd/tdiv_qr$U.lo mpbsd/set$U.lo	\
590  
-  mpbsd/powm$U.lo mpbsd/sub$U.lo mpbsd/cmp$U.lo mpbsd/mfree$U.lo	\
591  
-  mpbsd/mtox$U.lo mpbsd/realloc$U.lo mpbsd/gcd$U.lo mpbsd/itom$U.lo	\
592  
-  mpbsd/min$U.lo mpbsd/mul$U.lo mpbsd/mout$U.lo mpbsd/rpow$U.lo		\
593  
-  mpbsd/sdiv$U.lo mpbsd/sqrtrem$U.lo mpbsd/xtom$U.lo
594  
-
595 617
 
596 618
 # In libtool 1.5 it doesn't work to build libgmp.la from the convenience
597 619
 # libraries like mpz/libmpz.la.  Or rather it works, but it ends up putting
@@ -606,18 +628,16 @@ MPBSD_OBJECTS = mpbsd/add$U.lo mpbsd/tdiv_qr$U.lo mpbsd/set$U.lo	\
606 628
 # Currently, for libgmp, unlike libmp below, we're not using
607 629
 # -export-symbols, since the tune and speed programs, and perhaps some of
608 630
 # the test programs, want to access undocumented symbols.
609  
-libgmp_la_SOURCES = gmp-impl.h longlong.h randmt.h			\
  631
+libgmp_la_SOURCES = gmp-impl.h longlong.h				\
610 632
   assert.c compat.c errno.c extract-dbl.c invalid.c memory.c		\
611 633
   mp_bpl.c mp_clz_tab.c mp_dv_tab.c mp_minv_tab.c mp_get_fns.c mp_set_fns.c \
612  
-  rand.c randclr.c randdef.c randiset.c randlc2s.c randlc2x.c randmt.c	\
613  
-  randmts.c rands.c randsd.c randsdui.c randbui.c randmui.c version.c	\
614  
-  nextprime.c
  634
+  version.c nextprime.c primesieve.c
615 635
 
616 636
 EXTRA_libgmp_la_SOURCES = tal-debug.c tal-notreent.c tal-reent.c
617 637
 libgmp_la_DEPENDENCIES = @TAL_OBJECT@		\
618 638
   $(MPF_OBJECTS) $(MPZ_OBJECTS) $(MPQ_OBJECTS)	\
619 639
   $(MPN_OBJECTS) @mpn_objs_in_libgmp@		\
620  
-  $(PRINTF_OBJECTS)  $(SCANF_OBJECTS)
  640
+  $(PRINTF_OBJECTS)  $(SCANF_OBJECTS) $(RANDOM_OBJECTS)
621 641
 
622 642
 libgmp_la_LIBADD = $(libgmp_la_DEPENDENCIES)
623 643
 libgmp_la_LDFLAGS = $(GMP_LDFLAGS) $(LIBGMP_LDFLAGS) \
@@ -634,32 +654,12 @@ libgmpxx_la_LIBADD = $(libgmpxx_la_DEPENDENCIES)
634 654
 libgmpxx_la_LDFLAGS = $(GMP_LDFLAGS) $(LIBGMPXX_LDFLAGS) \
635 655
   -version-info $(LIBGMPXX_LT_CURRENT):$(LIBGMPXX_LT_REVISION):$(LIBGMPXX_LT_AGE)
636 656
 
637  
-
638  
-# The selected mpz objects here support mpz/powm.c (built as mpbsd/powm.lo)
639  
-# and can probably be removed when that switches to an mpn implementation.
640  
-# (Apart from mpz/n_pow_ui$U.lo, which supports mpbsd/rpow.c)
641  
-@WANT_MPBSD_TRUE@MPBSD_HEADERS_OPTION = mp.h
642  
-@WANT_MPBSD_TRUE@MPBSD_LTLIBRARIES_OPTION = libmp.la
643  
-libmp_la_SOURCES = assert.c errno.c memory.c mp_bpl.c mp_clz_tab.c	\
644  
-  mp_dv_tab.c mp_minv_tab.c mp_get_fns.c mp_set_fns.c nextprime.c
645  
-
646  
-libmp_la_DEPENDENCIES = $(srcdir)/libmp.sym				\
647  
-  @TAL_OBJECT@ $(MPBSD_OBJECTS) $(MPN_OBJECTS) @mpn_objs_in_libmp@	\
648  
-  mpz/add$U.lo mpz/gcdext$U.lo mpz/invert$U.lo mpz/mul$U.lo		\
649  
-  mpz/n_pow_ui$U.lo mpz/realloc$U.lo mpz/set$U.lo mpz/sub$U.lo		\
650  
-  mpz/tdiv_q$U.lo
651  
-
652  
-libmp_la_LIBADD = $(libmp_la_DEPENDENCIES)
653  
-libmp_la_LDFLAGS = $(GMP_LDFLAGS) \
654  
-  -version-info $(LIBMP_LT_CURRENT):$(LIBMP_LT_REVISION):$(LIBMP_LT_AGE) \
655  
-  -export-symbols $(srcdir)/libmp.sym
656  
-
657 657
 all: $(BUILT_SOURCES) config.h
658 658
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
659 659
 
660 660
 .SUFFIXES:
661 661
 .SUFFIXES: .c .cc .lo .o .obj
662  
-am--refresh:
  662
+am--refresh: Makefile
663 663
 	@:
664 664
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
665 665
 	@for dep in $?; do \
@@ -695,10 +695,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
695 695
 $(am__aclocal_m4_deps):
696 696
 
697 697
 config.h: stamp-h1
698  
-	@if test ! -f $@; then \
699  
-	  rm -f stamp-h1; \
700  
-	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
701  
-	else :; fi
  698
+	@if test ! -f $@; then rm -f stamp-h1; else :; fi
  699
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
702 700
 
703 701
 stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status
704 702
 	@rm -f stamp-h1
@@ -712,11 +710,8 @@ distclean-hdr:
712 710
 	-rm -f config.h stamp-h1
713 711
 gmp.h: $(top_builddir)/config.status $(srcdir)/gmp-h.in
714 712
 	cd $(top_builddir) && $(SHELL) ./config.status $@
715  
-mp.h: $(top_builddir)/config.status $(srcdir)/mp-h.in
716  
-	cd $(top_builddir) && $(SHELL) ./config.status $@
717 713
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
718 714
 	@$(NORMAL_INSTALL)
719  
-	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
720 715
 	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
721 716
 	list2=; for p in $$list; do \
722 717
 	  if test -f $$p; then \
@@ -724,6 +719,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
724 719
 	  else :; fi; \
725 720
 	done; \
726 721
 	test -z "$$list2" || { \
  722
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
  723
+	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
727 724
 	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
728 725
 	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
729 726
 	}
@@ -745,27 +742,16 @@ clean-libLTLIBRARIES:
745 742
 	  echo "rm -f \"$${dir}/so_locations\""; \
746 743
 	  rm -f "$${dir}/so_locations"; \
747 744
 	done
748  
-libgmp.la: $(libgmp_la_OBJECTS) $(libgmp_la_DEPENDENCIES) 
  745
+libgmp.la: $(libgmp_la_OBJECTS) $(libgmp_la_DEPENDENCIES) $(EXTRA_libgmp_la_DEPENDENCIES) 
749 746
 	$(libgmp_la_LINK) -rpath $(libdir) $(libgmp_la_OBJECTS) $(libgmp_la_LIBADD) $(LIBS)
750  
-libgmpxx.la: $(libgmpxx_la_OBJECTS) $(libgmpxx_la_DEPENDENCIES) 
  747
+libgmpxx.la: $(libgmpxx_la_OBJECTS) $(libgmpxx_la_DEPENDENCIES) $(EXTRA_libgmpxx_la_DEPENDENCIES) 
751 748
 	$(libgmpxx_la_LINK) $(am_libgmpxx_la_rpath) $(libgmpxx_la_OBJECTS) $(libgmpxx_la_LIBADD) $(LIBS)
752  
-libmp.la: $(libmp_la_OBJECTS) $(libmp_la_DEPENDENCIES) 
753  
-	$(libmp_la_LINK) $(am_libmp_la_rpath) $(libmp_la_OBJECTS) $(libmp_la_LIBADD) $(LIBS)
754 749
 
755 750
 mostlyclean-compile:
756 751
 	-rm -f *.$(OBJEXT)
757 752
 
758 753
 distclean-compile:
759 754
 	-rm -f *.tab.c
760  
-./ansi2knr: ansi2knr.$(OBJEXT)
761  
-	$(LINK) ansi2knr.$(OBJEXT) $(LIBS)
762  
-ansi2knr.$(OBJEXT): $(CONFIG_HEADER)
763  
-
764  
-clean-krextra:
765  
-	-rm -f ansi2knr
766  
-
767  
-mostlyclean-kr:
768  
-	-test "$U" = "" || rm -f *_.c
769 755
 
770 756
 .c.o:
771 757
 	$(COMPILE) -c $<
@@ -775,82 +761,6 @@ mostlyclean-kr:
775 761
 
776 762
 .c.lo:
777 763
 	$(LTCOMPILE) -c -o $@ $<