From 3853e91bce7a012e264ed429f4438e9a28703df6 Mon Sep 17 00:00:00 2001 From: Kostyantyn Vorobyov <kostyantyn.vorobyov@cea.fr> Date: Mon, 22 Aug 2016 16:16:14 +0200 Subject: [PATCH] Reduce libgmp distribution --- src/plugins/e-acsl/contrib/.gitignore | 569 +- .../contrib/libgmp/autom4te.cache/output.0 | 30708 ---------------- .../contrib/libgmp/autom4te.cache/output.1 | 30704 --------------- .../contrib/libgmp/autom4te.cache/requests | 393 - .../contrib/libgmp/autom4te.cache/traces.0 | 9505 ----- .../contrib/libgmp/autom4te.cache/traces.1 | 3733 -- src/plugins/e-acsl/contrib/libgmp/configure | 593 +- .../e-acsl/contrib/libgmp/configure.ac | 71 - .../e-acsl/contrib/libgmp/demos/Makefile.am | 50 - .../e-acsl/contrib/libgmp/demos/Makefile.in | 785 - .../contrib/libgmp/demos/calc/Makefile.am | 47 - .../contrib/libgmp/demos/calc/Makefile.in | 677 - .../e-acsl/contrib/libgmp/demos/calc/README | 65 - .../contrib/libgmp/demos/calc/calc-common.h | 35 - .../libgmp/demos/calc/calc-config-h.in | 21 - .../e-acsl/contrib/libgmp/demos/calc/calc.c | 2254 -- .../e-acsl/contrib/libgmp/demos/calc/calc.h | 145 - .../e-acsl/contrib/libgmp/demos/calc/calc.y | 318 - .../contrib/libgmp/demos/calc/calclex.c | 1715 - .../contrib/libgmp/demos/calc/calclex.l | 113 - .../contrib/libgmp/demos/calc/calcread.c | 146 - .../contrib/libgmp/demos/expr/Makefile.am | 54 - .../contrib/libgmp/demos/expr/Makefile.in | 666 - .../e-acsl/contrib/libgmp/demos/expr/README | 501 - .../contrib/libgmp/demos/expr/expr-impl.h | 125 - .../e-acsl/contrib/libgmp/demos/expr/expr.c | 834 - .../e-acsl/contrib/libgmp/demos/expr/expr.h | 142 - .../e-acsl/contrib/libgmp/demos/expr/exprf.c | 123 - .../e-acsl/contrib/libgmp/demos/expr/exprfa.c | 191 - .../e-acsl/contrib/libgmp/demos/expr/exprq.c | 155 - .../e-acsl/contrib/libgmp/demos/expr/exprqa.c | 100 - .../e-acsl/contrib/libgmp/demos/expr/exprv.c | 57 - .../e-acsl/contrib/libgmp/demos/expr/exprz.c | 206 - .../e-acsl/contrib/libgmp/demos/expr/exprza.c | 108 - .../contrib/libgmp/demos/expr/run-expr.c | 242 - .../e-acsl/contrib/libgmp/demos/expr/t-expr.c | 510 - .../e-acsl/contrib/libgmp/demos/factorize.c | 447 - .../e-acsl/contrib/libgmp/demos/isprime.c | 68 - .../e-acsl/contrib/libgmp/demos/perl/GMP.pm | 671 - .../e-acsl/contrib/libgmp/demos/perl/GMP.xs | 3212 -- .../contrib/libgmp/demos/perl/GMP/Mpf.pm | 106 - .../contrib/libgmp/demos/perl/GMP/Mpq.pm | 89 - .../contrib/libgmp/demos/perl/GMP/Mpz.pm | 101 - .../contrib/libgmp/demos/perl/GMP/Rand.pm | 44 - .../e-acsl/contrib/libgmp/demos/perl/INSTALL | 88 - .../contrib/libgmp/demos/perl/Makefile.PL | 82 - .../contrib/libgmp/demos/perl/sample.pl | 54 - .../e-acsl/contrib/libgmp/demos/perl/test.pl | 2179 -- .../e-acsl/contrib/libgmp/demos/perl/test2.pl | 75 - .../e-acsl/contrib/libgmp/demos/perl/typemap | 108 - .../contrib/libgmp/demos/pexpr-config-h.in | 45 - .../e-acsl/contrib/libgmp/demos/pexpr.c | 1380 - .../e-acsl/contrib/libgmp/demos/primes.c | 387 - .../e-acsl/contrib/libgmp/demos/primes.h | 552 - src/plugins/e-acsl/contrib/libgmp/demos/qcn.c | 172 - .../contrib/libgmp/mini-gmp/tests/Makefile | 60 - .../libgmp/mini-gmp/tests/hex-random.c | 434 - .../libgmp/mini-gmp/tests/hex-random.h | 50 - .../libgmp/mini-gmp/tests/mini-random.c | 142 - .../libgmp/mini-gmp/tests/mini-random.h | 33 - .../contrib/libgmp/mini-gmp/tests/run-tests | 123 - .../contrib/libgmp/mini-gmp/tests/t-add.c | 57 - .../contrib/libgmp/mini-gmp/tests/t-aorsmul.c | 77 - .../contrib/libgmp/mini-gmp/tests/t-bitops.c | 103 - .../contrib/libgmp/mini-gmp/tests/t-cmp_d.c | 283 - .../contrib/libgmp/mini-gmp/tests/t-comb.c | 164 - .../contrib/libgmp/mini-gmp/tests/t-cong.c | 212 - .../contrib/libgmp/mini-gmp/tests/t-div.c | 254 - .../libgmp/mini-gmp/tests/t-div_2exp.c | 82 - .../contrib/libgmp/mini-gmp/tests/t-double.c | 138 - .../contrib/libgmp/mini-gmp/tests/t-gcd.c | 176 - .../contrib/libgmp/mini-gmp/tests/t-import.c | 99 - .../contrib/libgmp/mini-gmp/tests/t-invert.c | 98 - .../contrib/libgmp/mini-gmp/tests/t-lcm.c | 73 - .../contrib/libgmp/mini-gmp/tests/t-limbs.c | 106 - .../contrib/libgmp/mini-gmp/tests/t-logops.c | 112 - .../contrib/libgmp/mini-gmp/tests/t-mul.c | 113 - .../contrib/libgmp/mini-gmp/tests/t-powm.c | 61 - .../libgmp/mini-gmp/tests/t-pprime_p.c | 182 - .../contrib/libgmp/mini-gmp/tests/t-reuse.c | 663 - .../contrib/libgmp/mini-gmp/tests/t-root.c | 95 - .../contrib/libgmp/mini-gmp/tests/t-scan.c | 90 - .../contrib/libgmp/mini-gmp/tests/t-signed.c | 142 - .../contrib/libgmp/mini-gmp/tests/t-sqrt.c | 181 - .../contrib/libgmp/mini-gmp/tests/t-str.c | 307 - .../contrib/libgmp/mini-gmp/tests/t-sub.c | 71 - .../contrib/libgmp/mini-gmp/tests/testutils.c | 173 - .../contrib/libgmp/mini-gmp/tests/testutils.h | 37 - .../e-acsl/contrib/libgmp/tests/Makefile.am | 39 - .../e-acsl/contrib/libgmp/tests/Makefile.in | 1368 - .../e-acsl/contrib/libgmp/tests/amd64call.asm | 167 - .../e-acsl/contrib/libgmp/tests/amd64check.c | 112 - .../e-acsl/contrib/libgmp/tests/arm32call.asm | 83 - .../e-acsl/contrib/libgmp/tests/arm32check.c | 96 - .../contrib/libgmp/tests/cxx/Makefile.am | 81 - .../contrib/libgmp/tests/cxx/Makefile.in | 1407 - .../e-acsl/contrib/libgmp/tests/cxx/clocale.c | 66 - .../contrib/libgmp/tests/cxx/t-assign.cc | 604 - .../contrib/libgmp/tests/cxx/t-binary.cc | 466 - .../e-acsl/contrib/libgmp/tests/cxx/t-cast.cc | 57 - .../contrib/libgmp/tests/cxx/t-constr.cc | 756 - .../contrib/libgmp/tests/cxx/t-cxx11.cc | 225 - ...ceptions-work-at-all-with-this-compiler.cc | 38 - .../contrib/libgmp/tests/cxx/t-headers.cc | 26 - .../contrib/libgmp/tests/cxx/t-iostream.cc | 107 - .../contrib/libgmp/tests/cxx/t-istream.cc | 599 - .../contrib/libgmp/tests/cxx/t-locale.cc | 195 - .../e-acsl/contrib/libgmp/tests/cxx/t-misc.cc | 398 - .../e-acsl/contrib/libgmp/tests/cxx/t-mix.cc | 83 - .../e-acsl/contrib/libgmp/tests/cxx/t-ops.cc | 744 - .../e-acsl/contrib/libgmp/tests/cxx/t-ops2.cc | 268 - .../e-acsl/contrib/libgmp/tests/cxx/t-ops3.cc | 133 - .../contrib/libgmp/tests/cxx/t-ostream.cc | 450 - .../e-acsl/contrib/libgmp/tests/cxx/t-prec.cc | 217 - .../e-acsl/contrib/libgmp/tests/cxx/t-rand.cc | 149 - .../contrib/libgmp/tests/cxx/t-ternary.cc | 735 - .../contrib/libgmp/tests/cxx/t-unary.cc | 133 - .../contrib/libgmp/tests/devel/Makefile.am | 34 - .../contrib/libgmp/tests/devel/Makefile.in | 698 - .../e-acsl/contrib/libgmp/tests/devel/README | 37 - .../contrib/libgmp/tests/devel/anymul_1.c | 256 - .../contrib/libgmp/tests/devel/aors_n.c | 263 - .../e-acsl/contrib/libgmp/tests/devel/copy.c | 226 - .../contrib/libgmp/tests/devel/divmod_1.c | 200 - .../contrib/libgmp/tests/devel/divrem.c | 119 - .../contrib/libgmp/tests/devel/logops_n.c | 230 - .../e-acsl/contrib/libgmp/tests/devel/shift.c | 245 - .../e-acsl/contrib/libgmp/tests/devel/try.c | 3659 -- .../contrib/libgmp/tests/devel/tst-addsub.c | 98 - .../e-acsl/contrib/libgmp/tests/memory.c | 247 - .../e-acsl/contrib/libgmp/tests/misc.c | 565 - .../contrib/libgmp/tests/misc/Makefile.am | 33 - .../contrib/libgmp/tests/misc/Makefile.in | 1040 - .../contrib/libgmp/tests/misc/t-locale.c | 207 - .../contrib/libgmp/tests/misc/t-printf.c | 948 - .../contrib/libgmp/tests/misc/t-scanf.c | 1617 - .../contrib/libgmp/tests/mpf/Makefile.am | 31 - .../contrib/libgmp/tests/mpf/Makefile.in | 1451 - .../e-acsl/contrib/libgmp/tests/mpf/reuse.c | 219 - .../e-acsl/contrib/libgmp/tests/mpf/t-add.c | 108 - .../e-acsl/contrib/libgmp/tests/mpf/t-cmp_d.c | 104 - .../contrib/libgmp/tests/mpf/t-cmp_si.c | 135 - .../e-acsl/contrib/libgmp/tests/mpf/t-conv.c | 143 - .../e-acsl/contrib/libgmp/tests/mpf/t-div.c | 186 - .../contrib/libgmp/tests/mpf/t-dm2exp.c | 119 - .../e-acsl/contrib/libgmp/tests/mpf/t-eq.c | 218 - .../e-acsl/contrib/libgmp/tests/mpf/t-fits.c | 328 - .../e-acsl/contrib/libgmp/tests/mpf/t-get_d.c | 106 - .../contrib/libgmp/tests/mpf/t-get_d_2exp.c | 121 - .../contrib/libgmp/tests/mpf/t-get_si.c | 223 - .../contrib/libgmp/tests/mpf/t-get_ui.c | 128 - .../contrib/libgmp/tests/mpf/t-gsprec.c | 62 - .../contrib/libgmp/tests/mpf/t-inp_str.c | 192 - .../e-acsl/contrib/libgmp/tests/mpf/t-int_p.c | 91 - .../contrib/libgmp/tests/mpf/t-mul_ui.c | 165 - .../contrib/libgmp/tests/mpf/t-muldiv.c | 159 - .../contrib/libgmp/tests/mpf/t-pow_ui.c | 70 - .../e-acsl/contrib/libgmp/tests/mpf/t-set.c | 113 - .../e-acsl/contrib/libgmp/tests/mpf/t-set_q.c | 127 - .../contrib/libgmp/tests/mpf/t-set_si.c | 91 - .../contrib/libgmp/tests/mpf/t-set_ui.c | 90 - .../e-acsl/contrib/libgmp/tests/mpf/t-sqrt.c | 194 - .../contrib/libgmp/tests/mpf/t-sqrt_ui.c | 126 - .../e-acsl/contrib/libgmp/tests/mpf/t-sub.c | 288 - .../e-acsl/contrib/libgmp/tests/mpf/t-trunc.c | 271 - .../contrib/libgmp/tests/mpf/t-ui_div.c | 152 - .../contrib/libgmp/tests/mpn/Makefile.am | 38 - .../contrib/libgmp/tests/mpn/Makefile.in | 1756 - .../e-acsl/contrib/libgmp/tests/mpn/logic.c | 134 - .../contrib/libgmp/tests/mpn/t-aors_1.c | 311 - .../contrib/libgmp/tests/mpn/t-asmtype.c | 64 - .../e-acsl/contrib/libgmp/tests/mpn/t-bdiv.c | 368 - .../e-acsl/contrib/libgmp/tests/mpn/t-broot.c | 118 - .../contrib/libgmp/tests/mpn/t-brootinv.c | 106 - .../e-acsl/contrib/libgmp/tests/mpn/t-div.c | 505 - .../contrib/libgmp/tests/mpn/t-divrem_1.c | 124 - .../e-acsl/contrib/libgmp/tests/mpn/t-fat.c | 311 - .../e-acsl/contrib/libgmp/tests/mpn/t-get_d.c | 498 - .../e-acsl/contrib/libgmp/tests/mpn/t-hgcd.c | 407 - .../contrib/libgmp/tests/mpn/t-hgcd_appr.c | 564 - .../contrib/libgmp/tests/mpn/t-instrument.c | 416 - .../contrib/libgmp/tests/mpn/t-invert.c | 161 - .../contrib/libgmp/tests/mpn/t-iord_u.c | 221 - .../contrib/libgmp/tests/mpn/t-matrix22.c | 207 - .../contrib/libgmp/tests/mpn/t-minvert.c | 177 - .../e-acsl/contrib/libgmp/tests/mpn/t-mod_1.c | 129 - .../contrib/libgmp/tests/mpn/t-mp_bases.c | 105 - .../e-acsl/contrib/libgmp/tests/mpn/t-mul.c | 101 - .../e-acsl/contrib/libgmp/tests/mpn/t-mullo.c | 142 - .../contrib/libgmp/tests/mpn/t-mulmid.c | 93 - .../contrib/libgmp/tests/mpn/t-mulmod_bnm1.c | 218 - .../contrib/libgmp/tests/mpn/t-perfsqr.c | 117 - .../e-acsl/contrib/libgmp/tests/mpn/t-scan.c | 145 - .../contrib/libgmp/tests/mpn/t-sizeinbase.c | 108 - .../e-acsl/contrib/libgmp/tests/mpn/t-sqrlo.c | 141 - .../contrib/libgmp/tests/mpn/t-sqrmod_bnm1.c | 191 - .../contrib/libgmp/tests/mpn/t-toom2-sqr.c | 6 - .../contrib/libgmp/tests/mpn/t-toom22.c | 10 - .../contrib/libgmp/tests/mpn/t-toom3-sqr.c | 6 - .../contrib/libgmp/tests/mpn/t-toom32.c | 8 - .../contrib/libgmp/tests/mpn/t-toom33.c | 11 - .../contrib/libgmp/tests/mpn/t-toom4-sqr.c | 6 - .../contrib/libgmp/tests/mpn/t-toom42.c | 8 - .../contrib/libgmp/tests/mpn/t-toom43.c | 8 - .../contrib/libgmp/tests/mpn/t-toom44.c | 11 - .../contrib/libgmp/tests/mpn/t-toom52.c | 8 - .../contrib/libgmp/tests/mpn/t-toom53.c | 8 - .../contrib/libgmp/tests/mpn/t-toom54.c | 8 - .../contrib/libgmp/tests/mpn/t-toom6-sqr.c | 8 - .../contrib/libgmp/tests/mpn/t-toom62.c | 8 - .../contrib/libgmp/tests/mpn/t-toom63.c | 8 - .../contrib/libgmp/tests/mpn/t-toom6h.c | 13 - .../contrib/libgmp/tests/mpn/t-toom8-sqr.c | 8 - .../contrib/libgmp/tests/mpn/t-toom8h.c | 18 - .../contrib/libgmp/tests/mpn/toom-shared.h | 158 - .../libgmp/tests/mpn/toom-sqr-shared.h | 127 - .../contrib/libgmp/tests/mpq/Makefile.am | 34 - .../contrib/libgmp/tests/mpq/Makefile.in | 1240 - .../e-acsl/contrib/libgmp/tests/mpq/io.c | 137 - .../e-acsl/contrib/libgmp/tests/mpq/reuse.c | 247 - .../e-acsl/contrib/libgmp/tests/mpq/t-aors.c | 183 - .../e-acsl/contrib/libgmp/tests/mpq/t-cmp.c | 102 - .../contrib/libgmp/tests/mpq/t-cmp_si.c | 118 - .../contrib/libgmp/tests/mpq/t-cmp_ui.c | 117 - .../e-acsl/contrib/libgmp/tests/mpq/t-cmp_z.c | 147 - .../e-acsl/contrib/libgmp/tests/mpq/t-equal.c | 147 - .../e-acsl/contrib/libgmp/tests/mpq/t-get_d.c | 295 - .../contrib/libgmp/tests/mpq/t-get_str.c | 143 - .../contrib/libgmp/tests/mpq/t-inp_str.c | 172 - .../e-acsl/contrib/libgmp/tests/mpq/t-inv.c | 61 - .../contrib/libgmp/tests/mpq/t-md_2exp.c | 245 - .../e-acsl/contrib/libgmp/tests/mpq/t-set_f.c | 170 - .../contrib/libgmp/tests/mpq/t-set_str.c | 103 - .../contrib/libgmp/tests/mpz/Makefile.am | 42 - .../contrib/libgmp/tests/mpz/Makefile.in | 2042 - .../e-acsl/contrib/libgmp/tests/mpz/bit.c | 406 - .../e-acsl/contrib/libgmp/tests/mpz/convert.c | 170 - .../e-acsl/contrib/libgmp/tests/mpz/dive.c | 101 - .../e-acsl/contrib/libgmp/tests/mpz/dive_ui.c | 87 - .../e-acsl/contrib/libgmp/tests/mpz/io.c | 139 - .../e-acsl/contrib/libgmp/tests/mpz/logic.c | 195 - .../e-acsl/contrib/libgmp/tests/mpz/reuse.c | 722 - .../contrib/libgmp/tests/mpz/t-addsub.c | 122 - .../contrib/libgmp/tests/mpz/t-aorsmul.c | 422 - .../e-acsl/contrib/libgmp/tests/mpz/t-bin.c | 266 - .../contrib/libgmp/tests/mpz/t-cdiv_ui.c | 159 - .../e-acsl/contrib/libgmp/tests/mpz/t-cmp.c | 182 - .../e-acsl/contrib/libgmp/tests/mpz/t-cmp_d.c | 293 - .../contrib/libgmp/tests/mpz/t-cmp_si.c | 102 - .../e-acsl/contrib/libgmp/tests/mpz/t-cong.c | 227 - .../contrib/libgmp/tests/mpz/t-cong_2exp.c | 208 - .../contrib/libgmp/tests/mpz/t-div_2exp.c | 224 - .../e-acsl/contrib/libgmp/tests/mpz/t-divis.c | 168 - .../contrib/libgmp/tests/mpz/t-divis_2exp.c | 133 - .../contrib/libgmp/tests/mpz/t-export.c | 206 - .../contrib/libgmp/tests/mpz/t-fac_ui.c | 109 - .../e-acsl/contrib/libgmp/tests/mpz/t-fdiv.c | 147 - .../contrib/libgmp/tests/mpz/t-fdiv_ui.c | 159 - .../contrib/libgmp/tests/mpz/t-fib_ui.c | 156 - .../e-acsl/contrib/libgmp/tests/mpz/t-fits.c | 198 - .../e-acsl/contrib/libgmp/tests/mpz/t-gcd.c | 454 - .../contrib/libgmp/tests/mpz/t-gcd_ui.c | 63 - .../e-acsl/contrib/libgmp/tests/mpz/t-get_d.c | 74 - .../contrib/libgmp/tests/mpz/t-get_d_2exp.c | 223 - .../contrib/libgmp/tests/mpz/t-get_si.c | 122 - .../contrib/libgmp/tests/mpz/t-hamdist.c | 124 - .../contrib/libgmp/tests/mpz/t-import.c | 176 - .../contrib/libgmp/tests/mpz/t-inp_str.c | 199 - .../contrib/libgmp/tests/mpz/t-invert.c | 121 - .../contrib/libgmp/tests/mpz/t-io_raw.c | 287 - .../e-acsl/contrib/libgmp/tests/mpz/t-jac.c | 1012 - .../e-acsl/contrib/libgmp/tests/mpz/t-lcm.c | 185 - .../e-acsl/contrib/libgmp/tests/mpz/t-limbs.c | 233 - .../contrib/libgmp/tests/mpz/t-lucnum_ui.c | 97 - .../contrib/libgmp/tests/mpz/t-mfac_uiui.c | 136 - .../e-acsl/contrib/libgmp/tests/mpz/t-mul.c | 219 - .../e-acsl/contrib/libgmp/tests/mpz/t-mul_i.c | 135 - .../contrib/libgmp/tests/mpz/t-nextprime.c | 222 - .../contrib/libgmp/tests/mpz/t-oddeven.c | 88 - .../contrib/libgmp/tests/mpz/t-perfpow.c | 248 - .../contrib/libgmp/tests/mpz/t-perfsqr.c | 155 - .../contrib/libgmp/tests/mpz/t-popcount.c | 168 - .../e-acsl/contrib/libgmp/tests/mpz/t-pow.c | 218 - .../e-acsl/contrib/libgmp/tests/mpz/t-powm.c | 184 - .../contrib/libgmp/tests/mpz/t-powm_ui.c | 128 - .../contrib/libgmp/tests/mpz/t-pprime_p.c | 190 - .../contrib/libgmp/tests/mpz/t-primorial_ui.c | 97 - .../contrib/libgmp/tests/mpz/t-remove.c | 147 - .../e-acsl/contrib/libgmp/tests/mpz/t-root.c | 175 - .../e-acsl/contrib/libgmp/tests/mpz/t-scan.c | 132 - .../e-acsl/contrib/libgmp/tests/mpz/t-set_d.c | 140 - .../e-acsl/contrib/libgmp/tests/mpz/t-set_f.c | 126 - .../contrib/libgmp/tests/mpz/t-set_si.c | 97 - .../contrib/libgmp/tests/mpz/t-set_str.c | 109 - .../contrib/libgmp/tests/mpz/t-sizeinbase.c | 90 - .../contrib/libgmp/tests/mpz/t-sqrtrem.c | 123 - .../e-acsl/contrib/libgmp/tests/mpz/t-tdiv.c | 146 - .../contrib/libgmp/tests/mpz/t-tdiv_ui.c | 159 - .../contrib/libgmp/tests/rand/Makefile.am | 89 - .../contrib/libgmp/tests/rand/Makefile.in | 1214 - .../e-acsl/contrib/libgmp/tests/rand/findlc.c | 252 - .../e-acsl/contrib/libgmp/tests/rand/gen.c | 481 - .../contrib/libgmp/tests/rand/gmpstat.h | 75 - .../e-acsl/contrib/libgmp/tests/rand/spect.c | 137 - .../e-acsl/contrib/libgmp/tests/rand/stat.c | 407 - .../contrib/libgmp/tests/rand/statlib.c | 837 - .../e-acsl/contrib/libgmp/tests/rand/t-iset.c | 68 - .../contrib/libgmp/tests/rand/t-lc2exp.c | 217 - .../e-acsl/contrib/libgmp/tests/rand/t-mt.c | 83 - .../e-acsl/contrib/libgmp/tests/rand/t-rand.c | 290 - .../contrib/libgmp/tests/rand/t-urbui.c | 65 - .../contrib/libgmp/tests/rand/t-urmui.c | 75 - .../contrib/libgmp/tests/rand/t-urndmm.c | 159 - .../contrib/libgmp/tests/rand/zdiv_round.c | 44 - .../e-acsl/contrib/libgmp/tests/refmpf.c | 428 - .../e-acsl/contrib/libgmp/tests/refmpn.c | 2582 -- .../e-acsl/contrib/libgmp/tests/refmpq.c | 41 - .../e-acsl/contrib/libgmp/tests/refmpz.c | 298 - .../e-acsl/contrib/libgmp/tests/spinner.c | 129 - .../e-acsl/contrib/libgmp/tests/t-bswap.c | 71 - .../e-acsl/contrib/libgmp/tests/t-constants.c | 343 - .../contrib/libgmp/tests/t-count_zeros.c | 87 - .../contrib/libgmp/tests/t-hightomask.c | 43 - .../e-acsl/contrib/libgmp/tests/t-modlinv.c | 84 - .../e-acsl/contrib/libgmp/tests/t-parity.c | 67 - .../e-acsl/contrib/libgmp/tests/t-popc.c | 80 - .../e-acsl/contrib/libgmp/tests/t-sub.c | 115 - .../e-acsl/contrib/libgmp/tests/tests.h | 443 - .../e-acsl/contrib/libgmp/tests/trace.c | 318 - .../e-acsl/contrib/libgmp/tests/x86call.asm | 154 - .../e-acsl/contrib/libgmp/tests/x86check.c | 118 - 331 files changed, 7 insertions(+), 164204 deletions(-) delete mode 100644 src/plugins/e-acsl/contrib/libgmp/autom4te.cache/output.0 delete mode 100644 src/plugins/e-acsl/contrib/libgmp/autom4te.cache/output.1 delete mode 100644 src/plugins/e-acsl/contrib/libgmp/autom4te.cache/requests delete mode 100644 src/plugins/e-acsl/contrib/libgmp/autom4te.cache/traces.0 delete mode 100644 src/plugins/e-acsl/contrib/libgmp/autom4te.cache/traces.1 delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/Makefile.am delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/Makefile.in delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/calc/Makefile.am delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/calc/Makefile.in delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/calc/README delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/calc/calc-common.h delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/calc/calc-config-h.in delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/calc/calc.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/calc/calc.h delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/calc/calc.y delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/calc/calclex.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/calc/calclex.l delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/calc/calcread.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/expr/Makefile.am delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/expr/Makefile.in delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/expr/README delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/expr/expr-impl.h delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/expr/expr.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/expr/expr.h delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/expr/exprf.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/expr/exprfa.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/expr/exprq.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/expr/exprqa.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/expr/exprv.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/expr/exprz.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/expr/exprza.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/expr/run-expr.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/expr/t-expr.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/factorize.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/isprime.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP.pm delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP.xs delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP/Mpf.pm delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP/Mpq.pm delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP/Mpz.pm delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP/Rand.pm delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/perl/INSTALL delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/perl/Makefile.PL delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/perl/sample.pl delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/perl/test.pl delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/perl/test2.pl delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/perl/typemap delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/pexpr-config-h.in delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/pexpr.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/primes.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/primes.h delete mode 100644 src/plugins/e-acsl/contrib/libgmp/demos/qcn.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/Makefile delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/hex-random.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/hex-random.h delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/mini-random.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/mini-random.h delete mode 100755 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/run-tests delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-add.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-aorsmul.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-bitops.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-cmp_d.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-comb.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-cong.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-div.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-div_2exp.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-double.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-gcd.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-import.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-invert.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-lcm.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-limbs.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-logops.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-mul.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-powm.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-pprime_p.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-reuse.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-root.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-scan.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-signed.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-sqrt.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-str.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-sub.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/testutils.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/testutils.h delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/Makefile.am delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/Makefile.in delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/amd64call.asm delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/amd64check.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/arm32call.asm delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/arm32check.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/Makefile.am delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/Makefile.in delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/clocale.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-assign.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-binary.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-cast.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-constr.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-cxx11.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-do-exceptions-work-at-all-with-this-compiler.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-headers.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-iostream.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-istream.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-locale.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-misc.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-mix.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ops.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ops2.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ops3.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ostream.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-prec.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-rand.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ternary.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-unary.cc delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/devel/Makefile.am delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/devel/Makefile.in delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/devel/README delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/devel/anymul_1.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/devel/aors_n.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/devel/copy.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/devel/divmod_1.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/devel/divrem.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/devel/logops_n.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/devel/shift.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/devel/try.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/devel/tst-addsub.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/memory.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/misc.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/misc/Makefile.am delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/misc/Makefile.in delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/misc/t-locale.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/misc/t-printf.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/misc/t-scanf.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/Makefile.am delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/Makefile.in delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/reuse.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-add.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-cmp_d.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-cmp_si.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-conv.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-div.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-dm2exp.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-eq.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-fits.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-get_d.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-get_d_2exp.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-get_si.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-get_ui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-gsprec.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-inp_str.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-int_p.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-mul_ui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-muldiv.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-pow_ui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-set.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-set_q.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-set_si.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-set_ui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-sqrt.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-sqrt_ui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-sub.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-trunc.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-ui_div.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/Makefile.am delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/Makefile.in delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/logic.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-aors_1.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-asmtype.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-bdiv.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-broot.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-brootinv.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-div.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-divrem_1.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-fat.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-get_d.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-hgcd.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-hgcd_appr.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-instrument.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-invert.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-iord_u.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-matrix22.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-minvert.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mod_1.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mp_bases.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mul.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mullo.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mulmid.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mulmod_bnm1.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-perfsqr.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-scan.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-sizeinbase.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-sqrlo.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-sqrmod_bnm1.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom2-sqr.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom22.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom3-sqr.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom32.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom33.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom4-sqr.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom42.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom43.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom44.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom52.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom53.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom54.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom6-sqr.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom62.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom63.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom6h.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom8-sqr.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom8h.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/toom-shared.h delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpn/toom-sqr-shared.h delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/Makefile.am delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/Makefile.in delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/io.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/reuse.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-aors.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-cmp.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-cmp_si.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-cmp_ui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-cmp_z.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-equal.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-get_d.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-get_str.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-inp_str.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-inv.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-md_2exp.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-set_f.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-set_str.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/Makefile.am delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/Makefile.in delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/bit.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/convert.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/dive.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/dive_ui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/io.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/logic.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/reuse.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-addsub.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-aorsmul.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-bin.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cdiv_ui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cmp.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cmp_d.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cmp_si.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cong.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cong_2exp.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-div_2exp.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-divis.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-divis_2exp.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-export.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fac_ui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fdiv.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fdiv_ui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fib_ui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fits.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-gcd.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-gcd_ui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-get_d.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-get_d_2exp.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-get_si.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-hamdist.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-import.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-inp_str.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-invert.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-io_raw.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-jac.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-lcm.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-limbs.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-lucnum_ui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-mfac_uiui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-mul.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-mul_i.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-nextprime.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-oddeven.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-perfpow.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-perfsqr.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-popcount.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-pow.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-powm.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-powm_ui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-pprime_p.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-primorial_ui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-remove.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-root.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-scan.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-set_d.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-set_f.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-set_si.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-set_str.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-sizeinbase.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-sqrtrem.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-tdiv.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-tdiv_ui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/rand/Makefile.am delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/rand/Makefile.in delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/rand/findlc.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/rand/gen.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/rand/gmpstat.h delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/rand/spect.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/rand/stat.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/rand/statlib.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/rand/t-iset.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/rand/t-lc2exp.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/rand/t-mt.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/rand/t-rand.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/rand/t-urbui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/rand/t-urmui.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/rand/t-urndmm.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/rand/zdiv_round.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/refmpf.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/refmpn.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/refmpq.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/refmpz.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/spinner.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/t-bswap.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/t-constants.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/t-count_zeros.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/t-hightomask.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/t-modlinv.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/t-parity.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/t-popc.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/t-sub.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/tests.h delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/trace.c delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/x86call.asm delete mode 100644 src/plugins/e-acsl/contrib/libgmp/tests/x86check.c diff --git a/src/plugins/e-acsl/contrib/.gitignore b/src/plugins/e-acsl/contrib/.gitignore index 6d926c47eaf..873b4322882 100644 --- a/src/plugins/e-acsl/contrib/.gitignore +++ b/src/plugins/e-acsl/contrib/.gitignore @@ -1,16 +1,12 @@ -libgmp/.libs/ -libgmp/Makefile +libgmp/**/*.lo +libgmp/**/*.la +libgmp/**/Makefile +libgmp/**/.libs +autom4te.cache/ libgmp/config.h libgmp/config.log libgmp/config.m4 libgmp/config.status -libgmp/cxx/Makefile -libgmp/demos/Makefile -libgmp/demos/calc/Makefile -libgmp/demos/calc/calc-config.h -libgmp/demos/expr/Makefile -libgmp/demos/pexpr-config.h -libgmp/doc/Makefile libgmp/fac_table.h libgmp/fib_table.h libgmp/gen-bases @@ -21,772 +17,217 @@ libgmp/gen-psqr libgmp/gen-trialdivtab libgmp/gmp-mparam.h libgmp/gmp.h -libgmp/libgmp-e-acsl.a -libgmp/libgmp.la -libgmp/libgmp_la-assert.lo -libgmp/libgmp_la-compat.lo -libgmp/libgmp_la-errno.lo -libgmp/libgmp_la-extract-dbl.lo -libgmp/libgmp_la-invalid.lo -libgmp/libgmp_la-memory.lo -libgmp/libgmp_la-mp_bpl.lo -libgmp/libgmp_la-mp_clz_tab.lo -libgmp/libgmp_la-mp_dv_tab.lo -libgmp/libgmp_la-mp_get_fns.lo -libgmp/libgmp_la-mp_minv_tab.lo -libgmp/libgmp_la-mp_set_fns.lo -libgmp/libgmp_la-nextprime.lo -libgmp/libgmp_la-primesieve.lo -libgmp/libgmp_la-version.lo libgmp/libtool libgmp/mp_bases.h -libgmp/mpf/.libs/ -libgmp/mpf/Makefile -libgmp/mpf/abs.lo -libgmp/mpf/add.lo -libgmp/mpf/add_ui.lo -libgmp/mpf/ceilfloor.lo -libgmp/mpf/clear.lo -libgmp/mpf/clears.lo -libgmp/mpf/cmp.lo -libgmp/mpf/cmp_d.lo -libgmp/mpf/cmp_si.lo -libgmp/mpf/cmp_ui.lo -libgmp/mpf/cmp_z.lo -libgmp/mpf/div.lo -libgmp/mpf/div_2exp.lo -libgmp/mpf/div_ui.lo -libgmp/mpf/dump.lo -libgmp/mpf/eq.lo -libgmp/mpf/fits_sint.lo -libgmp/mpf/fits_slong.lo -libgmp/mpf/fits_sshort.lo -libgmp/mpf/fits_uint.lo -libgmp/mpf/fits_ulong.lo -libgmp/mpf/fits_ushort.lo -libgmp/mpf/get_d.lo -libgmp/mpf/get_d_2exp.lo -libgmp/mpf/get_dfl_prec.lo -libgmp/mpf/get_prc.lo -libgmp/mpf/get_si.lo -libgmp/mpf/get_str.lo -libgmp/mpf/get_ui.lo -libgmp/mpf/init.lo -libgmp/mpf/init2.lo -libgmp/mpf/inits.lo -libgmp/mpf/inp_str.lo -libgmp/mpf/int_p.lo -libgmp/mpf/iset.lo -libgmp/mpf/iset_d.lo -libgmp/mpf/iset_si.lo -libgmp/mpf/iset_str.lo -libgmp/mpf/iset_ui.lo -libgmp/mpf/libmpf.la -libgmp/mpf/mul.lo -libgmp/mpf/mul_2exp.lo -libgmp/mpf/mul_ui.lo -libgmp/mpf/neg.lo -libgmp/mpf/out_str.lo -libgmp/mpf/pow_ui.lo -libgmp/mpf/random2.lo -libgmp/mpf/reldiff.lo -libgmp/mpf/set.lo -libgmp/mpf/set_d.lo -libgmp/mpf/set_dfl_prec.lo -libgmp/mpf/set_prc.lo -libgmp/mpf/set_prc_raw.lo -libgmp/mpf/set_q.lo -libgmp/mpf/set_si.lo -libgmp/mpf/set_str.lo -libgmp/mpf/set_ui.lo -libgmp/mpf/set_z.lo -libgmp/mpf/size.lo -libgmp/mpf/sqrt.lo -libgmp/mpf/sqrt_ui.lo -libgmp/mpf/sub.lo -libgmp/mpf/sub_ui.lo -libgmp/mpf/swap.lo -libgmp/mpf/trunc.lo -libgmp/mpf/ui_div.lo -libgmp/mpf/ui_sub.lo -libgmp/mpf/urandomb.lo -libgmp/mpn/.libs/ -libgmp/mpn/Makefile libgmp/mpn/add.c -libgmp/mpn/add.lo libgmp/mpn/add_1.c -libgmp/mpn/add_1.lo libgmp/mpn/add_err1_n.asm -libgmp/mpn/add_err1_n.lo libgmp/mpn/add_err2_n.asm -libgmp/mpn/add_err2_n.lo libgmp/mpn/add_err3_n.asm -libgmp/mpn/add_err3_n.lo libgmp/mpn/add_n.asm -libgmp/mpn/add_n.lo libgmp/mpn/add_n_sub_n.c -libgmp/mpn/add_n_sub_n.lo libgmp/mpn/addaddmul_1msb0.asm -libgmp/mpn/addaddmul_1msb0.lo libgmp/mpn/addlsh1_n.asm -libgmp/mpn/addlsh1_n.lo libgmp/mpn/addlsh2_n.asm -libgmp/mpn/addlsh2_n.lo libgmp/mpn/addlsh_n.asm -libgmp/mpn/addlsh_n.lo libgmp/mpn/addmul_1.asm -libgmp/mpn/addmul_1.lo libgmp/mpn/addmul_2.asm -libgmp/mpn/addmul_2.lo libgmp/mpn/and_n.asm -libgmp/mpn/and_n.lo libgmp/mpn/andn_n.asm -libgmp/mpn/andn_n.lo libgmp/mpn/bdiv_dbm1c.asm -libgmp/mpn/bdiv_dbm1c.lo libgmp/mpn/bdiv_q.c -libgmp/mpn/bdiv_q.lo libgmp/mpn/bdiv_q_1.asm -libgmp/mpn/bdiv_q_1.lo libgmp/mpn/bdiv_qr.c -libgmp/mpn/bdiv_qr.lo libgmp/mpn/binvert.c -libgmp/mpn/binvert.lo libgmp/mpn/broot.c -libgmp/mpn/broot.lo libgmp/mpn/brootinv.c -libgmp/mpn/brootinv.lo libgmp/mpn/bsqrt.c -libgmp/mpn/bsqrt.lo libgmp/mpn/bsqrtinv.c -libgmp/mpn/bsqrtinv.lo libgmp/mpn/cmp.c -libgmp/mpn/cmp.lo libgmp/mpn/cnd_add_n.asm -libgmp/mpn/cnd_add_n.lo libgmp/mpn/cnd_sub_n.asm -libgmp/mpn/cnd_sub_n.lo libgmp/mpn/cnd_swap.c -libgmp/mpn/cnd_swap.lo libgmp/mpn/com.asm -libgmp/mpn/com.lo libgmp/mpn/comb_tables.c -libgmp/mpn/comb_tables.lo libgmp/mpn/copyd.asm -libgmp/mpn/copyd.lo libgmp/mpn/copyi.asm -libgmp/mpn/copyi.lo libgmp/mpn/dcpi1_bdiv_q.c -libgmp/mpn/dcpi1_bdiv_q.lo libgmp/mpn/dcpi1_bdiv_qr.c -libgmp/mpn/dcpi1_bdiv_qr.lo libgmp/mpn/dcpi1_div_q.c -libgmp/mpn/dcpi1_div_q.lo libgmp/mpn/dcpi1_div_qr.c -libgmp/mpn/dcpi1_div_qr.lo libgmp/mpn/dcpi1_divappr_q.c -libgmp/mpn/dcpi1_divappr_q.lo libgmp/mpn/div_q.c -libgmp/mpn/div_q.lo libgmp/mpn/div_qr_1.c -libgmp/mpn/div_qr_1.lo libgmp/mpn/div_qr_1n_pi1.asm -libgmp/mpn/div_qr_1n_pi1.lo libgmp/mpn/div_qr_2.c -libgmp/mpn/div_qr_2.lo libgmp/mpn/div_qr_2n_pi1.asm -libgmp/mpn/div_qr_2n_pi1.lo libgmp/mpn/div_qr_2u_pi1.asm -libgmp/mpn/div_qr_2u_pi1.lo libgmp/mpn/dive_1.asm -libgmp/mpn/dive_1.lo libgmp/mpn/diveby3.c -libgmp/mpn/diveby3.lo libgmp/mpn/divexact.c -libgmp/mpn/divexact.lo libgmp/mpn/divis.c -libgmp/mpn/divis.lo libgmp/mpn/divrem.c -libgmp/mpn/divrem.lo libgmp/mpn/divrem_1.asm -libgmp/mpn/divrem_1.lo libgmp/mpn/divrem_2.asm -libgmp/mpn/divrem_2.lo libgmp/mpn/dump.c -libgmp/mpn/dump.lo libgmp/mpn/fib2_ui.c -libgmp/mpn/fib2_ui.lo libgmp/mpn/fib_table.c -libgmp/mpn/fib_table.lo libgmp/mpn/gcd.c -libgmp/mpn/gcd.lo libgmp/mpn/gcd_1.asm -libgmp/mpn/gcd_1.lo libgmp/mpn/gcd_subdiv_step.c -libgmp/mpn/gcd_subdiv_step.lo libgmp/mpn/gcdext.c -libgmp/mpn/gcdext.lo libgmp/mpn/gcdext_1.c -libgmp/mpn/gcdext_1.lo libgmp/mpn/gcdext_lehmer.c -libgmp/mpn/gcdext_lehmer.lo libgmp/mpn/get_d.c -libgmp/mpn/get_d.lo libgmp/mpn/get_str.c -libgmp/mpn/get_str.lo libgmp/mpn/hamdist.asm -libgmp/mpn/hamdist.lo libgmp/mpn/hgcd.c -libgmp/mpn/hgcd.lo libgmp/mpn/hgcd2.c -libgmp/mpn/hgcd2.lo libgmp/mpn/hgcd2_jacobi.c -libgmp/mpn/hgcd2_jacobi.lo libgmp/mpn/hgcd_appr.c -libgmp/mpn/hgcd_appr.lo libgmp/mpn/hgcd_jacobi.c -libgmp/mpn/hgcd_jacobi.lo libgmp/mpn/hgcd_matrix.c -libgmp/mpn/hgcd_matrix.lo libgmp/mpn/hgcd_reduce.c -libgmp/mpn/hgcd_reduce.lo libgmp/mpn/hgcd_step.c -libgmp/mpn/hgcd_step.lo libgmp/mpn/invert.c -libgmp/mpn/invert.lo libgmp/mpn/invert_limb.asm -libgmp/mpn/invert_limb.lo libgmp/mpn/invert_limb_table.asm -libgmp/mpn/invert_limb_table.lo libgmp/mpn/invertappr.c -libgmp/mpn/invertappr.lo libgmp/mpn/ior_n.asm -libgmp/mpn/ior_n.lo libgmp/mpn/iorn_n.asm -libgmp/mpn/iorn_n.lo libgmp/mpn/jacbase.c -libgmp/mpn/jacbase.lo libgmp/mpn/jacobi.c -libgmp/mpn/jacobi.lo libgmp/mpn/jacobi_2.c -libgmp/mpn/jacobi_2.lo libgmp/mpn/jacobitab.h -libgmp/mpn/libmpn.la libgmp/mpn/lshift.asm -libgmp/mpn/lshift.lo libgmp/mpn/lshiftc.asm -libgmp/mpn/lshiftc.lo libgmp/mpn/matrix22_mul.c -libgmp/mpn/matrix22_mul.lo libgmp/mpn/matrix22_mul1_inverse_vector.c -libgmp/mpn/matrix22_mul1_inverse_vector.lo libgmp/mpn/mod_1.c -libgmp/mpn/mod_1.lo libgmp/mpn/mod_1_1.asm -libgmp/mpn/mod_1_1.lo libgmp/mpn/mod_1_2.asm -libgmp/mpn/mod_1_2.lo libgmp/mpn/mod_1_3.c -libgmp/mpn/mod_1_3.lo libgmp/mpn/mod_1_4.asm -libgmp/mpn/mod_1_4.lo libgmp/mpn/mod_34lsub1.asm -libgmp/mpn/mod_34lsub1.lo libgmp/mpn/mode1o.asm -libgmp/mpn/mode1o.lo libgmp/mpn/mp_bases.c -libgmp/mpn/mp_bases.lo libgmp/mpn/mu_bdiv_q.c -libgmp/mpn/mu_bdiv_q.lo libgmp/mpn/mu_bdiv_qr.c -libgmp/mpn/mu_bdiv_qr.lo libgmp/mpn/mu_div_q.c -libgmp/mpn/mu_div_q.lo libgmp/mpn/mu_div_qr.c -libgmp/mpn/mu_div_qr.lo libgmp/mpn/mu_divappr_q.c -libgmp/mpn/mu_divappr_q.lo libgmp/mpn/mul.c -libgmp/mpn/mul.lo libgmp/mpn/mul_1.asm -libgmp/mpn/mul_1.lo libgmp/mpn/mul_2.asm -libgmp/mpn/mul_2.lo libgmp/mpn/mul_basecase.asm -libgmp/mpn/mul_basecase.lo libgmp/mpn/mul_fft.c -libgmp/mpn/mul_fft.lo libgmp/mpn/mul_n.c -libgmp/mpn/mul_n.lo libgmp/mpn/mullo_basecase.asm -libgmp/mpn/mullo_basecase.lo libgmp/mpn/mullo_n.c -libgmp/mpn/mullo_n.lo libgmp/mpn/mulmid.c -libgmp/mpn/mulmid.lo libgmp/mpn/mulmid_basecase.c -libgmp/mpn/mulmid_basecase.lo libgmp/mpn/mulmid_n.c -libgmp/mpn/mulmid_n.lo libgmp/mpn/mulmod_bnm1.c -libgmp/mpn/mulmod_bnm1.lo libgmp/mpn/nand_n.asm -libgmp/mpn/nand_n.lo libgmp/mpn/neg.c -libgmp/mpn/neg.lo libgmp/mpn/nior_n.asm -libgmp/mpn/nior_n.lo libgmp/mpn/nussbaumer_mul.c -libgmp/mpn/nussbaumer_mul.lo libgmp/mpn/perfpow.c -libgmp/mpn/perfpow.lo libgmp/mpn/perfsqr.c libgmp/mpn/perfsqr.h -libgmp/mpn/perfsqr.lo libgmp/mpn/popcount.asm -libgmp/mpn/popcount.lo libgmp/mpn/pow_1.c -libgmp/mpn/pow_1.lo libgmp/mpn/powlo.c -libgmp/mpn/powlo.lo libgmp/mpn/powm.c -libgmp/mpn/powm.lo libgmp/mpn/pre_mod_1.c -libgmp/mpn/pre_mod_1.lo libgmp/mpn/random.c -libgmp/mpn/random.lo libgmp/mpn/random2.c -libgmp/mpn/random2.lo libgmp/mpn/redc_1.asm -libgmp/mpn/redc_1.lo libgmp/mpn/redc_2.c -libgmp/mpn/redc_2.lo libgmp/mpn/redc_n.c -libgmp/mpn/redc_n.lo libgmp/mpn/remove.c -libgmp/mpn/remove.lo libgmp/mpn/rootrem.c -libgmp/mpn/rootrem.lo libgmp/mpn/rsblsh1_n.asm -libgmp/mpn/rsblsh1_n.lo libgmp/mpn/rsblsh2_n.asm -libgmp/mpn/rsblsh2_n.lo libgmp/mpn/rsblsh_n.asm -libgmp/mpn/rsblsh_n.lo libgmp/mpn/rsh1add_n.asm -libgmp/mpn/rsh1add_n.lo libgmp/mpn/rsh1sub_n.asm -libgmp/mpn/rsh1sub_n.lo libgmp/mpn/rshift.asm -libgmp/mpn/rshift.lo libgmp/mpn/sbpi1_bdiv_q.c -libgmp/mpn/sbpi1_bdiv_q.lo libgmp/mpn/sbpi1_bdiv_qr.c -libgmp/mpn/sbpi1_bdiv_qr.lo libgmp/mpn/sbpi1_div_q.c -libgmp/mpn/sbpi1_div_q.lo libgmp/mpn/sbpi1_div_qr.c -libgmp/mpn/sbpi1_div_qr.lo libgmp/mpn/sbpi1_divappr_q.c -libgmp/mpn/sbpi1_divappr_q.lo libgmp/mpn/scan0.c -libgmp/mpn/scan0.lo libgmp/mpn/scan1.c -libgmp/mpn/scan1.lo libgmp/mpn/sec_add_1.c -libgmp/mpn/sec_add_1.lo libgmp/mpn/sec_div_qr.c -libgmp/mpn/sec_div_qr.lo libgmp/mpn/sec_div_r.c -libgmp/mpn/sec_div_r.lo libgmp/mpn/sec_invert.c -libgmp/mpn/sec_invert.lo libgmp/mpn/sec_mul.c -libgmp/mpn/sec_mul.lo libgmp/mpn/sec_pi1_div_qr.c -libgmp/mpn/sec_pi1_div_qr.lo libgmp/mpn/sec_pi1_div_r.c -libgmp/mpn/sec_pi1_div_r.lo libgmp/mpn/sec_powm.c -libgmp/mpn/sec_powm.lo libgmp/mpn/sec_sqr.c -libgmp/mpn/sec_sqr.lo libgmp/mpn/sec_sub_1.c -libgmp/mpn/sec_sub_1.lo libgmp/mpn/sec_tabselect.asm -libgmp/mpn/sec_tabselect.lo libgmp/mpn/set_str.c -libgmp/mpn/set_str.lo libgmp/mpn/sizeinbase.c -libgmp/mpn/sizeinbase.lo libgmp/mpn/sqr.c -libgmp/mpn/sqr.lo libgmp/mpn/sqr_basecase.asm -libgmp/mpn/sqr_basecase.lo libgmp/mpn/sqr_diag_addlsh1.asm -libgmp/mpn/sqr_diag_addlsh1.lo libgmp/mpn/sqrlo.c -libgmp/mpn/sqrlo.lo libgmp/mpn/sqrlo_basecase.c -libgmp/mpn/sqrlo_basecase.lo libgmp/mpn/sqrmod_bnm1.c -libgmp/mpn/sqrmod_bnm1.lo libgmp/mpn/sqrtrem.c -libgmp/mpn/sqrtrem.lo libgmp/mpn/sub.c -libgmp/mpn/sub.lo libgmp/mpn/sub_1.c -libgmp/mpn/sub_1.lo libgmp/mpn/sub_err1_n.asm -libgmp/mpn/sub_err1_n.lo libgmp/mpn/sub_err2_n.asm -libgmp/mpn/sub_err2_n.lo libgmp/mpn/sub_err3_n.asm -libgmp/mpn/sub_err3_n.lo libgmp/mpn/sub_n.asm -libgmp/mpn/sub_n.lo libgmp/mpn/sublsh1_n.asm -libgmp/mpn/sublsh1_n.lo libgmp/mpn/sublsh2_n.asm -libgmp/mpn/sublsh2_n.lo libgmp/mpn/submul_1.asm -libgmp/mpn/submul_1.lo libgmp/mpn/tdiv_qr.c -libgmp/mpn/tdiv_qr.lo libgmp/mpn/toom22_mul.c -libgmp/mpn/toom22_mul.lo libgmp/mpn/toom2_sqr.c -libgmp/mpn/toom2_sqr.lo libgmp/mpn/toom32_mul.c -libgmp/mpn/toom32_mul.lo libgmp/mpn/toom33_mul.c -libgmp/mpn/toom33_mul.lo libgmp/mpn/toom3_sqr.c -libgmp/mpn/toom3_sqr.lo libgmp/mpn/toom42_mul.c -libgmp/mpn/toom42_mul.lo libgmp/mpn/toom42_mulmid.c -libgmp/mpn/toom42_mulmid.lo libgmp/mpn/toom43_mul.c -libgmp/mpn/toom43_mul.lo libgmp/mpn/toom44_mul.c -libgmp/mpn/toom44_mul.lo libgmp/mpn/toom4_sqr.c -libgmp/mpn/toom4_sqr.lo libgmp/mpn/toom52_mul.c -libgmp/mpn/toom52_mul.lo libgmp/mpn/toom53_mul.c -libgmp/mpn/toom53_mul.lo libgmp/mpn/toom54_mul.c -libgmp/mpn/toom54_mul.lo libgmp/mpn/toom62_mul.c -libgmp/mpn/toom62_mul.lo libgmp/mpn/toom63_mul.c -libgmp/mpn/toom63_mul.lo libgmp/mpn/toom6_sqr.c -libgmp/mpn/toom6_sqr.lo libgmp/mpn/toom6h_mul.c -libgmp/mpn/toom6h_mul.lo libgmp/mpn/toom8_sqr.c -libgmp/mpn/toom8_sqr.lo libgmp/mpn/toom8h_mul.c -libgmp/mpn/toom8h_mul.lo libgmp/mpn/toom_couple_handling.c -libgmp/mpn/toom_couple_handling.lo libgmp/mpn/toom_eval_dgr3_pm1.c -libgmp/mpn/toom_eval_dgr3_pm1.lo libgmp/mpn/toom_eval_dgr3_pm2.c -libgmp/mpn/toom_eval_dgr3_pm2.lo libgmp/mpn/toom_eval_pm1.c -libgmp/mpn/toom_eval_pm1.lo libgmp/mpn/toom_eval_pm2.c -libgmp/mpn/toom_eval_pm2.lo libgmp/mpn/toom_eval_pm2exp.c -libgmp/mpn/toom_eval_pm2exp.lo libgmp/mpn/toom_eval_pm2rexp.c -libgmp/mpn/toom_eval_pm2rexp.lo libgmp/mpn/toom_interpolate_12pts.c -libgmp/mpn/toom_interpolate_12pts.lo libgmp/mpn/toom_interpolate_16pts.c -libgmp/mpn/toom_interpolate_16pts.lo libgmp/mpn/toom_interpolate_5pts.c -libgmp/mpn/toom_interpolate_5pts.lo libgmp/mpn/toom_interpolate_6pts.c -libgmp/mpn/toom_interpolate_6pts.lo libgmp/mpn/toom_interpolate_7pts.c -libgmp/mpn/toom_interpolate_7pts.lo libgmp/mpn/toom_interpolate_8pts.c -libgmp/mpn/toom_interpolate_8pts.lo libgmp/mpn/trialdiv.c -libgmp/mpn/trialdiv.lo libgmp/mpn/xnor_n.asm -libgmp/mpn/xnor_n.lo libgmp/mpn/xor_n.asm -libgmp/mpn/xor_n.lo libgmp/mpn/zero.c -libgmp/mpn/zero.lo libgmp/mpn/zero_p.c -libgmp/mpn/zero_p.lo -libgmp/mpq/.libs/ -libgmp/mpq/Makefile -libgmp/mpq/abs.lo -libgmp/mpq/aors.lo -libgmp/mpq/canonicalize.lo -libgmp/mpq/clear.lo -libgmp/mpq/clears.lo -libgmp/mpq/cmp.lo -libgmp/mpq/cmp_si.lo -libgmp/mpq/cmp_ui.lo -libgmp/mpq/div.lo -libgmp/mpq/equal.lo -libgmp/mpq/get_d.lo -libgmp/mpq/get_den.lo -libgmp/mpq/get_num.lo -libgmp/mpq/get_str.lo -libgmp/mpq/init.lo -libgmp/mpq/inits.lo -libgmp/mpq/inp_str.lo -libgmp/mpq/inv.lo -libgmp/mpq/libmpq.la -libgmp/mpq/md_2exp.lo -libgmp/mpq/mul.lo -libgmp/mpq/neg.lo -libgmp/mpq/out_str.lo -libgmp/mpq/set.lo -libgmp/mpq/set_d.lo -libgmp/mpq/set_den.lo -libgmp/mpq/set_f.lo -libgmp/mpq/set_num.lo -libgmp/mpq/set_si.lo -libgmp/mpq/set_str.lo -libgmp/mpq/set_ui.lo -libgmp/mpq/set_z.lo -libgmp/mpq/swap.lo -libgmp/mpz/.libs/ -libgmp/mpz/2fac_ui.lo -libgmp/mpz/Makefile -libgmp/mpz/abs.lo -libgmp/mpz/add.lo -libgmp/mpz/add_ui.lo -libgmp/mpz/and.lo -libgmp/mpz/aorsmul.lo -libgmp/mpz/aorsmul_i.lo -libgmp/mpz/array_init.lo -libgmp/mpz/bin_ui.lo -libgmp/mpz/bin_uiui.lo -libgmp/mpz/cdiv_q.lo -libgmp/mpz/cdiv_q_ui.lo -libgmp/mpz/cdiv_qr.lo -libgmp/mpz/cdiv_qr_ui.lo -libgmp/mpz/cdiv_r.lo -libgmp/mpz/cdiv_r_ui.lo -libgmp/mpz/cdiv_ui.lo -libgmp/mpz/cfdiv_q_2exp.lo -libgmp/mpz/cfdiv_r_2exp.lo -libgmp/mpz/clear.lo -libgmp/mpz/clears.lo -libgmp/mpz/clrbit.lo -libgmp/mpz/cmp.lo -libgmp/mpz/cmp_d.lo -libgmp/mpz/cmp_si.lo -libgmp/mpz/cmp_ui.lo -libgmp/mpz/cmpabs.lo -libgmp/mpz/cmpabs_d.lo -libgmp/mpz/cmpabs_ui.lo -libgmp/mpz/com.lo -libgmp/mpz/combit.lo -libgmp/mpz/cong.lo -libgmp/mpz/cong_2exp.lo -libgmp/mpz/cong_ui.lo -libgmp/mpz/dive_ui.lo -libgmp/mpz/divegcd.lo -libgmp/mpz/divexact.lo -libgmp/mpz/divis.lo -libgmp/mpz/divis_2exp.lo -libgmp/mpz/divis_ui.lo -libgmp/mpz/dump.lo -libgmp/mpz/export.lo -libgmp/mpz/fac_ui.lo -libgmp/mpz/fdiv_q.lo -libgmp/mpz/fdiv_q_ui.lo -libgmp/mpz/fdiv_qr.lo -libgmp/mpz/fdiv_qr_ui.lo -libgmp/mpz/fdiv_r.lo -libgmp/mpz/fdiv_r_ui.lo -libgmp/mpz/fdiv_ui.lo -libgmp/mpz/fib2_ui.lo -libgmp/mpz/fib_ui.lo -libgmp/mpz/fits_sint.lo -libgmp/mpz/fits_slong.lo -libgmp/mpz/fits_sshort.lo -libgmp/mpz/fits_uint.lo -libgmp/mpz/fits_ulong.lo -libgmp/mpz/fits_ushort.lo -libgmp/mpz/gcd.lo -libgmp/mpz/gcd_ui.lo -libgmp/mpz/gcdext.lo -libgmp/mpz/get_d.lo -libgmp/mpz/get_d_2exp.lo -libgmp/mpz/get_si.lo -libgmp/mpz/get_str.lo -libgmp/mpz/get_ui.lo -libgmp/mpz/getlimbn.lo -libgmp/mpz/hamdist.lo -libgmp/mpz/import.lo -libgmp/mpz/init.lo -libgmp/mpz/init2.lo -libgmp/mpz/inits.lo -libgmp/mpz/inp_raw.lo -libgmp/mpz/inp_str.lo -libgmp/mpz/invert.lo -libgmp/mpz/ior.lo -libgmp/mpz/iset.lo -libgmp/mpz/iset_d.lo -libgmp/mpz/iset_si.lo -libgmp/mpz/iset_str.lo -libgmp/mpz/iset_ui.lo -libgmp/mpz/jacobi.lo -libgmp/mpz/kronsz.lo -libgmp/mpz/kronuz.lo -libgmp/mpz/kronzs.lo -libgmp/mpz/kronzu.lo -libgmp/mpz/lcm.lo -libgmp/mpz/lcm_ui.lo -libgmp/mpz/libmpz.la -libgmp/mpz/limbs_finish.lo -libgmp/mpz/limbs_modify.lo -libgmp/mpz/limbs_read.lo -libgmp/mpz/limbs_write.lo -libgmp/mpz/lucnum2_ui.lo -libgmp/mpz/lucnum_ui.lo -libgmp/mpz/mfac_uiui.lo -libgmp/mpz/millerrabin.lo -libgmp/mpz/mod.lo -libgmp/mpz/mul.lo -libgmp/mpz/mul_2exp.lo -libgmp/mpz/mul_si.lo -libgmp/mpz/mul_ui.lo -libgmp/mpz/n_pow_ui.lo -libgmp/mpz/neg.lo -libgmp/mpz/nextprime.lo -libgmp/mpz/oddfac_1.lo -libgmp/mpz/out_raw.lo -libgmp/mpz/out_str.lo -libgmp/mpz/perfpow.lo -libgmp/mpz/perfsqr.lo -libgmp/mpz/popcount.lo -libgmp/mpz/pow_ui.lo -libgmp/mpz/powm.lo -libgmp/mpz/powm_sec.lo -libgmp/mpz/powm_ui.lo -libgmp/mpz/pprime_p.lo -libgmp/mpz/primorial_ui.lo -libgmp/mpz/prodlimbs.lo -libgmp/mpz/random.lo -libgmp/mpz/random2.lo -libgmp/mpz/realloc.lo -libgmp/mpz/realloc2.lo -libgmp/mpz/remove.lo -libgmp/mpz/roinit_n.lo -libgmp/mpz/root.lo -libgmp/mpz/rootrem.lo -libgmp/mpz/rrandomb.lo -libgmp/mpz/scan0.lo -libgmp/mpz/scan1.lo -libgmp/mpz/set.lo -libgmp/mpz/set_d.lo -libgmp/mpz/set_f.lo -libgmp/mpz/set_q.lo -libgmp/mpz/set_si.lo -libgmp/mpz/set_str.lo -libgmp/mpz/set_ui.lo -libgmp/mpz/setbit.lo -libgmp/mpz/size.lo -libgmp/mpz/sizeinbase.lo -libgmp/mpz/sqrt.lo -libgmp/mpz/sqrtrem.lo -libgmp/mpz/sub.lo -libgmp/mpz/sub_ui.lo -libgmp/mpz/swap.lo -libgmp/mpz/tdiv_q.lo -libgmp/mpz/tdiv_q_2exp.lo -libgmp/mpz/tdiv_q_ui.lo -libgmp/mpz/tdiv_qr.lo -libgmp/mpz/tdiv_qr_ui.lo -libgmp/mpz/tdiv_r.lo -libgmp/mpz/tdiv_r_2exp.lo -libgmp/mpz/tdiv_r_ui.lo -libgmp/mpz/tdiv_ui.lo -libgmp/mpz/tstbit.lo -libgmp/mpz/ui_pow_ui.lo -libgmp/mpz/ui_sub.lo -libgmp/mpz/urandomb.lo -libgmp/mpz/urandomm.lo -libgmp/mpz/xor.lo -libgmp/printf/.libs/ -libgmp/printf/Makefile -libgmp/printf/asprintf.lo -libgmp/printf/asprntffuns.lo -libgmp/printf/doprnt.lo -libgmp/printf/doprntf.lo -libgmp/printf/doprnti.lo -libgmp/printf/fprintf.lo -libgmp/printf/libprintf.la -libgmp/printf/obprintf.lo -libgmp/printf/obprntffuns.lo -libgmp/printf/obvprintf.lo -libgmp/printf/printf.lo -libgmp/printf/printffuns.lo -libgmp/printf/repl-vsnprintf.lo -libgmp/printf/snprintf.lo -libgmp/printf/snprntffuns.lo -libgmp/printf/sprintf.lo -libgmp/printf/sprintffuns.lo -libgmp/printf/vasprintf.lo -libgmp/printf/vfprintf.lo -libgmp/printf/vprintf.lo -libgmp/printf/vsnprintf.lo -libgmp/printf/vsprintf.lo -libgmp/rand/.libs/ -libgmp/rand/Makefile -libgmp/rand/librandom.la -libgmp/rand/rand.lo -libgmp/rand/randbui.lo -libgmp/rand/randclr.lo -libgmp/rand/randdef.lo -libgmp/rand/randiset.lo -libgmp/rand/randlc2s.lo -libgmp/rand/randlc2x.lo -libgmp/rand/randmt.lo -libgmp/rand/randmts.lo -libgmp/rand/randmui.lo -libgmp/rand/rands.lo -libgmp/rand/randsd.lo -libgmp/rand/randsdui.lo -libgmp/scanf/.libs/ -libgmp/scanf/Makefile -libgmp/scanf/doscan.lo -libgmp/scanf/fscanf.lo -libgmp/scanf/fscanffuns.lo -libgmp/scanf/libscanf.la -libgmp/scanf/scanf.lo -libgmp/scanf/sscanf.lo -libgmp/scanf/sscanffuns.lo -libgmp/scanf/vfscanf.lo -libgmp/scanf/vscanf.lo -libgmp/scanf/vsscanf.lo libgmp/stamp-h1 -libgmp/tal-reent.lo -libgmp/tests/Makefile -libgmp/tests/cxx/Makefile -libgmp/tests/devel/Makefile -libgmp/tests/misc/Makefile -libgmp/tests/mpf/Makefile -libgmp/tests/mpn/Makefile -libgmp/tests/mpq/Makefile -libgmp/tests/mpz/Makefile -libgmp/tests/rand/Makefile libgmp/trialdivtab.h -libgmp/tune/Makefile libgmp/tune/sqr_basecase.c libjemalloc/include/jemalloc/jemalloc-e-acsl.h diff --git a/src/plugins/e-acsl/contrib/libgmp/autom4te.cache/output.0 b/src/plugins/e-acsl/contrib/libgmp/autom4te.cache/output.0 deleted file mode 100644 index c303c0e2ccb..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/autom4te.cache/output.0 +++ /dev/null @@ -1,30708 +0,0 @@ -@%:@! /bin/sh -@%:@ From configure.ac Revision. -@%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.69 for GNU MP 6.1.0. -@%:@ -@%:@ Report bugs to <gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html>. -@%:@ -@%:@ -@%:@ -@%:@ Copyright 1996-2015 Free Software Foundation, Inc. -@%:@ -@%:@ This file is part of the GNU MP Library. -@%:@ -@%:@ The GNU MP Library is free software; you can redistribute it and/or modify -@%:@ it under the terms of either: -@%:@ -@%:@ * the GNU Lesser General Public License as published by the Free -@%:@ Software Foundation; either version 3 of the License, or (at your -@%:@ option) any later version. -@%:@ -@%:@ or -@%:@ -@%:@ * the GNU General Public License as published by the Free Software -@%:@ Foundation; either version 2 of the License, or (at your option) any -@%:@ later version. -@%:@ -@%:@ or both in parallel, as here. -@%:@ -@%:@ The GNU MP Library is distributed in the hope that it will be useful, but -@%:@ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -@%:@ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -@%:@ for more details. -@%:@ -@%:@ You should have received copies of the GNU General Public License and the -@%:@ GNU Lesser General Public License along with the GNU MP Library. If not, -@%:@ see https://www.gnu.org/licenses/. -@%:@ -@%:@ -@%:@ -@%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -@%:@ -@%:@ -@%:@ This configure script is free software; the Free Software Foundation -@%:@ gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in @%:@( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in @%:@(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in @%:@ (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in @%:@( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in @%:@ (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: gmp-bugs@gmplib.org, see -$0: https://gmplib.org/manual/Reporting-Bugs.html about -$0: your system, including any error possibly output before -$0: this message. Then install a modern shell, or manually -$0: run the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -@%:@ as_fn_unset VAR -@%:@ --------------- -@%:@ Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -@%:@ as_fn_set_status STATUS -@%:@ ----------------------- -@%:@ Set @S|@? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} @%:@ as_fn_set_status - -@%:@ as_fn_exit STATUS -@%:@ ----------------- -@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} @%:@ as_fn_exit - -@%:@ as_fn_mkdir_p -@%:@ ------------- -@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} @%:@ as_fn_mkdir_p - -@%:@ as_fn_executable_p FILE -@%:@ ----------------------- -@%:@ Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} @%:@ as_fn_executable_p -@%:@ as_fn_append VAR VALUE -@%:@ ---------------------- -@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take -@%:@ advantage of any shell optimizations that allow amortized linear growth over -@%:@ repeated appends, instead of the typical quadratic growth present in naive -@%:@ implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -@%:@ as_fn_arith ARG... -@%:@ ------------------ -@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the -@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments -@%:@ must be portable across @S|@(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] -@%:@ ---------------------------------------- -@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are -@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the -@%:@ script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} @%:@ as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in @%:@((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 </dev/null -exec 6>&1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIB@&t@OBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='GNU MP' -PACKAGE_TARNAME='gmp' -PACKAGE_VERSION='6.1.0' -PACKAGE_STRING='GNU MP 6.1.0' -PACKAGE_BUGREPORT='gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html' -PACKAGE_URL='http://www.gnu.org/software/gmp/' - -ac_unique_file="gmp-impl.h" -# Factoring default headers for most tests. -ac_includes_default="\ -#include <stdio.h> -#ifdef HAVE_SYS_TYPES_H -# include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -# include <sys/stat.h> -#endif -#ifdef STDC_HEADERS -# include <stdlib.h> -# include <stddef.h> -#else -# ifdef HAVE_STDLIB_H -# include <stdlib.h> -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include <memory.h> -# endif -# include <string.h> -#endif -#ifdef HAVE_STRINGS_H -# include <strings.h> -#endif -#ifdef HAVE_INTTYPES_H -# include <inttypes.h> -#endif -#ifdef HAVE_STDINT_H -# include <stdint.h> -#endif -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIB@&t@OBJS -LEXLIB -LEX_OUTPUT_ROOT -LEX -YFLAGS -YACC -LIBREADLINE -WITH_READLINE_01 -LIBCURSES -HAVE_STACK_T_01 -HAVE_SYS_RESOURCE_H_01 -HAVE_SIGSTACK_01 -HAVE_SIGALTSTACK_01 -HAVE_SIGACTION_01 -HAVE_GETTIMEOFDAY_01 -HAVE_GETRUSAGE_01 -HAVE_CPUTIME_01 -HAVE_CLOCK_01 -TUNE_SQR_OBJ -gmp_srclinks -mpn_objs_in_libgmp -mpn_objects -GMP_LIMB_BITS -M4 -TUNE_LIBS -TAL_OBJECT -LIBM -ENABLE_STATIC_FALSE -ENABLE_STATIC_TRUE -LT_SYS_LIBRARY_PATH -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -RANLIB -ac_ct_AR -LN_S -LD -FGREP -SED -LIBTOOL -LIBGMP_DLL -OBJDUMP -DLLTOOL -AS -NM -ac_ct_DUMPBIN -DUMPBIN -AR -ASMFLAGS -EGREP -GREP -CXXCPP -WANT_CXX_FALSE -WANT_CXX_TRUE -ac_ct_CXX -CXXFLAGS -CXX -CCAS -LIBM_FOR_BUILD -U_FOR_BUILD -EXEEXT_FOR_BUILD -CPP_FOR_BUILD -CC_FOR_BUILD -CPP -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -DEFN_LONG_LONG_LIMB -CALLING_CONVENTIONS_OBJS -SPEED_CYCLECOUNTER_OBJ -LIBGMPXX_LDFLAGS -LIBGMP_LDFLAGS -GMP_LDFLAGS -HAVE_HOST_CPU_FAMILY_powerpc -HAVE_HOST_CPU_FAMILY_power -ABI -GMP_NAIL_BITS -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_maintainer_mode -enable_assert -enable_alloca -enable_cxx -enable_assembly -enable_fft -enable_old_fft_full -enable_nails -enable_profiling -with_readline -enable_fat -enable_minithres -enable_fake_cpuid -enable_shared -enable_static -with_pic -enable_fast_install -with_aix_soname -with_gnu_ld -with_sysroot -enable_libtool_lock -' - ac_precious_vars='build_alias -host_alias -target_alias -ABI -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CC_FOR_BUILD -CPP_FOR_BUILD -CXX -CXXFLAGS -CCC -CXXCPP -LT_SYS_LIBRARY_PATH -M4 -YACC -YFLAGS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures GNU MP 6.1.0 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - @<:@@S|@ac_default_prefix@:>@ - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - @<:@PREFIX@:>@ - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root @<:@DATAROOTDIR/doc/gmp@:>@ - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of GNU MP 6.1.0:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --enable-maintainer-mode - enable make rules and dependencies not useful (and - sometimes confusing) to the casual installer - --enable-assert enable ASSERT checking @<:@default=no@:>@ - --enable-alloca how to get temp memory @<:@default=reentrant@:>@ - --enable-cxx enable C++ support @<:@default=no@:>@ - --enable-assembly enable the use of assembly loops @<:@default=yes@:>@ - --enable-fft enable FFTs for multiplication @<:@default=yes@:>@ - --enable-old-fft-full enable old mpn_mul_fft_full for multiplication - @<:@default=no@:>@ - --enable-nails use nails on limbs @<:@default=no@:>@ - --enable-profiling build with profiler support @<:@default=no@:>@ - --enable-fat build fat libraries on systems that support it - @<:@default=no@:>@ - --enable-minithres choose minimal thresholds for testing @<:@default=no@:>@ - --enable-fake-cpuid enable GMP_CPU_TYPE faking cpuid @<:@default=no@:>@ - --enable-shared@<:@=PKGS@:>@ build shared libraries @<:@default=yes@:>@ - --enable-static@<:@=PKGS@:>@ build static libraries @<:@default=yes@:>@ - --enable-fast-install@<:@=PKGS@:>@ - optimize for fast installation @<:@default=yes@:>@ - --disable-libtool-lock avoid locking (might break parallel builds) - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-readline readline support in demo programs @<:@default=detect@:>@ - --with-pic@<:@=PKGS@:>@ try to use only PIC/non-PIC objects @<:@default=use - both@:>@ - --with-aix-soname=aix|svr4|both - shared library versioning (aka "SONAME") variant to - provide on AIX, @<:@default=aix@:>@. - --with-gnu-ld assume the C compiler uses GNU ld @<:@default=no@:>@ - --with-sysroot@<:@=DIR@:>@ Search for dependent libraries within DIR (or the - compiler's sysroot if not specified). - -Some influential environment variables: - ABI desired ABI (for processors supporting more than one ABI) - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a - nonstandard directory <lib dir> - LIBS libraries to pass to the linker, e.g. -l<library> - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if - you have headers in a nonstandard directory <include dir> - CPP C preprocessor - CC_FOR_BUILD - build system C compiler - CPP_FOR_BUILD - build system C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - LT_SYS_LIBRARY_PATH - User-defined run-time library search path. - M4 m4 macro processor - YACC The `Yet Another Compiler Compiler' implementation to use. - Defaults to the first program found out of: `bison -y', `byacc', - `yacc'. - YFLAGS The list of arguments that will be passed by default to @S|@YACC. - This script will default YFLAGS to the empty string to avoid a - default value of `-d' given by some make applications. - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to <gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html>. -GNU MP home page: <http://www.gnu.org/software/gmp/>. -General help using GNU software: <http://www.gnu.org/gethelp/>. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -GNU MP configure 6.1.0 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. - - - -Copyright 1996-2015 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. - -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -@%:@ ac_fn_c_try_compile LINENO -@%:@ -------------------------- -@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_c_try_compile - -@%:@ ac_fn_c_try_cpp LINENO -@%:@ ---------------------- -@%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_c_try_cpp - -@%:@ ac_fn_cxx_try_compile LINENO -@%:@ ---------------------------- -@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_cxx_try_compile - -@%:@ ac_fn_cxx_try_cpp LINENO -@%:@ ------------------------ -@%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_cxx_try_cpp - -@%:@ ac_fn_c_try_link LINENO -@%:@ ----------------------- -@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_c_try_link - -@%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -@%:@ ------------------------------------------------------- -@%:@ Tests whether HEADER exists and can be compiled using the include files in -@%:@ INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -@%:@include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_check_header_compile - -@%:@ ac_fn_c_try_run LINENO -@%:@ ---------------------- -@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. Assumes -@%:@ that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_c_try_run - -@%:@ ac_fn_c_check_func LINENO FUNC VAR -@%:@ ---------------------------------- -@%:@ Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case <limits.h> declares $2. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_check_func - -@%:@ ac_fn_cxx_try_link LINENO -@%:@ ------------------------- -@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_cxx_try_link - -@%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -@%:@ ------------------------------------------------------- -@%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using -@%:@ the include files in INCLUDES and setting the cache variable VAR -@%:@ accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -@%:@include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ssssssssssssssssssssssssssssssssss ## -## Report this to gmp-bugs@gmplib.org ## -## ssssssssssssssssssssssssssssssssss ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_check_header_mongrel - -@%:@ ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -@%:@ --------------------------------------------- -@%:@ Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -@%:@ accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -@%:@ifndef $as_decl_name -@%:@ifdef __cplusplus - (void) $as_decl_use; -@%:@else - (void) $as_decl_name; -@%:@endif -@%:@endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_check_decl - -@%:@ ac_fn_c_check_type LINENO TYPE VAR INCLUDES -@%:@ ------------------------------------------- -@%:@ Tests whether TYPE exists after having included INCLUDES, setting cache -@%:@ variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_check_type - -@%:@ ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -@%:@ ---------------------------------------------------- -@%:@ Tries to find if the field MEMBER exists in type AGGR, after including -@%:@ INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if eval \${$4+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - eval "$4=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_check_member - -@%:@ ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES -@%:@ --------------------------------------------------------- -@%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using -@%:@ the include files in INCLUDES and setting the cache variable VAR -@%:@ accordingly. -ac_fn_cxx_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -@%:@include <$2> -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <$2> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ssssssssssssssssssssssssssssssssss ## -## Report this to gmp-bugs@gmplib.org ## -## ssssssssssssssssssssssssssssssssss ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_cxx_check_header_mongrel - -@%:@ ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES -@%:@ --------------------------------------------- -@%:@ Tests whether TYPE exists after having included INCLUDES, setting cache -@%:@ variable VAR accordingly. -ac_fn_cxx_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_cxx_check_type - -@%:@ ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -@%:@ -------------------------------------------- -@%:@ Tries to find the compile-time value of EXPR in a program that includes -@%:@ INCLUDES, setting VAR accordingly. Returns whether the value could be -@%:@ computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array @<:@1 - 2 * !(($2) >= 0)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array @<:@1 - 2 * !(($2) < 0)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array @<:@1 - 2 * !(($2) >= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in @%:@(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -@%:@include <stdio.h> -@%:@include <stdlib.h> -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 <conftest.val; ac_retval=0 -else - ac_retval=1 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -rm -f conftest.val - - fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_c_compute_int -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by GNU MP $as_me 6.1.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in @%:@(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - -# If --target is not used then $target_alias is empty, but if say -# "./configure athlon-pc-freebsd3.5" is used, then all three of -# $build_alias, $host_alias and $target_alias are set to -# "athlon-pc-freebsd3.5". -# -if test -n "$target_alias" && test "$target_alias" != "$host_alias"; then - as_fn_error $? "--target is not appropriate for GMP -Use --build=CPU-VENDOR-OS if you need to specify your CPU and/or system -explicitly. Use --host if cross-compiling (see \"Installing GMP\" in the -manual for more on this)." "$LINENO" 5 -fi - -gmp_configm4="config.m4" -gmp_tmpconfigm4=cnfm4.tmp -gmp_tmpconfigm4i=cnfm4i.tmp -gmp_tmpconfigm4p=cnfm4p.tmp -rm -f $gmp_tmpconfigm4 $gmp_tmpconfigm4i $gmp_tmpconfigm4p - -# CONFIG_TOP_SRCDIR is a path from the mpn builddir to the top srcdir. -# The pattern here tests for an absolute path the same way as -# _AC_OUTPUT_FILES in autoconf acgeneral.m4. -case $srcdir in -[\\/]* | ?:[\\/]* ) tmp="$srcdir" ;; -*) tmp="../$srcdir" ;; -esac -echo "define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)" >>$gmp_tmpconfigm4 - -# All CPUs use asm-defs.m4 -echo "include(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')" >>$gmp_tmpconfigm4i - - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - -am__api_version='1.15' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in @%:@(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi - -rm -f conftest.file - -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -@%:@ Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='gmp' - VERSION='6.1.0' - - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -@%:@define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> -# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> -mkdir_p='$(MKDIR_P)' - -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar pax cpio none' - -am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - - - - - - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: <http://www.gnu.org/software/coreutils/>. - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 - fi -fi - -ac_config_headers="$ac_config_headers config.h:config.in" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - @%:@ Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - - - -@%:@ Check whether --enable-assert was given. -if test "${enable_assert+set}" = set; then : - enableval=$enable_assert; case $enableval in -yes|no) ;; -*) as_fn_error $? "bad value $enableval for --enable-assert, need yes or no" "$LINENO" 5 ;; -esac -else - enable_assert=no -fi - - -if test "$enable_assert" = "yes"; then - -$as_echo "@%:@define WANT_ASSERT 1" >>confdefs.h - - want_assert_01=1 -else - want_assert_01=0 -fi - -echo "define(<WANT_ASSERT>,$want_assert_01)" >> $gmp_tmpconfigm4 - - - -@%:@ Check whether --enable-alloca was given. -if test "${enable_alloca+set}" = set; then : - enableval=$enable_alloca; case $enableval in -alloca|malloc-reentrant|malloc-notreentrant) ;; -yes|no|reentrant|notreentrant) ;; -debug) ;; -*) - as_fn_error $? "bad value $enableval for --enable-alloca, need one of: -yes no reentrant notreentrant alloca malloc-reentrant malloc-notreentrant debug" "$LINENO" 5 ;; -esac -else - enable_alloca=reentrant -fi - - - -# IMPROVE ME: The default for C++ is disabled. The tests currently -# performed below for a working C++ compiler are not particularly strong, -# and in general can't be expected to get the right setup on their own. The -# most significant problem is getting the ABI the same. Defaulting CXXFLAGS -# to CFLAGS takes only a small step towards this. It's also probably worth -# worrying whether the C and C++ runtimes from say gcc and a vendor C++ can -# work together. Some rather broken C++ installations were encountered -# during testing, and though such things clearly aren't GMP's problem, if -# --enable-cxx=detect were to be the default then some careful checks of -# which, if any, C++ compiler on the system is up to scratch would be -# wanted. -# -@%:@ Check whether --enable-cxx was given. -if test "${enable_cxx+set}" = set; then : - enableval=$enable_cxx; case $enableval in -yes|no|detect) ;; -*) as_fn_error $? "bad value $enableval for --enable-cxx, need yes/no/detect" "$LINENO" 5 ;; -esac -else - enable_cxx=no -fi - - - -@%:@ Check whether --enable-assembly was given. -if test "${enable_assembly+set}" = set; then : - enableval=$enable_assembly; case $enableval in -yes|no) ;; -*) as_fn_error $? "bad value $enableval for --enable-assembly, need yes or no" "$LINENO" 5 ;; -esac -else - enable_assembly=yes -fi - - -if test "$enable_assembly" = "yes"; then - -$as_echo "@%:@define WANT_ASSEMBLY 1" >>confdefs.h - -fi - - -@%:@ Check whether --enable-fft was given. -if test "${enable_fft+set}" = set; then : - enableval=$enable_fft; case $enableval in -yes|no) ;; -*) as_fn_error $? "bad value $enableval for --enable-fft, need yes or no" "$LINENO" 5 ;; -esac -else - enable_fft=yes -fi - - -if test "$enable_fft" = "yes"; then - -$as_echo "@%:@define WANT_FFT 1" >>confdefs.h - -fi - - -@%:@ Check whether --enable-old-fft-full was given. -if test "${enable_old_fft_full+set}" = set; then : - enableval=$enable_old_fft_full; case $enableval in -yes|no) ;; -*) as_fn_error $? "bad value $enableval for --enable-old-fft-full, need yes or no" "$LINENO" 5 ;; -esac -else - enable_old_fft_full=no -fi - - -if test "$enable_old_fft_full" = "yes"; then - -$as_echo "@%:@define WANT_OLD_FFT_FULL 1" >>confdefs.h - -fi - - -@%:@ Check whether --enable-nails was given. -if test "${enable_nails+set}" = set; then : - enableval=$enable_nails; case $enableval in -yes|no|[02468]|[0-9][02468]) ;; -*[13579]) - as_fn_error $? "bad value $enableval for --enable-nails, only even nail sizes supported" "$LINENO" 5 ;; -*) - as_fn_error $? "bad value $enableval for --enable-nails, need yes/no/number" "$LINENO" 5 ;; -esac -else - enable_nails=no -fi - - -case $enable_nails in -yes) GMP_NAIL_BITS=2 ;; -no) GMP_NAIL_BITS=0 ;; -*) GMP_NAIL_BITS=$enable_nails ;; -esac - - - -@%:@ Check whether --enable-profiling was given. -if test "${enable_profiling+set}" = set; then : - enableval=$enable_profiling; case $enableval in -no|prof|gprof|instrument) ;; -*) as_fn_error $? "bad value $enableval for --enable-profiling, need no/prof/gprof/instrument" "$LINENO" 5 ;; -esac -else - enable_profiling=no -fi - - -case $enable_profiling in - prof) - -$as_echo "@%:@define WANT_PROFILING_PROF 1" >>confdefs.h - - ;; - gprof) - -$as_echo "@%:@define WANT_PROFILING_GPROF 1" >>confdefs.h - - ;; - instrument) - -$as_echo "@%:@define WANT_PROFILING_INSTRUMENT 1" >>confdefs.h - - ;; -esac - - -echo "define(<WANT_PROFILING>,<\`$enable_profiling'>)" >> $gmp_tmpconfigm4 - - -# -fomit-frame-pointer is incompatible with -pg on some chips -if test "$enable_profiling" = gprof; then - fomit_frame_pointer= -else - fomit_frame_pointer="-fomit-frame-pointer" -fi - - - -@%:@ Check whether --with-readline was given. -if test "${with_readline+set}" = set; then : - withval=$with_readline; case $withval in -yes|no|detect) ;; -*) as_fn_error $? "bad value $withval for --with-readline, need yes/no/detect" "$LINENO" 5 ;; -esac -else - with_readline=detect -fi - - - -@%:@ Check whether --enable-fat was given. -if test "${enable_fat+set}" = set; then : - enableval=$enable_fat; case $enableval in -yes|no) ;; -*) as_fn_error $? "bad value $enableval for --enable-fat, need yes or no" "$LINENO" 5 ;; -esac -else - enable_fat=no -fi - - - -@%:@ Check whether --enable-minithres was given. -if test "${enable_minithres+set}" = set; then : - enableval=$enable_minithres; case $enableval in -yes|no) ;; -*) as_fn_error $? "bad value $enableval for --enable-minithres, need yes or no" "$LINENO" 5 ;; -esac -else - enable_minithres=no -fi - - - -@%:@ Check whether --enable-fake-cpuid was given. -if test "${enable_fake_cpuid+set}" = set; then : - enableval=$enable_fake_cpuid; case $enableval in -yes|no) ;; -*) as_fn_error $? "bad value $enableval for --enable-fake-cpuid, need yes or no" "$LINENO" 5 ;; -esac -else - enable_fake_cpuid=no -fi - - -if test "$enable_fake_cpuid" = "yes"; then - -$as_echo "@%:@define WANT_FAKE_CPUID 1" >>confdefs.h - -fi - - -if test $enable_fat = yes && test $enable_assembly = no ; then - as_fn_error $? "when doing a fat build, disabling assembly will not work" "$LINENO" 5 -fi - -if test $enable_fake_cpuid = yes && test $enable_fat = no ; then - as_fn_error $? "--enable-fake-cpuid requires --enable-fat" "$LINENO" 5 -fi - - -tmp_host=`echo $host_cpu | sed 's/\./_/'` -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_HOST_CPU_$tmp_host 1 -_ACEOF - - -echo "define_not_for_expansion(\`HAVE_HOST_CPU_$tmp_host')" >> $gmp_tmpconfigm4p - - - - - - -# Table of compilers, options, and mpn paths. This code has various related -# purposes -# -# - better default CC/CFLAGS selections than autoconf otherwise gives -# - default CC/CFLAGS selections for extra CPU types specific to GMP -# - a few tests for known bad compilers -# - choice of ABIs on suitable systems -# - selection of corresponding mpn search path -# -# After GMP specific searches and tests, the standard autoconf AC_PROG_CC is -# called. User selections of CC etc are respected. -# -# Care is taken not to use macros like AC_TRY_COMPILE during the GMP -# pre-testing, since they of course depend on AC_PROG_CC, and also some of -# them cache their results, which is not wanted. -# -# The ABI selection mechanism is unique to GMP. All that reaches autoconf -# is a different selection of CC/CFLAGS according to the best ABI the system -# supports, and/or what the user selects. Naturally the mpn assembler code -# selected is very dependent on the ABI. -# -# The closest the standard tools come to a notion of ABI is something like -# "sparc64" which encodes a CPU and an ABI together. This doesn't seem to -# scale well for GMP, where exact CPU types like "ultrasparc2" are wanted, -# separate from the ABI used on them. -# -# -# The variables set here are -# -# cclist the compiler choices -# xx_cflags flags for compiler xx -# xx_cflags_maybe flags for compiler xx, if they work -# xx_cppflags cpp flags for compiler xx -# xx_cflags_optlist list of sets of optional flags -# xx_cflags_yyy set yyy of optional flags for compiler xx -# xx_ldflags -Wc,-foo flags for libtool linking with compiler xx -# ar_flags extra flags for $AR -# nm_flags extra flags for $NM -# limb limb size, can be "longlong" -# path mpn search path -# extra_functions extra mpn functions -# fat_path fat binary mpn search path [if fat binary desired] -# fat_functions fat functions -# fat_thresholds fat thresholds -# -# Suppose xx_cflags_optlist="arch", then flags from $xx_cflags_arch are -# tried, and the first flag that works will be used. An optlist like "arch -# cpu optimize" can be used to get multiple independent sets of flags tried. -# The first that works from each will be used. If no flag in a set works -# then nothing from that set is added. -# -# For multiple ABIs, the scheme extends as follows. -# -# abilist set of ABI choices -# cclist_aa compiler choices in ABI aa -# xx_aa_cflags flags for xx in ABI aa -# xx_aa_cflags_maybe flags for xx in ABI aa, if they work -# xx_aa_cppflags cpp flags for xx in ABI aa -# xx_aa_cflags_optlist list of sets of optional flags in ABI aa -# xx_aa_cflags_yyy set yyy of optional flags for compiler xx in ABI aa -# xx_aa_ldflags -Wc,-foo flags for libtool linking -# ar_aa_flags extra flags for $AR in ABI aa -# nm_aa_flags extra flags for $NM in ABI aa -# limb_aa limb size in ABI aa, can be "longlong" -# path_aa mpn search path in ABI aa -# extra_functions_aa extra mpn functions in ABI aa -# -# As a convenience, the unadorned xx_cflags (etc) are used for the last ABI -# in ablist, if an xx_aa_cflags for that ABI isn't given. For example if -# abilist="64 32" then $cc_64_cflags will be used for the 64-bit ABI, but -# for the 32-bit either $cc_32_cflags or $cc_cflags is used, whichever is -# defined. This makes it easy to add some 64-bit compilers and flags to an -# unadorned 32-bit set. -# -# limb=longlong (or limb_aa=longlong) applies to all compilers within that -# ABI. It won't work to have some needing long long and some not, since a -# single instantiated gmp.h will be used by both. -# -# SPEED_CYCLECOUNTER, cyclecounter_size and CALLING_CONVENTIONS_OBJS are -# also set here, with an ABI suffix. -# -# -# -# A table-driven approach like this to mapping cpu type to good compiler -# options is a bit of a maintenance burden, but there's not much uniformity -# between options specifications on different compilers. Some sort of -# separately updatable tool might be cute. -# -# The use of lots of variables like this, direct and indirect, tends to -# obscure when and how various things are done, but unfortunately it's -# pretty much the only way. If shell subroutines were portable then actual -# code like "if this .. do that" could be written, but attempting the same -# with full copies of GMP_PROG_CC_WORKS etc expanded at every point would -# hugely bloat the output. - - - - -# abilist needs to be non-empty, "standard" is just a generic name here -abilist="standard" - -# FIXME: We'd like to prefer an ANSI compiler, perhaps by preferring -# c89 over cc here. But note that on HP-UX c89 provides a castrated -# environment, and would want to be excluded somehow. Maybe -# AC_PROG_CC_STDC already does enough to stick cc into ANSI mode and -# we don't need to worry. -# -cclist="gcc cc" - -gcc_cflags="-O3 -pedantic" -gcc_64_cflags="-O3 -pedantic" -cc_cflags="-O" -cc_64_cflags="-O" - -SPEED_CYCLECOUNTER_OBJ= -cyclecounter_size=2 - -HAVE_HOST_CPU_FAMILY_power=0 - -HAVE_HOST_CPU_FAMILY_powerpc=0 - - -case $host in - - alpha*-*-*) - $as_echo "@%:@define HAVE_HOST_CPU_FAMILY_alpha 1" >>confdefs.h - - case $host_cpu in - alphaev5* | alphapca5*) - path="alpha/ev5 alpha" ;; - alphaev67 | alphaev68 | alphaev7*) - path="alpha/ev67 alpha/ev6 alpha" ;; - alphaev6) - path="alpha/ev6 alpha" ;; - *) - path="alpha" ;; - esac - if test "$enable_assembly" = "yes" ; then - extra_functions="cntlz" - fi - gcc_cflags_optlist="asm cpu oldas" # need asm ahead of cpu, see below - gcc_cflags_maybe="-mieee" - gcc_cflags_oldas="-Wa,-oldas" # see GMP_GCC_WA_OLDAS. - - # gcc 2.7.2.3 doesn't know any -mcpu= for alpha, apparently. - # gcc 2.95 knows -mcpu= ev4, ev5, ev56, pca56, ev6. - # gcc 3.0 adds nothing. - # gcc 3.1 adds ev45, ev67 (but ev45 is the same as ev4). - # gcc 3.2 adds nothing. - # - # gcc version "2.9-gnupro-99r1" under "-O2 -mcpu=ev6" strikes internal - # compiler errors too easily and is rejected by GMP_PROG_CC_WORKS. Each - # -mcpu=ev6 below has a fallback to -mcpu=ev56 for this reason. - # - case $host_cpu in - alpha) gcc_cflags_cpu="-mcpu=ev4" ;; - alphaev5) gcc_cflags_cpu="-mcpu=ev5" ;; - alphaev56) gcc_cflags_cpu="-mcpu=ev56" ;; - alphapca56 | alphapca57) - gcc_cflags_cpu="-mcpu=pca56" ;; - alphaev6) gcc_cflags_cpu="-mcpu=ev6 -mcpu=ev56" ;; - alphaev67 | alphaev68 | alphaev7*) - gcc_cflags_cpu="-mcpu=ev67 -mcpu=ev6 -mcpu=ev56" ;; - esac - - # gcc version "2.9-gnupro-99r1" on alphaev68-dec-osf5.1 has been seen - # accepting -mcpu=ev6, but not putting the assembler in the right mode - # for what it produces. We need to do this for it, and need to do it - # before testing the -mcpu options. - # - # On old versions of gcc, which don't know -mcpu=, we believe an - # explicit -Wa,-mev5 etc will be necessary to put the assembler in - # the right mode for our .asm files and longlong.h asm blocks. - # - # On newer versions of gcc, when -mcpu= is known, we must give a -Wa - # which is at least as high as the code gcc will generate. gcc - # establishes what it needs with a ".arch" directive, our command line - # option seems to override that. - # - # gas prior to 2.14 doesn't accept -mev67, but -mev6 seems enough for - # ctlz and cttz (in 2.10.0 at least). - # - # OSF `as' accepts ev68 but stupidly treats it as ev4. -arch only seems - # to affect insns like ldbu which are expanded as macros when necessary. - # Insns like ctlz which were never available as macros are always - # accepted and always generate their plain code. - # - case $host_cpu in - alpha) gcc_cflags_asm="-Wa,-arch,ev4 -Wa,-mev4" ;; - alphaev5) gcc_cflags_asm="-Wa,-arch,ev5 -Wa,-mev5" ;; - alphaev56) gcc_cflags_asm="-Wa,-arch,ev56 -Wa,-mev56" ;; - alphapca56 | alphapca57) - gcc_cflags_asm="-Wa,-arch,pca56 -Wa,-mpca56" ;; - alphaev6) gcc_cflags_asm="-Wa,-arch,ev6 -Wa,-mev6" ;; - alphaev67 | alphaev68 | alphaev7*) - gcc_cflags_asm="-Wa,-arch,ev67 -Wa,-mev67 -Wa,-arch,ev6 -Wa,-mev6" ;; - esac - - # It might be better to ask "cc" whether it's Cray C or DEC C, - # instead of relying on the OS part of $host. But it's hard to - # imagine either of those compilers anywhere except their native - # systems. - # - -echo "include_mpn(\`alpha/alpha-defs.m4')" >> $gmp_tmpconfigm4i - - case $host in - *-cray-unicos*) - cc_cflags="-O" # no -g, it silently disables all optimizations - -echo "include_mpn(\`alpha/unicos.m4')" >> $gmp_tmpconfigm4i - - # Don't perform any assembly syntax tests on this beast. - gmp_asm_syntax_testing=no - ;; - *-*-osf*) - -echo "include_mpn(\`alpha/default.m4')" >> $gmp_tmpconfigm4i - - cc_cflags="" - cc_cflags_optlist="opt cpu" - - # not sure if -fast works on old versions, so make it optional - cc_cflags_opt="-fast -O2" - - # DEC C V5.9-005 knows ev4, ev5, ev56, pca56, ev6. - # Compaq C V6.3-029 adds ev67. - # - case $host_cpu in - alpha) cc_cflags_cpu="-arch~ev4~-tune~ev4" ;; - alphaev5) cc_cflags_cpu="-arch~ev5~-tune~ev5" ;; - alphaev56) cc_cflags_cpu="-arch~ev56~-tune~ev56" ;; - alphapca56 | alphapca57) - cc_cflags_cpu="-arch~pca56~-tune~pca56" ;; - alphaev6) cc_cflags_cpu="-arch~ev6~-tune~ev6" ;; - alphaev67 | alphaev68 | alphaev7*) - cc_cflags_cpu="-arch~ev67~-tune~ev67 -arch~ev6~-tune~ev6" ;; - esac - ;; - *) - -echo "include_mpn(\`alpha/default.m4')" >> $gmp_tmpconfigm4i - - ;; - esac - - case $host in - *-*-unicos*) - # tune/alpha.asm assumes int==4bytes but unicos uses int==8bytes - ;; - *) - SPEED_CYCLECOUNTER_OBJ=alpha.lo - cyclecounter_size=1 ;; - esac - ;; - - - # Cray vector machines. - # This must come after alpha* so that we can recognize present and future - # vector processors with a wildcard. - *-cray-unicos*) - gmp_asm_syntax_testing=no - cclist="cc" - # We used to have -hscalar0 here as a workaround for miscompilation of - # mpz/import.c, but let's hope Cray fixes their bugs instead, since - # -hscalar0 causes disastrously poor code to be generated. - cc_cflags="-O3 -hnofastmd -htask0 -Wa,-B" - path="cray" - ;; - - - arm64*-*-* | aarch64*-*-*) - # The compiler clang version 3.4 or earlier requires an explicit -mfpu=neon - # for out assembly code. Since this compiler cloaks as gcc, we have to - # fake too. - gcc_cflags_maybe="-mfpu=neon" - path="arm64" - ;; - - - arm*-*-*) - gcc_cflags="$gcc_cflags $fomit_frame_pointer" - gcc_cflags_optlist="arch fpmode neon tune" - gcc_testlist="gcc-arm-umodsi" - -echo "include_mpn(\`arm/arm-defs.m4')" >> $gmp_tmpconfigm4i - - CALLING_CONVENTIONS_OBJS='arm32call.lo arm32check.lo' - - # This is needed for clang, which is not content with flags like -mfpu=neon - # alone. - case $host in - *-*-*eabi) - gcc_cflags_fpmode="-mfloat-abi=softfp" ;; - *-*-*eabihf) - gcc_cflags_fpmode="-mfloat-abi=hard" ;; - esac - - # FIXME: We make mandatory compiler options optional here. We should - # either enforce them, or organise to strip paths as the corresponding - # options fail. - case $host_cpu in - armv7*) - path="arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - ;; - armv6t2*) - path="arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv6t2" - ;; - armv6*) - path="arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv6" - ;; - armsa1 | arm9tdmi | armv4*) - path="arm" - gcc_cflags_arch="-march=armv4" - ;; - armxscale | arm9te | arm10 | armv5*) - path="arm/v5 arm" - gcc_cflags_arch="-march=armv5" - ;; - arm11mpcore | arm1136 | arm1176*) - path="arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv6" - ;; - arm1156) - path="arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv6t2" - ;; - armcortexa5) - path="arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - ;; - armcortexa7) - path="arm/v7a/cora7 arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - gcc_cflags_tune="-mtune=cortex-a7" - ;; - armcortexa7neon) - path="arm/neon arm/v7a/cora7 arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - gcc_cflags_neon="-mfpu=neon" - gcc_cflags_tune="-mtune=cortex-a7" - ;; - armcortexa8) - path="arm/v7a/cora8 arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - gcc_cflags_tune="-mtune=cortex-a8" - ;; - armcortexa8neon) - path="arm/neon arm/v7a/cora8 arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - gcc_cflags_neon="-mfpu=neon" - gcc_cflags_tune="-mtune=cortex-a8" - ;; - armcortexa9) - path="arm/v7a/cora9 arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - gcc_cflags_tune="-mtune=cortex-a9" - ;; - armcortexa9neon) - path="arm/neon arm/v7a/cora9 arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - gcc_cflags_neon="-mfpu=neon" - gcc_cflags_tune="-mtune=cortex-a9" - ;; - armcortexa15) - path="arm/v7a/cora15 arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - gcc_cflags_tune="-mtune=cortex-a15 -mtune=cortex-a9" - ;; - armcortexa15neon) - path="arm/v7a/cora15/neon arm/neon arm/v7a/cora15 arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - gcc_cflags_neon="-mfpu=neon" - gcc_cflags_tune="-mtune=cortex-a15 -mtune=cortex-a9" - ;; - *) - path="arm" - ;; - esac - ;; - - - # Fujitsu - f30[01]-fujitsu-sysv*) - cclist="gcc vcc" - # FIXME: flags for vcc? - vcc_cflags="-g" - path="fujitsu" - ;; - - - hppa*-*-*) - # HP cc (the one sold separately) is K&R by default, but AM_C_PROTOTYPES - # will add "-Ae", or "-Aa -D_HPUX_SOURCE", to put it into ansi mode, if - # possible. - # - # gcc for hppa 2.0 can be built either for 2.0n (32-bit) or 2.0w - # (64-bit), but not both, so there's no option to choose the desired - # mode, we must instead detect which of the two it is. This is done by - # checking sizeof(long), either 4 or 8 bytes respectively. Do this in - # ABI=1.0 too, in case someone tries to build that with a 2.0w gcc. - # - gcc_cflags_optlist="arch" - gcc_testlist="sizeof-long-4" - SPEED_CYCLECOUNTER_OBJ=hppa.lo - cyclecounter_size=1 - - # FIXME: For hppa2.0*, path should be "pa32/hppa2_0 pa32/hppa1_1 pa32". - # (Can't remember why this isn't done already, have to check what .asm - # files are available in each and how they run on a typical 2.0 cpu.) - # - case $host_cpu in - hppa1.0*) path="pa32" ;; - hppa7000*) path="pa32/hppa1_1 pa32" ;; - hppa2.0* | hppa64) - path="pa32/hppa2_0 pa32/hppa1_1/pa7100 pa32/hppa1_1 pa32" ;; - *) # default to 7100 - path="pa32/hppa1_1/pa7100 pa32/hppa1_1 pa32" ;; - esac - - # gcc 2.7.2.3 knows -mpa-risc-1-0 and -mpa-risc-1-1 - # gcc 2.95 adds -mpa-risc-2-0, plus synonyms -march=1.0, 1.1 and 2.0 - # - # We don't use -mpa-risc-2-0 in ABI=1.0 because 64-bit registers may not - # be saved by the kernel on an old system. Actually gcc (as of 3.2) - # only adds a few float instructions with -mpa-risc-2-0, so it would - # probably be safe, but let's not take the chance. In any case, a - # configuration like --host=hppa2.0 ABI=1.0 is far from optimal. - # - case $host_cpu in - hppa1.0*) gcc_cflags_arch="-mpa-risc-1-0" ;; - *) # default to 7100 - gcc_cflags_arch="-mpa-risc-1-1" ;; - esac - - case $host_cpu in - hppa1.0*) cc_cflags="+O2" ;; - *) # default to 7100 - cc_cflags="+DA1.1 +O2" ;; - esac - - case $host in - hppa2.0*-*-* | hppa64-*-*) - cclist_20n="gcc cc" - abilist="2.0n 1.0" - path_20n="pa64" - limb_20n=longlong - any_20n_testlist="sizeof-long-4" - SPEED_CYCLECOUNTER_OBJ_20n=hppa2.lo - cyclecounter_size_20n=2 - - # -mpa-risc-2-0 is only an optional flag, in case an old gcc is - # used. Assembler support for 2.0 is essential though, for our asm - # files. - gcc_20n_cflags="$gcc_cflags" - gcc_20n_cflags_optlist="arch" - gcc_20n_cflags_arch="-mpa-risc-2-0 -mpa-risc-1-1" - gcc_20n_testlist="sizeof-long-4 hppa-level-2.0" - - cc_20n_cflags="+DA2.0 +e +O2 -Wl,+vnocompatwarnings" - cc_20n_testlist="hpc-hppa-2-0" - - # ABI=2.0w is available for hppa2.0w and hppa2.0, but not for - # hppa2.0n, on the assumption that that the latter indicates a - # desire for ABI=2.0n. - case $host in - hppa2.0n-*-*) ;; - *) - # HPUX 10 and earlier cannot run 2.0w. Not sure about other - # systems (GNU/Linux for instance), but lets assume they're ok. - case $host in - *-*-hpux[1-9] | *-*-hpux[1-9].* | *-*-hpux10 | *-*-hpux10.*) ;; - *-*-linux*) abilist="1.0" ;; # due to linux permanent kernel bug - *) abilist="2.0w $abilist" ;; - esac - - cclist_20w="gcc cc" - gcc_20w_cflags="$gcc_cflags -mpa-risc-2-0" - cc_20w_cflags="+DD64 +O2" - cc_20w_testlist="hpc-hppa-2-0" - path_20w="pa64" - any_20w_testlist="sizeof-long-8" - SPEED_CYCLECOUNTER_OBJ_20w=hppa2w.lo - cyclecounter_size_20w=2 - ;; - esac - ;; - esac - ;; - - - ia64*-*-* | itanium-*-* | itanium2-*-*) - abilist="64" - -echo "include_mpn(\`ia64/ia64-defs.m4')" >> $gmp_tmpconfigm4i - - SPEED_CYCLECOUNTER_OBJ=ia64.lo - any_32_testlist="sizeof-long-4" - - case $host_cpu in - itanium) path="ia64/itanium ia64" ;; - itanium2) path="ia64/itanium2 ia64" ;; - *) path="ia64" ;; - esac - - gcc_64_cflags_optlist="tune" - gcc_32_cflags_optlist=$gcc_64_cflags_optlist - - # gcc pre-release 3.4 adds -mtune itanium and itanium2 - case $host_cpu in - itanium) gcc_cflags_tune="-mtune=itanium" ;; - itanium2) gcc_cflags_tune="-mtune=itanium2" ;; - esac - - case $host in - *-*-linux*) - cclist="gcc icc" - icc_cflags="-no-gcc" - icc_cflags_optlist="opt" - # Don't use -O3, it is for "large data sets" and also miscompiles GMP. - # But icc miscompiles GMP at any optimization level, at higher levels - # it miscompiles more files... - icc_cflags_opt="-O2 -O1" - icc_cflags_opt_maybe="-fp-model~precise" - ;; - - *-*-hpux*) - # HP cc sometimes gets internal errors if the optimization level is - # too high. GMP_PROG_CC_WORKS detects this, the "_opt" fallbacks - # let us use whatever seems to work. - # - abilist="32 64" - any_64_testlist="sizeof-long-8" - - cclist_32="gcc cc" - path_32="ia64" - cc_32_cflags="" - cc_32_cflags_optlist="opt" - cc_32_cflags_opt="+O2 +O1" - gcc_32_cflags="$gcc_cflags -milp32" - limb_32=longlong - SPEED_CYCLECOUNTER_OBJ_32=ia64.lo - cyclecounter_size_32=2 - - # Must have +DD64 in CPPFLAGS to get the right __LP64__ for headers, - # but also need it in CFLAGS for linking programs, since automake - # only uses CFLAGS when linking, not CPPFLAGS. - # FIXME: Maybe should use cc_64_ldflags for this, but that would - # need GMP_LDFLAGS used consistently by all the programs. - # - cc_64_cflags="+DD64" - cc_64_cppflags="+DD64" - cc_64_cflags_optlist="opt" - cc_64_cflags_opt="+O2 +O1" - gcc_64_cflags="$gcc_cflags -mlp64" - ;; - esac - ;; - - - # Motorola 68k - # - m68k-*-* | m68[0-9][0-9][0-9]-*-*) - $as_echo "@%:@define HAVE_HOST_CPU_FAMILY_m68k 1" >>confdefs.h - - -echo "include_mpn(\`m68k/m68k-defs.m4')" >> $gmp_tmpconfigm4i - - gcc_cflags="$gcc_cflags $fomit_frame_pointer" - gcc_cflags_optlist="arch" - - # gcc 2.7.2 knows -m68000, -m68020, -m68030, -m68040. - # gcc 2.95 adds -mcpu32, -m68060. - # FIXME: Maybe "-m68020 -mnobitfield" would suit cpu32 on 2.7.2. - # - case $host_cpu in - m68020) gcc_cflags_arch="-m68020" ;; - m68030) gcc_cflags_arch="-m68030" ;; - m68040) gcc_cflags_arch="-m68040" ;; - m68060) gcc_cflags_arch="-m68060 -m68000" ;; - m68360) gcc_cflags_arch="-mcpu32 -m68000" ;; - *) gcc_cflags_arch="-m68000" ;; - esac - - # FIXME: m68k/mc68020 looks like it's ok for cpu32, but this wants to be - # tested. Will need to introduce an m68k/cpu32 if m68k/mc68020 ever uses - # the bitfield instructions. - case $host_cpu in - m680[234]0 | m68360) path="m68k/mc68020 m68k" ;; - *) path="m68k" ;; - esac - ;; - - - # Motorola 88k - m88k*-*-*) - path="m88k" - ;; - m88110*-*-*) - gcc_cflags="$gcc_cflags -m88110" - path="m88k/mc88110 m88k" - ;; - - - # IRIX 5 and earlier can only run 32-bit o32. - # - # IRIX 6 and up always has a 64-bit mips CPU can run n32 or 64. n32 is - # preferred over 64, but only because that's been the default in past - # versions of GMP. The two are equally efficient. - # - # Linux kernel 2.2.13 arch/mips/kernel/irixelf.c has a comment about not - # supporting n32 or 64. - # - # For reference, libtool (eg. 1.5.6) recognises the n32 ABI and knows the - # right options to use when linking (both cc and gcc), so no need for - # anything special from us. - # - mips*-*-*) - abilist="o32" - gcc_cflags_optlist="abi" - gcc_cflags_abi="-mabi=32 -m32" - gcc_testlist="gcc-mips-o32" - path="mips32" - cc_cflags="-O2 -o32" # no -g, it disables all optimizations - # this suits both mips32 and mips64 - -echo "include_mpn(\`mips32/mips-defs.m4')" >> $gmp_tmpconfigm4i - - - case $host in - mips64*-*-* | mips*-*-irix[6789]*) - abilist="n32 64 o32" - - cclist_n32="gcc cc" - gcc_n32_cflags_optlist="abi" - gcc_n32_cflags="$gcc_cflags" - gcc_n32_cflags_abi="-mabi=n32 -mn32" - cc_n32_cflags="-O2 -n32" # no -g, it disables all optimizations - limb_n32=longlong - path_n32="mips64" - - cclist_64="gcc cc" - gcc_64_cflags_optlist="abi" - gcc_64_cflags="$gcc_cflags" - gcc_64_cflags_abi="-mabi=64 -m64" - gcc_64_ldflags="-Wc,-mabi=64" - cc_64_cflags="-O2 -64" # no -g, it disables all optimizations - cc_64_ldflags="-Wc,-64" - path_64="mips64" - ;; - esac - ;; - - - # Darwin (powerpc-apple-darwin1.3) has it's hacked gcc installed as cc. - # Our usual "gcc in disguise" detection means gcc_cflags etc here gets - # used. - # - # The darwin pre-compiling preprocessor is disabled with -no-cpp-precomp - # since it doesn't like "__attribute__ ((mode (SI)))" etc in gmp-impl.h, - # and so always ends up running the plain preprocessor anyway. This could - # be done in CPPFLAGS rather than CFLAGS, but there's not many places - # preprocessing is done separately, and this is only a speedup, the normal - # preprocessor gets run if there's any problems. - # - # We used to use -Wa,-mppc with gcc, but can't remember exactly why. - # Presumably it was for old versions of gcc where -mpowerpc doesn't put - # the assembler in the right mode. In any case -Wa,-mppc is not good, for - # instance -mcpu=604 makes recent gcc use -m604 to get access to the - # "fsel" instruction, but a -Wa,-mppc overrides that, making code that - # comes out with fsel fail. - # - # (Note also that the darwin assembler doesn't accept "-mppc", so any - # -Wa,-mppc was used only if it worked. The right flag on darwin would be - # "-arch ppc" or some such, but that's already the default.) - # - powerpc*-*-* | power[3-9]-*-*) - $as_echo "@%:@define HAVE_HOST_CPU_FAMILY_powerpc 1" >>confdefs.h - - HAVE_HOST_CPU_FAMILY_powerpc=1 - abilist="32" - cclist="gcc cc" - cc_cflags="-O2" - gcc_32_cflags_maybe="-m32" - gcc_cflags_optlist="precomp subtype asm cpu" - gcc_cflags_precomp="-no-cpp-precomp" - gcc_cflags_subtype="-force_cpusubtype_ALL" # for vmx on darwin - gcc_cflags_asm="" - gcc_cflags_cpu="" - vmx_path="" - - # grab this object, though it's not a true cycle counter routine - SPEED_CYCLECOUNTER_OBJ=powerpc.lo - cyclecounter_size=0 - - case $host_cpu in - powerpc740 | powerpc750) - path="powerpc32/750 powerpc32" ;; - powerpc7400 | powerpc7410) - path="powerpc32/vmx powerpc32/750 powerpc32" ;; - powerpc74[45]?) - path="powerpc32/vmx powerpc32" ;; - *) - path="powerpc32" ;; - esac - - case $host_cpu in - powerpc401) gcc_cflags_cpu="-mcpu=401" ;; - powerpc403) gcc_cflags_cpu="-mcpu=403" - xlc_cflags_arch="-qarch=403 -qarch=ppc" ;; - powerpc405) gcc_cflags_cpu="-mcpu=405" ;; - powerpc505) gcc_cflags_cpu="-mcpu=505" ;; - powerpc601) gcc_cflags_cpu="-mcpu=601" - xlc_cflags_arch="-qarch=601 -qarch=ppc" ;; - powerpc602) gcc_cflags_cpu="-mcpu=602" - xlc_cflags_arch="-qarch=602 -qarch=ppc" ;; - powerpc603) gcc_cflags_cpu="-mcpu=603" - xlc_cflags_arch="-qarch=603 -qarch=ppc" ;; - powerpc603e) gcc_cflags_cpu="-mcpu=603e -mcpu=603" - xlc_cflags_arch="-qarch=603 -qarch=ppc" ;; - powerpc604) gcc_cflags_cpu="-mcpu=604" - xlc_cflags_arch="-qarch=604 -qarch=ppc" ;; - powerpc604e) gcc_cflags_cpu="-mcpu=604e -mcpu=604" - xlc_cflags_arch="-qarch=604 -qarch=ppc" ;; - powerpc620) gcc_cflags_cpu="-mcpu=620" ;; - powerpc630) gcc_cflags_cpu="-mcpu=630" - xlc_cflags_arch="-qarch=pwr3" - cpu_path="p3 p3-p7" ;; - powerpc740) gcc_cflags_cpu="-mcpu=740" ;; - powerpc7400 | powerpc7410) - gcc_cflags_asm="-Wa,-maltivec" - gcc_cflags_cpu="-mcpu=7400 -mcpu=750" ;; - powerpc74[45]?) - gcc_cflags_asm="-Wa,-maltivec" - gcc_cflags_cpu="-mcpu=7450" ;; - powerpc750) gcc_cflags_cpu="-mcpu=750" ;; - powerpc801) gcc_cflags_cpu="-mcpu=801" ;; - powerpc821) gcc_cflags_cpu="-mcpu=821" ;; - powerpc823) gcc_cflags_cpu="-mcpu=823" ;; - powerpc860) gcc_cflags_cpu="-mcpu=860" ;; - powerpc970) gcc_cflags_cpu="-mtune=970" - xlc_cflags_arch="-qarch=970 -qarch=pwr3" - vmx_path="powerpc64/vmx" - cpu_path="p4 p3-p7" ;; - power4) gcc_cflags_cpu="-mtune=power4" - xlc_cflags_arch="-qarch=pwr4" - cpu_path="p4 p3-p7" ;; - power5) gcc_cflags_cpu="-mtune=power5 -mtune=power4" - xlc_cflags_arch="-qarch=pwr5" - cpu_path="p5 p4 p3-p7" ;; - power6) gcc_cflags_cpu="-mtune=power6" - xlc_cflags_arch="-qarch=pwr6" - cpu_path="p6 p3-p7" ;; - power7) gcc_cflags_cpu="-mtune=power7 -mtune=power5" - xlc_cflags_arch="-qarch=pwr7 -qarch=pwr5" - cpu_path="p7 p5 p4 p3-p7" ;; - power[89]) gcc_cflags_cpu="-mtune=power8 -mtune=power7 -mtune=power5" - xlc_cflags_arch="-qarch=pwr8 -qarch=pwr7 -qarch=pwr5" - cpu_path="p8 p7 p5 p4 p3-p7" ;; - esac - - case $host in - *-*-aix*) - cclist="gcc xlc cc" - gcc_32_cflags_maybe="-maix32" - xlc_cflags="-O2 -qmaxmem=20000" - xlc_cflags_optlist="arch" - xlc_32_cflags_maybe="-q32" - ar_32_flags="-X32" - nm_32_flags="-X32" - esac - - case $host in - powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*) - case $host in - *-*-aix*) - # On AIX a true 64-bit ABI is available. - # Need -Wc to pass object type flags through to the linker. - abilist="mode64 $abilist" - cclist_mode64="gcc xlc" - gcc_mode64_cflags="$gcc_cflags -maix64 -mpowerpc64" - gcc_mode64_cflags_optlist="cpu" - gcc_mode64_ldflags="-Wc,-maix64" - xlc_mode64_cflags="-O2 -q64 -qmaxmem=20000" - xlc_mode64_cflags_optlist="arch" - xlc_mode64_ldflags="-Wc,-q64" - # Must indicate object type to ar and nm - ar_mode64_flags="-X64" - nm_mode64_flags="-X64" - path_mode64="" - p="" - for i in $cpu_path - do path_mode64="${path_mode64}powerpc64/mode64/$i " - path_mode64="${path_mode64}powerpc64/$i " - p="${p} powerpc32/$i " - done - path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64" - path="$p $path" - # grab this object, though it's not a true cycle counter routine - SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo - cyclecounter_size_mode64=0 - ;; - *-*-darwin*) - # On Darwin we can use 64-bit instructions with a longlong limb, - # but the chip still in 32-bit mode. - # In theory this can be used on any OS which knows how to save - # 64-bit registers in a context switch. - # - # Note that we must use -mpowerpc64 with gcc, since the - # longlong.h macros expect limb operands in a single 64-bit - # register, not two 32-bit registers as would be given for a - # long long without -mpowerpc64. In theory we could detect and - # accommodate both styles, but the proper 64-bit registers will - # be fastest and are what we really want to use. - # - # One would think -mpowerpc64 would set the assembler in the right - # mode to handle 64-bit instructions. But for that, also - # -force_cpusubtype_ALL is needed. - # - # Do not use -fast for Darwin, it actually adds options - # incompatible with a shared library. - # - abilist="mode64 mode32 $abilist" - gcc_cflags_opt="-O3 -O2 -O1" # will this become used? - cclist_mode32="gcc" - gcc_mode32_cflags_maybe="-m32" - gcc_mode32_cflags="-mpowerpc64" - gcc_mode32_cflags_optlist="subtype cpu opt" - gcc_mode32_cflags_subtype="-force_cpusubtype_ALL" - gcc_mode32_cflags_opt="-O3 -O2 -O1" - limb_mode32=longlong - cclist_mode64="gcc" - gcc_mode64_cflags="-m64" - gcc_mode64_cflags_optlist="cpu opt" - gcc_mode64_cflags_opt="-O3 -O2 -O1" - path_mode64="" - path_mode32="" - p="" - for i in $cpu_path - do path_mode64="${path_mode64}powerpc64/mode64/$i " - path_mode64="${path_mode64}powerpc64/$i " - path_mode32="${path_mode32}powerpc64/mode32/$i " - path_mode32="${path_mode32}powerpc64/$i " - p="${p} powerpc32/$i " - done - path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64" - path_mode32="${path_mode32}powerpc64/mode32 $vmx_path powerpc64" - path="$p $path" - SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo - cyclecounter_size_mode64=0 - any_mode64_testlist="sizeof-long-8" - ;; - *-*-linux* | *-*-*bsd*) - # On GNU/Linux, assume the processor is in 64-bit mode. Some - # environments have a gcc that is always in 64-bit mode, while - # others require -m64, hence the use of cflags_maybe. The - # sizeof-long-8 test checks the mode is right (for the no option - # case). - # - # -mpowerpc64 is not used, since it should be the default in - # 64-bit mode. (We need its effect for the various longlong.h - # asm macros to be right of course.) - # - # gcc64 was an early port of gcc to 64-bit mode, but should be - # obsolete before too long. We prefer plain gcc when it knows - # 64-bits. - # - abilist="mode64 mode32 $abilist" - cclist_mode32="gcc" - gcc_mode32_cflags_maybe="-m32" - gcc_mode32_cflags="-mpowerpc64" - gcc_mode32_cflags_optlist="cpu opt" - gcc_mode32_cflags_opt="-O3 -O2 -O1" - limb_mode32=longlong - cclist_mode64="gcc gcc64" - gcc_mode64_cflags_maybe="-m64" - gcc_mode64_cflags_optlist="cpu opt" - gcc_mode64_cflags_opt="-O3 -O2 -O1" - path_mode64="" - path_mode32="" - p="" - for i in $cpu_path - do path_mode64="${path_mode64}powerpc64/mode64/$i " - path_mode64="${path_mode64}powerpc64/$i " - path_mode32="${path_mode32}powerpc64/mode32/$i " - path_mode32="${path_mode32}powerpc64/$i " - p="${p} powerpc32/$i " - done - path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64" - path_mode32="${path_mode32}powerpc64/mode32 $vmx_path powerpc64" - path="$p $path" - SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo - cyclecounter_size_mode64=0 - any_mode64_testlist="sizeof-long-8" - ;; - esac - ;; - esac - ;; - - - # POWER 32-bit - power-*-* | power[12]-*-* | power2sc-*-*) - $as_echo "@%:@define HAVE_HOST_CPU_FAMILY_power 1" >>confdefs.h - - HAVE_HOST_CPU_FAMILY_power=1 - cclist="gcc" - extra_functions="udiv_w_sdiv" - path="power" - - # gcc 2.7.2 knows rios1, rios2, rsc - # - # -mcpu=rios2 can tickle an AIX assembler bug (see GMP_PROG_CC_WORKS) so - # there needs to be a fallback to just -mpower. - # - gcc_cflags_optlist="cpu" - case $host in - power-*-*) gcc_cflags_cpu="-mcpu=power -mpower" ;; - power1-*-*) gcc_cflags_cpu="-mcpu=rios1 -mpower" ;; - power2-*-*) gcc_cflags_cpu="-mcpu=rios2 -mpower" ;; - power2sc-*-*) gcc_cflags_cpu="-mcpu=rsc -mpower" ;; - esac - case $host in - *-*-aix*) - cclist="gcc xlc" - xlc_cflags="-O2 -qarch=pwr -qmaxmem=20000" - ;; - esac - ;; - - - # IBM System/390 and z/Architecture - s390-*-* | z900esa-*-* | z990esa-*-* | z9esa-*-* | z10esa-*-* | z196esa-*-* | s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*) - abilist="32" - gcc_cflags="$gcc_cflags $fomit_frame_pointer" - gcc_cflags_optlist="arch" - path="s390_32" - extra_functions="udiv_w_sdiv" - gcc_32_cflags_maybe="-m31" - - case $host_cpu in - s390) - ;; - z900 | z900esa) - cpu="z900" - gccarch="$cpu" - path="s390_32/esame/$cpu s390_32/esame s390_32" - gcc_cflags_arch="-march=$gccarch" - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_HOST_CPU_s390_$cpu 1 -_ACEOF - - $as_echo "@%:@define HAVE_HOST_CPU_s390_zarch 1" >>confdefs.h - - extra_functions="" - ;; - z990 | z990esa) - cpu="z990" - gccarch="$cpu" - path="s390_32/esame/$cpu s390_32/esame s390_32" - gcc_cflags_arch="-march=$gccarch" - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_HOST_CPU_s390_$cpu 1 -_ACEOF - - $as_echo "@%:@define HAVE_HOST_CPU_s390_zarch 1" >>confdefs.h - - extra_functions="" - ;; - z9 | z9esa) - cpu="z9" - gccarch="z9-109" - path="s390_32/esame/$cpu s390_32/esame s390_32" - gcc_cflags_arch="-march=$gccarch" - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_HOST_CPU_s390_$cpu 1 -_ACEOF - - $as_echo "@%:@define HAVE_HOST_CPU_s390_zarch 1" >>confdefs.h - - extra_functions="" - ;; - z10 | z10esa) - cpu="z10" - gccarch="z10" - path="s390_32/esame/$cpu s390_32/esame s390_32" - gcc_cflags_arch="-march=$gccarch" - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_HOST_CPU_s390_$cpu 1 -_ACEOF - - $as_echo "@%:@define HAVE_HOST_CPU_s390_zarch 1" >>confdefs.h - - extra_functions="" - ;; - z196 | z196esa) - cpu="z196" - gccarch="z196" - path="s390_32/esame/$cpu s390_32/esame s390_32" - gcc_cflags_arch="-march=$gccarch" - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_HOST_CPU_s390_$cpu 1 -_ACEOF - - $as_echo "@%:@define HAVE_HOST_CPU_s390_zarch 1" >>confdefs.h - - extra_functions="" - ;; - esac - - case $host in - s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*) - abilist="64 32" - cclist_64="gcc" - gcc_64_cflags_optlist="arch" - gcc_64_cflags="$gcc_cflags -m64" - path_64="s390_64/$host_cpu s390_64" - extra_functions="" - ;; - esac - ;; - - - sh-*-*) path="sh" ;; - sh[2-4]-*-*) path="sh/sh2 sh" ;; - - - *sparc*-*-*) - # sizeof(long)==4 or 8 is tested, to ensure we get the right ABI. We've - # had various bug reports where users have set CFLAGS for their desired - # mode, but not set our ABI. For some reason it's sparc where this - # keeps coming up, presumably users there are accustomed to driving the - # compiler mode that way. The effect of our testlist setting is to - # reject ABI=64 in favour of ABI=32 if the user has forced the flags to - # 32-bit mode. - # - abilist="32" - cclist="gcc acc cc" - any_testlist="sizeof-long-4" - -echo "include_mpn(\`sparc32/sparc-defs.m4')" >> $gmp_tmpconfigm4i - - - case $host_cpu in - sparcv8 | microsparc | turbosparc) - path="sparc32/v8 sparc32" ;; - supersparc) - path="sparc32/v8/supersparc sparc32/v8 sparc32" ;; - sparc64 | sparcv9* | ultrasparc | ultrasparc[234]*) - path="sparc32/v9 sparc32/v8 sparc32" ;; - ultrasparct[12345]) - path="sparc32/ultrasparct1 sparc32/v8 sparc32" ;; - *) - path="sparc32" ;; - esac - - # gcc 2.7.2 doesn't know about v9 and doesn't pass -xarch=v8plus to the - # assembler. Add it explicitly since the solaris assembler won't accept - # our sparc32/v9 asm code without it. gas accepts -xarch=v8plus too, so - # it can be in the cflags unconditionally (though gas doesn't need it). - # - # gcc -m32 is needed to force 32-bit mode on a dual-ABI system, but past - # gcc doesn't know that flag, hence cflags_maybe. Note that -m32 cannot - # be done through the optlist since the plain cflags would be run first - # and we don't want to require the default mode (whatever it is) works. - # - # Note it's gcc_32_cflags_maybe and not gcc_cflags_maybe because the - # latter would be used in the 64-bit ABI on systems like "*bsd" where - # abilist="64" only. - # - gcc_32_cflags_maybe="-m32" - gcc_cflags_optlist="cpu asm" - - # gcc 2.7.2 knows -mcypress, -msupersparc, -mv8, -msparclite. - # gcc 2.95 knows -mcpu= v7, hypersparc, sparclite86x, f930, f934, - # sparclet, tsc701, v9, ultrasparc. A warning is given that the - # plain -m forms will disappear. - # gcc 3.3 adds ultrasparc3. - # - case $host_cpu in - supersparc*) - gcc_cflags_cpu="-mcpu=supersparc -msupersparc" - gcc_cflags_asm="-Wa,-Av8 -Wa,-xarch=v8";; - sparcv8 | microsparc* | turbosparc | hypersparc*) - gcc_cflags_cpu="-mcpu=v8 -mv8" - gcc_cflags_asm="-Wa,-Av8 -Wa,-xarch=v8";; - sparc64 | sparcv9*) - gcc_cflags_cpu="-mcpu=v9" - gcc_32_cflags_asm="-Wa,-Av8 -Wa,-xarch=v8plus" - gcc_64_cflags_asm="-Wa,-Av9 -Wa,-xarch=v9";; - ultrasparc1 | ultrasparc2*) - gcc_cflags_cpu="-mcpu=ultrasparc -mcpu=v9" - gcc_32_cflags_asm="-Wa,-Av8plusa -Wa,-xarch=v8plusa" - gcc_64_cflags_asm="-Wa,-Av9a -Wa,-xarch=v9a";; - ultrasparc[34]) - gcc_cflags_cpu="-mcpu=ultrasparc3 -mcpu=ultrasparc -mcpu=v9" - gcc_32_cflags_asm="-Wa,-Av8plusb -Wa,-xarch=v8plusb" - gcc_64_cflags_asm="-Wa,-Av9b -Wa,-xarch=v9b";; - ultrasparct[12]) - gcc_cflags_cpu="-mcpu=niagara -mcpu=v9" - gcc_32_cflags_asm="-Wa,-Av8plusc -Wa,-xarch=v8plusc" - gcc_64_cflags_asm="-Wa,-Av9c -Wa,-xarch=v9c";; - ultrasparct3) - gcc_cflags_cpu="-mcpu=niagara3 -mcpu=niagara -mcpu=v9" - gcc_32_cflags_asm="-Wa,-Av8plusd -Wa,-xarch=v8plusd" - gcc_64_cflags_asm="-Wa,-Av9d -Wa,-xarch=v9d";; - ultrasparct[45]) - gcc_cflags_cpu="-mcpu=niagara4 -mcpu=niagara3 -mcpu=niagara -mcpu=v9" - gcc_32_cflags_asm="-Wa,-Av8plusd -Wa,-xarch=v8plusd" - gcc_64_cflags_asm="-Wa,-Av9d -Wa,-xarch=v9d";; - *) - gcc_cflags_cpu="-mcpu=v7 -mcypress" - gcc_cflags_asm="";; - esac - - # SunPRO cc and acc, and SunOS bundled cc - case $host in - *-*-solaris* | *-*-sunos*) - # Note no -g, it disables all optimizations. - cc_cflags= - cc_cflags_optlist="opt arch cpu" - - # SunOS <= 4 cc doesn't know -xO3, fallback to -O2. - cc_cflags_opt="-xO3 -O2" - - # SunOS cc doesn't know -xarch, apparently always generating v7 - # code, so make this optional - case $host_cpu in - sparcv8 | microsparc* | supersparc* | turbosparc | hypersparc*) - cc_cflags_arch="-xarch=v8";; - ultrasparct[345]) - cc_cflags_arch="-xarch=v8plusd" ;; - sparc64 | sparcv9* | ultrasparc*) - cc_cflags_arch="-xarch=v8plus" ;; - *) - cc_cflags_arch="-xarch=v7" ;; - esac - - # SunOS cc doesn't know -xchip and doesn't seem to have an equivalent. - # SunPRO cc 5 recognises -xchip=generic, old, super, super2, micro, - # micro2, hyper, hyper2, powerup, ultra, ultra2, ultra2i. - # SunPRO cc 6 adds -xchip=ultra2e, ultra3cu. - # - case $host_cpu in - supersparc*) cc_cflags_cpu="-xchip=super" ;; - microsparc*) cc_cflags_cpu="-xchip=micro" ;; - turbosparc) cc_cflags_cpu="-xchip=micro2" ;; - hypersparc*) cc_cflags_cpu="-xchip=hyper" ;; - ultrasparc) cc_cflags_cpu="-xchip=ultra" ;; - ultrasparc2) cc_cflags_cpu="-xchip=ultra2 -xchip=ultra" ;; - ultrasparc2i) cc_cflags_cpu="-xchip=ultra2i -xchip=ultra2 -xchip=ultra" ;; - ultrasparc3) cc_cflags_cpu="-xchip=ultra3 -xchip=ultra" ;; - ultrasparc4) cc_cflags_cpu="-xchip=ultra4 -xchip=ultra3 -xchip=ultra" ;; - ultrasparct1) cc_cflags_cpu="-xchip=ultraT1" ;; - ultrasparct2) cc_cflags_cpu="-xchip=ultraT2 -xchip=ultraT1" ;; - ultrasparct3) cc_cflags_cpu="-xchip=ultraT3 -xchip=ultraT2" ;; - ultrasparct4) cc_cflags_cpu="-xchip=T4" ;; - ultrasparct5) cc_cflags_cpu="-xchip=T5 -xchip=T4" ;; - *) cc_cflags_cpu="-xchip=generic" ;; - esac - esac - - case $host_cpu in - sparc64 | sparcv9* | ultrasparc*) - case $host in - # Solaris 6 and earlier cannot run ABI=64 since it doesn't save - # registers properly, so ABI=32 is left as the only choice. - # - *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;; - - # BSD sparc64 ports are 64-bit-only systems, so ABI=64 is the only - # choice. In fact they need no special compiler flags, gcc -m64 - # is the default, but it doesn't hurt to add it. v9 CPUs always - # use the sparc64 port, since the plain 32-bit sparc ports don't - # run on a v9. - # - *-*-*bsd*) abilist="64" ;; - - # For all other systems, we try both 64 and 32. - # - # GNU/Linux sparc64 has only recently gained a 64-bit user mode. - # In the past sparc64 meant a v9 cpu, but there were no 64-bit - # operations in user mode. We assume that if "gcc -m64" works - # then the system is suitable. Hopefully even if someone attempts - # to put a new gcc and/or glibc on an old system it won't run. - # - *) abilist="64 32" ;; - esac - - case $host_cpu in - ultrasparc | ultrasparc2 | ultrasparc2i) - path_64="sparc64/ultrasparc1234 sparc64" ;; - ultrasparc[34]) - path_64="sparc64/ultrasparc34 sparc64/ultrasparc1234 sparc64" ;; - ultrasparct[12]) - path_64="sparc64/ultrasparct1 sparc64" ;; - ultrasparct[345]) - path_64="sparc64/ultrasparct3 sparc64" ;; - *) - path_64="sparc64" - esac - - cclist_64="gcc" - any_64_testlist="sizeof-long-8" - - # gcc -mptr64 is probably implied by -m64, but we're not sure if - # this was always so. On Solaris in the past we always used both - # "-m64 -mptr64". - # - # gcc -Wa,-xarch=v9 is thought to be necessary in some cases on - # solaris, but it would seem likely that if gcc is going to generate - # 64-bit code it will have to add that option itself where needed. - # An extra copy of this option should be harmless though, but leave - # it until we're sure. (Might want -xarch=v9a or -xarch=v9b for the - # higher cpu types instead.) - # - gcc_64_cflags="$gcc_cflags -m64 -mptr64" - gcc_64_ldflags="-Wc,-m64" - gcc_64_cflags_optlist="cpu asm" - - case $host in - *-*-solaris*) - # Sun cc. - # - # We used to have -fast and some fixup options here, but it - # recurrently caused problems with miscompilation. Of course, - # -fast is documented as miscompiling things for the sake of speed. - # - cclist_64="$cclist_64 cc" - cc_64_cflags_optlist="cpu" - case $host_cpu in - ultrasparct[345]) - cc_64_cflags="$cc_64_cflags -xO3 -xarch=v9d" ;; - *) - cc_64_cflags="-xO3 -xarch=v9" ;; - esac - ;; - esac - - # using the v9 %tick register - SPEED_CYCLECOUNTER_OBJ_32=sparcv9.lo - SPEED_CYCLECOUNTER_OBJ_64=sparcv9.lo - cyclecounter_size_32=2 - cyclecounter_size_64=2 - ;; - esac - ;; - - - # VAX - vax*-*-*elf*) - # Use elf conventions (i.e., '%' register prefix, no global prefix) - # - -echo "include_mpn(\`vax/elf.m4')" >> $gmp_tmpconfigm4i - - gcc_cflags="$gcc_cflags $fomit_frame_pointer" - path="vax" - extra_functions="udiv_w_sdiv" - ;; - vax*-*-*) - # Default to aout conventions (i.e., no register prefix, '_' global prefix) - # - gcc_cflags="$gcc_cflags $fomit_frame_pointer" - path="vax" - extra_functions="udiv_w_sdiv" - ;; - - - # AMD and Intel x86 configurations, including AMD64 - # - # Rumour has it gcc -O2 used to give worse register allocation than just - # -O, but lets assume that's no longer true. - # - # -m32 forces 32-bit mode on a bi-arch 32/64 amd64 build of gcc. -m64 is - # the default in such a build (we think), so -m32 is essential for ABI=32. - # This is, of course, done for any $host_cpu, not just x86_64, so we can - # get such a gcc into the right mode to cross-compile to say i486-*-*. - # - # -m32 is not available in gcc 2.95 and earlier, hence cflags_maybe to use - # it when it works. We check sizeof(long)==4 to ensure we get the right - # mode, in case -m32 has failed not because it's an old gcc, but because - # it's a dual 32/64-bit gcc without a 32-bit libc, or whatever. - # - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | cabylake*-*-*) - abilist="32" - cclist="gcc icc cc" - gcc_cflags="$gcc_cflags $fomit_frame_pointer" - gcc_32_cflags_maybe="-m32" - icc_cflags="-no-gcc" - icc_cflags_optlist="opt" - icc_cflags_opt="-O3 -O2 -O1" - icc_cflags_opt_maybe="-fp-model~precise" - any_32_testlist="sizeof-long-4" - gcc_cflags_optlist="cpu arch noavx" - CALLING_CONVENTIONS_OBJS='x86call.lo x86check$U.lo' - - # Availability of rdtsc is checked at run-time. - SPEED_CYCLECOUNTER_OBJ=pentium.lo - - # gcc 2.7.2 only knows i386 and i486, using -m386 or -m486. These - # represent -mcpu= since -m486 doesn't generate 486 specific insns. - # gcc 2.95 adds k6, pentium and pentiumpro, and takes -march= and -mcpu=. - # gcc 3.0 adds athlon. - # gcc 3.1 adds k6-2, k6-3, pentium-mmx, pentium2, pentium3, pentium4, - # athlon-tbird, athlon-4, athlon-xp, athlon-mp. - # gcc 3.2 adds winchip2. - # gcc 3.3 adds winchip-c6. - # gcc 3.3.1 from mandrake adds k8 and knows -mtune. - # gcc 3.4 adds c3, c3-2, k8, and deprecates -mcpu in favour of -mtune. - # - # In gcc 2.95.[0123], -march=pentiumpro provoked a stack slot bug in an - # old version of mpz/powm.c. Seems to be fine with the current code, so - # no need for any restrictions on that option. - # - # -march=pentiumpro can fail if the assembler doesn't know "cmov" - # (eg. solaris 2.8 native "as"), so always have -march=pentium after - # that as a fallback. - # - # -march=pentium4 and -march=k8 enable SSE2 instructions, which may or - # may not be supported by the assembler and/or the OS, and is bad in gcc - # prior to 3.3. The tests will reject these if no good, so fallbacks - # like "-march=pentium4 -mno-sse2" are given to try also without SSE2. - # Note the relevant -march types are listed in the optflags handling - # below, be sure to update there if adding new types emitting SSE2. - # - # -mtune is used at the start of each cpu option list to give something - # gcc 3.4 will use, thereby avoiding warnings from -mcpu. -mcpu forms - # are retained for use by prior gcc. For example pentium has - # "-mtune=pentium -mcpu=pentium ...", the -mtune is for 3.4 and the - # -mcpu for prior. If there's a brand new choice in 3.4 for a chip, - # like k8 for x86_64, then it can be the -mtune at the start, no need to - # duplicate anything. - # - case $host_cpu in - i386*) - gcc_cflags_cpu="-mtune=i386 -mcpu=i386 -m386" - gcc_cflags_arch="-march=i386" - path="x86" - ;; - i486*) - gcc_cflags_cpu="-mtune=i486 -mcpu=i486 -m486" - gcc_cflags_arch="-march=i486" - path="x86/i486 x86" - ;; - i586 | pentium) - gcc_cflags_cpu="-mtune=pentium -mcpu=pentium -m486" - gcc_cflags_arch="-march=pentium" - path="x86/pentium x86" - ;; - pentiummmx) - gcc_cflags_cpu="-mtune=pentium-mmx -mcpu=pentium-mmx -mcpu=pentium -m486" - gcc_cflags_arch="-march=pentium-mmx -march=pentium" - path="x86/pentium/mmx x86/pentium x86/mmx x86" - ;; - i686 | pentiumpro) - gcc_cflags_cpu="-mtune=pentiumpro -mcpu=pentiumpro -mcpu=i486 -m486" - gcc_cflags_arch="-march=pentiumpro -march=pentium" - path="x86/p6 x86" - ;; - pentium2) - gcc_cflags_cpu="-mtune=pentium2 -mcpu=pentium2 -mcpu=pentiumpro -mcpu=i486 -m486" - gcc_cflags_arch="-march=pentium2 -march=pentiumpro -march=pentium" - path="x86/p6/mmx x86/p6 x86/mmx x86" - ;; - pentium3) - gcc_cflags_cpu="-mtune=pentium3 -mcpu=pentium3 -mcpu=pentiumpro -mcpu=i486 -m486" - gcc_cflags_arch="-march=pentium3 -march=pentiumpro -march=pentium" - path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - ;; - pentiumm) - gcc_cflags_cpu="-mtune=pentium3 -mcpu=pentium3 -mcpu=pentiumpro -mcpu=i486 -m486" - gcc_cflags_arch="-march=pentium3 -march=pentiumpro -march=pentium" - path="x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - ;; - k6) - gcc_cflags_cpu="-mtune=k6 -mcpu=k6 -mcpu=i486 -m486" - gcc_cflags_arch="-march=k6" - path="x86/k6/mmx x86/k6 x86/mmx x86" - ;; - k62) - gcc_cflags_cpu="-mtune=k6-2 -mcpu=k6-2 -mcpu=k6 -mcpu=i486 -m486" - gcc_cflags_arch="-march=k6-2 -march=k6" - path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86/mmx x86" - ;; - k63) - gcc_cflags_cpu="-mtune=k6-3 -mcpu=k6-3 -mcpu=k6 -mcpu=i486 -m486" - gcc_cflags_arch="-march=k6-3 -march=k6" - path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86/mmx x86" - ;; - geode) - gcc_cflags_cpu="-mtune=k6-3 -mcpu=k6-3 -mcpu=k6 -mcpu=i486 -m486" - gcc_cflags_arch="-march=k6-3 -march=k6" - path="x86/geode x86/k6/k62mmx x86/k6/mmx x86/k6 x86/mmx x86" - ;; - athlon) - # Athlon instruction costs are close to P6 (3 cycle load latency, - # 4-6 cycle mul, 40 cycle div, pairable adc, etc) so if gcc doesn't - # know athlon (eg. 2.95.2 doesn't) then fall back on pentiumpro. - gcc_cflags_cpu="-mtune=athlon -mcpu=athlon -mcpu=pentiumpro -mcpu=i486 -m486" - gcc_cflags_arch="-march=athlon -march=pentiumpro -march=pentium" - path="x86/k7/mmx x86/k7 x86/mmx x86" - ;; - i786 | pentium4) - # pentiumpro is the primary fallback when gcc doesn't know pentium4. - # This gets us cmov to eliminate branches. Maybe "athlon" would be - # a possibility on gcc 3.0. - # - gcc_cflags_cpu="-mtune=pentium4 -mcpu=pentium4 -mcpu=pentiumpro -mcpu=i486 -m486" - gcc_cflags_arch="-march=pentium4 -march=pentium4~-mno-sse2 -march=pentiumpro -march=pentium" - gcc_64_cflags_cpu="-mtune=nocona" - path="x86/pentium4/sse2 x86/pentium4/mmx x86/pentium4 x86/mmx x86" - path_64="x86_64/pentium4 x86_64" - ;; - viac32) - # Not sure of the best fallbacks here for -mcpu. - # c3-2 has sse and mmx, so pentium3 is good for -march. - gcc_cflags_cpu="-mtune=c3-2 -mcpu=c3-2 -mcpu=i486 -m486" - gcc_cflags_arch="-march=c3-2 -march=pentium3 -march=pentiumpro -march=pentium" - path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - ;; - viac3*) - # Not sure of the best fallbacks here. - gcc_cflags_cpu="-mtune=c3 -mcpu=c3 -mcpu=i486 -m486" - gcc_cflags_arch="-march=c3 -march=pentium-mmx -march=pentium" - path="x86/pentium/mmx x86/pentium x86/mmx x86" - ;; - athlon64 | k8 | x86_64) - gcc_cflags_cpu="-mtune=k8 -mcpu=athlon -mcpu=pentiumpro -mcpu=i486 -m486" - gcc_cflags_arch="-march=k8 -march=k8~-mno-sse2 -march=athlon -march=pentiumpro -march=pentium" - path="x86/k8 x86/k7/mmx x86/k7 x86/mmx x86" - path_64="x86_64/k8 x86_64" - ;; - k10) - gcc_cflags_cpu="-mtune=amdfam10 -mtune=k8" - gcc_cflags_arch="-march=amdfam10 -march=k8 -march=k8~-mno-sse2" - path="x86/k10 x86/k8 x86/k7/mmx x86/k7 x86/mmx x86" - path_64="x86_64/k10 x86_64/k8 x86_64" - ;; - bobcat) - gcc_cflags_cpu="-mtune=btver1 -mtune=amdfam10 -mtune=k8" - gcc_cflags_arch="-march=btver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2" - path="x86/bobcat x86/k7/mmx x86/k7 x86/mmx x86" - path_64="x86_64/bobcat x86_64/k10 x86_64/k8 x86_64" - ;; - jaguar | jaguarnoavx) - gcc_cflags_cpu="-mtune=btver2 -mtune=btver1 -mtune=amdfam10 -mtune=k8" - gcc_cflags_arch="-march=btver2 -march=btver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2" - path="x86/jaguar x86/bobcat x86/k7/mmx x86/k7 x86/mmx x86" - path_64="x86_64/jaguar x86_64/bobcat x86_64/k10 x86_64/k8 x86_64" - ;; - bulldozer | bd1 | bulldozernoavx | bd1noavx) - gcc_cflags_cpu="-mtune=bdver1 -mtune=amdfam10 -mtune=k8" - gcc_cflags_arch="-march=bdver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2" - path="x86/bd1 x86/k7/mmx x86/k7 x86/mmx x86" - path_64="x86_64/bd1 x86_64/k10 x86_64/k8 x86_64" - ;; - piledriver | bd2 | piledrivernoavx | bd2noavx) - gcc_cflags_cpu="-mtune=bdver2 -mtune=bdver1 -mtune=amdfam10 -mtune=k8" - gcc_cflags_arch="-march=bdver2 -march=bdver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2" - path="x86/bd2 x86/bd1 x86/k7/mmx x86/k7 x86/mmx x86" - path_64="x86_64/bd2 x86_64/bd1 x86_64/k10 x86_64/k8 x86_64" - ;; - steamroller | bd3 | steamrollernoavx | bd3noavx) - gcc_cflags_cpu="-mtune=bdver3 -mtune=bdver2 -mtune=bdver1 -mtune=amdfam10 -mtune=k8" - gcc_cflags_arch="-march=bdver3 -march=bdver2 -march=bdver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2" - path="x86/bd3 x86/bd2 x86/bd1 x86/k7/mmx x86/k7 x86/mmx x86" - path_64="x86_64/bd3 x86_64/bd2 x86_64/bd1 x86_64/k10 x86_64/k8 x86_64" - ;; - excavator | bd4 | excavatornoavx | bd4noavx) - gcc_cflags_cpu="-mtune=bdver4 -mtune=bdver3 -mtune=bdver2 -mtune=bdver1 -mtune=amdfam10 -mtune=k8" - gcc_cflags_arch="-march=bdver4 -march=bdver3 -march=bdver2 -march=bdver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2" - path="x86/bd4 x86/bd3 x86/bd2 x86/bd1 x86/k7/mmx x86/k7 x86/mmx x86" - path_64="x86_64/bd4 x86_64/bd3 x86_64/bd2 x86_64/bd1 x86_64/k10 x86_64/k8 x86_64" - ;; - core2) - gcc_cflags_cpu="-mtune=core2 -mtune=k8" - gcc_cflags_arch="-march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" - path="x86/core2 x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - path_64="x86_64/core2 x86_64" - ;; - corei | coreinhm | coreiwsm | nehalem | westmere) - gcc_cflags_cpu="-mtune=corei7 -mtune=core2 -mtune=k8" - gcc_cflags_arch="-march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" - path="x86/coreinhm x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - path_64="x86_64/coreinhm x86_64/core2 x86_64" - ;; - coreisbr | coreisbrnoavx | coreiibr | coreiibrnoavx | \ - sandybridge | sandybridgenoavx | ivybridge | ivybridgenoavx) - gcc_cflags_cpu="-mtune=sandybridge -mtune=corei7 -mtune=core2 -mtune=k8" - gcc_cflags_arch="-march=sandybridge -march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" - path="x86/coreisbr x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - path_64="x86_64/coreisbr x86_64/coreinhm x86_64/core2 x86_64" - ;; - coreihwl | coreihwlnoavx | haswell | haswellnoavx) - gcc_cflags_cpu="-mtune=haswell -mtune=corei7 -mtune=core2 -mtune=k8" - gcc_cflags_arch="-march=haswell -march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" - path="x86/coreisbr x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - path_64="x86_64/coreihwl x86_64/coreisbr x86_64/coreinhm x86_64/core2 x86_64" - ;; - coreibwl | coreibwlnoavx | broadwell | broadwellnoavx) - gcc_cflags_cpu="-mtune=broadwell -mtune=corei7 -mtune=core2 -mtune=k8" - gcc_cflags_arch="-march=broadwell -march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" - path="x86/coreisbr x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - path_64="x86_64/coreibwl x86_64/coreihwl x86_64/coreisbr x86_64/coreinhm x86_64/core2 x86_64" - # extra_functions_64="missing" # enable for bmi2/adx simulation - ;; - skylake | skylakenoavx | cabylake | cabylakenoavx) - gcc_cflags_cpu="-mtune=skylake -mtune=broadwell -mtune=corei7 -mtune=core2 -mtune=k8" - # Don't pass -march=skylake for now as then some compilers emit AVX512. - gcc_cflags_arch="-march=broadwell -march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" - path="x86/coreisbr x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - path_64="x86_64/skylake x86_64/coreibwl x86_64/coreihwl x86_64/coreisbr x86_64/coreinhm x86_64/core2 x86_64" - # extra_functions_64="missing" # enable for bmi2/adx simulation - ;; - atom) # in-order pipeline atom - gcc_cflags_cpu="-mtune=atom -mtune=pentium3" - gcc_cflags_arch="-march=atom -march=pentium3" - path="x86/atom/sse2 x86/atom/mmx x86/atom x86/mmx x86" - path_64="x86_64/atom x86_64" - ;; - silvermont | goldmont) # out-of-order pipeline atom - gcc_cflags_cpu="-mtune=slm -mtune=atom -mtune=pentium3" - gcc_cflags_arch="-march=slm -march=atom -march=pentium3" - path="x86/atom/sse2 x86/atom/mmx x86/atom x86/mmx x86" - path_64="x86_64/silvermont x86_64/atom x86_64" - ;; - nano) - gcc_cflags_cpu="-mtune=nano" - gcc_cflags_arch="-march=nano" - path="x86/nano x86/mmx x86" - path_64="x86_64/nano x86_64" - ;; - *) - gcc_cflags_cpu="-mtune=i486 -mcpu=i486 -m486" - gcc_cflags_arch="-march=i486" - path="x86" - path_64="x86_64" - ;; - esac - - case $host in - # Disable AVX if the CPU part tells us AVX is unavailable, but also - # unconditionally for NetBSD where they don't work but OSXSAVE is set - # to claim the contrary. - *noavx-*-* | *-*-netbsd*) - gcc_cflags_noavx="-mno-avx";; - esac - - case $host in - athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | cabylake*-*-*) - cclist_64="gcc cc" - gcc_64_cflags="$gcc_cflags -m64" - gcc_64_cflags_optlist="cpu arch noavx" - CALLING_CONVENTIONS_OBJS_64='amd64call.lo amd64check$U.lo' - SPEED_CYCLECOUNTER_OBJ_64=x86_64.lo - cyclecounter_size_64=2 - - cclist_x32="gcc cc" - gcc_x32_cflags="$gcc_cflags -mx32" - gcc_x32_cflags_optlist="$gcc_64_cflags_optlist" - CALLING_CONVENTIONS_OBJS_x32="$CALLING_CONVENTIONS_OBJS_64" - SPEED_CYCLECOUNTER_OBJ_x32="$SPEED_CYCLECOUNTER_OBJ_64" - cyclecounter_size_x32="$cyclecounter_size_64" - path_x32="$path_64" - limb_x32=longlong - any_x32_testlist="sizeof-long-4" - - abilist="64 x32 32" - if test "$enable_assembly" = "yes" ; then - extra_functions_64="$extra_functions_64 invert_limb_table" - extra_functions_x32=$extra_functions_64 - fi - - case $host in - *-*-solaris*) - # Sun cc. - cc_64_cflags="-xO3 -m64" - ;; - *-*-mingw* | *-*-cygwin) - limb_64=longlong - CALLING_CONVENTIONS_OBJS_64="" - -$as_echo "@%:@define HOST_DOS64 1" >>confdefs.h - - GMP_NONSTD_ABI_64=DOS64 - ;; - esac - ;; - esac - ;; - - - # Special CPU "none" used to select generic C, now this is obsolete. - none-*-*) - enable_assembly=no - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the \"none\" host is obsolete, use --disable-assembly" >&5 -$as_echo "$as_me: WARNING: the \"none\" host is obsolete, use --disable-assembly" >&2;} - ;; - -esac - -# mingw can be built by the cygwin gcc if -mno-cygwin is added. For -# convenience add this automatically if it works. Actual mingw gcc accepts -# -mno-cygwin too, but of course is the default. mingw only runs on the -# x86s, but allow any CPU here so as to catch "none" too. -# -case $host in - *-*-mingw*) - gcc_cflags_optlist="$gcc_cflags_optlist nocygwin" - gcc_cflags_nocygwin="-mno-cygwin" - ;; -esac - - -CFLAGS_or_unset=${CFLAGS-'(unset)'} -CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'} - -cat >&5 <<EOF -User: -ABI=$ABI -CC=$CC -CFLAGS=$CFLAGS_or_unset -CPPFLAGS=$CPPFLAGS_or_unset -MPN_PATH=$MPN_PATH -GMP: -abilist=$abilist -cclist=$cclist -EOF - - -test_CFLAGS=${CFLAGS+set} -test_CPPFLAGS=${CPPFLAGS+set} - -for abi in $abilist; do - abi_last="$abi" -done - -# If the user specifies an ABI then it must be in $abilist, after that -# $abilist is restricted to just that choice. -# -if test -n "$ABI"; then - found=no - for abi in $abilist; do - if test $abi = "$ABI"; then found=yes; break; fi - done - if test $found = no; then - as_fn_error $? "ABI=$ABI is not among the following valid choices: $abilist" "$LINENO" 5 - fi - abilist="$ABI" -fi - -found_compiler=no - -for abi in $abilist; do - - echo "checking ABI=$abi" - - # Suppose abilist="64 32", then for abi=64, will have abi1="_64" and - # abi2="_64". For abi=32, will have abi1="_32" and abi2="". This is how - # $gcc_cflags becomes a fallback for $gcc_32_cflags (the last in the - # abilist), but there's no fallback for $gcc_64_cflags. - # - abi1=`echo _$abi | sed 's/[.]//g'` - if test $abi = $abi_last; then abi2=; else abi2="$abi1"; fi - - # Compiler choices under this ABI - eval cclist_chosen=\"\$cclist$abi1\" - test -n "$cclist_chosen" || eval cclist_chosen=\"\$cclist$abi2\" - - # If there's a user specified $CC then don't use a list for - # $cclist_chosen, just a single value for $ccbase. - # - if test -n "$CC"; then - - # The first word of $CC, stripped of any directory. For instance - # CC="/usr/local/bin/gcc -pipe" will give "gcc". - # - for ccbase in $CC; do break; done - ccbase=`echo $ccbase | sed 's:.*/::'` - - # If this $ccbase is in $cclist_chosen then it's a compiler we know and - # we can do flags defaulting with it. If not, then $cclist_chosen is - # set to "unrecognised" so no default flags are used. - # - # "unrecognised" is used to avoid bad effects with eval if $ccbase has - # non-symbol characters. For instance ccbase=my+cc would end up with - # something like cflags="$my+cc_cflags" which would give - # cflags="+cc_cflags" rather than the intended empty string for an - # unknown compiler. - # - found=unrecognised - for i in $cclist_chosen; do - if test "$ccbase" = $i; then - found=$ccbase - break - fi - done - cclist_chosen=$found - fi - - for ccbase in $cclist_chosen; do - - # When cross compiling, look for a compiler with the $host_alias as a - # prefix, the same way that AC_CHECK_TOOL does. But don't do this to a - # user-selected $CC. - # - # $cross_compiling will be yes/no/maybe at this point. Do the host - # prefixing for "maybe" as well as "yes". - # - if test "$cross_compiling" != no && test -z "$CC"; then - cross_compiling_prefix="${host_alias}-" - fi - - for ccprefix in $cross_compiling_prefix ""; do - - cc="$CC" - test -n "$cc" || cc="$ccprefix$ccbase" - - # If the compiler is gcc but installed under another name, then change - # $ccbase so as to use the flags we know for gcc. This helps for - # instance when specifying CC=gcc272 on Debian GNU/Linux, or the - # native cc which is really gcc on NeXT or MacOS-X. - # - # FIXME: There's a slight misfeature here. If cc is actually gcc but - # gcc is not a known compiler under this $abi then we'll end up - # testing it with no flags and it'll work, but chances are it won't be - # in the right mode for the ABI we desire. Let's quietly hope this - # doesn't happen. - # - if test $ccbase != gcc; then - cat >conftest.c <<EOF -#if ! defined (__GNUC__) || defined (__INTEL_COMPILER) - choke me -#endif -EOF -gmp_compile="$cc -c conftest.c >&5" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - rm -f conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $cc is gcc" >&5 -$as_echo_n "checking whether $cc is gcc... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ccbase=gcc -else - rm -f conftest* - : -fi - - fi - - # Similarly if the compiler is IBM xlc but invoked as cc or whatever - # then change $ccbase and make the default xlc flags available. - if test $ccbase != xlc; then - gmp_command="$cc 2>&1 | grep xlc >/dev/null" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_command\""; } >&5 - (eval $gmp_command) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $cc is xlc" >&5 -$as_echo_n "checking whether $cc is xlc... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ccbase=xlc -else - : -fi - - fi - - # acc was Sun's first unbundled compiler back in the SunOS days, or - # something like that, but today its man page says it's not meant to - # be used directly (instead via /usr/ucb/cc). The options are pretty - # much the same as the main SunPRO cc, so share those configs. - # - case $host in - *sparc*-*-solaris* | *sparc*-*-sunos*) - if test "$ccbase" = acc; then ccbase=cc; fi ;; - esac - - for tmp_cflags_maybe in yes no; do - eval cflags=\"\$${ccbase}${abi1}_cflags\" - test -n "$cflags" || eval cflags=\"\$${ccbase}${abi2}_cflags\" - - if test "$tmp_cflags_maybe" = yes; then - # don't try cflags_maybe when the user set CFLAGS - if test "$test_CFLAGS" = set; then continue; fi - eval cflags_maybe=\"\$${ccbase}${abi1}_cflags_maybe\" - test -n "$cflags_maybe" || eval cflags_maybe=\"\$${ccbase}${abi2}_cflags_maybe\" - # don't try cflags_maybe if there's nothing set - if test -z "$cflags_maybe"; then continue; fi - cflags="$cflags_maybe $cflags" - fi - - # Any user CFLAGS, even an empty string, takes precedence - if test "$test_CFLAGS" = set; then cflags=$CFLAGS; fi - - # Any user CPPFLAGS, even an empty string, takes precedence - eval cppflags=\"\$${ccbase}${abi1}_cppflags\" - test -n "$cppflags" || eval cppflags=\"\$${ccbase}${abi2}_cppflags\" - if test "$test_CPPFLAGS" = set; then cppflags=$CPPFLAGS; fi - - # --enable-profiling adds -p/-pg even to user-specified CFLAGS. - # This is convenient, but it's perhaps a bit naughty to modify user - # CFLAGS. - case "$enable_profiling" in - prof) cflags="$cflags -p" ;; - gprof) cflags="$cflags -pg" ;; - instrument) cflags="$cflags -finstrument-functions" ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler $cc $cflags $cppflags" >&5 -$as_echo_n "checking compiler $cc $cflags $cppflags... " >&6; } -gmp_prog_cc_works=yes - -# first see a simple "main()" works, then go on to other checks -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF - -int main () { return 0; } -EOF - echo "Test compile: " >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no" - ;; - norun) - gmp_prog_cc_works="no, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 - (without -maix64), hence detecting an unusable compiler */ -void *g() { return (void *) 0; } -void *f() { return g(); } - -int main () { return 0; } -EOF - echo "Test compile: function pointer return" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, function pointer return" - ;; - norun) - gmp_prog_cc_works="no, function pointer return, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an invalid instruction syntax from i386 gcc - -march=pentiumpro on Solaris 2.8. The native sun assembler - requires a non-standard syntax for cmov which gcc (as of 2.95.2 at - least) doesn't know. */ -int n; -int cmov () { return (n >= 0 ? n : 0); } - -int main () { return 0; } -EOF - echo "Test compile: cmov instruction" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, cmov instruction" - ;; - norun) - gmp_prog_cc_works="no, cmov instruction, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes a linker invocation problem with gcc 3.0.3 - on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 - option causes gcc to incorrectly select the 32-bit libgcc.a, not - the 64-bit one, and consequently it misses out on the __fixunsdfdi - helper (double -> uint64 conversion). */ -double d; -unsigned long gcc303 () { return (unsigned long) d; } - -int main () { return 0; } -EOF - echo "Test compile: double -> ulong conversion" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, double -> ulong conversion" - ;; - norun) - gmp_prog_cc_works="no, double -> ulong conversion, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if - the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 - instruction, and a negation like this comes out using it. */ -double fneg_data; -unsigned long fneg () { return -fneg_data; } - -int main () { return 0; } -EOF - echo "Test compile: double negation" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, double negation" - ;; - norun) - gmp_prog_cc_works="no, double negation, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn - (cvtsd2ss) which will provoke an error if the assembler doesn't recognise - those instructions. Not sure how much of the gmp code will come out - wanting sse2, but it's easiest to reject an option we know is bad. */ -double ftod_data; -float ftod () { return (float) ftod_data; } - -int main () { return 0; } -EOF - echo "Test compile: double -> float conversion" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, double -> float conversion" - ;; - norun) - gmp_prog_cc_works="no, double -> float conversion, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal compiler error from gcc version - "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char - values being spilled into floating point registers. The problem doesn't - show up all the time, but has occurred enough in GMP for us to reject - this compiler+flags. */ -#include <string.h> /* for memcpy */ -struct try_t -{ - char dst[2]; - char size; - long d0, d1, d2, d3, d4, d5, d6; - char overlap; -}; -struct try_t param[6]; -int -param_init () -{ - struct try_t *p; - memcpy (p, ¶m[ 2 ], sizeof (*p)); - memcpy (p, ¶m[ 2 ], sizeof (*p)); - p->size = 2; - memcpy (p, ¶m[ 1 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 2; - memcpy (p, ¶m[ 3 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 8; - memcpy (p, ¶m[ 4 ], sizeof (*p)); - memcpy (p, ¶m[ 4 ], sizeof (*p)); - p->overlap = 8; - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - return 0; -} - -int main () { return 0; } -EOF - echo "Test compile: gnupro alpha ev6 char spilling" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, gnupro alpha ev6 char spilling" - ;; - norun) - gmp_prog_cc_works="no, gnupro alpha ev6 char spilling, program does not run" - ;; - esac -fi - - - - -# __builtin_alloca is not available everywhere, check it exists before -# seeing that it works -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -int k; int foo () { __builtin_alloca (k); } -EOF - echo "Test compile: __builtin_alloca availability" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal compiler error from Itanium HP-UX cc - under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ -int k; -int foo () -{ - int i, **a; - a = __builtin_alloca (k); - for (i = 0; i <= k; i++) - a[i] = __builtin_alloca (1 << i); -} - -int main () { return 0; } -EOF - echo "Test compile: alloca array" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, alloca array" - ;; - norun) - gmp_prog_cc_works="no, alloca array, program does not run" - ;; - esac -fi - - - - ;; - no) - - ;; - norun) - - ;; - esac -fi - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal error from the assembler on - power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this - results in "Internal error related to the source program domain". - - For reference it seems to be the combination of nabs+fcirz which is bad, - not either alone. This sort of thing occurs in mpz/get_str.c with the - way double chars_per_bit_exactly is applied in MPN_SIZEINBASE. Perhaps - if that code changes to a scaled-integer style then we won't need this - test. */ - -double fp[1]; -int x; -int f () -{ - int a; - a = (x >= 0 ? x : -x); - return a * fp[0]; -} - -int main () { return 0; } -EOF - echo "Test compile: abs int -> double conversion" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, abs int -> double conversion" - ;; - norun) - gmp_prog_cc_works="no, abs int -> double conversion, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes a segfault in the compiler on powerpc-apple-darwin. - Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to segfault with e.g., -O2 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -typedef unsigned long long t1;typedef t1*t2; -void g(){} -void h(){} -static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) -{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;} -void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i; -for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}} -#else -int dummy; -#endif - -int main () { return 0; } -EOF - echo "Test compile: long long reliability test 1" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, long long reliability test 1" - ;; - norun) - gmp_prog_cc_works="no, long long reliability test 1, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal compiler error on powerpc-apple-darwin. - Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to get an ICE with -O1 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int g(); -void f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();} -int g(){return 0;} -#else -int dummy; -#endif - -int main () { return 0; } -EOF - echo "Test compile: long long reliability test 2" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, long long reliability test 2" - ;; - norun) - gmp_prog_cc_works="no, long long reliability test 2, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* Provokes an ICE on i386-freebsd with the FreeBSD-hacked gcc, under - -O2 -march=amdfam10. We call helper functions here "open" and "close" in - order for linking to succeed. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int open(int*,int*,int);void*close(int);void g(int*rp,int*up,int un){ -__builtin_expect(un<=0x7f00,1)?__builtin_alloca(un):close(un);if(__builtin_clzl -(up[un])){open(rp,up,un);while(1){if(rp[un-1]!=0)break;un--;}}} -#else -int dummy; -#endif - -int main () { return 0; } -EOF - echo "Test compile: freebsd hacked gcc" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, freebsd hacked gcc" - ;; - norun) - gmp_prog_cc_works="no, freebsd hacked gcc, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following is mis-compiled by HP ia-64 cc version - cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003] - under "cc +O3", both in +DD32 and +DD64 modes. The mpn_lshift_com gets - inlined and its return value somehow botched to be 0 instead of 1. This - arises in the real mpn_lshift_com in mul_fft.c. A lower optimization - level, like +O2 seems ok. This code needs to be run to show the problem, - but that's fine, the offending cc is a native-only compiler so we don't - have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -unsigned long -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long retval, high_limb, low_limb; - unsigned tnc; - long i; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *up++; - retval = low_limb >> tnc; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *up++; - *rp++ = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - return retval; -} -int -main () -{ - unsigned long cy, rp[2], up[2]; - up[0] = ~ 0L; - up[1] = 0; - cy = lshift_com (rp, up, 2L, 1); - if (cy != 1L) - return 1; - return 0; -} -#else -int -main () -{ - return 0; -} -#endif - -EOF - echo "Test compile: mpn_lshift_com optimization" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, mpn_lshift_com optimization" - ;; - norun) - gmp_prog_cc_works="no, mpn_lshift_com optimization, program does not run" - ;; - esac -fi - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following is mis-compiled by Intel ia-64 icc version 1.8 under - "icc -O3", After several calls, the function writes partial garbage to - the result vector. Perhaps relates to the chk.a.nc insn. This code needs - to be run to show the problem, but that's fine, the offending cc is a - native-only compiler so we don't have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -#include <stdlib.h> -void -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long high_limb, low_limb; - unsigned tnc; - long i; - up += n; - rp += n; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *--up; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *--up; - *--rp = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - *--rp = ~high_limb; -} -int -main () -{ - unsigned long *r, *r2; - unsigned long a[88 + 1]; - long i; - for (i = 0; i < 88 + 1; i++) - a[i] = ~0L; - r = malloc (10000 * sizeof (unsigned long)); - r2 = r; - for (i = 0; i < 528; i += 22) - { - lshift_com (r2, a, - i / (8 * sizeof (unsigned long)) + 1, - i % (8 * sizeof (unsigned long))); - r2 += 88 + 1; - } - if (r[2048] != 0 || r[2049] != 0 || r[2050] != 0 || r[2051] != 0 || - r[2052] != 0 || r[2053] != 0 || r[2054] != 0) - abort (); - return 0; -} -#else -int -main () -{ - return 0; -} -#endif - -EOF - echo "Test compile: mpn_lshift_com optimization 2" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, mpn_lshift_com optimization 2" - ;; - norun) - gmp_prog_cc_works="no, mpn_lshift_com optimization 2, program does not run" - ;; - esac -fi - - - - -# A certain _GLOBAL_OFFSET_TABLE_ problem in past versions of gas, tickled -# by recent versions of gcc. -# -if test "$gmp_prog_cc_works" = yes; then - case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*) - # this problem only arises in PIC code, so don't need to test when - # --disable-shared. We don't necessarily have $enable_shared set to - # yes at this point, it will still be unset for the default (which is - # yes); hence the use of "!= no". - if test "$enable_shared" != no; then - echo "Testing gcc GOT with eax emitted" >&5 -cat >conftest.c <<\EOF -int foo; -int bar () { return foo; } -EOF -tmp_got_emitted=no -gmp_compile="$cc $cflags $cppflags -fPIC -S conftest.c >&5 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if grep "addl.*_GLOBAL_OFFSET_TABLE_.*eax" conftest.s >/dev/null; then - tmp_got_emitted=yes - fi -fi -rm -f conftest.* -echo "Result: $tmp_got_emitted" >&5 -if test "$tmp_got_emitted" = yes; then - echo "Testing gas GOT with eax good" >&5 -cat >conftest.awk <<\EOF -BEGIN { - want[0] = "001" - want[1] = "043" - want[2] = "105" - want[3] = "147" - want[4] = "211" - want[5] = "253" - want[6] = "315" - want[7] = "357" - - want[8] = "005" - want[9] = "002" - want[10] = "000" - want[11] = "000" - want[12] = "000" - - want[13] = "376" - want[14] = "334" - want[15] = "272" - want[16] = "230" - want[17] = "166" - want[18] = "124" - want[19] = "062" - want[20] = "020" - - result = "yes" -} -{ - for (f = 2; f <= NF; f++) - { - for (i = 0; i < 20; i++) - got[i] = got[i+1]; - got[20] = $f; - - found = 1 - for (i = 0; i < 21; i++) - if (got[i] != want[i]) - { - found = 0 - break - } - if (found) - { - result = "no" - exit - } - } -} -END { - print result -} -EOF -cat >conftest.s <<\EOF - .text - .byte 1, 35, 69, 103, 137, 171, 205, 239 - addl $_GLOBAL_OFFSET_TABLE_, %eax - .byte 254, 220, 186, 152, 118, 84, 50, 16 -EOF -tmp_got_good=yes -gmp_compile="$cc $cflags $cppflags -fPIC -o conftest.o -c conftest.s >&5 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - tmp_got_good=`od -b conftest.o | $AWK -f conftest.awk` -fi -rm -f conftest.* -echo "Result: $tmp_got_good" >&5 -if test "$tmp_got_good" = no; then - gmp_prog_cc_works="no, bad gas GOT with eax" -else - : -fi - -else - : -fi - - fi - ;; - esac -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_prog_cc_works" >&5 -$as_echo "$gmp_prog_cc_works" >&6; } -case $gmp_prog_cc_works in - yes) - - ;; - *) - continue - ;; -esac - - - # If we're supposed to be using a "long long" for a limb, check that - # it works. - eval limb_chosen=\"\$limb$abi1\" - test -n "$limb_chosen" || eval limb_chosen=\"\$limb$abi2\" - if test "$limb_chosen" = longlong; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler $cc $cflags $cppflags has long long" >&5 -$as_echo_n "checking compiler $cc $cflags $cppflags has long long... " >&6; } -cat >conftest.c <<EOF -long long foo; -long long bar () { return foo; } -int main () { return 0; } -EOF -gmp_prog_cc_works=no -gmp_compile="$cc $cflags $cppflags -c conftest.c >&5" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - gmp_prog_cc_works=yes -else - echo "failed program was:" >&5 - cat conftest.c >&5 -fi -rm -f conftest* a.out b.out a.exe a_out.exe -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_prog_cc_works" >&5 -$as_echo "$gmp_prog_cc_works" >&6; } -if test $gmp_prog_cc_works = yes; then - : -else - continue -fi - - fi - - # The tests to perform on this $cc, if any - eval testlist=\"\$${ccbase}${abi1}_testlist\" - test -n "$testlist" || eval testlist=\"\$${ccbase}${abi2}_testlist\" - test -n "$testlist" || eval testlist=\"\$any${abi1}_testlist\" - test -n "$testlist" || eval testlist=\"\$any${abi2}_testlist\" - - testlist_pass=yes - for tst in $testlist; do - case $tst in - hpc-hppa-2-0) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HP compiler $cc is good for 64-bits" >&5 -$as_echo_n "checking whether HP compiler $cc is good for 64-bits... " >&6; } -# Bad compiler output: -# ccom: HP92453-01 G.10.32.05 HP C Compiler -# Good compiler output: -# ccom: HP92453-01 A.10.32.30 HP C Compiler -# Let A.10.32.30 or higher be ok. -echo >conftest.c -gmp_tmp_vs=`$cc -V -c -o conftest.$OBJEXT conftest.c 2>&1 | grep "^ccom:"` -echo "Version string: $gmp_tmp_vs" >&5 -rm conftest* -gmp_tmp_v1=`echo $gmp_tmp_vs | sed 's/.* .\.\([0-9]*\).*/\1/'` -gmp_tmp_v2=`echo $gmp_tmp_vs | sed 's/.* .\..*\.\(.*\)\..* HP C.*/\1/'` -gmp_tmp_v3=`echo $gmp_tmp_vs | sed 's/.* .\..*\..*\.\(.*\) HP C.*/\1/'` -echo "Version number: $gmp_tmp_v1.$gmp_tmp_v2.$gmp_tmp_v3" >&5 -if test -z "$gmp_tmp_v1"; then - gmp_hpc_64bit=not-applicable -else - gmp_compare_ge=no -if test -n "$gmp_tmp_v1"; then - if test "$gmp_tmp_v1" -gt 10; then - gmp_compare_ge=yes - else - if test "$gmp_tmp_v1" -eq 10; then - if test -n "$gmp_tmp_v2"; then - if test "$gmp_tmp_v2" -gt 32; then - gmp_compare_ge=yes - else - if test "$gmp_tmp_v2" -eq 32; then - if test -n "$gmp_tmp_v3" && test "$gmp_tmp_v3" -ge 30; then - gmp_compare_ge=yes -fi - - fi - fi -fi - - fi - fi -fi - - - gmp_hpc_64bit=$gmp_compare_ge -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_hpc_64bit" >&5 -$as_echo "$gmp_hpc_64bit" >&6; } -if test $gmp_hpc_64bit = yes; then - : -else - testlist_pass=no -fi - ;; - gcc-arm-umodsi) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ARM gcc unsigned division works" >&5 -$as_echo_n "checking whether ARM gcc unsigned division works... " >&6; } -tmp_version=`$cc --version` -echo "$tmp_version" >&5 -case $tmp_version in - 2.95 | 2.95.[123]) - testlist_pass=no - gmp_gcc_arm_umodsi_result="no, gcc 2.95.[0123]" ;; - *) - : - gmp_gcc_arm_umodsi_result=yes ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_gcc_arm_umodsi_result" >&5 -$as_echo "$gmp_gcc_arm_umodsi_result" >&6; } - ;; - gcc-mips-o32) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports o32" >&5 -$as_echo_n "checking whether gcc supports o32... " >&6; } -echo 'int x;' >conftest.c -echo "$cc -mabi=32 -c conftest.c" >&5 -if $cc -mabi=32 -c conftest.c >conftest.out 2>&1; then - result=yes -else - cat conftest.out >&5 - if grep "cc1: Invalid option \`abi=32'" conftest.out >/dev/null; then - result=yes - else - result=no - fi -fi -rm -f conftest.* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5 -$as_echo "$result" >&6; } -if test $result = yes; then - : -else - testlist_pass=no -fi - ;; - hppa-level-2.0) { $as_echo "$as_me:${as_lineno-$LINENO}: checking $cc $cflags assembler knows hppa 2.0" >&5 -$as_echo_n "checking $cc $cflags assembler knows hppa 2.0... " >&6; } -result=no -cat >conftest.s <<EOF - .level 2.0 -EOF -gmp_compile="$cc $cflags -c conftest.s >&5 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - result=yes -else - echo "failed program was" >&5 - cat conftest.s >&5 -fi -rm -f conftest* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5 -$as_echo "$result" >&6; } -if test "$result" = yes; then - : -else - testlist_pass=no -fi - ;; - sizeof*) echo "configure: testlist $tst" >&5 -gmp_sizeof_type=`echo "$tst" | sed 's/sizeof-\([a-z]*\).*/\1/'` -gmp_sizeof_want=`echo "$tst" | sed 's/sizeof-[a-z]*-\([0-9]*\).*/\1/'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler $cc $cflags has sizeof($gmp_sizeof_type)==$gmp_sizeof_want" >&5 -$as_echo_n "checking compiler $cc $cflags has sizeof($gmp_sizeof_type)==$gmp_sizeof_want... " >&6; } -cat >conftest.c <<EOF -int -main () -{ - static int test_array [1 - 2 * (long) (sizeof ($gmp_sizeof_type) != $gmp_sizeof_want)]; - test_array[0] = 0; - return 0; -} -EOF -gmp_c_testlist_sizeof=no -gmp_compile="$cc $cflags -c conftest.c >&5" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - gmp_c_testlist_sizeof=yes -fi -rm -f conftest* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_c_testlist_sizeof" >&5 -$as_echo "$gmp_c_testlist_sizeof" >&6; } -if test $gmp_c_testlist_sizeof = yes; then - : -else - testlist_pass=no -fi - ;; - esac - if test $testlist_pass = no; then break; fi - done - - if test $testlist_pass = yes; then - found_compiler=yes - break - fi - done - - if test $found_compiler = yes; then break; fi - done - - if test $found_compiler = yes; then break; fi - done - - if test $found_compiler = yes; then break; fi -done - - -# If we recognised the CPU, as indicated by $path being set, then insist -# that we have a working compiler, either from our $cclist choices or from -# $CC. We can't let AC_PROG_CC look around for a compiler because it might -# find one that we've rejected (for not supporting the modes our asm code -# demands, etc). -# -# If we didn't recognise the CPU (and this includes host_cpu=none), then -# fall through and let AC_PROG_CC look around for a compiler too. This is -# mostly in the interests of following a standard autoconf setup, after all -# we've already tested cc and gcc adequately (hopefully). As of autoconf -# 2.50 the only thing AC_PROG_CC really adds is a check for "cl" (Microsoft -# C on MS-DOS systems). -# -if test $found_compiler = no && test -n "$path"; then - as_fn_error $? "could not find a working compiler, see config.log for details" "$LINENO" 5 -fi - -case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | cabylake*-*-*) - # If the user asked for a fat build, override the path and flags set above - if test $enable_fat = yes; then - gcc_cflags_cpu="" - gcc_cflags_arch="" - - fat_functions="add_n addmul_1 bdiv_dbm1c com cnd_add_n cnd_sub_n - copyd copyi dive_1 divrem_1 - gcd_1 lshift lshiftc mod_1 mod_1_1 mod_1_1_cps mod_1_2 - mod_1_2_cps mod_1_4 mod_1_4_cps mod_34lsub1 mode1o mul_1 - mul_basecase mullo_basecase pre_divrem_1 pre_mod_1 redc_1 - redc_2 rshift sqr_basecase sub_n submul_1" - - if test "$abi" = 32; then - extra_functions="$extra_functions fat fat_entry" - path="x86/fat x86" - fat_path="x86 x86/fat x86/i486 - x86/k6 x86/k6/mmx x86/k6/k62mmx - x86/k7 x86/k7/mmx - x86/k8 x86/k10 x86/bobcat - x86/pentium x86/pentium/mmx - x86/p6 x86/p6/mmx x86/p6/p3mmx x86/p6/sse2 - x86/pentium4 x86/pentium4/mmx x86/pentium4/sse2 - x86/core2 x86/coreinhm x86/coreisbr - x86/atom x86/atom/mmx x86/atom/sse2 x86/nano" - fi - - if test "$abi" = 64; then - gcc_64_cflags="" - extra_functions_64="$extra_functions_64 fat fat_entry" - path_64="x86_64/fat x86_64" - fat_path="x86_64 x86_64/fat - x86_64/k8 x86_64/k10 x86_64/bd1 x86_64/bobcat x86_64/pentium4 - x86_64/core2 x86_64/coreinhm x86_64/coreisbr x86_64/coreihwl - x86_64/coreibwl x86_64/skylake x86_64/atom x86_64/silvermont - x86_64/nano" - fat_functions="$fat_functions addmul_2 addlsh1_n addlsh2_n sublsh1_n" - fi - - fat_thresholds="MUL_TOOM22_THRESHOLD MUL_TOOM33_THRESHOLD - SQR_TOOM2_THRESHOLD SQR_TOOM3_THRESHOLD - BMOD_1_TO_MOD_1_THRESHOLD" - fi - ;; -esac - - -if test $found_compiler = yes; then - - # If we're creating CFLAGS, then look for optional additions. If the user - # set CFLAGS then leave it alone. - # - if test "$test_CFLAGS" != set; then - eval optlist=\"\$${ccbase}${abi1}_cflags_optlist\" - test -n "$optlist" || eval optlist=\"\$${ccbase}${abi2}_cflags_optlist\" - - for opt in $optlist; do - eval optflags=\"\$${ccbase}${abi1}_cflags_${opt}\" - test -n "$optflags" || eval optflags=\"\$${ccbase}${abi2}_cflags_${opt}\" - test -n "$optflags" || eval optflags=\"\$${ccbase}_cflags_${opt}\" - - for flag in $optflags; do - - # ~ represents a space in an option spec - flag=`echo "$flag" | tr '~' ' '` - - case $flag in - -march=pentium4 | -march=k8) - # For -march settings which enable SSE2 we exclude certain bad - # gcc versions and we need an OS knowing how to save xmm regs. - # - # This is only for ABI=32, any 64-bit gcc is good and any OS - # knowing x86_64 will know xmm. - # - # -march=k8 was only introduced in gcc 3.3, so we shouldn't need - # the GMP_GCC_PENTIUM4_SSE2 check (for gcc 3.2 and prior). But - # it doesn't hurt to run it anyway, sharing code with the - # pentium4 case. - # - if test "$abi" = 32; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc is good for sse2" >&5 -$as_echo_n "checking whether gcc is good for sse2... " >&6; } -case `$cc $cflags $cppflags -dumpversion` in - 3.[012] | 3.[012].*) result=no ;; - *) result=yes ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5 -$as_echo "$result" >&6; } -if test "$result" = yes; then - : -else - continue -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the operating system supports XMM registers" >&5 -$as_echo_n "checking whether the operating system supports XMM registers... " >&6; } -if ${gmp_cv_os_x86_xmm+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$build" = "$host"; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.s <<EOF - .text -main: -_main: - .globl main - .globl _main - .byte 0x0f, 0x57, 0xc0 - xorl %eax, %eax - ret -EOF - gmp_compile="$cc $cflags $cppflags conftest.s -o conftest >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - gmp_cv_os_x86_xmm=yes - else - gmp_cv_os_x86_xmm=no - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Oops, cannot compile test program" >&5 -$as_echo "$as_me: WARNING: Oops, cannot compile test program" >&2;} - fi - rm -f conftest* -fi - -if test -z "$gmp_cv_os_x86_xmm"; then - case $host_os in - freebsd[123] | freebsd[123].*) - gmp_cv_os_x86_xmm=no ;; - freebsd*) - gmp_cv_os_x86_xmm=yes ;; - *) - gmp_cv_os_x86_xmm=probably ;; - esac -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_os_x86_xmm" >&5 -$as_echo "$gmp_cv_os_x86_xmm" >&6; } - -if test "$gmp_cv_os_x86_xmm" = probably; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not certain of OS support for xmm when cross compiling." >&5 -$as_echo "$as_me: WARNING: Not certain of OS support for xmm when cross compiling." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Will assume it's ok, expect a SIGILL if this is wrong." >&5 -$as_echo "$as_me: WARNING: Will assume it's ok, expect a SIGILL if this is wrong." >&2;} -fi - -case $gmp_cv_os_x86_xmm in -no) - continue - ;; -*) - - ;; -esac - - fi - ;; - -no-cpp-precomp) - # special check, avoiding a warning - if test "$ccbase" = gcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler $cc $cflags -no-cpp-precomp" >&5 -$as_echo_n "checking compiler $cc $cflags -no-cpp-precomp... " >&6; } - result=no - cat >conftest.c <<EOF -int main () { return 0; } -EOF - gmp_compile="$cc $cflags -no-cpp-precomp conftest.c >conftest.out 2>&1" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if grep "unrecognized option.*-no-cpp-precomp" conftest.out >/dev/null; then : ; - else - result=yes - fi - fi - cat conftest.out >&5 - rm -f conftest* a.out b.out a.exe a_out.exe - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5 -$as_echo "$result" >&6; } - if test "$result" = yes; then - cflags="$cflags $flag" - break - else - continue - fi -fi - - ;; - -Wa,-m*) - case $host in - alpha*-*-*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler $cc $cflags $flag" >&5 -$as_echo_n "checking assembler $cc $cflags $flag... " >&6; } -result=no -cat >conftest.c <<EOF -int main () {} -EOF -gmp_compile="$cc $cflags $flag -c conftest.c >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if grep "Unknown CPU identifier" conftest.out >/dev/null; then : ; - else - result=yes - fi -fi -cat conftest.out >&5 -rm -f conftest* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5 -$as_echo "$result" >&6; } -if test "$result" = yes; then - : -else - continue -fi - - ;; - esac - ;; - -Wa,-oldas) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cc $cflags $cppflags -Wa,-oldas" >&5 -$as_echo_n "checking for $cc $cflags $cppflags -Wa,-oldas... " >&6; } -result=no -cat >conftest.c <<EOF -EOF -echo "with empty conftest.c" >&5 -gmp_compile="$cc $cflags $cppflags -c conftest.c >&5 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : ; -else - # empty fails - gmp_compile="$cc $cflags $cppflags -Wa,-oldas -c conftest.c >&5 2>&1" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # but with -Wa,-oldas it works - result=yes - fi -fi -rm -f conftest* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5 -$as_echo "$result" >&6; } -if test "$result" = yes; then - cflags="$cflags $flag" - break -else - continue -fi - - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler $cc $cflags $cppflags $flag" >&5 -$as_echo_n "checking compiler $cc $cflags $cppflags $flag... " >&6; } -gmp_prog_cc_works=yes - -# first see a simple "main()" works, then go on to other checks -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF - -int main () { return 0; } -EOF - echo "Test compile: " >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no" - ;; - norun) - gmp_prog_cc_works="no, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 - (without -maix64), hence detecting an unusable compiler */ -void *g() { return (void *) 0; } -void *f() { return g(); } - -int main () { return 0; } -EOF - echo "Test compile: function pointer return" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, function pointer return" - ;; - norun) - gmp_prog_cc_works="no, function pointer return, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an invalid instruction syntax from i386 gcc - -march=pentiumpro on Solaris 2.8. The native sun assembler - requires a non-standard syntax for cmov which gcc (as of 2.95.2 at - least) doesn't know. */ -int n; -int cmov () { return (n >= 0 ? n : 0); } - -int main () { return 0; } -EOF - echo "Test compile: cmov instruction" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, cmov instruction" - ;; - norun) - gmp_prog_cc_works="no, cmov instruction, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes a linker invocation problem with gcc 3.0.3 - on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 - option causes gcc to incorrectly select the 32-bit libgcc.a, not - the 64-bit one, and consequently it misses out on the __fixunsdfdi - helper (double -> uint64 conversion). */ -double d; -unsigned long gcc303 () { return (unsigned long) d; } - -int main () { return 0; } -EOF - echo "Test compile: double -> ulong conversion" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, double -> ulong conversion" - ;; - norun) - gmp_prog_cc_works="no, double -> ulong conversion, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if - the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 - instruction, and a negation like this comes out using it. */ -double fneg_data; -unsigned long fneg () { return -fneg_data; } - -int main () { return 0; } -EOF - echo "Test compile: double negation" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, double negation" - ;; - norun) - gmp_prog_cc_works="no, double negation, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn - (cvtsd2ss) which will provoke an error if the assembler doesn't recognise - those instructions. Not sure how much of the gmp code will come out - wanting sse2, but it's easiest to reject an option we know is bad. */ -double ftod_data; -float ftod () { return (float) ftod_data; } - -int main () { return 0; } -EOF - echo "Test compile: double -> float conversion" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, double -> float conversion" - ;; - norun) - gmp_prog_cc_works="no, double -> float conversion, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal compiler error from gcc version - "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char - values being spilled into floating point registers. The problem doesn't - show up all the time, but has occurred enough in GMP for us to reject - this compiler+flags. */ -#include <string.h> /* for memcpy */ -struct try_t -{ - char dst[2]; - char size; - long d0, d1, d2, d3, d4, d5, d6; - char overlap; -}; -struct try_t param[6]; -int -param_init () -{ - struct try_t *p; - memcpy (p, ¶m[ 2 ], sizeof (*p)); - memcpy (p, ¶m[ 2 ], sizeof (*p)); - p->size = 2; - memcpy (p, ¶m[ 1 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 2; - memcpy (p, ¶m[ 3 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 8; - memcpy (p, ¶m[ 4 ], sizeof (*p)); - memcpy (p, ¶m[ 4 ], sizeof (*p)); - p->overlap = 8; - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - return 0; -} - -int main () { return 0; } -EOF - echo "Test compile: gnupro alpha ev6 char spilling" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, gnupro alpha ev6 char spilling" - ;; - norun) - gmp_prog_cc_works="no, gnupro alpha ev6 char spilling, program does not run" - ;; - esac -fi - - - - -# __builtin_alloca is not available everywhere, check it exists before -# seeing that it works -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -int k; int foo () { __builtin_alloca (k); } -EOF - echo "Test compile: __builtin_alloca availability" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal compiler error from Itanium HP-UX cc - under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ -int k; -int foo () -{ - int i, **a; - a = __builtin_alloca (k); - for (i = 0; i <= k; i++) - a[i] = __builtin_alloca (1 << i); -} - -int main () { return 0; } -EOF - echo "Test compile: alloca array" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, alloca array" - ;; - norun) - gmp_prog_cc_works="no, alloca array, program does not run" - ;; - esac -fi - - - - ;; - no) - - ;; - norun) - - ;; - esac -fi - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal error from the assembler on - power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this - results in "Internal error related to the source program domain". - - For reference it seems to be the combination of nabs+fcirz which is bad, - not either alone. This sort of thing occurs in mpz/get_str.c with the - way double chars_per_bit_exactly is applied in MPN_SIZEINBASE. Perhaps - if that code changes to a scaled-integer style then we won't need this - test. */ - -double fp[1]; -int x; -int f () -{ - int a; - a = (x >= 0 ? x : -x); - return a * fp[0]; -} - -int main () { return 0; } -EOF - echo "Test compile: abs int -> double conversion" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, abs int -> double conversion" - ;; - norun) - gmp_prog_cc_works="no, abs int -> double conversion, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes a segfault in the compiler on powerpc-apple-darwin. - Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to segfault with e.g., -O2 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -typedef unsigned long long t1;typedef t1*t2; -void g(){} -void h(){} -static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) -{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;} -void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i; -for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}} -#else -int dummy; -#endif - -int main () { return 0; } -EOF - echo "Test compile: long long reliability test 1" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, long long reliability test 1" - ;; - norun) - gmp_prog_cc_works="no, long long reliability test 1, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal compiler error on powerpc-apple-darwin. - Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to get an ICE with -O1 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int g(); -void f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();} -int g(){return 0;} -#else -int dummy; -#endif - -int main () { return 0; } -EOF - echo "Test compile: long long reliability test 2" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, long long reliability test 2" - ;; - norun) - gmp_prog_cc_works="no, long long reliability test 2, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* Provokes an ICE on i386-freebsd with the FreeBSD-hacked gcc, under - -O2 -march=amdfam10. We call helper functions here "open" and "close" in - order for linking to succeed. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int open(int*,int*,int);void*close(int);void g(int*rp,int*up,int un){ -__builtin_expect(un<=0x7f00,1)?__builtin_alloca(un):close(un);if(__builtin_clzl -(up[un])){open(rp,up,un);while(1){if(rp[un-1]!=0)break;un--;}}} -#else -int dummy; -#endif - -int main () { return 0; } -EOF - echo "Test compile: freebsd hacked gcc" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, freebsd hacked gcc" - ;; - norun) - gmp_prog_cc_works="no, freebsd hacked gcc, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following is mis-compiled by HP ia-64 cc version - cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003] - under "cc +O3", both in +DD32 and +DD64 modes. The mpn_lshift_com gets - inlined and its return value somehow botched to be 0 instead of 1. This - arises in the real mpn_lshift_com in mul_fft.c. A lower optimization - level, like +O2 seems ok. This code needs to be run to show the problem, - but that's fine, the offending cc is a native-only compiler so we don't - have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -unsigned long -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long retval, high_limb, low_limb; - unsigned tnc; - long i; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *up++; - retval = low_limb >> tnc; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *up++; - *rp++ = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - return retval; -} -int -main () -{ - unsigned long cy, rp[2], up[2]; - up[0] = ~ 0L; - up[1] = 0; - cy = lshift_com (rp, up, 2L, 1); - if (cy != 1L) - return 1; - return 0; -} -#else -int -main () -{ - return 0; -} -#endif - -EOF - echo "Test compile: mpn_lshift_com optimization" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, mpn_lshift_com optimization" - ;; - norun) - gmp_prog_cc_works="no, mpn_lshift_com optimization, program does not run" - ;; - esac -fi - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following is mis-compiled by Intel ia-64 icc version 1.8 under - "icc -O3", After several calls, the function writes partial garbage to - the result vector. Perhaps relates to the chk.a.nc insn. This code needs - to be run to show the problem, but that's fine, the offending cc is a - native-only compiler so we don't have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -#include <stdlib.h> -void -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long high_limb, low_limb; - unsigned tnc; - long i; - up += n; - rp += n; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *--up; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *--up; - *--rp = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - *--rp = ~high_limb; -} -int -main () -{ - unsigned long *r, *r2; - unsigned long a[88 + 1]; - long i; - for (i = 0; i < 88 + 1; i++) - a[i] = ~0L; - r = malloc (10000 * sizeof (unsigned long)); - r2 = r; - for (i = 0; i < 528; i += 22) - { - lshift_com (r2, a, - i / (8 * sizeof (unsigned long)) + 1, - i % (8 * sizeof (unsigned long))); - r2 += 88 + 1; - } - if (r[2048] != 0 || r[2049] != 0 || r[2050] != 0 || r[2051] != 0 || - r[2052] != 0 || r[2053] != 0 || r[2054] != 0) - abort (); - return 0; -} -#else -int -main () -{ - return 0; -} -#endif - -EOF - echo "Test compile: mpn_lshift_com optimization 2" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, mpn_lshift_com optimization 2" - ;; - norun) - gmp_prog_cc_works="no, mpn_lshift_com optimization 2, program does not run" - ;; - esac -fi - - - - -# A certain _GLOBAL_OFFSET_TABLE_ problem in past versions of gas, tickled -# by recent versions of gcc. -# -if test "$gmp_prog_cc_works" = yes; then - case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*) - # this problem only arises in PIC code, so don't need to test when - # --disable-shared. We don't necessarily have $enable_shared set to - # yes at this point, it will still be unset for the default (which is - # yes); hence the use of "!= no". - if test "$enable_shared" != no; then - echo "Testing gcc GOT with eax emitted" >&5 -cat >conftest.c <<\EOF -int foo; -int bar () { return foo; } -EOF -tmp_got_emitted=no -gmp_compile="$cc $cflags $cppflags $flag -fPIC -S conftest.c >&5 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if grep "addl.*_GLOBAL_OFFSET_TABLE_.*eax" conftest.s >/dev/null; then - tmp_got_emitted=yes - fi -fi -rm -f conftest.* -echo "Result: $tmp_got_emitted" >&5 -if test "$tmp_got_emitted" = yes; then - echo "Testing gas GOT with eax good" >&5 -cat >conftest.awk <<\EOF -BEGIN { - want[0] = "001" - want[1] = "043" - want[2] = "105" - want[3] = "147" - want[4] = "211" - want[5] = "253" - want[6] = "315" - want[7] = "357" - - want[8] = "005" - want[9] = "002" - want[10] = "000" - want[11] = "000" - want[12] = "000" - - want[13] = "376" - want[14] = "334" - want[15] = "272" - want[16] = "230" - want[17] = "166" - want[18] = "124" - want[19] = "062" - want[20] = "020" - - result = "yes" -} -{ - for (f = 2; f <= NF; f++) - { - for (i = 0; i < 20; i++) - got[i] = got[i+1]; - got[20] = $f; - - found = 1 - for (i = 0; i < 21; i++) - if (got[i] != want[i]) - { - found = 0 - break - } - if (found) - { - result = "no" - exit - } - } -} -END { - print result -} -EOF -cat >conftest.s <<\EOF - .text - .byte 1, 35, 69, 103, 137, 171, 205, 239 - addl $_GLOBAL_OFFSET_TABLE_, %eax - .byte 254, 220, 186, 152, 118, 84, 50, 16 -EOF -tmp_got_good=yes -gmp_compile="$cc $cflags $cppflags $flag -fPIC -o conftest.o -c conftest.s >&5 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - tmp_got_good=`od -b conftest.o | $AWK -f conftest.awk` -fi -rm -f conftest.* -echo "Result: $tmp_got_good" >&5 -if test "$tmp_got_good" = no; then - gmp_prog_cc_works="no, bad gas GOT with eax" -else - : -fi - -else - : -fi - - fi - ;; - esac -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_prog_cc_works" >&5 -$as_echo "$gmp_prog_cc_works" >&6; } -case $gmp_prog_cc_works in - yes) - cflags="$cflags $flag" - break - ;; - *) - - ;; -esac - - done - done - fi - - ABI="$abi" - CC="$cc" - CFLAGS="$cflags" - CPPFLAGS="$cppflags" - eval GMP_NONSTD_ABI=\"\$GMP_NONSTD_ABI_$ABI\" - - # Could easily have this in config.h too, if desired. - ABI_nodots=`echo $ABI | sed 's/\./_/'` - -echo "define_not_for_expansion(\`HAVE_ABI_$ABI_nodots')" >> $gmp_tmpconfigm4p - - - - # GMP_LDFLAGS substitution, selected according to ABI. - # These are needed on libgmp.la and libmp.la, but currently not on - # convenience libraries like tune/libspeed.la or mpz/libmpz.la. - # - eval GMP_LDFLAGS=\"\$${ccbase}${abi1}_ldflags\" - test -n "$GMP_LDFLAGS" || eval GMP_LDFLAGS=\"\$${ccbase}${abi1}_ldflags\" - - - - - # extra_functions, selected according to ABI - eval tmp=\"\$extra_functions$abi1\" - test -n "$tmp" || eval tmp=\"\$extra_functions$abi2\" - extra_functions="$tmp" - - - # Cycle counter, selected according to ABI. - # - eval tmp=\"\$SPEED_CYCLECOUNTER_OBJ$abi1\" - test -n "$tmp" || eval tmp=\"\$SPEED_CYCLECOUNTER_OBJ$abi2\" - SPEED_CYCLECOUNTER_OBJ="$tmp" - eval tmp=\"\$cyclecounter_size$abi1\" - test -n "$tmp" || eval tmp=\"\$cyclecounter_size$abi2\" - cyclecounter_size="$tmp" - - if test -n "$SPEED_CYCLECOUNTER_OBJ"; then - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_SPEED_CYCLECOUNTER $cyclecounter_size -_ACEOF - - fi - - - - # Calling conventions checking, selected according to ABI. - # - eval tmp=\"\$CALLING_CONVENTIONS_OBJS$abi1\" - test -n "$tmp" || eval tmp=\"\$CALLING_CONVENTIONS_OBJS$abi2\" - if test "$enable_assembly" = "yes"; then - CALLING_CONVENTIONS_OBJS="$tmp" - else - CALLING_CONVENTIONS_OBJS="" - fi - - if test -n "$CALLING_CONVENTIONS_OBJS"; then - -$as_echo "@%:@define HAVE_CALLING_CONVENTIONS 1" >>confdefs.h - - fi - - -fi - - -# If the user gave an MPN_PATH, use that verbatim, otherwise choose -# according to the ABI and add "generic". -# -if test -n "$MPN_PATH"; then - path="$MPN_PATH" -else - eval tmp=\"\$path$abi1\" - test -n "$tmp" || eval tmp=\"\$path$abi2\" - path="$tmp generic" -fi - - -# Long long limb setup for gmp.h. -case $limb_chosen in -longlong) DEFN_LONG_LONG_LIMB="#define _LONG_LONG_LIMB 1" ;; -*) DEFN_LONG_LONG_LIMB="/* #undef _LONG_LONG_LIMB */" ;; -esac - - - -# The C compiler and preprocessor, put into ANSI mode if possible. -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $@%:@ != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <stdio.h> -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdarg.h> -#include <stdio.h> -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - case $ac_cv_prog_cc_stdc in @%:@( - no) : - ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; @%:@( - *) : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 -$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } -if ${ac_cv_prog_cc_c99+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdarg.h> -#include <stdbool.h> -#include <stdlib.h> -#include <wchar.h> -#include <stdio.h> - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -#define debug(...) fprintf (stderr, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - your preprocessor is broken; -#endif -#if BIG_OK -#else - your preprocessor is broken; -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\0'; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static void -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str; - int number; - float fnumber; - - while (*format) - { - switch (*format++) - { - case 's': // string - str = va_arg (args_copy, const char *); - break; - case 'd': // int - number = va_arg (args_copy, int); - break; - case 'f': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); -} - -int -main () -{ - - // Check bool. - _Bool success = false; - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - test_varargs ("s, d' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' - || dynamic_array[ni.number - 1] != 543); - - ; - return 0; -} -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c99" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c99" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c99" != xno; then : - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdarg.h> -#include <stdio.h> -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 -else - ac_cv_prog_cc_stdc=no -fi - -fi - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 -$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } - if ${ac_cv_prog_cc_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -fi - - case $ac_cv_prog_cc_stdc in @%:@( - no) : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; @%:@( - '') : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; @%:@( - *) : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 -$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; -esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include <limits.h> -@%:@else -@%:@ include <assert.h> -@%:@endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <ac_nonexistent.h> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include <limits.h> -@%:@else -@%:@ include <assert.h> -@%:@endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <ac_nonexistent.h> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# The C compiler on the build system, and associated tests. - -if test -n "$CC_FOR_BUILD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $CC_FOR_BUILD" >&5 -$as_echo_n "checking build system compiler $CC_FOR_BUILD... " >&6; } -# remove anything that might look like compiler output to our "||" expression -rm -f conftest* a.out b.out a.exe a_out.exe -cat >conftest.c <<EOF -int -main () -{ - return 0; -} -EOF -gmp_compile="$CC_FOR_BUILD conftest.c" -cc_for_build_works=no -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then - cc_for_build_works=yes - fi -fi -rm -f conftest* a.out b.out a.exe a_out.exe -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_for_build_works" >&5 -$as_echo "$cc_for_build_works" >&6; } -if test "$cc_for_build_works" = yes; then - : -else - as_fn_error $? "Specified CC_FOR_BUILD doesn't seem to work" "$LINENO" 5 -fi - -elif test -n "$HOST_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $HOST_CC" >&5 -$as_echo_n "checking build system compiler $HOST_CC... " >&6; } -# remove anything that might look like compiler output to our "||" expression -rm -f conftest* a.out b.out a.exe a_out.exe -cat >conftest.c <<EOF -int -main () -{ - return 0; -} -EOF -gmp_compile="$HOST_CC conftest.c" -cc_for_build_works=no -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then - cc_for_build_works=yes - fi -fi -rm -f conftest* a.out b.out a.exe a_out.exe -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_for_build_works" >&5 -$as_echo "$cc_for_build_works" >&6; } -if test "$cc_for_build_works" = yes; then - CC_FOR_BUILD=$HOST_CC -else - as_fn_error $? "Specified HOST_CC doesn't seem to work" "$LINENO" 5 -fi - -else - for i in "$CC" "$CC $CFLAGS $CPPFLAGS" cc gcc c89 c99; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $i" >&5 -$as_echo_n "checking build system compiler $i... " >&6; } -# remove anything that might look like compiler output to our "||" expression -rm -f conftest* a.out b.out a.exe a_out.exe -cat >conftest.c <<EOF -int -main () -{ - return 0; -} -EOF -gmp_compile="$i conftest.c" -cc_for_build_works=no -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then - cc_for_build_works=yes - fi -fi -rm -f conftest* a.out b.out a.exe a_out.exe -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_for_build_works" >&5 -$as_echo "$cc_for_build_works" >&6; } -if test "$cc_for_build_works" = yes; then - CC_FOR_BUILD=$i - break -else - : -fi - - done - if test -z "$CC_FOR_BUILD"; then - as_fn_error $? "Cannot find a build system compiler" "$LINENO" 5 - fi -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system preprocessor" >&5 -$as_echo_n "checking for build system preprocessor... " >&6; } -if test -z "$CPP_FOR_BUILD"; then - if ${gmp_cv_prog_cpp_for_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.c <<EOF -#define FOO BAR -EOF - for i in "$CC_FOR_BUILD -E" "$CC_FOR_BUILD -E -traditional-cpp" "/lib/cpp"; do - gmp_compile="$i conftest.c" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >&5 2>&1; then - gmp_cv_prog_cpp_for_build=$i - break - fi - done - rm -f conftest* a.out b.out a.exe a_out.exe - if test -z "$gmp_cv_prog_cpp_for_build"; then - as_fn_error $? "Cannot find build system C preprocessor." "$LINENO" 5 - fi - -fi - - CPP_FOR_BUILD=$gmp_cv_prog_cpp_for_build -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP_FOR_BUILD" >&5 -$as_echo "$CPP_FOR_BUILD" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system executable suffix" >&5 -$as_echo_n "checking for build system executable suffix... " >&6; } -if ${gmp_cv_prog_exeext_for_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.c <<EOF -int -main () -{ - return 0; -} -EOF -for i in .exe ,ff8 ""; do - gmp_compile="$CC_FOR_BUILD conftest.c -o conftest$i" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if (./conftest) 2>&5; then - gmp_cv_prog_exeext_for_build=$i - break - fi - fi -done -rm -f conftest* -if test "${gmp_cv_prog_exeext_for_build+set}" != set; then - as_fn_error $? "Cannot determine executable suffix" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_prog_exeext_for_build" >&5 -$as_echo "$gmp_cv_prog_exeext_for_build" >&6; } -EXEEXT_FOR_BUILD=$gmp_cv_prog_exeext_for_build - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build system compiler is ANSI" >&5 -$as_echo_n "checking whether build system compiler is ANSI... " >&6; } -if ${gmp_cv_c_for_build_ansi+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.c <<EOF -int -main (int argc, char **argv) -{ - return 0; -} -EOF -gmp_compile="$CC_FOR_BUILD conftest.c" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - gmp_cv_c_for_build_ansi=yes -else - gmp_cv_c_for_build_ansi=no -fi -rm -f conftest* a.out b.out a.exe a_out.exe - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_for_build_ansi" >&5 -$as_echo "$gmp_cv_c_for_build_ansi" >&6; } -if test "$gmp_cv_c_for_build_ansi" = yes; then - U_FOR_BUILD= -else - U_FOR_BUILD=_ - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system compiler math library" >&5 -$as_echo_n "checking for build system compiler math library... " >&6; } -if ${gmp_cv_check_libm_for_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.c <<EOF -#include <math.h> -int -main () -{ - return 0; -} -double d; -double -foo () -{ - return log (d); -} -EOF -gmp_compile="$CC_FOR_BUILD conftest.c -lm" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - gmp_cv_check_libm_for_build=-lm -else - gmp_cv_check_libm_for_build=no -fi -rm -f conftest* a.out b.out a.exe a_out.exe - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_check_libm_for_build" >&5 -$as_echo "$gmp_cv_check_libm_for_build" >&6; } -case $gmp_cv_check_libm_for_build in - yes) LIBM_FOR_BUILD=-lm - ;; - no) LIBM_FOR_BUILD= ;; - *) LIBM_FOR_BUILD=$gmp_cv_check_libm_for_build ;; -esac - - - -# How to assemble, used with CFLAGS etc, see mpn/Makeasm.am. -# Using the compiler is a lot easier than figuring out how to invoke the -# assembler directly. -# -test -n "$CCAS" || CCAS="$CC -c" - - - -# The C++ compiler, if desired. -want_cxx=no -if test $enable_cxx != no; then - test_CXXFLAGS=${CXXFLAGS+set} - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&5 - cxxflags_ac_prog_cxx=$CXXFLAGS - cxxflags_list=ac_prog_cxx - - # If the user didn't specify $CXXFLAGS, then try $CFLAGS, with -g removed - # if AC_PROG_CXX thinks that doesn't work. $CFLAGS stands a good chance - # of working, eg. on a GNU system where CC=gcc and CXX=g++. - # - if test "$test_CXXFLAGS" != set; then - cxxflags_cflags=$CFLAGS - cxxflags_list="cflags $cxxflags_list" - if test "$ac_prog_cxx_g" = no; then - cxxflags_cflags=`echo "$cxxflags_cflags" | sed -e 's/ -g //' -e 's/^-g //' -e 's/ -g$//'` - fi - fi - - # See if the C++ compiler works. If the user specified CXXFLAGS then all - # we're doing is checking whether AC_PROG_CXX succeeded, since it doesn't - # give a fatal error, just leaves CXX set to a default g++. If on the - # other hand the user didn't specify CXXFLAGS then we get to try here our - # $cxxflags_list alternatives. - # - # Automake includes $CPPFLAGS in a C++ compile, so we do the same here. - # - for cxxflags_choice in $cxxflags_list; do - eval CXXFLAGS=\"\$cxxflags_$cxxflags_choice\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler $CXX $CPPFLAGS $CXXFLAGS" >&5 -$as_echo_n "checking C++ compiler $CXX $CPPFLAGS $CXXFLAGS... " >&6; } -gmp_prog_cxx_works=yes - -# start with a plain "main()", then go on to further checks -if test "$gmp_prog_cxx_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.cc <<EOF - -int main (void) { return 0; } -EOF - echo "Test compile: " >&5 - gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_cxxcompile\""; } >&5 - (eval $gmp_cxxcompile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - gmp_prog_cxx_works="no, program does not run" - fi - fi - else - gmp_prog_cxx_works="no" - fi - case $gmp_prog_cxx_works in - no*) - echo "failed program was:" >&5 - cat conftest.cc >&5 - ;; - esac - rm -f conftest* a.out b.out a.exe a_out.exe -fi - - -if test "$gmp_prog_cxx_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.cc <<EOF -namespace foo { } -using namespace foo; - -int main (void) { return 0; } -EOF - echo "Test compile: namespace" >&5 - gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_cxxcompile\""; } >&5 - (eval $gmp_cxxcompile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - gmp_prog_cxx_works="no, namespace, program does not run" - fi - fi - else - gmp_prog_cxx_works="no, namespace" - fi - case $gmp_prog_cxx_works in - no*) - echo "failed program was:" >&5 - cat conftest.cc >&5 - ;; - esac - rm -f conftest* a.out b.out a.exe a_out.exe -fi - - -# GMP requires the standard C++ iostream classes -if test "$gmp_prog_cxx_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.cc <<EOF -/* This test rejects g++ 2.7.2 which doesn't have <iostream>, only a - pre-standard iostream.h. */ -#include <iostream> - -/* This test rejects OSF 5.1 Compaq C++ in its default pre-standard iostream - mode, since that mode puts cout in the global namespace, not "std". */ -void someoutput (void) { std::cout << 123; } - -int main (void) { return 0; } -EOF - echo "Test compile: std iostream" >&5 - gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_cxxcompile\""; } >&5 - (eval $gmp_cxxcompile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - gmp_prog_cxx_works="no, std iostream, program does not run" - fi - fi - else - gmp_prog_cxx_works="no, std iostream" - fi - case $gmp_prog_cxx_works in - no*) - echo "failed program was:" >&5 - cat conftest.cc >&5 - ;; - esac - rm -f conftest* a.out b.out a.exe a_out.exe -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_prog_cxx_works" >&5 -$as_echo "$gmp_prog_cxx_works" >&6; } -case $gmp_prog_cxx_works in - yes) - want_cxx=yes - break - ;; - *) - - ;; -esac - - done - - # If --enable-cxx=yes but a C++ compiler can't be found, then abort. - if test $want_cxx = no && test $enable_cxx = yes; then - as_fn_error $? "C++ compiler not available, see config.log for details" "$LINENO" 5 - fi -fi - - if test $want_cxx = yes; then - WANT_CXX_TRUE= - WANT_CXX_FALSE='#' -else - WANT_CXX_TRUE='#' - WANT_CXX_FALSE= -fi - - -# FIXME: We're not interested in CXXCPP for ourselves, but if we don't do it -# here then AC_PROG_LIBTOOL will AC_REQUIRE it (via _LT_AC_TAGCONFIG) and -# hence execute it unconditionally, and that will fail if there's no C++ -# compiler (and no generic /lib/cpp). -# -if test $want_cxx = yes; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include <limits.h> -@%:@else -@%:@ include <assert.h> -@%:@endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <ac_nonexistent.h> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include <limits.h> -@%:@else -@%:@ include <assert.h> -@%:@endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <ac_nonexistent.h> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi - - -# Path setups for Cray, according to IEEE or CFP. These must come after -# deciding the compiler. -# - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -case $host_cpu in - c90 | t90) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef _CRAYIEEE -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - add_path="cray/ieee" -else - add_path="cray/cfp"; extra_functions="mulwwc90" -fi -rm -f conftest* - - ;; - j90 | sv1) - add_path="cray/cfp"; extra_functions="mulwwj90" - ;; -esac - - - -if test -z "$MPN_PATH"; then - path="$add_path $path" -fi - -# For a nail build, also look in "nails" subdirectories. -# -if test $GMP_NAIL_BITS != 0 && test -z "$MPN_PATH"; then - new_path= - for i in $path; do - case $i in - generic) new_path="$new_path $i" ;; - *) new_path="$new_path $i/nails $i" ;; - esac - done - path=$new_path -fi - - -# Put all directories into CPUVEC_list so as to get a full set of -# CPUVEC_SETUP_$tmp_suffix defines into config.h, even if some of them are -# empty because mmx and/or sse2 had to be dropped. -# -for i in $fat_path; do - tmp_suffix=`echo $i | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'` - CPUVEC_list="$CPUVEC_list CPUVEC_SETUP_$tmp_suffix" -done - - -# If there's any sse2 or mmx in the path, check whether the assembler -# supports it, and remove if not. -# -# We only need this in ABI=32, for ABI=64 on x86_64 we can assume a new -# enough assembler. -# -case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | cabylake*-*-*) - if test "$ABI" = 32; then - case "$path $fat_path" in - *mmx*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler knows about MMX instructions" >&5 -$as_echo_n "checking if the assembler knows about MMX instructions... " >&6; } -if ${gmp_cv_asm_x86_mmx+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - .text - movq %mm0, %mm1 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_x86_mmx=yes -case $host in -*-*-solaris*) - if (dis conftest.$OBJEXT >conftest.out) 2>/dev/null; then - if grep "0f 6f c1" conftest.out >/dev/null; then - gmp_cv_asm_x86_mmx=movq-bug - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"dis\" not available to check for \"as\" movq bug" >&5 -$as_echo "$as_me: WARNING: \"dis\" not available to check for \"as\" movq bug" >&2;} - fi -esac -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_x86_mmx=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_mmx" >&5 -$as_echo "$gmp_cv_asm_x86_mmx" >&6; } - -case $gmp_cv_asm_x86_mmx in -movq-bug) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5 -$as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has MMX code, but the assembler" >&5 -$as_echo "$as_me: WARNING: | Host CPU has MMX code, but the assembler" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5 -$as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | has the Solaris 2.6 and 2.7 bug where register to register" >&5 -$as_echo "$as_me: WARNING: | has the Solaris 2.6 and 2.7 bug where register to register" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | movq operands are reversed." >&5 -$as_echo "$as_me: WARNING: | movq operands are reversed." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Non-MMX replacements will be used." >&5 -$as_echo "$as_me: WARNING: | Non-MMX replacements will be used." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5 -$as_echo "$as_me: WARNING: | This will be an inferior build." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - ;; -no) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5 -$as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has MMX code, but it can't be assembled by" >&5 -$as_echo "$as_me: WARNING: | Host CPU has MMX code, but it can't be assembled by" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5 -$as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Non-MMX replacements will be used." >&5 -$as_echo "$as_me: WARNING: | Non-MMX replacements will be used." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5 -$as_echo "$as_me: WARNING: | This will be an inferior build." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - ;; -esac -if test "$gmp_cv_asm_x86_mmx" = yes; then - : -else - tmp_path= -for i in $path; do - case $i in - */*mmx*) ;; - *) tmp_path="$tmp_path $i" ;; - esac -done -path="$tmp_path" - -tmp_path= -for i in $fat_path; do - case $i in - */*mmx*) ;; - *) tmp_path="$tmp_path $i" ;; - esac -done -fat_path="$tmp_path" - - -fi - ;; - esac - case "$path $fat_path" in - *sse2*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler knows about SSE2 instructions" >&5 -$as_echo_n "checking if the assembler knows about SSE2 instructions... " >&6; } -if ${gmp_cv_asm_x86_sse2+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - .text - paddq %mm0, %mm1 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_x86_sse2=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_x86_sse2=no -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_sse2" >&5 -$as_echo "$gmp_cv_asm_x86_sse2" >&6; } -case $gmp_cv_asm_x86_sse2 in -yes) - : - ;; -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5 -$as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has SSE2 code, but it can't be assembled by" >&5 -$as_echo "$as_me: WARNING: | Host CPU has SSE2 code, but it can't be assembled by" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5 -$as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Non-SSE2 replacements will be used." >&5 -$as_echo "$as_me: WARNING: | Non-SSE2 replacements will be used." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5 -$as_echo "$as_me: WARNING: | This will be an inferior build." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - tmp_path= -for i in $path; do - case $i in - */sse2) ;; - *) tmp_path="$tmp_path $i" ;; - esac -done -path="$tmp_path" - -tmp_path= -for i in $fat_path; do - case $i in - */sse2) ;; - *) tmp_path="$tmp_path $i" ;; - esac -done -fat_path="$tmp_path" - - - ;; -esac - ;; - esac - fi - case "$path $fat_path" in - *mulx*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler knows about the mulx instruction" >&5 -$as_echo_n "checking if the assembler knows about the mulx instruction... " >&6; } -if ${gmp_cv_asm_x86_mulx+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - .text - mulx %r8, %r9, %r10 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_x86_mulx=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_x86_mulx=no -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_mulx" >&5 -$as_echo "$gmp_cv_asm_x86_mulx" >&6; } -case $gmp_cv_asm_x86_mulx in -yes) - : - ;; -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5 -$as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has the mulx instruction, but it can't be" >&5 -$as_echo "$as_me: WARNING: | Host CPU has the mulx instruction, but it can't be" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | assembled by" >&5 -$as_echo "$as_me: WARNING: | assembled by" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5 -$as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Older x86 instructions will be used." >&5 -$as_echo "$as_me: WARNING: | Older x86 instructions will be used." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5 -$as_echo "$as_me: WARNING: | This will be an inferior build." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - tmp_path= -for i in $path; do - case $i in - */mulx) ;; - *) tmp_path="$tmp_path $i" ;; - esac -done -path="$tmp_path" - -tmp_path= -for i in $fat_path; do - case $i in - */mulx) ;; - *) tmp_path="$tmp_path $i" ;; - esac -done -fat_path="$tmp_path" - - - ;; -esac - ;; - esac - case "$path $fat_path" in - *adx*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler knows about the adox instruction" >&5 -$as_echo_n "checking if the assembler knows about the adox instruction... " >&6; } -if ${gmp_cv_asm_x86_adx+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - .text - adox %r8, %r9 - adcx %r8, %r9 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_x86_adx=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_x86_adx=no -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_adx" >&5 -$as_echo "$gmp_cv_asm_x86_adx" >&6; } -case $gmp_cv_asm_x86_adx in -yes) - : - ;; -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5 -$as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has the adcx and adox instructions, but they" >&5 -$as_echo "$as_me: WARNING: | Host CPU has the adcx and adox instructions, but they" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | can't be assembled by" >&5 -$as_echo "$as_me: WARNING: | can't be assembled by" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5 -$as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Older x86 instructions will be used." >&5 -$as_echo "$as_me: WARNING: | Older x86 instructions will be used." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5 -$as_echo "$as_me: WARNING: | This will be an inferior build." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - tmp_path= -for i in $path; do - case $i in - */adx) ;; - *) tmp_path="$tmp_path $i" ;; - esac -done -path="$tmp_path" - -tmp_path= -for i in $fat_path; do - case $i in - */adx) ;; - *) tmp_path="$tmp_path $i" ;; - esac -done -fat_path="$tmp_path" - - - ;; -esac - ;; - esac - ;; -esac - - -if test "$enable_assembly" = "no"; then - path="generic" - CFLAGS="$CFLAGS -DNO_ASM" -# for abi in $abilist; do -# eval unset "path_\$abi" -# eval gcc_${abi}_cflags=\"\$gcc_${abi}_cflags -DNO_ASM\" -# done -fi - - -cat >&5 <<EOF -Decided: -ABI=$ABI -CC=$CC -CFLAGS=$CFLAGS -CPPFLAGS=$CPPFLAGS -GMP_LDFLAGS=$GMP_LDFLAGS -CXX=$CXX -CXXFLAGS=$CXXFLAGS -path=$path -EOF -echo "using ABI=\"$ABI\"" -echo " CC=\"$CC\"" -echo " CFLAGS=\"$CFLAGS\"" -echo " CPPFLAGS=\"$CPPFLAGS\"" -if test $want_cxx = yes; then - echo " CXX=\"$CXX\"" - echo " CXXFLAGS=\"$CXXFLAGS\"" -fi -echo " MPN_PATH=\"$path\"" - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports --noexecstack option" >&5 -$as_echo_n "checking whether assembler supports --noexecstack option... " >&6; } -if ${cl_cv_as_noexecstack+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.c <<EOF -void foo() {} -EOF - if { ac_try='${CC} $CFLAGS $CPPFLAGS - -S -o conftest.s conftest.c >/dev/null' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } \ - && grep .note.GNU-stack conftest.s >/dev/null \ - && { ac_try='${CC} $CFLAGS $CPPFLAGS -Wa,--noexecstack - -c -o conftest.o conftest.s >/dev/null' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then - cl_cv_as_noexecstack=yes - else - cl_cv_as_noexecstack=no - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_as_noexecstack" >&5 -$as_echo "$cl_cv_as_noexecstack" >&6; } - if test "$cl_cv_as_noexecstack" = yes; then - ASMFLAGS="$ASMFLAGS -Wa,--noexecstack" - fi - - - - -gmp_user_AR=$AR -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="ar" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -if test -z "$gmp_user_AR"; then - eval arflags=\"\$ar${abi1}_flags\" - test -n "$arflags" || eval arflags=\"\$ar${abi2}_flags\" - if test -n "$arflags"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra ar flags" >&5 -$as_echo_n "checking for extra ar flags... " >&6; } - AR="$AR $arflags" - ac_cv_prog_AR="$AR $arflags" - ac_cv_prog_ac_ct_AR="$AR $arflags" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $arflags" >&5 -$as_echo "$arflags" >&6; } - fi -fi -if test -z "$AR_FLAGS"; then - AR_FLAGS=cq -fi - - -gmp_user_NM=$NM -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - - -# FIXME: When cross compiling (ie. $ac_tool_prefix not empty), libtool -# defaults to plain "nm" if a "${ac_tool_prefix}nm" is not found. In this -# case run it again to try the native "nm", firstly so that likely locations -# are searched, secondly so that -B or -p are added if necessary for BSD -# format. This is necessary for instance on OSF with "./configure -# --build=alphaev5-dec-osf --host=alphaev6-dec-osf". -# -if test -z "$gmp_user_NM" && test -n "$ac_tool_prefix" && test "$NM" = nm; then - $as_unset lt_cv_path_NM - gmp_save_ac_tool_prefix=$ac_tool_prefix - ac_tool_prefix= - NM= - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - - ac_tool_prefix=$gmp_save_ac_tool_prefix -fi - -if test -z "$gmp_user_NM"; then - eval nmflags=\"\$nm${abi1}_flags\" - test -n "$nmflags" || eval nmflags=\"\$nm${abi2}_flags\" - if test -n "$nmflags"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra nm flags" >&5 -$as_echo_n "checking for extra nm flags... " >&6; } - NM="$NM $nmflags" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nmflags" >&5 -$as_echo "$nmflags" >&6; } - fi -fi - - -case $host in - # FIXME: On AIX 3 and 4, $libname.a is included in libtool - # $library_names_spec, so libgmp.a becomes a symlink to libgmp.so, making - # it impossible to build shared and static libraries simultaneously. - # Disable shared libraries by default, but let the user override with - # --enable-shared --disable-static. - # - # FIXME: This $libname.a problem looks like it might apply to *-*-amigaos* - # and *-*-os2* too, but wait for someone to test this before worrying - # about it. If there is a problem then of course libtool is the right - # place to fix it. - # - *-*-aix[34]*) - if test -z "$enable_shared"; then enable_shared=no; fi ;; -esac - - -# Configs for Windows DLLs. - -enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AS="${ac_tool_prefix}as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AS="as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 -$as_echo "$ac_ct_AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AS" = x; then - AS="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AS=$ac_ct_AS - fi -else - AS="$ac_cv_prog_AS" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - - ;; -esac - -test -z "$AS" && AS=as - - - - - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - -LIBGMP_DLL=0 - -case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - # By default, build only static. - if test -z "$enable_shared"; then - enable_shared=no - fi - # Don't allow both static and DLL. - if test "$enable_shared" != no && test "$enable_static" != no; then - as_fn_error $? "cannot build both static and DLL, since gmp.h is different for each. -Use \"--disable-static --enable-shared\" to build just a DLL." "$LINENO" 5 - fi - - # "-no-undefined" is required when building a DLL, see documentation on - # AC_LIBTOOL_WIN32_DLL. - # - # "-Wl,--export-all-symbols" is a bit of a hack, it gets all libgmp and - # libgmpxx functions and variables exported. This is what libtool did - # in the past, and it's convenient for us in the test programs. - # - # Maybe it'd be prudent to check for --export-all-symbols before using - # it, but it seems to have been in ld since at least 2000, and there's - # not really any alternative we want to take up at the moment. - # - # "-Wl,output-def" is used to get a .def file for use by MS lib to make - # a .lib import library, described in the manual. libgmp-3.dll.def - # corresponds to the libmp-3.dll.def generated by libtool (as a result - # of -export-symbols on that library). - # - # Incidentally, libtool does generate an import library libgmp.dll.a, - # but it's "ar" format and cannot be used by the MS linker. There - # doesn't seem to be any GNU tool for generating or converting to .lib. - # - # FIXME: The .def files produced by -Wl,output-def include isascii, - # iscsym, iscsymf and toascii, apparently because mingw ctype.h doesn't - # inline isascii (used in gmp). It gives an extern inline for - # __isascii, but for some reason not the plain isascii. - # - if test "$enable_shared" = yes; then - GMP_LDFLAGS="$GMP_LDFLAGS -no-undefined -Wl,--export-all-symbols" - LIBGMP_LDFLAGS="$LIBGMP_LDFLAGS -Wl,--output-def,.libs/libgmp-3.dll.def" - LIBGMPXX_LDFLAGS="$LIBGMP_LDFLAGS -Wl,--output-def,.libs/libgmpxx-3.dll.def" - LIBGMP_DLL=1 - fi - ;; -esac - - -# Ensure that $CONFIG_SHELL is available for AC_LIBTOOL_SYS_MAX_CMD_LEN. -# It's often set already by _LT_AC_PROG_ECHO_BACKSLASH or -# _AS_LINENO_PREPARE, but not always. -# -# The symptom of CONFIG_SHELL unset is some "expr" errors during the test, -# and an empty result. This only happens when invoked as "sh configure", -# ie. no path, and can be seen for instance on ia64-*-hpux*. -# -# FIXME: Newer libtool should have it's own fix for this. -# -if test -z "$CONFIG_SHELL"; then - CONFIG_SHELL=$SHELL -fi - -# Enable CXX in libtool only if we want it, and never enable GCJ, nor RC on -# mingw and cygwin. Under --disable-cxx this avoids some error messages -# from libtool arising from the fact we didn't actually run AC_PROG_CXX. -# Notice that any user-supplied --with-tags setting takes precedence. -# -# FIXME: Is this the right way to get this effect? Very possibly not, but -# the current _LT_AC_TAGCONFIG doesn't really suggest an alternative. -# -if test "${with_tags+set}" != set; then - if test $want_cxx = yes; then - with_tags=CXX - else - with_tags= - fi -fi - -# The dead hand of AC_REQUIRE makes AC_PROG_LIBTOOL expand and execute -# AC_PROG_F77, even when F77 is not in the selected with_tags. This is -# probably harmless, but it's unsightly and bloats our configure, so pretend -# AC_PROG_F77 has been expanded already. -# -# FIXME: Rumour has it libtool will one day provide a way for a configure.in -# to say what it wants from among supported languages etc. -# -#AC_PROVIDE([AC_PROG_F77]) - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.6' -macro_revision='2.4.6' - - - - - - - - - - - - - -ltmain=$ac_aux_dir/ltmain.sh - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -@%:@ Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in - *GNU* | *'with BFD'*) - test no != "$with_gnu_ld" && break - ;; - *) - test yes != "$with_gnu_ld" && break - ;; - esac - fi - done - IFS=$lt_save_ifs -else - lt_cv_path_LD=$LD # Let the user override the test with a path. -fi -fi - -LD=$lt_cv_path_LD -if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 </dev/null` in -*GNU* | *'with BFD'*) - lt_cv_prog_gnu_ld=yes - ;; -*) - lt_cv_prog_gnu_ld=no - ;; -esac -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n "$lt_cv_sys_max_cmd_len"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test yes != "$GCC"; then - reload_cmds=false - fi - ;; - darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -@%:@ Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -if test -z "$lt_DD"; then - ac_path_lt_DD_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in dd; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_lt_DD" || continue -if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi - $ac_path_lt_DD_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_lt_DD"; then - : - fi -else - ac_cv_path_lt_DD=$lt_DD -fi - -rm -f conftest.i conftest2.i conftest.out -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } - - - - - - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in @S|@*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - -@%:@ Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x@S|@2 in - x) - ;; - *:) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" - ;; - x:*) - eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" - ;; - *) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - esac -} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <string.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ctype.h> -#include <stdlib.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - -func_stripname_cnf () -{ - case @S|@2 in - .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; - *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; - esac -} # func_stripname_cnf - - - - - -# Set options - - - - enable_dlopen=no - - - - @%:@ Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - @%:@ Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -@%:@ Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - pic_mode=default -fi - - - - - - - - - @%:@ Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[5-9]*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } - -@%:@ Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : - withval=$with_aix_soname; case $withval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_with_aix_soname=aix -fi - - with_aix_soname=$lt_cv_with_aix_soname -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -@%:@define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/${ac_tool_prefix}file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC=$CC -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test yes = "$GCC"; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - lt_prog_compiler_pic='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic@&t@ -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic@&t@ -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works"; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works"; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - export_dynamic_flag_spec='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='$wl--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - export_dynamic_flag_spec='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test no = "$ld_shlibs"; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct=no - hardcode_direct_absolute=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' $wl-bernotok' - allow_undefined_flag=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test yes = "$GCC"; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test yes = "$lt_cv_prog_compiler__b"; then - archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs=yes - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - else - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - osf3*) - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='$wl-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='$wl-z,text' - allow_undefined_flag='$wl-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='$wl-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test no = "$ld_shlibs" && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([A-Za-z]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib<name>.so - # instead of lib<name>.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - # Handle Gentoo/FreeBSD as it was Linux - case $host_vendor in - gentoo) - version_type=linux ;; - *) - version_type=freebsd-$objformat ;; - esac - - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - linux) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - need_lib_prefix=no - need_version=no - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test yes = "$hardcode_automatic"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && - test no != "$hardcode_minus_L"; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test relink = "$hardcode_action" || - test yes = "$inherit_rpath"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen=shl_load -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen=dlopen -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - -#include <stdio.h> - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - -#include <stdio.h> - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report what library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC=$lt_save_CC - - if test -n "$CXX" && ( test no != "$CXX" && - ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || - (test g++ != "$CXX"))); then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include <limits.h> -@%:@else -@%:@ include <assert.h> -@%:@endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <ac_nonexistent.h> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include <limits.h> -@%:@else -@%:@ include <assert.h> -@%:@endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <ac_nonexistent.h> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - _lt_caught_CXX_error=yes -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -compiler_needs_object_CXX=no -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_direct_absolute_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -inherit_rpath_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -reload_flag_CXX=$reload_flag -reload_cmds_CXX=$reload_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_caught_CXX_error"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - compiler_CXX=$CC - func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test yes = "$GXX"; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' - else - lt_prog_compiler_no_builtin_flag_CXX= - fi - - if test yes = "$GXX"; then - # Set up default GNU C++ configuration - - - -@%:@ Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in - *GNU* | *'with BFD'*) - test no != "$with_gnu_ld" && break - ;; - *) - test yes != "$with_gnu_ld" && break - ;; - esac - fi - done - IFS=$lt_save_ifs -else - lt_cv_path_LD=$LD # Let the user override the test with a path. -fi -fi - -LD=$lt_cv_path_LD -if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 </dev/null` in -*GNU* | *'with BFD'*) - lt_cv_prog_gnu_ld=yes - ;; -*) - lt_cv_prog_gnu_ld=no - ;; -esac -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test yes = "$with_gnu_ld"; then - archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='$wl' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - ld_shlibs_CXX=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - file_list_spec_CXX='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct_CXX=no - hardcode_direct_absolute_CXX=no - ;; - esac - - if test yes = "$GXX"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag=$shared_flag' $wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec_CXX='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - always_export_symbols_CXX=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - # The "-G" linker flag allows undefined symbols. - no_undefined_flag_CXX='-bernotok' - # Determine the default libpath from the value encoded in an empty - # executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath__CXX -fi - - hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath__CXX -fi - - hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' $wl-bernotok' - allow_undefined_flag_CXX=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - fi - archive_cmds_need_lc_CXX=yes - archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared - # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_CXX=' ' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=yes - file_list_spec_CXX='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' - enable_shared_with_static_runtimes_CXX=yes - # Don't use ranlib - old_postinstall_cmds_CXX='chmod 644 $oldlib' - postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - export_dynamic_flag_spec_CXX='$wl--export-all-symbols' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - - - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec_CXX='' - fi - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - if test yes != "$lt_cv_apple_cc_single_mod"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" - fi - - else - ld_shlibs_CXX=no - fi - - ;; - - os2*) - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_minus_L_CXX=yes - allow_undefined_flag_CXX=unsupported - shrext_cmds=.dll - archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes_CXX=yes - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - ld_shlibs_CXX=no - ;; - - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - - haiku*) - archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs_CXX=yes - ;; - - hpux9*) - hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='$wl-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - export_dynamic_flag_spec_CXX='$wl-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - hardcode_libdir_separator_CXX=: - inherit_rpath_CXX=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [1-5].* | *pgcpp\ [1-5].*) - prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object_CXX=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - ld_shlibs_CXX=yes - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - hardcode_direct_absolute_CXX=yes - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='$wl-E' - whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - ld_shlibs_CXX=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - case $host in - osf3*) - allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' - archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - ;; - *) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ - $RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - ;; - esac - - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes,no = "$GXX,$with_gnu_ld"; then - allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' - case $host in - osf3*) - archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - *) - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test yes,no = "$GXX,$with_gnu_ld"; then - no_undefined_flag_CXX=' $wl-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require '-G' NOT '-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='$wl-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_CXX='$wl-z,text' - allow_undefined_flag_CXX='$wl-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ - '"$old_archive_cmds_CXX" - reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ - '"$reload_cmds_CXX" - ;; - *) - archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } - test no = "$ld_shlibs_CXX" && can_build_shared=no - - GCC_CXX=$GXX - LD_CXX=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF - - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test x-L = "$p" || - test x-R = "$p"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test no = "$pre_test_object_deps_done"; then - case $prev in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX=$prev$p - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX=$prev$p - else - postdeps_CXX="${postdeps_CXX} $prev$p" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test no = "$pre_test_object_deps_done"; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX=$p - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX=$p - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - compiler_lib_search_dirs_CXX= -if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - - - # C++ specific cases for pic, static, wl, etc. - if test yes = "$GXX"; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - lt_prog_compiler_pic_CXX='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_CXX='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static_CXX='$wl-static' - ;; - esac - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='$wl-a ${wl}archive' - if test ia64 != "$host_cpu"; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='$wl-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64, which still supported -KPIC. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-qpic' - lt_prog_compiler_static_CXX='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX@&t@ -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } -lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX@&t@ -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then - : -else - lt_prog_compiler_static_CXX= -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX=$ltdll_cmds - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - ;; - esac - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } -test no = "$ld_shlibs_CXX" && can_build_shared=no - -with_gnu_ld_CXX=$with_gnu_ld - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc_CXX=no - else - lt_cv_archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } - archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib<name>.so - # instead of lib<name>.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - # Handle Gentoo/FreeBSD as it was Linux - case $host_vendor in - gentoo) - version_type=linux ;; - *) - version_type=freebsd-$objformat ;; - esac - - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - linux) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - need_lib_prefix=no - need_version=no - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec_CXX='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || - test -n "$runpath_var_CXX" || - test yes = "$hardcode_automatic_CXX"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct_CXX" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && - test no != "$hardcode_minus_L_CXX"; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 -$as_echo "$hardcode_action_CXX" >&6; } - -if test relink = "$hardcode_action_CXX" || - test yes = "$inherit_rpath_CXX"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test yes != "$_lt_caught_CXX_error" - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - -# Generate an error here if attempting to build both shared and static when -# $libname.a is in $library_names_spec (as mentioned above), rather than -# wait for ar or ld to fail. -# -if test "$enable_shared" = yes && test "$enable_static" = yes; then - case $library_names_spec in - *libname.a*) - as_fn_error $? "cannot create both shared and static libraries on this system, --disable one of the two" "$LINENO" 5 - ;; - esac -fi - - if test "$enable_static" = yes; then - ENABLE_STATIC_TRUE= - ENABLE_STATIC_FALSE='#' -else - ENABLE_STATIC_TRUE='#' - ENABLE_STATIC_FALSE= -fi - - - -# Many of these library and header checks are for the benefit of -# supplementary programs. libgmp doesn't use anything too weird. - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <string.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ctype.h> -#include <stdlib.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> -#include <sys/time.h> -#include <time.h> - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "@%:@define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi - - -# Reasons for testing: -# float.h - not in SunOS bundled cc -# invent.h - IRIX specific -# langinfo.h - X/Open standard only, not in djgpp for instance -# locale.h - old systems won't have this -# nl_types.h - X/Open standard only, not in djgpp for instance -# (usually langinfo.h gives nl_item etc, but not on netbsd 1.4.1) -# sys/attributes.h - IRIX specific -# sys/iograph.h - IRIX specific -# sys/mman.h - not in Cray Unicos -# sys/param.h - not in mingw -# sys/processor.h - solaris specific, though also present in macos -# sys/pstat.h - HPUX specific -# sys/resource.h - not in mingw -# sys/sysctl.h - not in mingw -# sys/sysinfo.h - OSF specific -# sys/syssgi.h - IRIX specific -# sys/systemcfg.h - AIX specific -# sys/time.h - autoconf suggests testing, don't know anywhere without it -# sys/times.h - not in mingw -# machine/hal_sysinfo.h - OSF specific -# -# inttypes.h, stdint.h, unistd.h and sys/types.h are already in the autoconf -# default tests -# -for ac_header in fcntl.h float.h invent.h langinfo.h locale.h nl_types.h sys/attributes.h sys/iograph.h sys/mman.h sys/param.h sys/processor.h sys/pstat.h sys/sysinfo.h sys/syssgi.h sys/systemcfg.h sys/time.h sys/times.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -# On SunOS, sys/resource.h needs sys/time.h (for struct timeval) -for ac_header in sys/resource.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "#if TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -#else -# if HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif -#endif -" -if test "x$ac_cv_header_sys_resource_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_SYS_RESOURCE_H 1 -_ACEOF - -fi - -done - - -# On NetBSD and OpenBSD, sys/sysctl.h needs sys/param.h for various constants -for ac_header in sys/sysctl.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "#if HAVE_SYS_PARAM_H -# include <sys/param.h> -#endif -" -if test "x$ac_cv_header_sys_sysctl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_SYS_SYSCTL_H 1 -_ACEOF - -fi - -done - - -# On OSF 4.0, <machine/hal_sysinfo.h> must have <sys/sysinfo.h> for ulong_t -for ac_header in machine/hal_sysinfo.h -do : - ac_fn_c_check_header_compile "$LINENO" "machine/hal_sysinfo.h" "ac_cv_header_machine_hal_sysinfo_h" "#if HAVE_SYS_SYSINFO_H -# include <sys/sysinfo.h> -#endif -" -if test "x$ac_cv_header_machine_hal_sysinfo_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_MACHINE_HAL_SYSINFO_H 1 -_ACEOF - -fi - -done - - -# Reasons for testing: -# optarg - not declared in mingw -# fgetc, fscanf, ungetc, vfprintf - not declared in SunOS 4 -# sys_errlist, sys_nerr - not declared in SunOS 4 -# -# optarg should be in unistd.h and the rest in stdio.h, both of which are -# in the autoconf default includes. -# -# sys_errlist and sys_nerr are supposed to be in <errno.h> on SunOS according -# to the man page (but aren't), in glibc they're in stdio.h. -# -ac_fn_c_check_decl "$LINENO" "fgetc" "ac_cv_have_decl_fgetc" "$ac_includes_default" -if test "x$ac_cv_have_decl_fgetc" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DECL_FGETC $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "fscanf" "ac_cv_have_decl_fscanf" "$ac_includes_default" -if test "x$ac_cv_have_decl_fscanf" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DECL_FSCANF $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "optarg" "ac_cv_have_decl_optarg" "$ac_includes_default" -if test "x$ac_cv_have_decl_optarg" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DECL_OPTARG $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "ungetc" "ac_cv_have_decl_ungetc" "$ac_includes_default" -if test "x$ac_cv_have_decl_ungetc" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DECL_UNGETC $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "vfprintf" "ac_cv_have_decl_vfprintf" "$ac_includes_default" -if test "x$ac_cv_have_decl_vfprintf" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DECL_VFPRINTF $ac_have_decl -_ACEOF - -ac_fn_c_check_decl "$LINENO" "sys_errlist" "ac_cv_have_decl_sys_errlist" "#include <stdio.h> -#include <errno.h> -" -if test "x$ac_cv_have_decl_sys_errlist" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DECL_SYS_ERRLIST $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "sys_nerr" "ac_cv_have_decl_sys_nerr" "#include <stdio.h> -#include <errno.h> -" -if test "x$ac_cv_have_decl_sys_nerr" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DECL_SYS_NERR $ac_have_decl -_ACEOF - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } -if ${ac_cv_type_signal+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> -#include <signal.h> - -int -main () -{ -return *(signal (0, 0)) (0) == 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_signal=int -else - ac_cv_type_signal=void -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } - -cat >>confdefs.h <<_ACEOF -@%:@define RETSIGTYPE $ac_cv_type_signal -_ACEOF - - - -# Reasons for testing: -# intmax_t - C99 -# long double - not in the HP bundled K&R cc -# long long - only in reasonably recent compilers -# ptrdiff_t - seems to be everywhere, maybe don't need to check this -# quad_t - BSD specific -# uint_least32_t - C99 -# -# the default includes are sufficient for all these types -# -ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default" -if test "x$ac_cv_type_intmax_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_INTMAX_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "long double" "ac_cv_type_long_double" "$ac_includes_default" -if test "x$ac_cv_type_long_double" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LONG_DOUBLE 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" -if test "x$ac_cv_type_long_long" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LONG_LONG 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" -if test "x$ac_cv_type_ptrdiff_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_PTRDIFF_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "quad_t" "ac_cv_type_quad_t" "$ac_includes_default" -if test "x$ac_cv_type_quad_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_QUAD_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "uint_least32_t" "ac_cv_type_uint_least32_t" "$ac_includes_default" -if test "x$ac_cv_type_uint_least32_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_UINT_LEAST32_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" -if test "x$ac_cv_type_intptr_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_INTPTR_T 1 -_ACEOF - - -fi - - -# FIXME: Really want #ifndef __cplusplus around the #define volatile -# replacement autoconf gives, since volatile is always available in C++. -# But we don't use it in C++ currently. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 -$as_echo_n "checking for working volatile... " >&6; } -if ${ac_cv_c_volatile+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -volatile int x; -int * volatile y = (int *) 0; -return !x && !y; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_volatile=yes -else - ac_cv_c_volatile=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 -$as_echo "$ac_cv_c_volatile" >&6; } -if test $ac_cv_c_volatile = no; then - -$as_echo "@%:@define volatile /**/" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 -$as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if ${ac_cv_c_restrict+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - } -int -main () -{ -int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_restrict=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_restrict" != no && break - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 -$as_echo "$ac_cv_c_restrict" >&6; } - - case $ac_cv_c_restrict in - restrict) ;; - no) $as_echo "@%:@define restrict /**/" >>confdefs.h - ;; - *) cat >>confdefs.h <<_ACEOF -@%:@define restrict $ac_cv_c_restrict -_ACEOF - ;; - esac - - -# GMP_C_STDARG -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((const)) works" >&5 -$as_echo_n "checking whether gcc __attribute__ ((const)) works... " >&6; } -if ${gmp_cv_c_attribute_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (int x) __attribute__ ((const)); -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gmp_cv_c_attribute_const=yes -else - gmp_cv_c_attribute_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_attribute_const" >&5 -$as_echo "$gmp_cv_c_attribute_const" >&6; } -if test $gmp_cv_c_attribute_const = yes; then - -$as_echo "@%:@define HAVE_ATTRIBUTE_CONST 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((malloc)) works" >&5 -$as_echo_n "checking whether gcc __attribute__ ((malloc)) works... " >&6; } -if ${gmp_cv_c_attribute_malloc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.c <<EOF -void *foo (int x) __attribute__ ((malloc)); -EOF -gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if grep "attribute directive ignored" conftest.out >/dev/null; then - gmp_cv_c_attribute_malloc=no - else - gmp_cv_c_attribute_malloc=yes - fi -else - gmp_cv_c_attribute_malloc=no -fi -cat conftest.out >&5 -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_attribute_malloc" >&5 -$as_echo "$gmp_cv_c_attribute_malloc" >&6; } -if test $gmp_cv_c_attribute_malloc = yes; then - -$as_echo "@%:@define HAVE_ATTRIBUTE_MALLOC 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((mode (XX))) works" >&5 -$as_echo_n "checking whether gcc __attribute__ ((mode (XX))) works... " >&6; } -if ${gmp_cv_c_attribute_mode+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -typedef int SItype __attribute__ ((mode (SI))); -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gmp_cv_c_attribute_mode=yes -else - gmp_cv_c_attribute_mode=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_attribute_mode" >&5 -$as_echo "$gmp_cv_c_attribute_mode" >&6; } -if test $gmp_cv_c_attribute_mode = yes; then - -$as_echo "@%:@define HAVE_ATTRIBUTE_MODE 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((noreturn)) works" >&5 -$as_echo_n "checking whether gcc __attribute__ ((noreturn)) works... " >&6; } -if ${gmp_cv_c_attribute_noreturn+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void foo (int x) __attribute__ ((noreturn)); -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gmp_cv_c_attribute_noreturn=yes -else - gmp_cv_c_attribute_noreturn=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_attribute_noreturn" >&5 -$as_echo "$gmp_cv_c_attribute_noreturn" >&6; } -if test $gmp_cv_c_attribute_noreturn = yes; then - -$as_echo "@%:@define HAVE_ATTRIBUTE_NORETURN 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc hidden aliases work" >&5 -$as_echo_n "checking whether gcc hidden aliases work... " >&6; } -if ${gmp_cv_c_hidden_alias+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void hid() __attribute__ ((visibility("hidden"))); -void hid() {} -void pub() __attribute__ ((alias("hid"))); -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gmp_cv_c_hidden_alias=yes -else - gmp_cv_c_hidden_alias=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_hidden_alias" >&5 -$as_echo "$gmp_cv_c_hidden_alias" >&6; } -if test $gmp_cv_c_hidden_alias = yes; then - -$as_echo "@%:@define HAVE_HIDDEN_ALIAS 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - - -case $ac_cv_c_inline in -no) ;; -*) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define __GMP_WITHIN_CONFIGURE_INLINE 1 -#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ -#define GMP_NAIL_BITS $GMP_NAIL_BITS -#define GMP_LIMB_BITS 123 -$DEFN_LONG_LONG_LIMB -#include "$srcdir/gmp-h.in" - -#ifndef __GMP_EXTERN_INLINE -die die die -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - case $ac_cv_c_inline in - yes) tmp_inline=inline ;; - *) tmp_inline=$ac_cv_c_inline ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gmp.h doesnt recognise compiler \"$tmp_inline\", inlines will be unavailable" >&5 -$as_echo "$as_me: WARNING: gmp.h doesnt recognise compiler \"$tmp_inline\", inlines will be unavailable" >&2;} -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ;; -esac - - -# from libtool -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 -$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } -if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmw $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char _mwvalidcheckl (); -int -main () -{ -return _mwvalidcheckl (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mw__mwvalidcheckl=yes -else - ac_cv_lib_mw__mwvalidcheckl=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 -$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } -if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : - LIBM=-lmw -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -$as_echo_n "checking for cos in -lm... " >&6; } -if ${ac_cv_lib_m_cos+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char cos (); -int -main () -{ -return cos (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_cos=yes -else - ac_cv_lib_m_cos=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -$as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes; then : - LIBM="$LIBM -lm" -fi - - ;; -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -$as_echo_n "checking for cos in -lm... " >&6; } -if ${ac_cv_lib_m_cos+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char cos (); -int -main () -{ -return cos (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_cos=yes -else - ac_cv_lib_m_cos=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -$as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes; then : - LIBM=-lm -fi - - ;; -esac - - - - -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if ${gmp_cv_header_alloca+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <alloca.h> -int -main () -{ -char *p = (char *) alloca (2 * sizeof (int)); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gmp_cv_header_alloca=yes -else - gmp_cv_header_alloca=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_header_alloca" >&5 -$as_echo "$gmp_cv_header_alloca" >&6; } -if test $gmp_cv_header_alloca = yes; then - -$as_echo "@%:@define HAVE_ALLOCA_H 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca (via gmp-impl.h)" >&5 -$as_echo_n "checking for alloca (via gmp-impl.h)... " >&6; } -if ${gmp_cv_func_alloca+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ -#define GMP_NAIL_BITS $GMP_NAIL_BITS -#define GMP_LIMB_BITS 123 -$DEFN_LONG_LONG_LIMB -#include "$srcdir/gmp-h.in" - -#include "$srcdir/gmp-impl.h" - -int -main () -{ -char *p = (char *) alloca (1); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gmp_cv_func_alloca=yes -else - gmp_cv_func_alloca=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_func_alloca" >&5 -$as_echo "$gmp_cv_func_alloca" >&6; } -if test $gmp_cv_func_alloca = yes; then - -$as_echo "@%:@define HAVE_ALLOCA 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to allocate temporary memory" >&5 -$as_echo_n "checking how to allocate temporary memory... " >&6; } -if ${gmp_cv_option_alloca+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $enable_alloca in - yes) - gmp_cv_option_alloca=alloca - ;; - no) - gmp_cv_option_alloca=malloc-reentrant - ;; - reentrant | notreentrant) - case $gmp_cv_func_alloca in - yes) gmp_cv_option_alloca=alloca ;; - *) gmp_cv_option_alloca=malloc-$enable_alloca ;; - esac - ;; - *) - gmp_cv_option_alloca=$enable_alloca - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_option_alloca" >&5 -$as_echo "$gmp_cv_option_alloca" >&6; } - - - -case $gmp_cv_option_alloca in - alloca) - if test $gmp_cv_func_alloca = no; then - as_fn_error $? "--enable-alloca=alloca specified, but alloca not available" "$LINENO" 5 - fi - $as_echo "@%:@define WANT_TMP_ALLOCA 1" >>confdefs.h - - TAL_OBJECT=tal-reent$U.lo - ;; - malloc-reentrant) - $as_echo "@%:@define WANT_TMP_REENTRANT 1" >>confdefs.h - - TAL_OBJECT=tal-reent$U.lo - ;; - malloc-notreentrant) - $as_echo "@%:@define WANT_TMP_NOTREENTRANT 1" >>confdefs.h - - TAL_OBJECT=tal-notreent$U.lo - ;; - debug) - $as_echo "@%:@define WANT_TMP_DEBUG 1" >>confdefs.h - - TAL_OBJECT=tal-debug$U.lo - ;; - *) - # checks at the start of configure.in should protect us - as_fn_error $? "unrecognised --enable-alloca=$gmp_cv_option_alloca" "$LINENO" 5 - ;; -esac - - - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdio.h> -#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ -#define GMP_NAIL_BITS $GMP_NAIL_BITS -#define GMP_LIMB_BITS 123 -$DEFN_LONG_LONG_LIMB -#include "$srcdir/gmp-h.in" - -#if ! _GMP_H_HAVE_FILE -die die die -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gmp.h doesnt recognise <stdio.h>, FILE prototypes will be unavailable" >&5 -$as_echo "$as_me: WARNING: gmp.h doesnt recognise <stdio.h>, FILE prototypes will be unavailable" >&2;} -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> - #include <sys/param.h> - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> - #include <sys/param.h> - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <limits.h> - -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <limits.h> - -int -main () -{ -#ifndef _BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no -else - ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "@%:@define HAVE_LIMB_BIG_ENDIAN 1" >>confdefs.h - - -echo "define_not_for_expansion(\`HAVE_LIMB_BIG_ENDIAN')" >> $gmp_tmpconfigm4p -;; #( - no) - $as_echo "@%:@define HAVE_LIMB_LITTLE_ENDIAN 1" >>confdefs.h - - -echo "define_not_for_expansion(\`HAVE_LIMB_LITTLE_ENDIAN')" >> $gmp_tmpconfigm4p - - ;; #( - universal) - -$as_echo "@%:@define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - - ;; #( - *) - : ;; - esac - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking format of \`double' floating point" >&5 -$as_echo_n "checking format of \`double' floating point... " >&6; } -if ${gmp_cv_c_double_format+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_cv_c_double_format=unknown -cat >conftest.c <<\EOF -struct foo { - char before[8]; - double x; - char after[8]; -}; -extern struct foo foo; -struct foo foo = { - { '\001', '\043', '\105', '\147', '\211', '\253', '\315', '\357' }, - -123456789.0, - { '\376', '\334', '\272', '\230', '\166', '\124', '\062', '\020' }, -}; -EOF -gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >&5 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -cat >conftest.awk <<\EOF - -BEGIN { - found = 0 -} - -{ - for (f = 2; f <= NF; f++) - { - for (i = 0; i < 23; i++) - got[i] = got[i+1]; - got[23] = $f; - - # match the special begin and end sequences - if (got[0] != "001") continue - if (got[1] != "043") continue - if (got[2] != "105") continue - if (got[3] != "147") continue - if (got[4] != "211") continue - if (got[5] != "253") continue - if (got[6] != "315") continue - if (got[7] != "357") continue - if (got[16] != "376") continue - if (got[17] != "334") continue - if (got[18] != "272") continue - if (got[19] != "230") continue - if (got[20] != "166") continue - if (got[21] != "124") continue - if (got[22] != "062") continue - if (got[23] != "020") continue - - saw = " (" got[8] " " got[9] " " got[10] " " got[11] " " got[12] " " got[13] " " got[14] " " got[15] ")" - - if (got[8] == "000" && \ - got[9] == "000" && \ - got[10] == "000" && \ - got[11] == "124" && \ - got[12] == "064" && \ - got[13] == "157" && \ - got[14] == "235" && \ - got[15] == "301") - { - print "IEEE little endian" - found = 1 - exit - } - - # Little endian with the two 4-byte halves swapped, as used by ARM - # when the chip is in little endian mode. - # - if (got[8] == "064" && \ - got[9] == "157" && \ - got[10] == "235" && \ - got[11] == "301" && \ - got[12] == "000" && \ - got[13] == "000" && \ - got[14] == "000" && \ - got[15] == "124") - { - print "IEEE little endian, swapped halves" - found = 1 - exit - } - - # gcc 2.95.4 on one GNU/Linux ARM system was seen generating 000 in - # the last byte, whereas 124 is correct. Not sure where the bug - # actually lies, but a running program didn't seem to get a full - # mantissa worth of working bits. - # - # We match this case explicitly so we can give a nice result message, - # but we deliberately exclude it from the normal IEEE double setups - # since it's too broken. - # - if (got[8] == "064" && \ - got[9] == "157" && \ - got[10] == "235" && \ - got[11] == "301" && \ - got[12] == "000" && \ - got[13] == "000" && \ - got[14] == "000" && \ - got[15] == "000") - { - print "bad ARM software floats" - found = 1 - exit - } - - if (got[8] == "301" && \ - got[9] == "235" && \ - got[10] == "157" && \ - got[11] == "064" && \ - got[12] == "124" && \ - got[13] == "000" && \ - got[14] == "000" && \ - got[15] == "000") - { - print "IEEE big endian" - found = 1 - exit - } - - if (got[8] == "353" && \ - got[9] == "315" && \ - got[10] == "242" && \ - got[11] == "171" && \ - got[12] == "000" && \ - got[13] == "240" && \ - got[14] == "000" && \ - got[15] == "000") - { - print "VAX D" - found = 1 - exit - } - - if (got[8] == "275" && \ - got[9] == "301" && \ - got[10] == "064" && \ - got[11] == "157" && \ - got[12] == "000" && \ - got[13] == "124" && \ - got[14] == "000" && \ - got[15] == "000") - { - print "VAX G" - found = 1 - exit - } - - if (got[8] == "300" && \ - got[9] == "033" && \ - got[10] == "353" && \ - got[11] == "171" && \ - got[12] == "242" && \ - got[13] == "240" && \ - got[14] == "000" && \ - got[15] == "000") - { - print "Cray CFP" - found = 1 - exit - } - } -} - -END { - if (! found) - print "unknown", saw -} - -EOF - gmp_cv_c_double_format=`od -b conftest.$OBJEXT | $AWK -f conftest.awk` - case $gmp_cv_c_double_format in - unknown*) - echo "cannot match anything, conftest.$OBJEXT contains" >&5 - od -b conftest.$OBJEXT >&5 - ;; - esac -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: oops, cannot compile test program" >&5 -$as_echo "$as_me: WARNING: oops, cannot compile test program" >&2;} -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_double_format" >&5 -$as_echo "$gmp_cv_c_double_format" >&6; } - - - -case $gmp_cv_c_double_format in - "IEEE big endian") - $as_echo "@%:@define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1" >>confdefs.h - - -echo "define_not_for_expansion(\`HAVE_DOUBLE_IEEE_BIG_ENDIAN')" >> $gmp_tmpconfigm4p - - ;; - "IEEE little endian") - $as_echo "@%:@define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1" >>confdefs.h - - -echo "define_not_for_expansion(\`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN')" >> $gmp_tmpconfigm4p - - ;; - "IEEE little endian, swapped halves") - $as_echo "@%:@define HAVE_DOUBLE_IEEE_LITTLE_SWAPPED 1" >>confdefs.h - ;; - "VAX D") - $as_echo "@%:@define HAVE_DOUBLE_VAX_D 1" >>confdefs.h - ;; - "VAX G") - $as_echo "@%:@define HAVE_DOUBLE_VAX_G 1" >>confdefs.h - ;; - "Cray CFP") - $as_echo "@%:@define HAVE_DOUBLE_CRAY_CFP 1" >>confdefs.h - ;; - "bad ARM software floats") - ;; - unknown*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not determine float format." >&5 -$as_echo "$as_me: WARNING: Could not determine float format." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Conversions to and from \"double\" may be slow." >&5 -$as_echo "$as_me: WARNING: Conversions to and from \"double\" may be slow." >&2;} - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: oops, unrecognised float format: $gmp_cv_c_double_format" >&5 -$as_echo "$as_me: WARNING: oops, unrecognised float format: $gmp_cv_c_double_format" >&2;} - ;; -esac - - - -# Reasons for testing: -# alarm - not in mingw -# attr_get - IRIX specific -# clock_gettime - not in glibc 2.2.4, only very recent systems -# cputime - not in glibc -# getsysinfo - OSF specific -# getrusage - not in mingw -# gettimeofday - not in mingw -# mmap - not in mingw, djgpp -# nl_langinfo - X/Open standard only, not in djgpp for instance -# obstack_vprintf - glibc specific -# processor_info - solaris specific -# pstat_getprocessor - HPUX specific (10.x and up) -# raise - an ANSI-ism, though probably almost universal by now -# read_real_time - AIX specific -# sigaction - not in mingw -# sigaltstack - not in mingw, or old AIX (reputedly) -# sigstack - not in mingw -# strerror - not in SunOS -# strnlen - glibc extension (some other systems too) -# syssgi - IRIX specific -# times - not in mingw -# -# AC_FUNC_STRNLEN is not used because we don't want the AC_LIBOBJ -# replacement setups it gives. It detects a faulty strnlen on AIX, but -# missing out on that test is ok since our only use of strnlen is in -# __gmp_replacement_vsnprintf which is not required on AIX since it has a -# vsnprintf. -# -for ac_func in alarm attr_get clock cputime getpagesize getrusage gettimeofday getsysinfo localeconv memset mmap mprotect nl_langinfo obstack_vprintf popen processor_info pstat_getprocessor raise read_real_time sigaction sigaltstack sigstack syssgi strchr strerror strnlen strtol strtoul sysconf sysctl sysctlbyname times -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -@%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -# clock_gettime is in librt on *-*-osf5.1 and on glibc, so att -lrt to -# TUNE_LIBS if needed. On linux (tested on x86_32, 2.6.26), -# clock_getres reports ns accuracy, while in a quick test on osf -# clock_getres said only 1 millisecond. - -old_LIBS="$LIBS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 -$as_echo_n "checking for library containing clock_gettime... " >&6; } -if ${ac_cv_search_clock_gettime+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char clock_gettime (); -int -main () -{ -return clock_gettime (); - ; - return 0; -} -_ACEOF -for ac_lib in '' rt; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_clock_gettime=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_clock_gettime+:} false; then : - break -fi -done -if ${ac_cv_search_clock_gettime+:} false; then : - -else - ac_cv_search_clock_gettime=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 -$as_echo "$ac_cv_search_clock_gettime" >&6; } -ac_res=$ac_cv_search_clock_gettime -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - - -$as_echo "@%:@define HAVE_CLOCK_GETTIME 1" >>confdefs.h - -fi - -TUNE_LIBS="$LIBS" -LIBS="$old_LIBS" - - - -ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" -if test "x$ac_cv_func_vsnprintf" = xyes; then : - gmp_vsnprintf_exists=yes -else - gmp_vsnprintf_exists=no -fi - -if test "$gmp_vsnprintf_exists" = no; then - gmp_cv_func_vsnprintf=no -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf works" >&5 -$as_echo_n "checking whether vsnprintf works... " >&6; } -if ${gmp_cv_func_vsnprintf+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_cv_func_vsnprintf=yes - for i in 'return check ("hello world");' 'int n; return check ("%nhello world", &n);'; do - if test "$cross_compiling" = yes; then : - gmp_cv_func_vsnprintf=probably; break -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <string.h> /* for strcmp */ -#include <stdio.h> /* for vsnprintf */ - -#include <stdarg.h> - -int -check (const char *fmt, ...) -{ - static char buf[128]; - va_list ap; - int ret; - - va_start (ap, fmt); - - ret = vsnprintf (buf, 4, fmt, ap); - - if (strcmp (buf, "hel") != 0) - return 1; - - /* allowed return values */ - if (ret != -1 && ret != 3 && ret != 11) - return 2; - - return 0; -} - -int -main () -{ -$i -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - : -else - gmp_cv_func_vsnprintf=no; break -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_func_vsnprintf" >&5 -$as_echo "$gmp_cv_func_vsnprintf" >&6; } - if test "$gmp_cv_func_vsnprintf" = probably; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for properly working vsnprintf when cross compiling, will assume it's ok" >&5 -$as_echo "$as_me: WARNING: cannot check for properly working vsnprintf when cross compiling, will assume it's ok" >&2;} - fi - if test "$gmp_cv_func_vsnprintf" != no; then - -$as_echo "@%:@define HAVE_VSNPRINTF 1" >>confdefs.h - - fi -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sscanf needs writable input" >&5 -$as_echo_n "checking whether sscanf needs writable input... " >&6; } -if ${gmp_cv_func_sscanf_writable_input+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-hpux9 | *-*-hpux9.*) - gmp_cv_func_sscanf_writable_input=yes ;; - *) gmp_cv_func_sscanf_writable_input=no ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_func_sscanf_writable_input" >&5 -$as_echo "$gmp_cv_func_sscanf_writable_input" >&6; } -case $gmp_cv_func_sscanf_writable_input in - yes) -$as_echo "@%:@define SSCANF_WRITABLE_INPUT 1" >>confdefs.h - ;; - no) ;; - *) as_fn_error $? "unrecognised \$gmp_cv_func_sscanf_writable_input" "$LINENO" 5 ;; -esac - - -# Reasons for checking: -# pst_processor psp_iticksperclktick - not in hpux 9 -# -ac_fn_c_check_member "$LINENO" "struct pst_processor" "psp_iticksperclktick" "ac_cv_member_struct_pst_processor_psp_iticksperclktick" "#include <sys/pstat.h> -" -if test "x$ac_cv_member_struct_pst_processor_psp_iticksperclktick" = xyes; then : - -$as_echo "@%:@define HAVE_PSP_ITICKSPERCLKTICK 1" >>confdefs.h - -fi - - -# C++ tests, when required -# -if test $enable_cxx = yes; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - # Reasons for testing: - # <sstream> - not in g++ 2.95.2 - # std::locale - not in g++ 2.95.4 - # - -for ac_header in sstream -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "sstream" "ac_cv_header_sstream" "$ac_includes_default" -if test "x$ac_cv_header_sstream" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_SSTREAM 1 -_ACEOF - -fi - -done - - ac_fn_cxx_check_type "$LINENO" "std::locale" "ac_cv_type_std__locale" "#include <locale> -" -if test "x$ac_cv_type_std__locale" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_STD__LOCALE 1 -_ACEOF - - -fi - - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi - - -# Pick the correct source files in $path and link them to mpn/. -# $gmp_mpn_functions lists all functions we need. -# -# The rule is to find a file with the function name and a .asm, .S, -# .s, or .c extension. Certain multi-function files with special names -# can provide some functions too. (mpn/Makefile.am passes -# -DOPERATION_<func> to get them to generate the right code.) - -# Note: $gmp_mpn_functions must have mod_1 before pre_mod_1 so the former -# can optionally provide the latter as an extra entrypoint. Likewise -# divrem_1 and pre_divrem_1. - -gmp_mpn_functions_optional="umul udiv \ - invert_limb sqr_diagonal sqr_diag_addlsh1 \ - mul_2 mul_3 mul_4 mul_5 mul_6 \ - addmul_2 addmul_3 addmul_4 addmul_5 addmul_6 addmul_7 addmul_8 \ - addlsh1_n sublsh1_n rsblsh1_n rsh1add_n rsh1sub_n \ - addlsh2_n sublsh2_n rsblsh2_n \ - addlsh_n sublsh_n rsblsh_n \ - add_n_sub_n addaddmul_1msb0" - -gmp_mpn_functions="$extra_functions \ - add add_1 add_n sub sub_1 sub_n cnd_add_n cnd_sub_n cnd_swap neg com \ - mul_1 addmul_1 submul_1 \ - add_err1_n add_err2_n add_err3_n sub_err1_n sub_err2_n sub_err3_n \ - lshift rshift dive_1 diveby3 divis divrem divrem_1 divrem_2 \ - fib2_ui mod_1 mod_34lsub1 mode1o pre_divrem_1 pre_mod_1 dump \ - mod_1_1 mod_1_2 mod_1_3 mod_1_4 lshiftc \ - mul mul_fft mul_n sqr mul_basecase sqr_basecase nussbaumer_mul \ - mulmid_basecase toom42_mulmid mulmid_n mulmid \ - random random2 pow_1 \ - rootrem sqrtrem sizeinbase get_str set_str \ - scan0 scan1 popcount hamdist cmp zero_p \ - perfsqr perfpow \ - gcd_1 gcd gcdext_1 gcdext gcd_subdiv_step \ - gcdext_lehmer \ - div_q tdiv_qr jacbase jacobi_2 jacobi get_d \ - matrix22_mul matrix22_mul1_inverse_vector \ - hgcd_matrix hgcd2 hgcd_step hgcd_reduce hgcd hgcd_appr \ - hgcd2_jacobi hgcd_jacobi \ - mullo_n mullo_basecase sqrlo sqrlo_basecase \ - toom22_mul toom32_mul toom42_mul toom52_mul toom62_mul \ - toom33_mul toom43_mul toom53_mul toom54_mul toom63_mul \ - toom44_mul \ - toom6h_mul toom6_sqr toom8h_mul toom8_sqr \ - toom_couple_handling \ - toom2_sqr toom3_sqr toom4_sqr \ - toom_eval_dgr3_pm1 toom_eval_dgr3_pm2 \ - toom_eval_pm1 toom_eval_pm2 toom_eval_pm2exp toom_eval_pm2rexp \ - toom_interpolate_5pts toom_interpolate_6pts toom_interpolate_7pts \ - toom_interpolate_8pts toom_interpolate_12pts toom_interpolate_16pts \ - invertappr invert binvert mulmod_bnm1 sqrmod_bnm1 \ - div_qr_1 div_qr_1n_pi1 \ - div_qr_2 div_qr_2n_pi1 div_qr_2u_pi1 \ - sbpi1_div_q sbpi1_div_qr sbpi1_divappr_q \ - dcpi1_div_q dcpi1_div_qr dcpi1_divappr_q \ - mu_div_qr mu_divappr_q mu_div_q \ - bdiv_q_1 \ - sbpi1_bdiv_q sbpi1_bdiv_qr \ - dcpi1_bdiv_q dcpi1_bdiv_qr \ - mu_bdiv_q mu_bdiv_qr \ - bdiv_q bdiv_qr broot brootinv bsqrt bsqrtinv \ - divexact bdiv_dbm1c redc_1 redc_2 redc_n powm powlo sec_powm \ - sec_mul sec_sqr sec_div_qr sec_div_r sec_pi1_div_qr sec_pi1_div_r \ - sec_add_1 sec_sub_1 sec_invert \ - trialdiv remove \ - and_n andn_n nand_n ior_n iorn_n nior_n xor_n xnor_n \ - copyi copyd zero sec_tabselect \ - comb_tables \ - $gmp_mpn_functions_optional" - - - -# the list of all object files used by mpn/Makefile.in and the -# top-level Makefile.in, respectively -mpn_objects= -mpn_objs_in_libgmp= - -# links from the sources, to be removed by "make distclean" -gmp_srclinks= - - -# mpn_relative_top_srcdir is $top_srcdir, but for use from within the mpn -# build directory. If $srcdir is relative then we use a relative path too, -# so the two trees can be moved together. -case $srcdir in - [\\/]* | ?:[\\/]*) # absolute, as per autoconf - mpn_relative_top_srcdir=$srcdir ;; - *) # relative - mpn_relative_top_srcdir=../$srcdir ;; -esac - - - - - - -# Fat binary setups. -# -# We proceed through each $fat_path directory, and look for $fat_function -# routines there. Those found are incorporated in the build by generating a -# little mpn/<foo>.asm or mpn/<foo>.c file in the build directory, with -# suitable function renaming, and adding that to $mpn_objects (the same as a -# normal mpn file). -# -# fat.h is generated with macros to let internal calls to each $fat_function -# go directly through __gmpn_cpuvec, plus macros and declarations helping to -# setup that structure, on a per-directory basis ready for -# mpn/<cpu>/fat/fat.c. -# -# fat.h includes thresholds listed in $fat_thresholds, extracted from -# gmp-mparam.h in each directory. An overall maximum for each threshold is -# established, for use in making fixed size arrays of temporary space. -# (Eg. MUL_TOOM33_THRESHOLD_LIMIT used by mpn/generic/mul.c.) -# -# It'd be possible to do some of this manually, but when there's more than a -# few functions and a few directories it becomes very tedious, and very -# prone to having some routine accidentally omitted. On that basis it seems -# best to automate as much as possible, even if the code to do so is a bit -# ugly. -# - -if test -n "$fat_path"; then - # Usually the mpn build directory is created with mpn/Makefile - # instantiation, but we want to write to it sooner. - mkdir mpn 2>/dev/null - - echo "/* fat.h - setups for fat binaries." >fat.h - echo " Generated by configure - DO NOT EDIT. */" >>fat.h - - -$as_echo "@%:@define WANT_FAT_BINARY 1" >>confdefs.h - - -echo 'define(<WANT_FAT_BINARY>, <yes>)' >>$gmp_tmpconfigm4 - - - # Don't want normal copies of fat functions - for tmp_fn in $fat_functions; do - remove_from_list_tmp= -for remove_from_list_i in $gmp_mpn_functions; do - if test $remove_from_list_i = $tmp_fn; then :; - else - remove_from_list_tmp="$remove_from_list_tmp $remove_from_list_i" - fi -done -gmp_mpn_functions=$remove_from_list_tmp - - remove_from_list_tmp= -for remove_from_list_i in $gmp_mpn_functions_optional; do - if test $remove_from_list_i = $tmp_fn; then :; - else - remove_from_list_tmp="$remove_from_list_tmp $remove_from_list_i" - fi -done -gmp_mpn_functions_optional=$remove_from_list_tmp - - done - - for tmp_fn in $fat_functions; do - case $tmp_fn in - dive_1) tmp_fbase=divexact_1 ;; - diveby3) tmp_fbase=divexact_by3c ;; - pre_divrem_1) tmp_fbase=preinv_divrem_1 ;; - mode1o) tmp_fbase=modexact_1c_odd ;; - pre_mod_1) tmp_fbase=preinv_mod_1 ;; - mod_1_1) tmp_fbase=mod_1_1p ;; - mod_1_1_cps) tmp_fbase=mod_1_1p_cps ;; - mod_1_2) tmp_fbase=mod_1s_2p ;; - mod_1_2_cps) tmp_fbase=mod_1s_2p_cps ;; - mod_1_3) tmp_fbase=mod_1s_3p ;; - mod_1_3_cps) tmp_fbase=mod_1s_3p_cps ;; - mod_1_4) tmp_fbase=mod_1s_4p ;; - mod_1_4_cps) tmp_fbase=mod_1s_4p_cps ;; - *) tmp_fbase=$tmp_fn ;; -esac - - echo " -#ifndef OPERATION_$tmp_fn -#undef mpn_$tmp_fbase -#define mpn_$tmp_fbase (*__gmpn_cpuvec.$tmp_fbase) -#endif -DECL_$tmp_fbase (__MPN(${tmp_fbase}_init));" >>fat.h - # encourage various macros to use fat functions - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_NATIVE_mpn_$tmp_fbase 1 -_ACEOF - - done - - echo "" >>fat.h - echo "/* variable thresholds */" >>fat.h - for tmp_tn in $fat_thresholds; do - echo "#undef $tmp_tn" >>fat.h - echo "#define $tmp_tn CPUVEC_THRESHOLD (`echo $tmp_tn | tr [A-Z] [a-z]`)" >>fat.h - done - - echo " -/* Copy all fields into __gmpn_cpuvec. - memcpy is not used because it might operate byte-wise (depending on its - implementation), and we need the function pointer writes to be atomic. - "volatile" discourages the compiler from trying to optimize this. */ -#define CPUVEC_INSTALL(vec) \\ - do { \\ - volatile struct cpuvec_t *p = &__gmpn_cpuvec; \\" >>fat.h - for tmp_fn in $fat_functions; do - case $tmp_fn in - dive_1) tmp_fbase=divexact_1 ;; - diveby3) tmp_fbase=divexact_by3c ;; - pre_divrem_1) tmp_fbase=preinv_divrem_1 ;; - mode1o) tmp_fbase=modexact_1c_odd ;; - pre_mod_1) tmp_fbase=preinv_mod_1 ;; - mod_1_1) tmp_fbase=mod_1_1p ;; - mod_1_1_cps) tmp_fbase=mod_1_1p_cps ;; - mod_1_2) tmp_fbase=mod_1s_2p ;; - mod_1_2_cps) tmp_fbase=mod_1s_2p_cps ;; - mod_1_3) tmp_fbase=mod_1s_3p ;; - mod_1_3_cps) tmp_fbase=mod_1s_3p_cps ;; - mod_1_4) tmp_fbase=mod_1s_4p ;; - mod_1_4_cps) tmp_fbase=mod_1s_4p_cps ;; - *) tmp_fbase=$tmp_fn ;; -esac - - echo " p->$tmp_fbase = vec.$tmp_fbase; \\" >>fat.h - done - for tmp_tn in $fat_thresholds; do - tmp_field_name=`echo $tmp_tn | tr [A-Z] [a-z]` - echo " p->$tmp_field_name = vec.$tmp_field_name; \\" >>fat.h - done - echo " } while (0)" >>fat.h - - echo " -/* A helper to check all fields are filled. */ -#define ASSERT_CPUVEC(vec) \\ - do { \\" >>fat.h - for tmp_fn in $fat_functions; do - case $tmp_fn in - dive_1) tmp_fbase=divexact_1 ;; - diveby3) tmp_fbase=divexact_by3c ;; - pre_divrem_1) tmp_fbase=preinv_divrem_1 ;; - mode1o) tmp_fbase=modexact_1c_odd ;; - pre_mod_1) tmp_fbase=preinv_mod_1 ;; - mod_1_1) tmp_fbase=mod_1_1p ;; - mod_1_1_cps) tmp_fbase=mod_1_1p_cps ;; - mod_1_2) tmp_fbase=mod_1s_2p ;; - mod_1_2_cps) tmp_fbase=mod_1s_2p_cps ;; - mod_1_3) tmp_fbase=mod_1s_3p ;; - mod_1_3_cps) tmp_fbase=mod_1s_3p_cps ;; - mod_1_4) tmp_fbase=mod_1s_4p ;; - mod_1_4_cps) tmp_fbase=mod_1s_4p_cps ;; - *) tmp_fbase=$tmp_fn ;; -esac - - echo " ASSERT (vec.$tmp_fbase != NULL); \\" >>fat.h - done - for tmp_tn in $fat_thresholds; do - tmp_field_name=`echo $tmp_tn | tr [A-Z] [a-z]` - echo " ASSERT (vec.$tmp_field_name != 0); \\" >>fat.h - done - echo " } while (0)" >>fat.h - - echo " -/* Call ITERATE(field) for each fat threshold field. */ -#define ITERATE_FAT_THRESHOLDS() \\ - do { \\" >>fat.h - for tmp_tn in $fat_thresholds; do - tmp_field_name=`echo $tmp_tn | tr [A-Z] [a-z]` - echo " ITERATE ($tmp_tn, $tmp_field_name); \\" >>fat.h - done - echo " } while (0)" >>fat.h - - for tmp_dir in $fat_path; do - CPUVEC_SETUP= - THRESH_ASM_SETUP= - echo "" >>fat.h - tmp_suffix=`echo $tmp_dir | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'` - - # In order to keep names unique on a DOS 8.3 filesystem, use a prefix - # (rather than a suffix) for the generated file names, and abbreviate. - case $tmp_suffix in - pentium) tmp_prefix=p ;; - pentium_mmx) tmp_prefix=pm ;; - p6_mmx) tmp_prefix=p2 ;; - p6_p3mmx) tmp_prefix=p3 ;; - pentium4) tmp_prefix=p4 ;; - pentium4_mmx) tmp_prefix=p4m ;; - pentium4_sse2) tmp_prefix=p4s ;; - k6_mmx) tmp_prefix=k6m ;; - k6_k62mmx) tmp_prefix=k62 ;; - k7_mmx) tmp_prefix=k7m ;; - *) tmp_prefix=$tmp_suffix ;; - esac - - # Extract desired thresholds from gmp-mparam.h file in this directory, - # if present. - tmp_mparam=$srcdir/mpn/$tmp_dir/gmp-mparam.h - if test -f $tmp_mparam; then - for tmp_tn in $fat_thresholds; do - tmp_thresh=`sed -n "s/^#define $tmp_tn[ ]*\\([0-9][0-9]*\\).*$/\\1/p" $tmp_mparam` - if test -n "$tmp_thresh"; then - THRESH_ASM_SETUP="${THRESH_ASM_SETUP}define($tmp_tn,$tmp_thresh) -" - CPUVEC_SETUP="$CPUVEC_SETUP decided_cpuvec.`echo $tmp_tn | tr [A-Z] [a-z]` = $tmp_thresh; \\ -" - eval tmp_limit=\$${tmp_tn}_LIMIT - if test -z "$tmp_limit"; then - tmp_limit=0 - fi - if test $tmp_thresh -gt $tmp_limit; then - eval ${tmp_tn}_LIMIT=$tmp_thresh - fi - fi - done - fi - - for tmp_fn in $fat_functions; do - # functions that can be provided by multi-function files -tmp_mulfunc= -case $tmp_fn in - add_n|sub_n) tmp_mulfunc="aors_n" ;; - add_err1_n|sub_err1_n) - tmp_mulfunc="aors_err1_n" ;; - add_err2_n|sub_err2_n) - tmp_mulfunc="aors_err2_n" ;; - add_err3_n|sub_err3_n) - tmp_mulfunc="aors_err3_n" ;; - cnd_add_n|cnd_sub_n) tmp_mulfunc="cnd_aors_n" ;; - sec_add_1|sec_sub_1) tmp_mulfunc="sec_aors_1" ;; - addmul_1|submul_1) tmp_mulfunc="aorsmul_1" ;; - mul_2|addmul_2) tmp_mulfunc="aormul_2" ;; - mul_3|addmul_3) tmp_mulfunc="aormul_3" ;; - mul_4|addmul_4) tmp_mulfunc="aormul_4" ;; - popcount|hamdist) tmp_mulfunc="popham" ;; - and_n|andn_n|nand_n | ior_n|iorn_n|nior_n | xor_n|xnor_n) - tmp_mulfunc="logops_n" ;; - lshift|rshift) tmp_mulfunc="lorrshift";; - addlsh1_n) - tmp_mulfunc="aorslsh1_n aorrlsh1_n aorsorrlsh1_n";; - sublsh1_n) - tmp_mulfunc="aorslsh1_n sorrlsh1_n aorsorrlsh1_n";; - rsblsh1_n) - tmp_mulfunc="aorrlsh1_n sorrlsh1_n aorsorrlsh1_n";; - addlsh2_n) - tmp_mulfunc="aorslsh2_n aorrlsh2_n aorsorrlsh2_n";; - sublsh2_n) - tmp_mulfunc="aorslsh2_n sorrlsh2_n aorsorrlsh2_n";; - rsblsh2_n) - tmp_mulfunc="aorrlsh2_n sorrlsh2_n aorsorrlsh2_n";; - addlsh_n) - tmp_mulfunc="aorslsh_n aorrlsh_n aorsorrlsh_n";; - sublsh_n) - tmp_mulfunc="aorslsh_n sorrlsh_n aorsorrlsh_n";; - rsblsh_n) - tmp_mulfunc="aorrlsh_n sorrlsh_n aorsorrlsh_n";; - rsh1add_n|rsh1sub_n) - tmp_mulfunc="rsh1aors_n";; - sec_div_qr|sec_div_r) - tmp_mulfunc="sec_div";; - sec_pi1_div_qr|sec_pi1_div_r) - tmp_mulfunc="sec_pi1_div";; -esac - - - for tmp_base in $tmp_fn $tmp_mulfunc; do - for tmp_ext in asm S s c; do - tmp_file=$srcdir/mpn/$tmp_dir/$tmp_base.$tmp_ext - if test -f $tmp_file; then - - # If the host uses a non-standard ABI, check if tmp_file supports it - # - if test -n "$GMP_NONSTD_ABI" && test $tmp_ext != "c"; then - abi=`sed -n 's/^[ ]*ABI_SUPPORT(\(.*\))/\1/p' $tmp_file ` - if echo "$abi" | grep -q "\\b${GMP_NONSTD_ABI}\\b"; then - true - else - continue - fi - fi - - mpn_objects="$mpn_objects ${tmp_prefix}_$tmp_fn.lo" - mpn_objs_in_libgmp="$mpn_objs_in_libgmp mpn/${tmp_prefix}_$tmp_fn.lo" - - case $tmp_fn in - dive_1) tmp_fbase=divexact_1 ;; - diveby3) tmp_fbase=divexact_by3c ;; - pre_divrem_1) tmp_fbase=preinv_divrem_1 ;; - mode1o) tmp_fbase=modexact_1c_odd ;; - pre_mod_1) tmp_fbase=preinv_mod_1 ;; - mod_1_1) tmp_fbase=mod_1_1p ;; - mod_1_1_cps) tmp_fbase=mod_1_1p_cps ;; - mod_1_2) tmp_fbase=mod_1s_2p ;; - mod_1_2_cps) tmp_fbase=mod_1s_2p_cps ;; - mod_1_3) tmp_fbase=mod_1s_3p ;; - mod_1_3_cps) tmp_fbase=mod_1s_3p_cps ;; - mod_1_4) tmp_fbase=mod_1s_4p ;; - mod_1_4_cps) tmp_fbase=mod_1s_4p_cps ;; - *) tmp_fbase=$tmp_fn ;; -esac - - - # carry-in variant, eg. divrem_1c or modexact_1c_odd - case $tmp_fbase in - *_1*) tmp_fbasec=`echo $tmp_fbase | sed 's/_1/_1c/'` ;; - *) tmp_fbasec=${tmp_fbase}c ;; - esac - - # Create a little file doing an include from srcdir. The - # OPERATION and renamings aren't all needed all the time, but - # they don't hurt if unused. - # - # FIXME: Should generate these via config.status commands. - # Would need them all in one AC_CONFIG_COMMANDS though, since - # that macro doesn't accept a set of separate commands generated - # by shell code. - # - case $tmp_ext in - asm) - # hide the d-n-l from autoconf's error checking - tmp_d_n_l=d""nl - echo "$tmp_d_n_l mpn_$tmp_fbase - from $tmp_dir directory for fat binary. -$tmp_d_n_l Generated by configure - DO NOT EDIT. - -define(OPERATION_$tmp_fn) -define(__gmpn_$tmp_fbase, __gmpn_${tmp_fbase}_$tmp_suffix) -define(__gmpn_$tmp_fbasec,__gmpn_${tmp_fbasec}_${tmp_suffix}) -define(__gmpn_preinv_${tmp_fbase},__gmpn_preinv_${tmp_fbase}_${tmp_suffix}) -define(__gmpn_${tmp_fbase}_cps,__gmpn_${tmp_fbase}_cps_${tmp_suffix}) - -$tmp_d_n_l For k6 and k7 gcd_1 calling their corresponding mpn_modexact_1_odd -ifdef(\`__gmpn_modexact_1_odd',, -\`define(__gmpn_modexact_1_odd,__gmpn_modexact_1_odd_${tmp_suffix})') - -$THRESH_ASM_SETUP -include($mpn_relative_top_srcdir/mpn/$tmp_dir/$tmp_base.asm) -" >mpn/${tmp_prefix}_$tmp_fn.asm - ;; - c) - echo "/* mpn_$tmp_fbase - from $tmp_dir directory for fat binary. - Generated by configure - DO NOT EDIT. */ - -#define OPERATION_$tmp_fn 1 -#define __gmpn_$tmp_fbase __gmpn_${tmp_fbase}_$tmp_suffix -#define __gmpn_$tmp_fbasec __gmpn_${tmp_fbasec}_${tmp_suffix} -#define __gmpn_preinv_${tmp_fbase} __gmpn_preinv_${tmp_fbase}_${tmp_suffix} -#define __gmpn_${tmp_fbase}_cps __gmpn_${tmp_fbase}_cps_${tmp_suffix} - -#include \"$mpn_relative_top_srcdir/mpn/$tmp_dir/$tmp_base.c\" -" >mpn/${tmp_prefix}_$tmp_fn.c - ;; - esac - - # Prototype, and append to CPUVEC_SETUP for this directory. - echo "DECL_$tmp_fbase (__gmpn_${tmp_fbase}_$tmp_suffix);" >>fat.h - CPUVEC_SETUP="$CPUVEC_SETUP decided_cpuvec.$tmp_fbase = __gmpn_${tmp_fbase}_${tmp_suffix}; \\ -" - # Ditto for any preinv variant (preinv_divrem_1, preinv_mod_1). - if grep "^PROLOGUE(mpn_preinv_$tmp_fn)" $tmp_file >/dev/null; then - echo "DECL_preinv_$tmp_fbase (__gmpn_preinv_${tmp_fbase}_$tmp_suffix);" >>fat.h - CPUVEC_SETUP="$CPUVEC_SETUP decided_cpuvec.preinv_$tmp_fbase = __gmpn_preinv_${tmp_fbase}_${tmp_suffix}; \\ -" - fi - - # Ditto for any mod_1...cps variant - if grep "^PROLOGUE(mpn_${tmp_fbase}_cps)" $tmp_file >/dev/null; then - echo "DECL_${tmp_fbase}_cps (__gmpn_${tmp_fbase}_cps_$tmp_suffix);" >>fat.h - CPUVEC_SETUP="$CPUVEC_SETUP decided_cpuvec.${tmp_fbase}_cps = __gmpn_${tmp_fbase}_cps_${tmp_suffix}; \\ -" - fi - fi - done - done - done - - # Emit CPUVEC_SETUP for this directory - echo "" >>fat.h - echo "#define CPUVEC_SETUP_$tmp_suffix \\" >>fat.h - echo " do { \\" >>fat.h - echo "$CPUVEC_SETUP } while (0)" >>fat.h - done - - # Emit threshold limits - echo "" >>fat.h - for tmp_tn in $fat_thresholds; do - eval tmp_limit=\$${tmp_tn}_LIMIT - echo "#define ${tmp_tn}_LIMIT $tmp_limit" >>fat.h - done -fi - - -# Normal binary setups. -# - -for tmp_ext in asm S s c; do - eval found_$tmp_ext=no -done - -for tmp_fn in $gmp_mpn_functions; do - for tmp_ext in asm S s c; do - test "$no_create" = yes || rm -f mpn/$tmp_fn.$tmp_ext - done - - # mpn_preinv_divrem_1 might have been provided by divrem_1.asm, likewise - # mpn_preinv_mod_1 by mod_1.asm. - case $tmp_fn in - pre_divrem_1) - if test "$HAVE_NATIVE_mpn_preinv_divrem_1" = yes; then continue; fi ;; - pre_mod_1) - if test "$HAVE_NATIVE_mpn_preinv_mod_1" = yes; then continue; fi ;; - esac - - # functions that can be provided by multi-function files -tmp_mulfunc= -case $tmp_fn in - add_n|sub_n) tmp_mulfunc="aors_n" ;; - add_err1_n|sub_err1_n) - tmp_mulfunc="aors_err1_n" ;; - add_err2_n|sub_err2_n) - tmp_mulfunc="aors_err2_n" ;; - add_err3_n|sub_err3_n) - tmp_mulfunc="aors_err3_n" ;; - cnd_add_n|cnd_sub_n) tmp_mulfunc="cnd_aors_n" ;; - sec_add_1|sec_sub_1) tmp_mulfunc="sec_aors_1" ;; - addmul_1|submul_1) tmp_mulfunc="aorsmul_1" ;; - mul_2|addmul_2) tmp_mulfunc="aormul_2" ;; - mul_3|addmul_3) tmp_mulfunc="aormul_3" ;; - mul_4|addmul_4) tmp_mulfunc="aormul_4" ;; - popcount|hamdist) tmp_mulfunc="popham" ;; - and_n|andn_n|nand_n | ior_n|iorn_n|nior_n | xor_n|xnor_n) - tmp_mulfunc="logops_n" ;; - lshift|rshift) tmp_mulfunc="lorrshift";; - addlsh1_n) - tmp_mulfunc="aorslsh1_n aorrlsh1_n aorsorrlsh1_n";; - sublsh1_n) - tmp_mulfunc="aorslsh1_n sorrlsh1_n aorsorrlsh1_n";; - rsblsh1_n) - tmp_mulfunc="aorrlsh1_n sorrlsh1_n aorsorrlsh1_n";; - addlsh2_n) - tmp_mulfunc="aorslsh2_n aorrlsh2_n aorsorrlsh2_n";; - sublsh2_n) - tmp_mulfunc="aorslsh2_n sorrlsh2_n aorsorrlsh2_n";; - rsblsh2_n) - tmp_mulfunc="aorrlsh2_n sorrlsh2_n aorsorrlsh2_n";; - addlsh_n) - tmp_mulfunc="aorslsh_n aorrlsh_n aorsorrlsh_n";; - sublsh_n) - tmp_mulfunc="aorslsh_n sorrlsh_n aorsorrlsh_n";; - rsblsh_n) - tmp_mulfunc="aorrlsh_n sorrlsh_n aorsorrlsh_n";; - rsh1add_n|rsh1sub_n) - tmp_mulfunc="rsh1aors_n";; - sec_div_qr|sec_div_r) - tmp_mulfunc="sec_div";; - sec_pi1_div_qr|sec_pi1_div_r) - tmp_mulfunc="sec_pi1_div";; -esac - - - found=no - for tmp_dir in $path; do - for tmp_base in $tmp_fn $tmp_mulfunc; do - for tmp_ext in asm S s c; do - tmp_file=$srcdir/mpn/$tmp_dir/$tmp_base.$tmp_ext - if test -f $tmp_file; then - - # For a nails build, check if the file supports our nail bits. - # Generic code always supports all nails. - # - # FIXME: When a multi-function file is selected to provide one of - # the nails-neutral routines, like logops_n for and_n, the - # PROLOGUE grepping will create HAVE_NATIVE_mpn_<foo> defines for - # all functions in that file, even if they haven't all been - # nailified. Not sure what to do about this, it's only really a - # problem for logops_n, and it's not too terrible to insist those - # get nailified always. - # - if test $GMP_NAIL_BITS != 0 && test $tmp_dir != generic; then - case $tmp_fn in - and_n | ior_n | xor_n | andn_n | \ - copyi | copyd | \ - popcount | hamdist | \ - udiv | udiv_w_sdiv | umul | \ - cntlz | invert_limb) - # these operations are either unaffected by nails or defined - # to operate on full limbs - ;; - *) - nails=`sed -n 's/^[ ]*NAILS_SUPPORT(\(.*\))/\1/p' $tmp_file ` - for n in $nails; do - case $n in - *-*) - n_start=`echo "$n" | sed -n 's/\(.*\)-.*/\1/p'` - n_end=`echo "$n" | sed -n 's/.*-\(.*\)/\1/p'` - ;; - *) - n_start=$n - n_end=$n - ;; - esac - if test $GMP_NAIL_BITS -ge $n_start && test $GMP_NAIL_BITS -le $n_end; then - found=yes - break - fi - done - if test $found != yes; then - continue - fi - ;; - esac - fi - - # If the host uses a non-standard ABI, check if tmp_file supports it - # - if test -n "$GMP_NONSTD_ABI" && test $tmp_ext != "c"; then - abi=`sed -n 's/^[ ]*ABI_SUPPORT(\(.*\))/\1/p' $tmp_file ` - if echo "$abi" | grep -q "\\b${GMP_NONSTD_ABI}\\b"; then - true - else - continue - fi - fi - - found=yes - eval found_$tmp_ext=yes - - if test $tmp_ext = c; then - tmp_u='$U' - else - tmp_u= - fi - - mpn_objects="$mpn_objects $tmp_fn$tmp_u.lo" - mpn_objs_in_libgmp="$mpn_objs_in_libgmp mpn/$tmp_fn$tmp_u.lo" - ac_config_links="$ac_config_links mpn/$tmp_fn.$tmp_ext:mpn/$tmp_dir/$tmp_base.$tmp_ext" - - gmp_srclinks="$gmp_srclinks mpn/$tmp_fn.$tmp_ext" - - # Duplicate AC_DEFINEs are harmless, so it doesn't matter - # that multi-function files get grepped here repeatedly. - # The PROLOGUE pattern excludes the optional second parameter. - gmp_ep=` - sed -n 's/^[ ]*MULFUNC_PROLOGUE(\(.*\))/\1/p' $tmp_file ; - sed -n 's/^[ ]*PROLOGUE(\([^,]*\).*)/\1/p' $tmp_file - ` - for gmp_tmp in $gmp_ep; do - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_NATIVE_$gmp_tmp 1 -_ACEOF - - eval HAVE_NATIVE_$gmp_tmp=yes - done - - case $tmp_fn in - sqr_basecase) sqr_basecase_source=$tmp_file ;; - esac - - break - fi - done - if test $found = yes; then break ; fi - done - if test $found = yes; then break ; fi - done - - if test $found = no; then - for tmp_optional in $gmp_mpn_functions_optional; do - if test $tmp_optional = $tmp_fn; then - found=yes - fi - done - if test $found = no; then - as_fn_error $? "no version of $tmp_fn found in path: $path" "$LINENO" 5 - fi - fi -done - -# All cycle counters are .asm files currently -if test -n "$SPEED_CYCLECOUNTER_OBJ"; then - found_asm=yes -fi - - - - - -# Don't demand an m4 unless it's actually needed. -if test $found_asm = yes; then - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suitable m4" >&5 -$as_echo_n "checking for suitable m4... " >&6; } -if ${gmp_cv_prog_m4+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$M4"; then - gmp_cv_prog_m4="$M4" -else - cat >conftest.m4 <<\EOF -define(dollarhash,``$#'')ifelse(dollarhash(x),1,`define(t1,Y)', -``bad: $# not supported (SunOS /usr/bin/m4) -'')ifelse(eval(89),89,`define(t2,Y)', -`bad: eval() doesnt support 8 or 9 in a constant (OpenBSD 2.6 m4) -')ifelse(eval(9,9),10,`define(t3,Y)', -`bad: eval() doesnt support radix in eval (FreeBSD 8.x,9.0,9.1,9.2 m4) -')ifelse(t1`'t2`'t3,YYY,`good -') -EOF - echo "trying m4" >&5 - gmp_tmp_val=`(m4 conftest.m4) 2>&5` - echo "$gmp_tmp_val" >&5 - if test "$gmp_tmp_val" = good; then - gmp_cv_prog_m4="m4" - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH:/usr/5bin" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - echo "trying $ac_dir/m4" >&5 - gmp_tmp_val=`($ac_dir/m4 conftest.m4) 2>&5` - echo "$gmp_tmp_val" >&5 - if test "$gmp_tmp_val" = good; then - gmp_cv_prog_m4="$ac_dir/m4" - break - fi - done - IFS="$ac_save_ifs" - if test -z "$gmp_cv_prog_m4"; then - as_fn_error $? "No usable m4 in \$PATH or /usr/5bin (see config.log for reasons)." "$LINENO" 5 - fi - fi - rm -f conftest.m4 -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_prog_m4" >&5 -$as_echo "$gmp_cv_prog_m4" >&6; } -M4="$gmp_cv_prog_m4" - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if m4wrap produces spurious output" >&5 -$as_echo_n "checking if m4wrap produces spurious output... " >&6; } -if ${gmp_cv_m4_m4wrap_spurious+:} false; then : - $as_echo_n "(cached) " >&6 -else - # hide the d-n-l from autoconf's error checking -tmp_d_n_l=d""nl -cat >conftest.m4 <<EOF -changequote({,})define(x,)m4wrap({x})$tmp_d_n_l -EOF -echo test input is >&5 -cat conftest.m4 >&5 -tmp_chars=`$M4 conftest.m4 | wc -c` -echo produces $tmp_chars chars output >&5 -rm -f conftest.m4 -if test $tmp_chars = 0; then - gmp_cv_m4_m4wrap_spurious=no -else - gmp_cv_m4_m4wrap_spurious=yes -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_m4_m4wrap_spurious" >&5 -$as_echo "$gmp_cv_m4_m4wrap_spurious" >&6; } - -echo "define(<M4WRAP_SPURIOUS>,<$gmp_cv_m4_m4wrap_spurious>)" >> $gmp_tmpconfigm4 - - -# else -# It's unclear why this m4-not-needed stuff was ever done. -# if test -z "$M4" ; then -# M4=m4-not-needed -# fi -fi - -# Only do the GMP_ASM checks if there's a .S or .asm wanting them. -if test $found_asm = no && test $found_S = no; then - gmp_asm_syntax_testing=no -fi - -if test "$gmp_asm_syntax_testing" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to text section" >&5 -$as_echo_n "checking how to switch to text section... " >&6; } -if ${gmp_cv_asm_text+:} false; then : - $as_echo_n "(cached) " >&6 -else - for i in ".text" ".code" ".csect .text[PR]"; do - echo "trying $i" >&5 - cat >conftest.s <<EOF - $i -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_text=$i - rm -f conftest* - break -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - : -fi -rm -f conftest* - -done -if test -z "$gmp_cv_asm_text"; then - as_fn_error $? "Cannot determine text section directive" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_text" >&5 -$as_echo "$gmp_cv_asm_text" >&6; } -echo "define(<TEXT>, <$gmp_cv_asm_text>)" >> $gmp_tmpconfigm4 - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to data section" >&5 -$as_echo_n "checking how to switch to data section... " >&6; } -if ${gmp_cv_asm_data+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-aix*) gmp_cv_asm_data=".csect .data[RW]" ;; - *) gmp_cv_asm_data=".data" ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_data" >&5 -$as_echo "$gmp_cv_asm_data" >&6; } -echo "define(<DATA>, <$gmp_cv_asm_data>)" >> $gmp_tmpconfigm4 - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler label suffix" >&5 -$as_echo_n "checking for assembler label suffix... " >&6; } -if ${gmp_cv_asm_label_suffix+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_cv_asm_label_suffix=unknown -for i in "" ":"; do - echo "trying $i" >&5 - cat >conftest.s <<EOF - $gmp_cv_asm_text -somelabel$i -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_label_suffix=$i - rm -f conftest* - break -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - cat conftest.out >&5 -fi -rm -f conftest* - -done -if test "$gmp_cv_asm_label_suffix" = "unknown"; then - as_fn_error $? "Cannot determine label suffix" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_label_suffix" >&5 -$as_echo "$gmp_cv_asm_label_suffix" >&6; } -echo "define(<LABEL_SUFFIX>, <$gmp_cv_asm_label_suffix>)" >> $gmp_tmpconfigm4 - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler global directive" >&5 -$as_echo_n "checking for assembler global directive... " >&6; } -if ${gmp_cv_asm_globl+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - hppa*-*-*) gmp_cv_asm_globl=.export ;; - ia64*-*-* | itanium-*-* | itanium2-*-*) gmp_cv_asm_globl=.global ;; - *) gmp_cv_asm_globl=.globl ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_globl" >&5 -$as_echo "$gmp_cv_asm_globl" >&6; } -echo "define(<GLOBL>, <$gmp_cv_asm_globl>)" >> $gmp_tmpconfigm4 - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler global directive attribute" >&5 -$as_echo_n "checking for assembler global directive attribute... " >&6; } -if ${gmp_cv_asm_globl_attr+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $gmp_cv_asm_globl in - .export) gmp_cv_asm_globl_attr=",entry" ;; - *) gmp_cv_asm_globl_attr="" ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_globl_attr" >&5 -$as_echo "$gmp_cv_asm_globl_attr" >&6; } -echo "define(<GLOBL_ATTR>, <$gmp_cv_asm_globl_attr>)" >> $gmp_tmpconfigm4 - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if globals are prefixed by underscore" >&5 -$as_echo_n "checking if globals are prefixed by underscore... " >&6; } -if ${gmp_cv_asm_underscore+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_cv_asm_underscore="unknown" -cat >conftest.c <<EOF -int gurkmacka; -EOF -gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >&5" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - $NM conftest.$OBJEXT >conftest.out - if grep _gurkmacka conftest.out >/dev/null; then - gmp_cv_asm_underscore=yes - elif grep gurkmacka conftest.out >/dev/null; then - gmp_cv_asm_underscore=no - else - echo "configure: $NM doesn't have gurkmacka:" >&5 - cat conftest.out >&5 - fi -else - echo "configure: failed program was:" >&5 - cat conftest.c >&5 -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_underscore" >&5 -$as_echo "$gmp_cv_asm_underscore" >&6; } -case $gmp_cv_asm_underscore in - yes) - -echo 'define(<GSYM_PREFIX>, <_>)' >>$gmp_tmpconfigm4 - ;; - no) - -echo 'define(<GSYM_PREFIX>, <>)' >>$gmp_tmpconfigm4 - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Cannot determine global symbol prefix." >&5 -$as_echo "$as_me: WARNING: | Cannot determine global symbol prefix." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $NM output doesn't contain a global data symbol." >&5 -$as_echo "$as_me: WARNING: | $NM output doesn't contain a global data symbol." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Will proceed with no underscore." >&5 -$as_echo "$as_me: WARNING: | Will proceed with no underscore." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | If this is wrong then you'll get link errors referring" >&5 -$as_echo "$as_me: WARNING: | If this is wrong then you'll get link errors referring" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | to ___gmpn_add_n (note three underscores)." >&5 -$as_echo "$as_me: WARNING: | to ___gmpn_add_n (note three underscores)." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | In this case do a fresh build with an override," >&5 -$as_echo "$as_me: WARNING: | In this case do a fresh build with an override," >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | ./configure gmp_cv_asm_underscore=yes" >&5 -$as_echo "$as_me: WARNING: | ./configure gmp_cv_asm_underscore=yes" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - -echo 'define(<GSYM_PREFIX>, <>)' >>$gmp_tmpconfigm4 - - ;; -esac - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to read-only data section" >&5 -$as_echo_n "checking how to switch to read-only data section... " >&6; } -if ${gmp_cv_asm_rodata+:} false; then : - $as_echo_n "(cached) " >&6 -else - -case $host in -i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | x86_64-*-*) - gmp_cv_asm_rodata="$gmp_cv_asm_data" ;; -*) - gmp_cv_asm_rodata="$gmp_cv_asm_text" ;; -esac - -cat >conftest.c <<EOF -extern const int foo[]; /* Suppresses C++'s suppression of foo */ -const int foo[] = {1,2,3}; -EOF -echo "Test program:" >&5 -cat conftest.c >&5 -gmp_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c >&5" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - echo "Compiler output:" >&5 - cat conftest.s >&5 - if test $gmp_cv_asm_underscore = yes; then - tmp_gsym_prefix=_ - else - tmp_gsym_prefix= - fi - # must see our label - if grep "^${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix" conftest.s >/dev/null 2>&5; then - # take the last directive before our label (hence skipping segments - # getting debugging info etc) - tmp_match=`sed -n "/^${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix/q - /^[. ]*data/p - /^[. ]*rdata/p - /^[. ]*text/p - /^[. ]*section/p - /^[. ]*csect/p - /^[. ]*CSECT/p" conftest.s | sed -n '$p'` - echo "Match: $tmp_match" >&5 - if test -n "$tmp_match"; then - gmp_cv_asm_rodata=$tmp_match - fi - else - echo "Couldn't find label: ^${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix" >&5 - fi -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_rodata" >&5 -$as_echo "$gmp_cv_asm_rodata" >&6; } -echo "define(<RODATA>, <$gmp_cv_asm_rodata>)" >> $gmp_tmpconfigm4 - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .type directive" >&5 -$as_echo_n "checking for assembler .type directive... " >&6; } -if ${gmp_cv_asm_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_cv_asm_type= -for gmp_tmp_prefix in @ \# %; do - cat >conftest.s <<EOF - .type sym,${gmp_tmp_prefix}function -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - if grep "\.type pseudo-op used outside of \.def/\.endef ignored" conftest.out >/dev/null; then : ; - else - gmp_cv_asm_type=".type \$1,${gmp_tmp_prefix}\$2" - break - fi -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - : -fi -rm -f conftest* - -done -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_type" >&5 -$as_echo "$gmp_cv_asm_type" >&6; } -echo "define(<TYPE>, <$gmp_cv_asm_type>)" >> $gmp_tmpconfigm4 - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .size directive" >&5 -$as_echo_n "checking for assembler .size directive... " >&6; } -if ${gmp_cv_asm_size+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_cv_asm_size= -cat >conftest.s <<EOF - .size sym,1 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - if grep "\.size pseudo-op used outside of \.def/\.endef ignored" conftest.out >/dev/null; then : ; - else - gmp_cv_asm_size=".size \$1,\$2" - fi -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - : -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_size" >&5 -$as_echo "$gmp_cv_asm_size" >&6; } -echo "define(<SIZE>, <$gmp_cv_asm_size>)" >> $gmp_tmpconfigm4 - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler local label prefix" >&5 -$as_echo_n "checking for assembler local label prefix... " >&6; } -if ${gmp_cv_asm_lsym_prefix+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_tmp_pre_appears=yes -for gmp_tmp_pre in L .L $L $ L$; do - echo "Trying $gmp_tmp_pre" >&5 - cat >conftest.s <<EOF - $gmp_cv_asm_text -dummy${gmp_cv_asm_label_suffix} -${gmp_tmp_pre}gurkmacka${gmp_cv_asm_label_suffix} -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - if $NM conftest.$OBJEXT >conftest.nm 2>&5; then : ; else - cat conftest.nm >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"$NM\" failure" >&5 -$as_echo "$as_me: WARNING: \"$NM\" failure" >&2;} - break - fi - cat conftest.nm >&5 - if grep gurkmacka conftest.nm >/dev/null; then : ; else - # no mention of the symbol, this is good - echo "$gmp_tmp_pre label doesn't appear in object file at all (good)" >&5 - gmp_cv_asm_lsym_prefix="$gmp_tmp_pre" - gmp_tmp_pre_appears=no - break - fi - if grep ' [a-zN] .*gurkmacka' conftest.nm >/dev/null; then - # symbol mentioned as a local, use this if nothing better - echo "$gmp_tmp_pre label is local but still in object file" >&5 - if test -z "$gmp_cv_asm_lsym_prefix"; then - gmp_cv_asm_lsym_prefix="$gmp_tmp_pre" - fi - else - echo "$gmp_tmp_pre label is something unknown" >&5 - fi - -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - : -fi -rm -f conftest* - -done -rm -f conftest* -if test -z "$gmp_cv_asm_lsym_prefix"; then - gmp_cv_asm_lsym_prefix=L - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine local label, using default $gmp_cv_asm_lsym_prefix" >&5 -$as_echo "$as_me: WARNING: cannot determine local label, using default $gmp_cv_asm_lsym_prefix" >&2;} -fi -# for development purposes, note whether we got a purely temporary local label -echo "Local label appears in object files: $gmp_tmp_pre_appears" >&5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_lsym_prefix" >&5 -$as_echo "$gmp_cv_asm_lsym_prefix" >&6; } -echo "define(<LSYM_PREFIX>, <${gmp_cv_asm_lsym_prefix}>)" >> $gmp_tmpconfigm4 - -cat >>confdefs.h <<_ACEOF -@%:@define LSYM_PREFIX "$gmp_cv_asm_lsym_prefix" -_ACEOF - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler byte directive" >&5 -$as_echo_n "checking for assembler byte directive... " >&6; } -if ${gmp_cv_asm_byte+:} false; then : - $as_echo_n "(cached) " >&6 -else - for i in .byte data1; do - echo "trying $i" >&5 - cat >conftest.s <<EOF - $gmp_cv_asm_data - $i 0 - -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_byte=$i - rm -f conftest* - break -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - cat conftest.out >&5 -fi -rm -f conftest* - -done -if test -z "$gmp_cv_asm_byte"; then - as_fn_error $? "Cannot determine how to emit a data byte" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_byte" >&5 -$as_echo "$gmp_cv_asm_byte" >&6; } - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to define a 32-bit word" >&5 -$as_echo_n "checking how to define a 32-bit word... " >&6; } -if ${gmp_cv_asm_w32+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-hpux*) - # FIXME: HPUX puts first symbol at 0x40000000, breaking our assumption - # that it's at 0x0. We'll have to declare another symbol before the - # .long/.word and look at the distance between the two symbols. The - # only problem is that the sed expression(s) barfs (on Solaris, for - # example) for the symbol with value 0. For now, HPUX uses .word. - gmp_cv_asm_w32=".word" - ;; - *-*-*) - gmp_tmp_val= - for gmp_tmp_op in .long .word data4; do - cat >conftest.s <<EOF - $gmp_cv_asm_data - $gmp_cv_asm_globl foo - $gmp_tmp_op 0 -foo$gmp_cv_asm_label_suffix - $gmp_cv_asm_byte 0 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_tmp_val=`$NM conftest.$OBJEXT | grep foo | \ - sed -e 's;[[][0-9][]]\(.*\);\1;' -e 's;[^1-9]*\([0-9]*\).*;\1;'` - if test "$gmp_tmp_val" = 4; then - gmp_cv_asm_w32="$gmp_tmp_op" - break - fi -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - : -fi -rm -f conftest* - - done - rm -f conftest* - ;; -esac -if test -z "$gmp_cv_asm_w32"; then - as_fn_error $? "cannot determine how to define a 32-bit word" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_w32" >&5 -$as_echo "$gmp_cv_asm_w32" >&6; } -echo "define(<W32>, <$gmp_cv_asm_w32>)" >> $gmp_tmpconfigm4 - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if .align assembly directive is logarithmic" >&5 -$as_echo_n "checking if .align assembly directive is logarithmic... " >&6; } -if ${gmp_cv_asm_align_log+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - $gmp_cv_asm_data - .align 4 - $gmp_cv_asm_globl foo - $gmp_cv_asm_byte 1 - .align 4 -foo$gmp_cv_asm_label_suffix - $gmp_cv_asm_byte 2 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_tmp_val=`$NM conftest.$OBJEXT | grep foo | \ - sed -e 's;[[][0-9][]]\(.*\);\1;' -e 's;[^1-9]*\([0-9]*\).*;\1;'` - if test "$gmp_tmp_val" = "10" || test "$gmp_tmp_val" = "16"; then - gmp_cv_asm_align_log=yes - else - gmp_cv_asm_align_log=no - fi -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - as_fn_error $? "cannot assemble alignment test" "$LINENO" 5 -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_align_log" >&5 -$as_echo "$gmp_cv_asm_align_log" >&6; } - - -echo "define(<ALIGN_LOGARITHMIC>,<$gmp_cv_asm_align_log>)" >> $gmp_tmpconfigm4 - - - - case $host in - hppa*-*-*) - # for both pa32 and pa64 - -echo "include_mpn(\`pa32/pa-defs.m4')" >> $gmp_tmpconfigm4i - - ;; - ia64*-*-* | itanium-*-* | itanium2-*-*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler .align padding is good" >&5 -$as_echo_n "checking whether assembler .align padding is good... " >&6; } -if ${gmp_cv_asm_ia64_align_ok+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.awk <<\EOF -BEGIN { - want[0] = "011" - want[1] = "160" - want[2] = "074" - want[3] = "040" - want[4] = "000" - want[5] = "040" - want[6] = "020" - want[7] = "221" - want[8] = "114" - want[9] = "000" - want[10] = "100" - want[11] = "200" - want[12] = "122" - want[13] = "261" - want[14] = "000" - want[15] = "200" - - want[16] = "000" - want[17] = "004" - want[18] = "000" - want[19] = "000" - want[20] = "000" - want[21] = "000" - want[22] = "002" - want[23] = "000" - want[24] = "000" - want[25] = "000" - want[26] = "000" - want[27] = "001" - want[28] = "000" - want[29] = "000" - want[30] = "000" - want[31] = "014" - - want[32] = "011" - want[33] = "270" - want[34] = "140" - want[35] = "062" - want[36] = "000" - want[37] = "040" - want[38] = "240" - want[39] = "331" - want[40] = "160" - want[41] = "000" - want[42] = "100" - want[43] = "240" - want[44] = "343" - want[45] = "371" - want[46] = "000" - want[47] = "200" - - result = "yes" -} -{ - for (f = 2; f <= NF; f++) - { - for (i = 0; i < 47; i++) - got[i] = got[i+1]; - got[47] = $f; - - found = 1 - for (i = 0; i < 48; i++) - if (got[i] != want[i]) - { - found = 0 - break - } - if (found) - { - result = "no" - exit - } - } -} -END { - print result -} -EOF -cat >conftest.s <<EOF - .text - .align 32 -{ .mmi; add r14 = r15, r16 - add r17 = r18, r19 - add r20 = r21, r22 ;; } - .align 32 -{ .mmi; add r23 = r24, r25 - add r26 = r27, r28 - add r29 = r30, r31 ;; } - -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_ia64_align_ok=`od -b conftest.$OBJEXT | $AWK -f conftest.awk` -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: oops, cannot compile test program" >&5 -$as_echo "$as_me: WARNING: oops, cannot compile test program" >&2;} - gmp_cv_asm_ia64_align_ok=yes -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_ia64_align_ok" >&5 -$as_echo "$gmp_cv_asm_ia64_align_ok" >&6; } - -echo "define(<IA64_ALIGN_OK>, <\`$gmp_cv_asm_ia64_align_ok'>)" >> $gmp_tmpconfigm4 - - - ;; - m68k-*-* | m68[0-9][0-9][0-9]-*-*) - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler instruction and register style" >&5 -$as_echo_n "checking assembler instruction and register style... " >&6; } -if ${gmp_cv_asm_m68k_instruction+:} false; then : - $as_echo_n "(cached) " >&6 -else - for i in "addl %d0,%d1" "add.l %d0,%d1" "addl d0,d1" "add.l d0,d1"; do - cat >conftest.s <<EOF - $gmp_cv_asm_text - $i -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_m68k_instruction=$i - rm -f conftest* - break -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - : -fi -rm -f conftest* - -done -if test -z "$gmp_cv_asm_m68k_instruction"; then - as_fn_error $? "cannot determine assembler instruction and register style" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_m68k_instruction" >&5 -$as_echo "$gmp_cv_asm_m68k_instruction" >&6; } -case $gmp_cv_asm_m68k_instruction in -"addl d0,d1") want_dot_size=no; want_register_percent=no ;; -"addl %d0,%d1") want_dot_size=no; want_register_percent=yes ;; -"add.l d0,d1") want_dot_size=yes; want_register_percent=no ;; -"add.l %d0,%d1") want_dot_size=yes; want_register_percent=yes ;; -*) as_fn_error $? "oops, unrecognised instruction and register style" "$LINENO" 5 ;; -esac - -echo "define(<WANT_REGISTER_PERCENT>, <\`$want_register_percent'>)" >> $gmp_tmpconfigm4 - - -echo "define(<WANT_DOT_SIZE>, <\`$want_dot_size'>)" >> $gmp_tmpconfigm4 - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler addressing style" >&5 -$as_echo_n "checking assembler addressing style... " >&6; } -if ${gmp_cv_asm_m68k_addressing+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $gmp_cv_asm_m68k_instruction in -addl*) movel=movel ;; -add.l*) movel=move.l ;; -*) as_fn_error $? "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;; -esac -case $gmp_cv_asm_m68k_instruction in -*"%d0,%d1") dreg=%d0; areg=%a0 ;; -*"d0,d1") dreg=d0; areg=a0 ;; -*) as_fn_error $? "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;; -esac -cat >conftest.s <<EOF - $gmp_cv_asm_text - $movel $dreg, $areg@- -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_m68k_addressing=mit -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - cat >conftest.s <<EOF - $gmp_cv_asm_text - $movel $dreg, -($areg) -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_m68k_addressing=motorola -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - as_fn_error $? "cannot determine assembler addressing style" "$LINENO" 5 -fi -rm -f conftest* - -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_m68k_addressing" >&5 -$as_echo "$gmp_cv_asm_m68k_addressing" >&6; } - -echo "define(<WANT_ADDRESSING>, <\`$gmp_cv_asm_m68k_addressing'>)" >> $gmp_tmpconfigm4 - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler shortest branches" >&5 -$as_echo_n "checking assembler shortest branches... " >&6; } -if ${gmp_cv_asm_m68k_branches+:} false; then : - $as_echo_n "(cached) " >&6 -else - for i in jra jbra bra; do - cat >conftest.s <<EOF - $gmp_cv_asm_text -foo$gmp_cv_asm_label_suffix - $i foo -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_m68k_branches=$i - rm -f conftest* - break -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - : -fi -rm -f conftest* - -done -if test -z "$gmp_cv_asm_m68k_branches"; then - as_fn_error $? "cannot determine assembler branching style" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_m68k_branches" >&5 -$as_echo "$gmp_cv_asm_m68k_branches" >&6; } - -echo "define(<WANT_BRANCHES>, <\`$gmp_cv_asm_m68k_branches'>)" >> $gmp_tmpconfigm4 - - - ;; - powerpc*-*-* | power[3-9]-*-*) - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler output is PIC by default" >&5 -$as_echo_n "checking whether compiler output is PIC by default... " >&6; } -if ${gmp_cv_asm_powerpc_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_cv_asm_powerpc_pic=yes -cat >conftest.c <<EOF -int foo; -int *bar() { return &foo; } -EOF -echo "Test program:" >&5 -cat conftest.c >&5 -gmp_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c >&5" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - echo "Compiler output:" >&5 - cat conftest.s >&5 - if grep 'foo@ha' conftest.s >/dev/null 2>&5; then - gmp_cv_asm_powerpc_pic=no - fi - if grep 'ha16(_foo)' conftest.s >/dev/null 2>&5; then - gmp_cv_asm_powerpc_pic=no - fi -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_powerpc_pic" >&5 -$as_echo "$gmp_cv_asm_powerpc_pic" >&6; } - -echo "define(<PIC_ALWAYS>,<$gmp_cv_asm_powerpc_pic>)" >> $gmp_tmpconfigm4 - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler needs r on registers" >&5 -$as_echo_n "checking if the assembler needs r on registers... " >&6; } -if ${gmp_cv_asm_powerpc_r_registers+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - $gmp_cv_asm_text - mtctr 6 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_powerpc_r_registers=no -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - cat >conftest.s <<EOF - $gmp_cv_asm_text - mtctr r6 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_powerpc_r_registers=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - as_fn_error $? "neither \"mtctr 6\" nor \"mtctr r6\" works" "$LINENO" 5 -fi -rm -f conftest* - -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_powerpc_r_registers" >&5 -$as_echo "$gmp_cv_asm_powerpc_r_registers" >&6; } - - -echo "define(<WANT_R_REGISTERS>,<$gmp_cv_asm_powerpc_r_registers>)" >> $gmp_tmpconfigm4 - - - -echo "include_mpn(\`powerpc32/powerpc-defs.m4')" >> $gmp_tmpconfigm4i - - - # Check for Linux ELFv2 ABI - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if _CALL_ELF == 2 -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - -echo "define(<ELFv2_ABI>)" >> $gmp_tmpconfigm4 - -fi -rm -f conftest* - - - case $host in - *-*-aix*) - case $ABI in - mode64) -echo "include_mpn(\`powerpc64/aix.m4')" >> $gmp_tmpconfigm4i - ;; - *) -echo "include_mpn(\`powerpc32/aix.m4')" >> $gmp_tmpconfigm4i - ;; - esac - ;; - *-*-linux* | *-*-*bsd*) - case $ABI in - mode64) -echo "include_mpn(\`powerpc64/elf.m4')" >> $gmp_tmpconfigm4i - ;; - mode32 | 32) -echo "include_mpn(\`powerpc32/elf.m4')" >> $gmp_tmpconfigm4i - ;; - esac - ;; - *-*-darwin*) - case $ABI in - mode64) -echo "include_mpn(\`powerpc64/darwin.m4')" >> $gmp_tmpconfigm4i - ;; - mode32 | 32) -echo "include_mpn(\`powerpc32/darwin.m4')" >> $gmp_tmpconfigm4i - ;; - esac - ;; - *) - # Assume unrecognized operating system is the powerpc eABI - -echo "include_mpn(\`powerpc32/eabi.m4')" >> $gmp_tmpconfigm4i - - ;; - esac - ;; - power*-*-aix*) - -echo "include_mpn(\`powerpc32/aix.m4')" >> $gmp_tmpconfigm4i - - ;; - *sparc*-*-*) - case $ABI in - 64) - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler accepts \".register\"" >&5 -$as_echo_n "checking if the assembler accepts \".register\"... " >&6; } -if ${gmp_cv_asm_sparc_register+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - $gmp_cv_asm_text - .register %g2,#scratch - -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_sparc_register=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_sparc_register=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_sparc_register" >&5 -$as_echo "$gmp_cv_asm_sparc_register" >&6; } - - -echo "define(<HAVE_REGISTER>,<$gmp_cv_asm_sparc_register>)" >> $gmp_tmpconfigm4 - - - ;; - esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler accepts gotdata relocations" >&5 -$as_echo_n "checking if the assembler accepts gotdata relocations... " >&6; } -if ${gmp_cv_asm_sparc_gotdata+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - $gmp_cv_asm_text - .text - sethi %gdop_hix22(symbol), %g1 - or %g1, %gdop_lox10(symbol), %g1 - -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_sparc_gotdata=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_sparc_gotdata=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_sparc_gotdata" >&5 -$as_echo "$gmp_cv_asm_sparc_gotdata" >&6; } - - -echo "define(<HAVE_GOTDATA>,<$gmp_cv_asm_sparc_gotdata>)" >> $gmp_tmpconfigm4 - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler can support shared PIC thunks" >&5 -$as_echo_n "checking if the assembler can support shared PIC thunks... " >&6; } -if ${gmp_cv_asm_sparc_shared_thunks+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - $gmp_cv_asm_text - .section .text.__sparc_get_pc_thunk.l7,"axG",@progbits,__sparc_get_pc_thunk.l7,comdat - .weak __sparc_get_pc_thunk.l7 - .hidden __sparc_get_pc_thunk.l7 - .type __sparc_get_pc_thunk.l7, #function -__sparc_get_pc_thunk.l7: - jmp %o7+8 - add %o7, %l7, %l7 - -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_sparc_shared_thunks=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_sparc_shared_thunks=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_sparc_shared_thunks" >&5 -$as_echo "$gmp_cv_asm_sparc_shared_thunks" >&6; } - - -echo "define(<HAVE_SHARED_THUNKS>,<$gmp_cv_asm_sparc_shared_thunks>)" >> $gmp_tmpconfigm4 - - - ;; - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | cabylake*-*-*) - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the .align directive accepts an 0x90 fill in .text" >&5 -$as_echo_n "checking if the .align directive accepts an 0x90 fill in .text... " >&6; } -if ${gmp_cv_asm_align_fill_0x90+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - $gmp_cv_asm_text - .align 4, 0x90 - .byte 0 - .align 4, 0x90 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - if grep "Warning: Fill parameter ignored for executable section" conftest.out >/dev/null; then - echo "Suppressing this warning by omitting 0x90" 1>&5 - gmp_cv_asm_align_fill_0x90=no -else - gmp_cv_asm_align_fill_0x90=yes -fi -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_align_fill_0x90=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_align_fill_0x90" >&5 -$as_echo "$gmp_cv_asm_align_fill_0x90" >&6; } - - -echo "define(<ALIGN_FILL_0x90>,<$gmp_cv_asm_align_fill_0x90>)" >> $gmp_tmpconfigm4 - - - case $ABI in - 32) - -echo "include_mpn(\`x86/x86-defs.m4')" >> $gmp_tmpconfigm4i - - $as_echo "@%:@define HAVE_HOST_CPU_FAMILY_x86 1" >>confdefs.h - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler COFF type directives" >&5 -$as_echo_n "checking for assembler COFF type directives... " >&6; } -if ${gmp_cv_asm_x86_coff_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - $gmp_cv_asm_text - $gmp_cv_asm_globl ${tmp_gsym_prefix}foo$gmp_cv_asm_globl_attr - .def ${tmp_gsym_prefix}foo - .scl 2 - .type 32 - .endef -${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix - -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_x86_coff_type=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_x86_coff_type=no -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_coff_type" >&5 -$as_echo "$gmp_cv_asm_x86_coff_type" >&6; } -echo "define(<HAVE_COFF_TYPE>, <$gmp_cv_asm_x86_coff_type>)" >> $gmp_tmpconfigm4 - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if _GLOBAL_OFFSET_TABLE_ is prefixed by underscore" >&5 -$as_echo_n "checking if _GLOBAL_OFFSET_TABLE_ is prefixed by underscore... " >&6; } -if ${gmp_cv_asm_x86_got_underscore+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_cv_asm_x86_got_underscore="not applicable" -if test $gmp_cv_asm_underscore = yes; then - tmp_gsym_prefix=_ -else - tmp_gsym_prefix= -fi -for tmp_underscore in "" "_"; do - cat >conftest.s <<EOF - $gmp_cv_asm_text - $gmp_cv_asm_globl ${tmp_gsym_prefix}main$gmp_cv_asm_globl_attr -${tmp_gsym_prefix}main$gmp_cv_asm_label_suffix - addl $ ${tmp_underscore}_GLOBAL_OFFSET_TABLE_, %ebx -EOF - gmp_compile="$CCAS $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.s >&5 && $CC $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.$OBJEXT >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$tmp_underscore" = "_"; then - gmp_cv_asm_x86_got_underscore=yes - else - gmp_cv_asm_x86_got_underscore=no - fi - break - fi -done -rm -f conftest* a.out b.out a.exe a_out.exe - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_got_underscore" >&5 -$as_echo "$gmp_cv_asm_x86_got_underscore" >&6; } -if test "$gmp_cv_asm_x86_got_underscore" = "yes"; then - -echo 'define(<GOT_GSYM_PREFIX>, <_>)' >>$gmp_tmpconfigm4 - -else - -echo 'define(<GOT_GSYM_PREFIX>, <>)' >>$gmp_tmpconfigm4 - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler takes cl with shldl" >&5 -$as_echo_n "checking if the assembler takes cl with shldl... " >&6; } -if ${gmp_cv_asm_x86_shldl_cl+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - $gmp_cv_asm_text - shldl %cl, %eax, %ebx -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_x86_shldl_cl=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_x86_shldl_cl=no -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_shldl_cl" >&5 -$as_echo "$gmp_cv_asm_x86_shldl_cl" >&6; } -if test "$gmp_cv_asm_x86_shldl_cl" = "yes"; then - -echo 'define(<WANT_SHLDL_CL>, <1>)' >>$gmp_tmpconfigm4 - -else - -echo 'define(<WANT_SHLDL_CL>, <0>)' >>$gmp_tmpconfigm4 - -fi - - case $enable_profiling in - prof | gprof) @%:@ Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_shared=yes -fi - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call x86 mcount" >&5 -$as_echo_n "checking how to call x86 mcount... " >&6; } -cat >conftest.c <<EOF -foo(){bar();} -EOF - -if test "$enable_static" = yes; then - gmp_asmout_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c 1>&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_asmout_compile\""; } >&5 - (eval $gmp_asmout_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if grep '\.data' conftest.s >/dev/null; then - mcount_nonpic_reg=`sed -n '/esp/!s/.*movl.*,\(%[a-z]*\).*$/\1/p' conftest.s` - else - mcount_nonpic_reg= - fi - mcount_nonpic_call=`grep 'call.*mcount' conftest.s` - if test -z "$mcount_nonpic_call"; then - as_fn_error $? "Cannot find mcount call for non-PIC" "$LINENO" 5 - fi - else - as_fn_error $? "Cannot compile test program for non-PIC" "$LINENO" 5 - fi -fi - -if test "$enable_shared" = yes; then - gmp_asmout_compile="$CC $CFLAGS $CPPFLAGS $lt_prog_compiler_pic -S conftest.c 1>&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_asmout_compile\""; } >&5 - (eval $gmp_asmout_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if grep '\.data' conftest.s >/dev/null; then - case $lt_prog_compiler_pic in - *-DDLL_EXPORT*) - # Windows DLLs have non-PIC style mcount - mcount_pic_reg=`sed -n '/esp/!s/.*movl.*,\(%[a-z]*\).*$/\1/p' conftest.s` - ;; - *) - mcount_pic_reg=`sed -n 's/.*GOTOFF.*,\(%[a-z]*\).*$/\1/p' conftest.s` - ;; - esac - else - mcount_pic_reg= - fi - mcount_pic_call=`grep 'call.*mcount' conftest.s` - if test -z "$mcount_pic_call"; then - as_fn_error $? "Cannot find mcount call for PIC" "$LINENO" 5 - fi - else - as_fn_error $? "Cannot compile test program for PIC" "$LINENO" 5 - fi -fi - - -echo "define(<MCOUNT_NONPIC_REG>, <\`$mcount_nonpic_reg'>)" >> $gmp_tmpconfigm4 - - -echo "define(<MCOUNT_NONPIC_CALL>,<\`$mcount_nonpic_call'>)" >> $gmp_tmpconfigm4 - - -echo "define(<MCOUNT_PIC_REG>, <\`$mcount_pic_reg'>)" >> $gmp_tmpconfigm4 - - -echo "define(<MCOUNT_PIC_CALL>, <\`$mcount_pic_call'>)" >> $gmp_tmpconfigm4 - - -rm -f conftest.* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: determined" >&5 -$as_echo "determined" >&6; } - ;; - esac - case $host in - *-*-darwin*) - -echo "include_mpn(\`x86/darwin.m4')" >> $gmp_tmpconfigm4i - ;; - esac - ;; - 64|x32) - -echo "include_mpn(\`x86_64/x86_64-defs.m4')" >> $gmp_tmpconfigm4i - - $as_echo "@%:@define HAVE_HOST_CPU_FAMILY_x86_64 1" >>confdefs.h - - case $host in - *-*-darwin*) - -echo "include_mpn(\`x86_64/darwin.m4')" >> $gmp_tmpconfigm4i - ;; - *-*-mingw* | *-*-cygwin) - -echo "include_mpn(\`x86_64/dos64.m4')" >> $gmp_tmpconfigm4i - ;; - *-openbsd*) - -echo "define(<OPENBSD>,1)" >> $gmp_tmpconfigm4 - ;; - esac - ;; - esac - ;; - esac -fi - -# For --enable-minithres, prepend "minithres" to path so that its special -# gmp-mparam.h will be used. -if test $enable_minithres = yes; then - path="minithres $path" -fi - -# Create link for gmp-mparam.h. -gmp_mparam_source= -for gmp_mparam_dir in $path; do - test "$no_create" = yes || rm -f gmp-mparam.h - tmp_file=$srcdir/mpn/$gmp_mparam_dir/gmp-mparam.h - if test -f $tmp_file; then - ac_config_links="$ac_config_links gmp-mparam.h:mpn/$gmp_mparam_dir/gmp-mparam.h" - - gmp_srclinks="$gmp_srclinks gmp-mparam.h" - gmp_mparam_source=$tmp_file - break - fi -done -if test -z "$gmp_mparam_source"; then - as_fn_error $? "no version of gmp-mparam.h found in path: $path" "$LINENO" 5 -fi - -# For a helpful message from tune/tuneup.c -gmp_mparam_suggest=$gmp_mparam_source -if test "$gmp_mparam_dir" = generic; then - for i in $path; do break; done - if test "$i" != generic; then - gmp_mparam_suggest="new file $srcdir/mpn/$i/gmp-mparam.h" - fi -fi - -cat >>confdefs.h <<_ACEOF -@%:@define GMP_MPARAM_H_SUGGEST "$gmp_mparam_source" -_ACEOF - - - -# Copy relevant parameters from gmp-mparam.h to config.m4. -# We only do this for parameters that are used by some assembly files. -# Fat binaries do this on a per-file basis, so skip in that case. -# -if test -z "$fat_path"; then - for i in SQR_TOOM2_THRESHOLD BMOD_1_TO_MOD_1_THRESHOLD SHLD_SLOW SHRD_SLOW; do - value=`sed -n 's/^#define '$i'[ ]*\([0-9][0-9]*\).*$/\1/p' $gmp_mparam_source` - if test -n "$value"; then - -echo "define(<$i>,<$value>)" >> $gmp_tmpconfigm4 - - fi - done -fi - - -# Sizes of some types, needed at preprocessing time. -# -# FIXME: The assumption that GMP_LIMB_BITS is 8*sizeof(mp_limb_t) might -# be slightly rash, but it's true everywhere we know of and ought to be true -# of any sensible system. In a generic C build, grepping LONG_BIT out of -# <limits.h> might be an alternative, for maximum portability. -# -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 -$as_echo_n "checking size of void *... " >&6; } -if ${ac_cv_sizeof_void_p+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_void_p" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (void *) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_void_p=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 -$as_echo "$ac_cv_sizeof_void_p" >&6; } - - - -cat >>confdefs.h <<_ACEOF -@%:@define SIZEOF_VOID_P $ac_cv_sizeof_void_p -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned short" >&5 -$as_echo_n "checking size of unsigned short... " >&6; } -if ${ac_cv_sizeof_unsigned_short+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned short))" "ac_cv_sizeof_unsigned_short" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_unsigned_short" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (unsigned short) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_unsigned_short=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_short" >&5 -$as_echo "$ac_cv_sizeof_unsigned_short" >&6; } - - - -cat >>confdefs.h <<_ACEOF -@%:@define SIZEOF_UNSIGNED_SHORT $ac_cv_sizeof_unsigned_short -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned" >&5 -$as_echo_n "checking size of unsigned... " >&6; } -if ${ac_cv_sizeof_unsigned+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned))" "ac_cv_sizeof_unsigned" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_unsigned" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (unsigned) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_unsigned=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned" >&5 -$as_echo "$ac_cv_sizeof_unsigned" >&6; } - - - -cat >>confdefs.h <<_ACEOF -@%:@define SIZEOF_UNSIGNED $ac_cv_sizeof_unsigned -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 -$as_echo_n "checking size of unsigned long... " >&6; } -if ${ac_cv_sizeof_unsigned_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_unsigned_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (unsigned long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_unsigned_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 -$as_echo "$ac_cv_sizeof_unsigned_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -@%:@define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of mp_limb_t" >&5 -$as_echo_n "checking size of mp_limb_t... " >&6; } -if ${ac_cv_sizeof_mp_limb_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (mp_limb_t))" "ac_cv_sizeof_mp_limb_t" "#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ -#define GMP_NAIL_BITS $GMP_NAIL_BITS -#define GMP_LIMB_BITS 123 -$DEFN_LONG_LONG_LIMB -#include \"$srcdir/gmp-h.in\" - -"; then : - -else - if test "$ac_cv_type_mp_limb_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (mp_limb_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_mp_limb_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_mp_limb_t" >&5 -$as_echo "$ac_cv_sizeof_mp_limb_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -@%:@define SIZEOF_MP_LIMB_T $ac_cv_sizeof_mp_limb_t -_ACEOF - - -if test "$ac_cv_sizeof_mp_limb_t" = 0; then - as_fn_error $? "Oops, mp_limb_t doesn't seem to work" "$LINENO" 5 -fi -GMP_LIMB_BITS=`expr 8 \* $ac_cv_sizeof_mp_limb_t` - - -echo "define(<SIZEOF_UNSIGNED>,<$ac_cv_sizeof_unsigned>)" >> $gmp_tmpconfigm4 - - -# Check compiler limb size matches gmp-mparam.h -# -# FIXME: Some of the cycle counter objects in the tune directory depend on -# the size of ulong, it'd be possible to check that here, though a mismatch -# probably wouldn't want to be fatal, none of the libgmp assembler code -# depends on ulong. -# -mparam_bits=`sed -n 's/^#define GMP_LIMB_BITS[ ][ ]*\([0-9]*\).*$/\1/p' $gmp_mparam_source` -if test -n "$mparam_bits" && test "$mparam_bits" -ne $GMP_LIMB_BITS; then - if test "$test_CFLAGS" = set; then - as_fn_error $? "Oops, mp_limb_t is $GMP_LIMB_BITS bits, but the assembler code -in this configuration expects $mparam_bits bits. -You appear to have set \$CFLAGS, perhaps you also need to tell GMP the -intended ABI, see \"ABI and ISA\" in the manual." "$LINENO" 5 - else - as_fn_error $? "Oops, mp_limb_t is $GMP_LIMB_BITS bits, but the assembler code -in this configuration expects $mparam_bits bits." "$LINENO" 5 - fi -fi - - -echo "define(<GMP_LIMB_BITS>,$GMP_LIMB_BITS)" >> $gmp_tmpconfigm4 - - -echo "define(<GMP_NAIL_BITS>,$GMP_NAIL_BITS)" >> $gmp_tmpconfigm4 - - -echo "define(<GMP_NUMB_BITS>,eval(GMP_LIMB_BITS-GMP_NAIL_BITS))" >> $gmp_tmpconfigm4 - - - - - - - - -# A recompiled sqr_basecase for use in the tune program, if necessary. -TUNE_SQR_OBJ= -test -d tune || mkdir tune -case $sqr_basecase_source in - *.asm) - sqr_max=`sed -n 's/^def...(SQR_TOOM2_THRESHOLD_MAX, *\([0-9]*\))/\1/p' $sqr_basecase_source` - if test -n "$sqr_max"; then - TUNE_SQR_OBJ=sqr_asm.o - -cat >>confdefs.h <<_ACEOF -@%:@define TUNE_SQR_TOOM2_MAX $sqr_max -_ACEOF - - fi - cat >tune/sqr_basecase.c <<EOF -/* not sure that an empty file can compile, so put in a dummy */ -int sqr_basecase_dummy; -EOF - ;; - *.c) - TUNE_SQR_OBJ= - $as_echo "@%:@define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC" >>confdefs.h - - cat >tune/sqr_basecase.c <<EOF -#define TUNE_PROGRAM_BUILD 1 -#define TUNE_PROGRAM_BUILD_SQR 1 -#include "mpn/sqr_basecase.c" -EOF - ;; -esac - - - -# Configs for demos/pexpr.c. -# -ac_config_files="$ac_config_files demos/pexpr-config.h:demos/pexpr-config-h.in" - -case $ac_cv_func_clock in -yes) HAVE_CLOCK_01=1 - ;; -no) HAVE_CLOCK_01=0 ;; -esac - -case $ac_cv_func_cputime in -yes) HAVE_CPUTIME_01=1 - ;; -no) HAVE_CPUTIME_01=0 ;; -esac - -case $ac_cv_func_getrusage in -yes) HAVE_GETRUSAGE_01=1 - ;; -no) HAVE_GETRUSAGE_01=0 ;; -esac - -case $ac_cv_func_gettimeofday in -yes) HAVE_GETTIMEOFDAY_01=1 - ;; -no) HAVE_GETTIMEOFDAY_01=0 ;; -esac - -case $ac_cv_func_sigaction in -yes) HAVE_SIGACTION_01=1 - ;; -no) HAVE_SIGACTION_01=0 ;; -esac - -case $ac_cv_func_sigaltstack in -yes) HAVE_SIGALTSTACK_01=1 - ;; -no) HAVE_SIGALTSTACK_01=0 ;; -esac - -case $ac_cv_func_sigstack in -yes) HAVE_SIGSTACK_01=1 - ;; -no) HAVE_SIGSTACK_01=0 ;; -esac - - -case $ac_cv_header_sys_resource_h in -yes) HAVE_SYS_RESOURCE_H_01=1 - ;; -no) HAVE_SYS_RESOURCE_H_01=0 ;; -esac - - -ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include <signal.h> -" -if test "x$ac_cv_type_stack_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_STACK_T 1 -_ACEOF - -HAVE_STACK_T_01=1 -else - HAVE_STACK_T_01=0 -fi - - - -# Configs for demos/calc directory -# -# AC_SUBST+AC_CONFIG_FILES is used for calc-config.h, rather than AC_DEFINE+ -# AC_CONFIG_HEADERS, since with the latter automake (1.8) will then put the -# directory (ie. demos/calc) into $(DEFAULT_INCLUDES) for every Makefile.in, -# which would look very strange. -# -# -lcurses is required by libreadline. On a typical SVR4 style system this -# normally doesn't have to be given explicitly, since libreadline.so will -# have a NEEDED record for it. But if someone for some reason is using only -# a static libreadline.a then we must give -lcurses. Readline (as of -# version 4.3) doesn't use libtool, so we can't rely on a .la to cover -# necessary dependencies. -# -# On a couple of systems we've seen libreadline available, but the headers -# not in the default include path, so check for readline/readline.h. We've -# also seen readline/history.h missing, not sure if that's just a broken -# install or a very old version, but check that too. -# -ac_config_files="$ac_config_files demos/calc/calc-config.h:demos/calc/calc-config-h.in" - -LIBCURSES= -if test $with_readline != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lncurses" >&5 -$as_echo_n "checking for tputs in -lncurses... " >&6; } -if ${ac_cv_lib_ncurses_tputs+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lncurses $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tputs (); -int -main () -{ -return tputs (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ncurses_tputs=yes -else - ac_cv_lib_ncurses_tputs=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tputs" >&5 -$as_echo "$ac_cv_lib_ncurses_tputs" >&6; } -if test "x$ac_cv_lib_ncurses_tputs" = xyes; then : - LIBCURSES=-lncurses -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lcurses" >&5 -$as_echo_n "checking for tputs in -lcurses... " >&6; } -if ${ac_cv_lib_curses_tputs+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcurses $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tputs (); -int -main () -{ -return tputs (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_curses_tputs=yes -else - ac_cv_lib_curses_tputs=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tputs" >&5 -$as_echo "$ac_cv_lib_curses_tputs" >&6; } -if test "x$ac_cv_lib_curses_tputs" = xyes; then : - LIBCURSES=-lcurses -fi - -fi - -fi - -use_readline=$with_readline -if test $with_readline = detect; then - use_readline=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 -$as_echo_n "checking for readline in -lreadline... " >&6; } -if ${ac_cv_lib_readline_readline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lreadline $LIBCURSES $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char readline (); -int -main () -{ -return readline (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_readline_readline=yes -else - ac_cv_lib_readline_readline=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 -$as_echo "$ac_cv_lib_readline_readline" >&6; } -if test "x$ac_cv_lib_readline_readline" = xyes; then : - ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_readline_h" = xyes; then : - ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_history_h" = xyes; then : - use_readline=yes -fi - - -fi - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking readline detected" >&5 -$as_echo_n "checking readline detected... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_readline" >&5 -$as_echo "$use_readline" >&6; } -fi -if test $use_readline = yes; then - WITH_READLINE_01=1 - - LIBREADLINE=-lreadline - -else - WITH_READLINE_01=0 -fi -for ac_prog in 'bison -y' byacc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_YACC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_YACC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -YACC=$ac_cv_prog_YACC -if test -n "$YACC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 -$as_echo "$YACC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$YACC" && break -done -test -n "$YACC" || YACC="yacc" - -for ac_prog in flex lex -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LEX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LEX"; then - ac_cv_prog_LEX="$LEX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LEX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LEX=$ac_cv_prog_LEX -if test -n "$LEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 -$as_echo "$LEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$LEX" && break -done -test -n "$LEX" || LEX=":" - -if test "x$LEX" != "x:"; then - cat >conftest.l <<_ACEOF -%% -a { ECHO; } -b { REJECT; } -c { yymore (); } -d { yyless (1); } -e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ - yyless ((input () != 0)); } -f { unput (yytext[0]); } -. { BEGIN INITIAL; } -%% -#ifdef YYTEXT_POINTER -extern char *yytext; -#endif -int -main (void) -{ - return ! yylex () + ! yywrap (); -} -_ACEOF -{ { ac_try="$LEX conftest.l" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$LEX conftest.l") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 -$as_echo_n "checking lex output file root... " >&6; } -if ${ac_cv_prog_lex_root+:} false; then : - $as_echo_n "(cached) " >&6 -else - -if test -f lex.yy.c; then - ac_cv_prog_lex_root=lex.yy -elif test -f lexyy.c; then - ac_cv_prog_lex_root=lexyy -else - as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 -$as_echo "$ac_cv_prog_lex_root" >&6; } -LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root - -if test -z "${LEXLIB+set}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 -$as_echo_n "checking lex library... " >&6; } -if ${ac_cv_lib_lex+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ac_save_LIBS=$LIBS - ac_cv_lib_lex='none needed' - for ac_lib in '' -lfl -ll; do - LIBS="$ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lex=$ac_lib -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - test "$ac_cv_lib_lex" != 'none needed' && break - done - LIBS=$ac_save_LIBS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 -$as_echo "$ac_cv_lib_lex" >&6; } - test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 -$as_echo_n "checking whether yytext is a pointer... " >&6; } -if ${ac_cv_prog_lex_yytext_pointer+:} false; then : - $as_echo_n "(cached) " >&6 -else - # POSIX says lex can declare yytext either as a pointer or an array; the -# default is implementation-dependent. Figure out which it is, since -# not all implementations provide the %pointer and %array declarations. -ac_cv_prog_lex_yytext_pointer=no -ac_save_LIBS=$LIBS -LIBS="$LEXLIB $ac_save_LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #define YYTEXT_POINTER 1 -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_prog_lex_yytext_pointer=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_save_LIBS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 -$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } -if test $ac_cv_prog_lex_yytext_pointer = yes; then - -$as_echo "@%:@define YYTEXT_POINTER 1" >>confdefs.h - -fi -rm -f conftest.l $LEX_OUTPUT_ROOT.c - -fi -if test "$LEX" = :; then - LEX=${am_missing_run}flex -fi - -# Configs for demos/expr directory -# -# Libtool already runs an AC_CHECK_TOOL for ranlib, but we give -# AC_PROG_RANLIB anyway since automake is supposed to complain if it's not -# called. (Automake 1.8.4 doesn't, at least not when the only library is in -# an EXTRA_LIBRARIES.) -# -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - - - -# Create config.m4. - -echo "creating $gmp_configm4" -echo "d""nl $gmp_configm4. Generated automatically by configure." > $gmp_configm4 -if test -f $gmp_tmpconfigm4; then - echo "changequote(<,>)" >> $gmp_configm4 - echo "ifdef(<__CONFIG_M4_INCLUDED__>,,<" >> $gmp_configm4 - cat $gmp_tmpconfigm4 >> $gmp_configm4 - echo ">)" >> $gmp_configm4 - echo "changequote(\`,')" >> $gmp_configm4 - rm $gmp_tmpconfigm4 -fi -echo "ifdef(\`__CONFIG_M4_INCLUDED__',,\`" >> $gmp_configm4 -if test -f $gmp_tmpconfigm4i; then - cat $gmp_tmpconfigm4i >> $gmp_configm4 - rm $gmp_tmpconfigm4i -fi -if test -f $gmp_tmpconfigm4p; then - cat $gmp_tmpconfigm4p >> $gmp_configm4 - rm $gmp_tmpconfigm4p -fi -echo "')" >> $gmp_configm4 -echo "define(\`__CONFIG_M4_INCLUDED__')" >> $gmp_configm4 - - -# Create Makefiles -# FIXME: Upcoming version of autoconf/automake may not like broken lines. -# Right now automake isn't accepting the new AC_CONFIG_FILES scheme. - -ac_config_files="$ac_config_files Makefile mpf/Makefile mpn/Makefile mpq/Makefile mpz/Makefile printf/Makefile scanf/Makefile rand/Makefile cxx/Makefile tests/Makefile tests/devel/Makefile tests/mpf/Makefile tests/mpn/Makefile tests/mpq/Makefile tests/mpz/Makefile tests/rand/Makefile tests/misc/Makefile tests/cxx/Makefile doc/Makefile tune/Makefile demos/Makefile demos/calc/Makefile demos/expr/Makefile gmp.h:gmp-h.in" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIB@&t@OBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WANT_CXX_TRUE}" && test -z "${WANT_CXX_FALSE}"; then - as_fn_error $? "conditional \"WANT_CXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${ENABLE_STATIC_TRUE}" && test -z "${ENABLE_STATIC_FALSE}"; then - as_fn_error $? "conditional \"ENABLE_STATIC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in @%:@( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in @%:@(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] -@%:@ ---------------------------------------- -@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are -@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the -@%:@ script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} @%:@ as_fn_error - - -@%:@ as_fn_set_status STATUS -@%:@ ----------------------- -@%:@ Set @S|@? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} @%:@ as_fn_set_status - -@%:@ as_fn_exit STATUS -@%:@ ----------------- -@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} @%:@ as_fn_exit - -@%:@ as_fn_unset VAR -@%:@ --------------- -@%:@ Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -@%:@ as_fn_append VAR VALUE -@%:@ ---------------------- -@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take -@%:@ advantage of any shell optimizations that allow amortized linear growth over -@%:@ repeated appends, instead of the typical quadratic growth present in naive -@%:@ implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -@%:@ as_fn_arith ARG... -@%:@ ------------------ -@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the -@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments -@%:@ must be portable across @S|@(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in @%:@((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -@%:@ as_fn_mkdir_p -@%:@ ------------- -@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} @%:@ as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -@%:@ as_fn_executable_p FILE -@%:@ ----------------------- -@%:@ Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} @%:@ as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by GNU MP $as_me 6.1.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_links="$ac_config_links" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration links: -$config_links - -Configuration commands: -$config_commands - -Report bugs to <gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html>. -GNU MP home page: <http://www.gnu.org/software/gmp/>. -General help using GNU software: <http://www.gnu.org/gethelp/>." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -GNU MP config.status 6.1.0 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX -@%:@@%:@ Running $as_me. @%:@@%:@ -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' -configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' -predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' -predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' -postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' -reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' -reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in NM \ -AS \ -DLLTOOL \ -OBJDUMP \ -SHELL \ -ECHO \ -PATH_SEPARATOR \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_import \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_cv_nm_interface \ -nm_file_list_spec \ -lt_cv_truncate_bin \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib \ -compiler_lib_search_dirs \ -predep_objects \ -postdep_objects \ -predeps \ -postdeps \ -compiler_lib_search_path \ -LD_CXX \ -reload_flag_CXX \ -compiler_CXX \ -lt_prog_compiler_no_builtin_flag_CXX \ -lt_prog_compiler_pic_CXX \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_static_CXX \ -lt_cv_prog_compiler_c_o_CXX \ -export_dynamic_flag_spec_CXX \ -whole_archive_flag_spec_CXX \ -compiler_needs_object_CXX \ -with_gnu_ld_CXX \ -allow_undefined_flag_CXX \ -no_undefined_flag_CXX \ -hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_separator_CXX \ -exclude_expsyms_CXX \ -include_expsyms_CXX \ -file_list_spec_CXX \ -compiler_lib_search_dirs_CXX \ -predep_objects_CXX \ -postdep_objects_CXX \ -predeps_CXX \ -postdeps_CXX \ -compiler_lib_search_path_CXX; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -configure_time_dlsearch_path \ -configure_time_lt_sys_library_path \ -reload_cmds_CXX \ -old_archive_cmds_CXX \ -old_archive_from_new_cmds_CXX \ -old_archive_from_expsyms_cmds_CXX \ -archive_cmds_CXX \ -archive_expsym_cmds_CXX \ -module_cmds_CXX \ -module_expsym_cmds_CXX \ -export_symbols_cmds_CXX \ -prelink_cmds_CXX \ -postlink_cmds_CXX; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' - -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile' - - - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "mpn/$tmp_fn.$tmp_ext") CONFIG_LINKS="$CONFIG_LINKS mpn/$tmp_fn.$tmp_ext:mpn/$tmp_dir/$tmp_base.$tmp_ext" ;; - "gmp-mparam.h") CONFIG_LINKS="$CONFIG_LINKS gmp-mparam.h:mpn/$gmp_mparam_dir/gmp-mparam.h" ;; - "demos/pexpr-config.h") CONFIG_FILES="$CONFIG_FILES demos/pexpr-config.h:demos/pexpr-config-h.in" ;; - "demos/calc/calc-config.h") CONFIG_FILES="$CONFIG_FILES demos/calc/calc-config.h:demos/calc/calc-config-h.in" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "mpf/Makefile") CONFIG_FILES="$CONFIG_FILES mpf/Makefile" ;; - "mpn/Makefile") CONFIG_FILES="$CONFIG_FILES mpn/Makefile" ;; - "mpq/Makefile") CONFIG_FILES="$CONFIG_FILES mpq/Makefile" ;; - "mpz/Makefile") CONFIG_FILES="$CONFIG_FILES mpz/Makefile" ;; - "printf/Makefile") CONFIG_FILES="$CONFIG_FILES printf/Makefile" ;; - "scanf/Makefile") CONFIG_FILES="$CONFIG_FILES scanf/Makefile" ;; - "rand/Makefile") CONFIG_FILES="$CONFIG_FILES rand/Makefile" ;; - "cxx/Makefile") CONFIG_FILES="$CONFIG_FILES cxx/Makefile" ;; - "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - "tests/devel/Makefile") CONFIG_FILES="$CONFIG_FILES tests/devel/Makefile" ;; - "tests/mpf/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mpf/Makefile" ;; - "tests/mpn/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mpn/Makefile" ;; - "tests/mpq/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mpq/Makefile" ;; - "tests/mpz/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mpz/Makefile" ;; - "tests/rand/Makefile") CONFIG_FILES="$CONFIG_FILES tests/rand/Makefile" ;; - "tests/misc/Makefile") CONFIG_FILES="$CONFIG_FILES tests/misc/Makefile" ;; - "tests/cxx/Makefile") CONFIG_FILES="$CONFIG_FILES tests/cxx/Makefile" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "tune/Makefile") CONFIG_FILES="$CONFIG_FILES tune/Makefile" ;; - "demos/Makefile") CONFIG_FILES="$CONFIG_FILES demos/Makefile" ;; - "demos/calc/Makefile") CONFIG_FILES="$CONFIG_FILES demos/calc/Makefile" ;; - "demos/expr/Makefile") CONFIG_FILES="$CONFIG_FILES demos/expr/Makefile" ;; - "gmp.h") CONFIG_FILES="$CONFIG_FILES gmp.h:gmp-h.in" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' <conf$$subs.awk | sed ' -/^[^""]/{ - N - s/\n// -} -' >>$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' <confdefs.h | sed ' -s/'"$ac_delim"'/"\\\ -"/g' >>$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - :L) - # - # CONFIG_LINK - # - - if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then - : - else - # Prefer the file from the source tree if names are identical. - if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then - ac_source=$srcdir/$ac_source - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 -$as_echo "$as_me: linking $ac_source to $ac_file" >&6;} - - if test ! -r "$ac_source"; then - as_fn_error $? "$ac_source: file not found" "$LINENO" 5 - fi - rm -f "$ac_file" - - # Try a relative symlink, then a hard link, then a copy. - case $ac_source in - [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; - *) ac_rel_source=$ac_top_build_prefix$ac_source ;; - esac - ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || - ln "$ac_source" "$ac_file" 2>/dev/null || - cp -p "$ac_source" "$ac_file" || - as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 - fi - ;; - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "libtool":C) - - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - - -# The names of the tagged configurations supported by this script. -available_tags='CXX ' - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Assembler program. -AS=$lt_AS - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Object dumper program. -OBJDUMP=$lt_OBJDUMP - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec=$shared_archive_member_spec - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm into a list of symbols to manually relocate. -global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name lister interface. -nm_interface=$lt_lt_cv_nm_interface - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and where our libraries should be installed. -lt_sysroot=$lt_sysroot - -# Command to truncate a binary pipe. -lt_truncate_bin=$lt_lt_cv_truncate_bin - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects -postdep_objects=$lt_postdep_objects -predeps=$lt_predeps -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x@S|@2 in - x) - ;; - *:) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" - ;; - x:*) - eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" - ;; - *) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in @S|@*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain=$ac_aux_dir/ltmain.sh - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# How to create reloadable object files. -reload_flag=$lt_reload_flag_CXX -reload_cmds=$lt_reload_cmds_CXX - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_CXX - -# A language specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU compiler? -with_gcc=$GCC_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_CXX - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_CXX - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_CXX - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_CXX - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_CXX - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds_CXX - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_CXX - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_CXX -postdep_objects=$lt_postdep_objects_CXX -predeps=$lt_predeps_CXX -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# ### END LIBTOOL TAG CONFIG: CXX -_LT_EOF - - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: summary of build options: - - Version: ${PACKAGE_STRING} - Host type: ${host} - ABI: ${ABI} - Install prefix: ${prefix} - Compiler: ${CC} - Static libraries: ${enable_static} - Shared libraries: ${enable_shared} -" >&5 -$as_echo "$as_me: summary of build options: - - Version: ${PACKAGE_STRING} - Host type: ${host} - ABI: ${ABI} - Install prefix: ${prefix} - Compiler: ${CC} - Static libraries: ${enable_static} - Shared libraries: ${enable_shared} -" >&6;} - -if test x$cross_compiling = xyes ; then - case "$host" in - *-*-mingw* | *-*-cygwin) - if test x$ABI = x64 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: If wine64 is installed, use make check TESTS_ENVIRONMENT=wine64." >&5 -$as_echo "$as_me: If wine64 is installed, use make check TESTS_ENVIRONMENT=wine64." >&6;} - else - { $as_echo "$as_me:${as_lineno-$LINENO}: If wine is installed, use make check TESTS_ENVIRONMENT=wine." >&5 -$as_echo "$as_me: If wine is installed, use make check TESTS_ENVIRONMENT=wine." >&6;} - fi - ;; - esac -fi diff --git a/src/plugins/e-acsl/contrib/libgmp/autom4te.cache/output.1 b/src/plugins/e-acsl/contrib/libgmp/autom4te.cache/output.1 deleted file mode 100644 index e5b0da68022..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/autom4te.cache/output.1 +++ /dev/null @@ -1,30704 +0,0 @@ -@%:@! /bin/sh -@%:@ From configure.ac Revision. -@%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.69 for GNU MP 6.1.0. -@%:@ -@%:@ Report bugs to <gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html>. -@%:@ -@%:@ -@%:@ -@%:@ Copyright 1996-2015 Free Software Foundation, Inc. -@%:@ -@%:@ This file is part of the GNU MP Library. -@%:@ -@%:@ The GNU MP Library is free software; you can redistribute it and/or modify -@%:@ it under the terms of either: -@%:@ -@%:@ * the GNU Lesser General Public License as published by the Free -@%:@ Software Foundation; either version 3 of the License, or (at your -@%:@ option) any later version. -@%:@ -@%:@ or -@%:@ -@%:@ * the GNU General Public License as published by the Free Software -@%:@ Foundation; either version 2 of the License, or (at your option) any -@%:@ later version. -@%:@ -@%:@ or both in parallel, as here. -@%:@ -@%:@ The GNU MP Library is distributed in the hope that it will be useful, but -@%:@ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -@%:@ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -@%:@ for more details. -@%:@ -@%:@ You should have received copies of the GNU General Public License and the -@%:@ GNU Lesser General Public License along with the GNU MP Library. If not, -@%:@ see https://www.gnu.org/licenses/. -@%:@ -@%:@ -@%:@ -@%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -@%:@ -@%:@ -@%:@ This configure script is free software; the Free Software Foundation -@%:@ gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in @%:@( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in @%:@(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in @%:@ (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in @%:@( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in @%:@ (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: gmp-bugs@gmplib.org, see -$0: https://gmplib.org/manual/Reporting-Bugs.html about -$0: your system, including any error possibly output before -$0: this message. Then install a modern shell, or manually -$0: run the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -@%:@ as_fn_unset VAR -@%:@ --------------- -@%:@ Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -@%:@ as_fn_set_status STATUS -@%:@ ----------------------- -@%:@ Set @S|@? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} @%:@ as_fn_set_status - -@%:@ as_fn_exit STATUS -@%:@ ----------------- -@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} @%:@ as_fn_exit - -@%:@ as_fn_mkdir_p -@%:@ ------------- -@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} @%:@ as_fn_mkdir_p - -@%:@ as_fn_executable_p FILE -@%:@ ----------------------- -@%:@ Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} @%:@ as_fn_executable_p -@%:@ as_fn_append VAR VALUE -@%:@ ---------------------- -@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take -@%:@ advantage of any shell optimizations that allow amortized linear growth over -@%:@ repeated appends, instead of the typical quadratic growth present in naive -@%:@ implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -@%:@ as_fn_arith ARG... -@%:@ ------------------ -@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the -@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments -@%:@ must be portable across @S|@(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] -@%:@ ---------------------------------------- -@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are -@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the -@%:@ script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} @%:@ as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in @%:@((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 </dev/null -exec 6>&1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIB@&t@OBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='GNU MP' -PACKAGE_TARNAME='gmp' -PACKAGE_VERSION='6.1.0' -PACKAGE_STRING='GNU MP 6.1.0' -PACKAGE_BUGREPORT='gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html' -PACKAGE_URL='http://www.gnu.org/software/gmp/' - -ac_unique_file="gmp-impl.h" -# Factoring default headers for most tests. -ac_includes_default="\ -#include <stdio.h> -#ifdef HAVE_SYS_TYPES_H -# include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -# include <sys/stat.h> -#endif -#ifdef STDC_HEADERS -# include <stdlib.h> -# include <stddef.h> -#else -# ifdef HAVE_STDLIB_H -# include <stdlib.h> -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include <memory.h> -# endif -# include <string.h> -#endif -#ifdef HAVE_STRINGS_H -# include <strings.h> -#endif -#ifdef HAVE_INTTYPES_H -# include <inttypes.h> -#endif -#ifdef HAVE_STDINT_H -# include <stdint.h> -#endif -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIB@&t@OBJS -LEXLIB -LEX_OUTPUT_ROOT -LEX -YFLAGS -YACC -LIBREADLINE -WITH_READLINE_01 -LIBCURSES -HAVE_STACK_T_01 -HAVE_SYS_RESOURCE_H_01 -HAVE_SIGSTACK_01 -HAVE_SIGALTSTACK_01 -HAVE_SIGACTION_01 -HAVE_GETTIMEOFDAY_01 -HAVE_GETRUSAGE_01 -HAVE_CPUTIME_01 -HAVE_CLOCK_01 -TUNE_SQR_OBJ -gmp_srclinks -mpn_objs_in_libgmp -mpn_objects -GMP_LIMB_BITS -M4 -TUNE_LIBS -TAL_OBJECT -LIBM -ENABLE_STATIC_FALSE -ENABLE_STATIC_TRUE -LT_SYS_LIBRARY_PATH -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -RANLIB -ac_ct_AR -LN_S -LD -FGREP -SED -LIBTOOL -LIBGMP_DLL -OBJDUMP -DLLTOOL -AS -NM -ac_ct_DUMPBIN -DUMPBIN -AR -ASMFLAGS -EGREP -GREP -CXXCPP -WANT_CXX_FALSE -WANT_CXX_TRUE -ac_ct_CXX -CXXFLAGS -CXX -CCAS -LIBM_FOR_BUILD -U_FOR_BUILD -EXEEXT_FOR_BUILD -CPP_FOR_BUILD -CC_FOR_BUILD -CPP -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -DEFN_LONG_LONG_LIMB -CALLING_CONVENTIONS_OBJS -SPEED_CYCLECOUNTER_OBJ -LIBGMPXX_LDFLAGS -LIBGMP_LDFLAGS -GMP_LDFLAGS -HAVE_HOST_CPU_FAMILY_powerpc -HAVE_HOST_CPU_FAMILY_power -ABI -GMP_NAIL_BITS -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_maintainer_mode -enable_assert -enable_alloca -enable_cxx -enable_assembly -enable_fft -enable_old_fft_full -enable_nails -enable_profiling -with_readline -enable_fat -enable_minithres -enable_fake_cpuid -enable_shared -enable_static -with_pic -enable_fast_install -with_aix_soname -with_gnu_ld -with_sysroot -enable_libtool_lock -' - ac_precious_vars='build_alias -host_alias -target_alias -ABI -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CC_FOR_BUILD -CPP_FOR_BUILD -CXX -CXXFLAGS -CCC -CXXCPP -LT_SYS_LIBRARY_PATH -M4 -YACC -YFLAGS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures GNU MP 6.1.0 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - @<:@@S|@ac_default_prefix@:>@ - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - @<:@PREFIX@:>@ - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root @<:@DATAROOTDIR/doc/gmp@:>@ - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of GNU MP 6.1.0:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --enable-maintainer-mode - enable make rules and dependencies not useful (and - sometimes confusing) to the casual installer - --enable-assert enable ASSERT checking @<:@default=no@:>@ - --enable-alloca how to get temp memory @<:@default=reentrant@:>@ - --enable-cxx enable C++ support @<:@default=no@:>@ - --enable-assembly enable the use of assembly loops @<:@default=yes@:>@ - --enable-fft enable FFTs for multiplication @<:@default=yes@:>@ - --enable-old-fft-full enable old mpn_mul_fft_full for multiplication - @<:@default=no@:>@ - --enable-nails use nails on limbs @<:@default=no@:>@ - --enable-profiling build with profiler support @<:@default=no@:>@ - --enable-fat build fat libraries on systems that support it - @<:@default=no@:>@ - --enable-minithres choose minimal thresholds for testing @<:@default=no@:>@ - --enable-fake-cpuid enable GMP_CPU_TYPE faking cpuid @<:@default=no@:>@ - --enable-shared@<:@=PKGS@:>@ build shared libraries @<:@default=yes@:>@ - --enable-static@<:@=PKGS@:>@ build static libraries @<:@default=yes@:>@ - --enable-fast-install@<:@=PKGS@:>@ - optimize for fast installation @<:@default=yes@:>@ - --disable-libtool-lock avoid locking (might break parallel builds) - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-readline readline support in demo programs @<:@default=detect@:>@ - --with-pic@<:@=PKGS@:>@ try to use only PIC/non-PIC objects @<:@default=use - both@:>@ - --with-aix-soname=aix|svr4|both - shared library versioning (aka "SONAME") variant to - provide on AIX, @<:@default=aix@:>@. - --with-gnu-ld assume the C compiler uses GNU ld @<:@default=no@:>@ - --with-sysroot@<:@=DIR@:>@ Search for dependent libraries within DIR (or the - compiler's sysroot if not specified). - -Some influential environment variables: - ABI desired ABI (for processors supporting more than one ABI) - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a - nonstandard directory <lib dir> - LIBS libraries to pass to the linker, e.g. -l<library> - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if - you have headers in a nonstandard directory <include dir> - CPP C preprocessor - CC_FOR_BUILD - build system C compiler - CPP_FOR_BUILD - build system C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - LT_SYS_LIBRARY_PATH - User-defined run-time library search path. - M4 m4 macro processor - YACC The `Yet Another Compiler Compiler' implementation to use. - Defaults to the first program found out of: `bison -y', `byacc', - `yacc'. - YFLAGS The list of arguments that will be passed by default to @S|@YACC. - This script will default YFLAGS to the empty string to avoid a - default value of `-d' given by some make applications. - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to <gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html>. -GNU MP home page: <http://www.gnu.org/software/gmp/>. -General help using GNU software: <http://www.gnu.org/gethelp/>. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -GNU MP configure 6.1.0 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. - - - -Copyright 1996-2015 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. - -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -@%:@ ac_fn_c_try_compile LINENO -@%:@ -------------------------- -@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_c_try_compile - -@%:@ ac_fn_c_try_cpp LINENO -@%:@ ---------------------- -@%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_c_try_cpp - -@%:@ ac_fn_cxx_try_compile LINENO -@%:@ ---------------------------- -@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_cxx_try_compile - -@%:@ ac_fn_cxx_try_cpp LINENO -@%:@ ------------------------ -@%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_cxx_try_cpp - -@%:@ ac_fn_c_try_link LINENO -@%:@ ----------------------- -@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_c_try_link - -@%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -@%:@ ------------------------------------------------------- -@%:@ Tests whether HEADER exists and can be compiled using the include files in -@%:@ INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -@%:@include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_check_header_compile - -@%:@ ac_fn_c_try_run LINENO -@%:@ ---------------------- -@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. Assumes -@%:@ that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_c_try_run - -@%:@ ac_fn_c_check_func LINENO FUNC VAR -@%:@ ---------------------------------- -@%:@ Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case <limits.h> declares $2. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_check_func - -@%:@ ac_fn_cxx_try_link LINENO -@%:@ ------------------------- -@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_cxx_try_link - -@%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -@%:@ ------------------------------------------------------- -@%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using -@%:@ the include files in INCLUDES and setting the cache variable VAR -@%:@ accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -@%:@include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ssssssssssssssssssssssssssssssssss ## -## Report this to gmp-bugs@gmplib.org ## -## ssssssssssssssssssssssssssssssssss ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_check_header_mongrel - -@%:@ ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -@%:@ --------------------------------------------- -@%:@ Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -@%:@ accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -@%:@ifndef $as_decl_name -@%:@ifdef __cplusplus - (void) $as_decl_use; -@%:@else - (void) $as_decl_name; -@%:@endif -@%:@endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_check_decl - -@%:@ ac_fn_c_check_type LINENO TYPE VAR INCLUDES -@%:@ ------------------------------------------- -@%:@ Tests whether TYPE exists after having included INCLUDES, setting cache -@%:@ variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_check_type - -@%:@ ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -@%:@ ---------------------------------------------------- -@%:@ Tries to find if the field MEMBER exists in type AGGR, after including -@%:@ INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if eval \${$4+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - eval "$4=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_c_check_member - -@%:@ ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES -@%:@ --------------------------------------------------------- -@%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using -@%:@ the include files in INCLUDES and setting the cache variable VAR -@%:@ accordingly. -ac_fn_cxx_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -@%:@include <$2> -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <$2> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ssssssssssssssssssssssssssssssssss ## -## Report this to gmp-bugs@gmplib.org ## -## ssssssssssssssssssssssssssssssssss ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_cxx_check_header_mongrel - -@%:@ ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES -@%:@ --------------------------------------------- -@%:@ Tests whether TYPE exists after having included INCLUDES, setting cache -@%:@ variable VAR accordingly. -ac_fn_cxx_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} @%:@ ac_fn_cxx_check_type - -@%:@ ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -@%:@ -------------------------------------------- -@%:@ Tries to find the compile-time value of EXPR in a program that includes -@%:@ INCLUDES, setting VAR accordingly. Returns whether the value could be -@%:@ computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array @<:@1 - 2 * !(($2) >= 0)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array @<:@1 - 2 * !(($2) < 0)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array @<:@1 - 2 * !(($2) >= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; -test_array @<:@0@:>@ = 0; -return test_array @<:@0@:>@; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in @%:@(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -@%:@include <stdio.h> -@%:@include <stdlib.h> -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 <conftest.val; ac_retval=0 -else - ac_retval=1 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -rm -f conftest.val - - fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_c_compute_int -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by GNU MP $as_me 6.1.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in @%:@(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - -# If --target is not used then $target_alias is empty, but if say -# "./configure athlon-pc-freebsd3.5" is used, then all three of -# $build_alias, $host_alias and $target_alias are set to -# "athlon-pc-freebsd3.5". -# -if test -n "$target_alias" && test "$target_alias" != "$host_alias"; then - as_fn_error $? "--target is not appropriate for GMP -Use --build=CPU-VENDOR-OS if you need to specify your CPU and/or system -explicitly. Use --host if cross-compiling (see \"Installing GMP\" in the -manual for more on this)." "$LINENO" 5 -fi - -gmp_configm4="config.m4" -gmp_tmpconfigm4=cnfm4.tmp -gmp_tmpconfigm4i=cnfm4i.tmp -gmp_tmpconfigm4p=cnfm4p.tmp -rm -f $gmp_tmpconfigm4 $gmp_tmpconfigm4i $gmp_tmpconfigm4p - -# CONFIG_TOP_SRCDIR is a path from the mpn builddir to the top srcdir. -# The pattern here tests for an absolute path the same way as -# _AC_OUTPUT_FILES in autoconf acgeneral.m4. -case $srcdir in -[\\/]* | ?:[\\/]* ) tmp="$srcdir" ;; -*) tmp="../$srcdir" ;; -esac -echo "define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)" >>$gmp_tmpconfigm4 - -# All CPUs use asm-defs.m4 -echo "include(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')" >>$gmp_tmpconfigm4i - - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - -am__api_version='1.15' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in @%:@(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi - -rm -f conftest.file - -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -@%:@ Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='gmp' - VERSION='6.1.0' - - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -@%:@define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> -# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> -mkdir_p='$(MKDIR_P)' - -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar pax cpio none' - -am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - - - - - - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: <http://www.gnu.org/software/coreutils/>. - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 - fi -fi - -ac_config_headers="$ac_config_headers config.h:config.in" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - @%:@ Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - - - -@%:@ Check whether --enable-assert was given. -if test "${enable_assert+set}" = set; then : - enableval=$enable_assert; case $enableval in -yes|no) ;; -*) as_fn_error $? "bad value $enableval for --enable-assert, need yes or no" "$LINENO" 5 ;; -esac -else - enable_assert=no -fi - - -if test "$enable_assert" = "yes"; then - -$as_echo "@%:@define WANT_ASSERT 1" >>confdefs.h - - want_assert_01=1 -else - want_assert_01=0 -fi - -echo "define(<WANT_ASSERT>,$want_assert_01)" >> $gmp_tmpconfigm4 - - - -@%:@ Check whether --enable-alloca was given. -if test "${enable_alloca+set}" = set; then : - enableval=$enable_alloca; case $enableval in -alloca|malloc-reentrant|malloc-notreentrant) ;; -yes|no|reentrant|notreentrant) ;; -debug) ;; -*) - as_fn_error $? "bad value $enableval for --enable-alloca, need one of: -yes no reentrant notreentrant alloca malloc-reentrant malloc-notreentrant debug" "$LINENO" 5 ;; -esac -else - enable_alloca=reentrant -fi - - - -# IMPROVE ME: The default for C++ is disabled. The tests currently -# performed below for a working C++ compiler are not particularly strong, -# and in general can't be expected to get the right setup on their own. The -# most significant problem is getting the ABI the same. Defaulting CXXFLAGS -# to CFLAGS takes only a small step towards this. It's also probably worth -# worrying whether the C and C++ runtimes from say gcc and a vendor C++ can -# work together. Some rather broken C++ installations were encountered -# during testing, and though such things clearly aren't GMP's problem, if -# --enable-cxx=detect were to be the default then some careful checks of -# which, if any, C++ compiler on the system is up to scratch would be -# wanted. -# -@%:@ Check whether --enable-cxx was given. -if test "${enable_cxx+set}" = set; then : - enableval=$enable_cxx; case $enableval in -yes|no|detect) ;; -*) as_fn_error $? "bad value $enableval for --enable-cxx, need yes/no/detect" "$LINENO" 5 ;; -esac -else - enable_cxx=no -fi - - - -@%:@ Check whether --enable-assembly was given. -if test "${enable_assembly+set}" = set; then : - enableval=$enable_assembly; case $enableval in -yes|no) ;; -*) as_fn_error $? "bad value $enableval for --enable-assembly, need yes or no" "$LINENO" 5 ;; -esac -else - enable_assembly=yes -fi - - -if test "$enable_assembly" = "yes"; then - -$as_echo "@%:@define WANT_ASSEMBLY 1" >>confdefs.h - -fi - - -@%:@ Check whether --enable-fft was given. -if test "${enable_fft+set}" = set; then : - enableval=$enable_fft; case $enableval in -yes|no) ;; -*) as_fn_error $? "bad value $enableval for --enable-fft, need yes or no" "$LINENO" 5 ;; -esac -else - enable_fft=yes -fi - - -if test "$enable_fft" = "yes"; then - -$as_echo "@%:@define WANT_FFT 1" >>confdefs.h - -fi - - -@%:@ Check whether --enable-old-fft-full was given. -if test "${enable_old_fft_full+set}" = set; then : - enableval=$enable_old_fft_full; case $enableval in -yes|no) ;; -*) as_fn_error $? "bad value $enableval for --enable-old-fft-full, need yes or no" "$LINENO" 5 ;; -esac -else - enable_old_fft_full=no -fi - - -if test "$enable_old_fft_full" = "yes"; then - -$as_echo "@%:@define WANT_OLD_FFT_FULL 1" >>confdefs.h - -fi - - -@%:@ Check whether --enable-nails was given. -if test "${enable_nails+set}" = set; then : - enableval=$enable_nails; case $enableval in -yes|no|[02468]|[0-9][02468]) ;; -*[13579]) - as_fn_error $? "bad value $enableval for --enable-nails, only even nail sizes supported" "$LINENO" 5 ;; -*) - as_fn_error $? "bad value $enableval for --enable-nails, need yes/no/number" "$LINENO" 5 ;; -esac -else - enable_nails=no -fi - - -case $enable_nails in -yes) GMP_NAIL_BITS=2 ;; -no) GMP_NAIL_BITS=0 ;; -*) GMP_NAIL_BITS=$enable_nails ;; -esac - - - -@%:@ Check whether --enable-profiling was given. -if test "${enable_profiling+set}" = set; then : - enableval=$enable_profiling; case $enableval in -no|prof|gprof|instrument) ;; -*) as_fn_error $? "bad value $enableval for --enable-profiling, need no/prof/gprof/instrument" "$LINENO" 5 ;; -esac -else - enable_profiling=no -fi - - -case $enable_profiling in - prof) - -$as_echo "@%:@define WANT_PROFILING_PROF 1" >>confdefs.h - - ;; - gprof) - -$as_echo "@%:@define WANT_PROFILING_GPROF 1" >>confdefs.h - - ;; - instrument) - -$as_echo "@%:@define WANT_PROFILING_INSTRUMENT 1" >>confdefs.h - - ;; -esac - - -echo "define(<WANT_PROFILING>,<\`$enable_profiling'>)" >> $gmp_tmpconfigm4 - - -# -fomit-frame-pointer is incompatible with -pg on some chips -if test "$enable_profiling" = gprof; then - fomit_frame_pointer= -else - fomit_frame_pointer="-fomit-frame-pointer" -fi - - - -@%:@ Check whether --with-readline was given. -if test "${with_readline+set}" = set; then : - withval=$with_readline; case $withval in -yes|no|detect) ;; -*) as_fn_error $? "bad value $withval for --with-readline, need yes/no/detect" "$LINENO" 5 ;; -esac -else - with_readline=detect -fi - - - -@%:@ Check whether --enable-fat was given. -if test "${enable_fat+set}" = set; then : - enableval=$enable_fat; case $enableval in -yes|no) ;; -*) as_fn_error $? "bad value $enableval for --enable-fat, need yes or no" "$LINENO" 5 ;; -esac -else - enable_fat=no -fi - - - -@%:@ Check whether --enable-minithres was given. -if test "${enable_minithres+set}" = set; then : - enableval=$enable_minithres; case $enableval in -yes|no) ;; -*) as_fn_error $? "bad value $enableval for --enable-minithres, need yes or no" "$LINENO" 5 ;; -esac -else - enable_minithres=no -fi - - - -@%:@ Check whether --enable-fake-cpuid was given. -if test "${enable_fake_cpuid+set}" = set; then : - enableval=$enable_fake_cpuid; case $enableval in -yes|no) ;; -*) as_fn_error $? "bad value $enableval for --enable-fake-cpuid, need yes or no" "$LINENO" 5 ;; -esac -else - enable_fake_cpuid=no -fi - - -if test "$enable_fake_cpuid" = "yes"; then - -$as_echo "@%:@define WANT_FAKE_CPUID 1" >>confdefs.h - -fi - - -if test $enable_fat = yes && test $enable_assembly = no ; then - as_fn_error $? "when doing a fat build, disabling assembly will not work" "$LINENO" 5 -fi - -if test $enable_fake_cpuid = yes && test $enable_fat = no ; then - as_fn_error $? "--enable-fake-cpuid requires --enable-fat" "$LINENO" 5 -fi - - -tmp_host=`echo $host_cpu | sed 's/\./_/'` -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_HOST_CPU_$tmp_host 1 -_ACEOF - - -echo "define_not_for_expansion(\`HAVE_HOST_CPU_$tmp_host')" >> $gmp_tmpconfigm4p - - - - - - -# Table of compilers, options, and mpn paths. This code has various related -# purposes -# -# - better default CC/CFLAGS selections than autoconf otherwise gives -# - default CC/CFLAGS selections for extra CPU types specific to GMP -# - a few tests for known bad compilers -# - choice of ABIs on suitable systems -# - selection of corresponding mpn search path -# -# After GMP specific searches and tests, the standard autoconf AC_PROG_CC is -# called. User selections of CC etc are respected. -# -# Care is taken not to use macros like AC_TRY_COMPILE during the GMP -# pre-testing, since they of course depend on AC_PROG_CC, and also some of -# them cache their results, which is not wanted. -# -# The ABI selection mechanism is unique to GMP. All that reaches autoconf -# is a different selection of CC/CFLAGS according to the best ABI the system -# supports, and/or what the user selects. Naturally the mpn assembler code -# selected is very dependent on the ABI. -# -# The closest the standard tools come to a notion of ABI is something like -# "sparc64" which encodes a CPU and an ABI together. This doesn't seem to -# scale well for GMP, where exact CPU types like "ultrasparc2" are wanted, -# separate from the ABI used on them. -# -# -# The variables set here are -# -# cclist the compiler choices -# xx_cflags flags for compiler xx -# xx_cflags_maybe flags for compiler xx, if they work -# xx_cppflags cpp flags for compiler xx -# xx_cflags_optlist list of sets of optional flags -# xx_cflags_yyy set yyy of optional flags for compiler xx -# xx_ldflags -Wc,-foo flags for libtool linking with compiler xx -# ar_flags extra flags for $AR -# nm_flags extra flags for $NM -# limb limb size, can be "longlong" -# path mpn search path -# extra_functions extra mpn functions -# fat_path fat binary mpn search path [if fat binary desired] -# fat_functions fat functions -# fat_thresholds fat thresholds -# -# Suppose xx_cflags_optlist="arch", then flags from $xx_cflags_arch are -# tried, and the first flag that works will be used. An optlist like "arch -# cpu optimize" can be used to get multiple independent sets of flags tried. -# The first that works from each will be used. If no flag in a set works -# then nothing from that set is added. -# -# For multiple ABIs, the scheme extends as follows. -# -# abilist set of ABI choices -# cclist_aa compiler choices in ABI aa -# xx_aa_cflags flags for xx in ABI aa -# xx_aa_cflags_maybe flags for xx in ABI aa, if they work -# xx_aa_cppflags cpp flags for xx in ABI aa -# xx_aa_cflags_optlist list of sets of optional flags in ABI aa -# xx_aa_cflags_yyy set yyy of optional flags for compiler xx in ABI aa -# xx_aa_ldflags -Wc,-foo flags for libtool linking -# ar_aa_flags extra flags for $AR in ABI aa -# nm_aa_flags extra flags for $NM in ABI aa -# limb_aa limb size in ABI aa, can be "longlong" -# path_aa mpn search path in ABI aa -# extra_functions_aa extra mpn functions in ABI aa -# -# As a convenience, the unadorned xx_cflags (etc) are used for the last ABI -# in ablist, if an xx_aa_cflags for that ABI isn't given. For example if -# abilist="64 32" then $cc_64_cflags will be used for the 64-bit ABI, but -# for the 32-bit either $cc_32_cflags or $cc_cflags is used, whichever is -# defined. This makes it easy to add some 64-bit compilers and flags to an -# unadorned 32-bit set. -# -# limb=longlong (or limb_aa=longlong) applies to all compilers within that -# ABI. It won't work to have some needing long long and some not, since a -# single instantiated gmp.h will be used by both. -# -# SPEED_CYCLECOUNTER, cyclecounter_size and CALLING_CONVENTIONS_OBJS are -# also set here, with an ABI suffix. -# -# -# -# A table-driven approach like this to mapping cpu type to good compiler -# options is a bit of a maintenance burden, but there's not much uniformity -# between options specifications on different compilers. Some sort of -# separately updatable tool might be cute. -# -# The use of lots of variables like this, direct and indirect, tends to -# obscure when and how various things are done, but unfortunately it's -# pretty much the only way. If shell subroutines were portable then actual -# code like "if this .. do that" could be written, but attempting the same -# with full copies of GMP_PROG_CC_WORKS etc expanded at every point would -# hugely bloat the output. - - - - -# abilist needs to be non-empty, "standard" is just a generic name here -abilist="standard" - -# FIXME: We'd like to prefer an ANSI compiler, perhaps by preferring -# c89 over cc here. But note that on HP-UX c89 provides a castrated -# environment, and would want to be excluded somehow. Maybe -# AC_PROG_CC_STDC already does enough to stick cc into ANSI mode and -# we don't need to worry. -# -cclist="gcc cc" - -gcc_cflags="-O3 -pedantic" -gcc_64_cflags="-O3 -pedantic" -cc_cflags="-O" -cc_64_cflags="-O" - -SPEED_CYCLECOUNTER_OBJ= -cyclecounter_size=2 - -HAVE_HOST_CPU_FAMILY_power=0 - -HAVE_HOST_CPU_FAMILY_powerpc=0 - - -case $host in - - alpha*-*-*) - $as_echo "@%:@define HAVE_HOST_CPU_FAMILY_alpha 1" >>confdefs.h - - case $host_cpu in - alphaev5* | alphapca5*) - path="alpha/ev5 alpha" ;; - alphaev67 | alphaev68 | alphaev7*) - path="alpha/ev67 alpha/ev6 alpha" ;; - alphaev6) - path="alpha/ev6 alpha" ;; - *) - path="alpha" ;; - esac - if test "$enable_assembly" = "yes" ; then - extra_functions="cntlz" - fi - gcc_cflags_optlist="asm cpu oldas" # need asm ahead of cpu, see below - gcc_cflags_maybe="-mieee" - gcc_cflags_oldas="-Wa,-oldas" # see GMP_GCC_WA_OLDAS. - - # gcc 2.7.2.3 doesn't know any -mcpu= for alpha, apparently. - # gcc 2.95 knows -mcpu= ev4, ev5, ev56, pca56, ev6. - # gcc 3.0 adds nothing. - # gcc 3.1 adds ev45, ev67 (but ev45 is the same as ev4). - # gcc 3.2 adds nothing. - # - # gcc version "2.9-gnupro-99r1" under "-O2 -mcpu=ev6" strikes internal - # compiler errors too easily and is rejected by GMP_PROG_CC_WORKS. Each - # -mcpu=ev6 below has a fallback to -mcpu=ev56 for this reason. - # - case $host_cpu in - alpha) gcc_cflags_cpu="-mcpu=ev4" ;; - alphaev5) gcc_cflags_cpu="-mcpu=ev5" ;; - alphaev56) gcc_cflags_cpu="-mcpu=ev56" ;; - alphapca56 | alphapca57) - gcc_cflags_cpu="-mcpu=pca56" ;; - alphaev6) gcc_cflags_cpu="-mcpu=ev6 -mcpu=ev56" ;; - alphaev67 | alphaev68 | alphaev7*) - gcc_cflags_cpu="-mcpu=ev67 -mcpu=ev6 -mcpu=ev56" ;; - esac - - # gcc version "2.9-gnupro-99r1" on alphaev68-dec-osf5.1 has been seen - # accepting -mcpu=ev6, but not putting the assembler in the right mode - # for what it produces. We need to do this for it, and need to do it - # before testing the -mcpu options. - # - # On old versions of gcc, which don't know -mcpu=, we believe an - # explicit -Wa,-mev5 etc will be necessary to put the assembler in - # the right mode for our .asm files and longlong.h asm blocks. - # - # On newer versions of gcc, when -mcpu= is known, we must give a -Wa - # which is at least as high as the code gcc will generate. gcc - # establishes what it needs with a ".arch" directive, our command line - # option seems to override that. - # - # gas prior to 2.14 doesn't accept -mev67, but -mev6 seems enough for - # ctlz and cttz (in 2.10.0 at least). - # - # OSF `as' accepts ev68 but stupidly treats it as ev4. -arch only seems - # to affect insns like ldbu which are expanded as macros when necessary. - # Insns like ctlz which were never available as macros are always - # accepted and always generate their plain code. - # - case $host_cpu in - alpha) gcc_cflags_asm="-Wa,-arch,ev4 -Wa,-mev4" ;; - alphaev5) gcc_cflags_asm="-Wa,-arch,ev5 -Wa,-mev5" ;; - alphaev56) gcc_cflags_asm="-Wa,-arch,ev56 -Wa,-mev56" ;; - alphapca56 | alphapca57) - gcc_cflags_asm="-Wa,-arch,pca56 -Wa,-mpca56" ;; - alphaev6) gcc_cflags_asm="-Wa,-arch,ev6 -Wa,-mev6" ;; - alphaev67 | alphaev68 | alphaev7*) - gcc_cflags_asm="-Wa,-arch,ev67 -Wa,-mev67 -Wa,-arch,ev6 -Wa,-mev6" ;; - esac - - # It might be better to ask "cc" whether it's Cray C or DEC C, - # instead of relying on the OS part of $host. But it's hard to - # imagine either of those compilers anywhere except their native - # systems. - # - -echo "include_mpn(\`alpha/alpha-defs.m4')" >> $gmp_tmpconfigm4i - - case $host in - *-cray-unicos*) - cc_cflags="-O" # no -g, it silently disables all optimizations - -echo "include_mpn(\`alpha/unicos.m4')" >> $gmp_tmpconfigm4i - - # Don't perform any assembly syntax tests on this beast. - gmp_asm_syntax_testing=no - ;; - *-*-osf*) - -echo "include_mpn(\`alpha/default.m4')" >> $gmp_tmpconfigm4i - - cc_cflags="" - cc_cflags_optlist="opt cpu" - - # not sure if -fast works on old versions, so make it optional - cc_cflags_opt="-fast -O2" - - # DEC C V5.9-005 knows ev4, ev5, ev56, pca56, ev6. - # Compaq C V6.3-029 adds ev67. - # - case $host_cpu in - alpha) cc_cflags_cpu="-arch~ev4~-tune~ev4" ;; - alphaev5) cc_cflags_cpu="-arch~ev5~-tune~ev5" ;; - alphaev56) cc_cflags_cpu="-arch~ev56~-tune~ev56" ;; - alphapca56 | alphapca57) - cc_cflags_cpu="-arch~pca56~-tune~pca56" ;; - alphaev6) cc_cflags_cpu="-arch~ev6~-tune~ev6" ;; - alphaev67 | alphaev68 | alphaev7*) - cc_cflags_cpu="-arch~ev67~-tune~ev67 -arch~ev6~-tune~ev6" ;; - esac - ;; - *) - -echo "include_mpn(\`alpha/default.m4')" >> $gmp_tmpconfigm4i - - ;; - esac - - case $host in - *-*-unicos*) - # tune/alpha.asm assumes int==4bytes but unicos uses int==8bytes - ;; - *) - SPEED_CYCLECOUNTER_OBJ=alpha.lo - cyclecounter_size=1 ;; - esac - ;; - - - # Cray vector machines. - # This must come after alpha* so that we can recognize present and future - # vector processors with a wildcard. - *-cray-unicos*) - gmp_asm_syntax_testing=no - cclist="cc" - # We used to have -hscalar0 here as a workaround for miscompilation of - # mpz/import.c, but let's hope Cray fixes their bugs instead, since - # -hscalar0 causes disastrously poor code to be generated. - cc_cflags="-O3 -hnofastmd -htask0 -Wa,-B" - path="cray" - ;; - - - arm64*-*-* | aarch64*-*-*) - # The compiler clang version 3.4 or earlier requires an explicit -mfpu=neon - # for out assembly code. Since this compiler cloaks as gcc, we have to - # fake too. - gcc_cflags_maybe="-mfpu=neon" - path="arm64" - ;; - - - arm*-*-*) - gcc_cflags="$gcc_cflags $fomit_frame_pointer" - gcc_cflags_optlist="arch fpmode neon tune" - gcc_testlist="gcc-arm-umodsi" - -echo "include_mpn(\`arm/arm-defs.m4')" >> $gmp_tmpconfigm4i - - CALLING_CONVENTIONS_OBJS='arm32call.lo arm32check.lo' - - # This is needed for clang, which is not content with flags like -mfpu=neon - # alone. - case $host in - *-*-*eabi) - gcc_cflags_fpmode="-mfloat-abi=softfp" ;; - *-*-*eabihf) - gcc_cflags_fpmode="-mfloat-abi=hard" ;; - esac - - # FIXME: We make mandatory compiler options optional here. We should - # either enforce them, or organise to strip paths as the corresponding - # options fail. - case $host_cpu in - armv7*) - path="arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - ;; - armv6t2*) - path="arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv6t2" - ;; - armv6*) - path="arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv6" - ;; - armsa1 | arm9tdmi | armv4*) - path="arm" - gcc_cflags_arch="-march=armv4" - ;; - armxscale | arm9te | arm10 | armv5*) - path="arm/v5 arm" - gcc_cflags_arch="-march=armv5" - ;; - arm11mpcore | arm1136 | arm1176*) - path="arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv6" - ;; - arm1156) - path="arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv6t2" - ;; - armcortexa5) - path="arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - ;; - armcortexa7) - path="arm/v7a/cora7 arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - gcc_cflags_tune="-mtune=cortex-a7" - ;; - armcortexa7neon) - path="arm/neon arm/v7a/cora7 arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - gcc_cflags_neon="-mfpu=neon" - gcc_cflags_tune="-mtune=cortex-a7" - ;; - armcortexa8) - path="arm/v7a/cora8 arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - gcc_cflags_tune="-mtune=cortex-a8" - ;; - armcortexa8neon) - path="arm/neon arm/v7a/cora8 arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - gcc_cflags_neon="-mfpu=neon" - gcc_cflags_tune="-mtune=cortex-a8" - ;; - armcortexa9) - path="arm/v7a/cora9 arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - gcc_cflags_tune="-mtune=cortex-a9" - ;; - armcortexa9neon) - path="arm/neon arm/v7a/cora9 arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - gcc_cflags_neon="-mfpu=neon" - gcc_cflags_tune="-mtune=cortex-a9" - ;; - armcortexa15) - path="arm/v7a/cora15 arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - gcc_cflags_tune="-mtune=cortex-a15 -mtune=cortex-a9" - ;; - armcortexa15neon) - path="arm/v7a/cora15/neon arm/neon arm/v7a/cora15 arm/v6t2 arm/v6 arm/v5 arm" - gcc_cflags_arch="-march=armv7-a" - gcc_cflags_neon="-mfpu=neon" - gcc_cflags_tune="-mtune=cortex-a15 -mtune=cortex-a9" - ;; - *) - path="arm" - ;; - esac - ;; - - - # Fujitsu - f30[01]-fujitsu-sysv*) - cclist="gcc vcc" - # FIXME: flags for vcc? - vcc_cflags="-g" - path="fujitsu" - ;; - - - hppa*-*-*) - # HP cc (the one sold separately) is K&R by default, but AM_C_PROTOTYPES - # will add "-Ae", or "-Aa -D_HPUX_SOURCE", to put it into ansi mode, if - # possible. - # - # gcc for hppa 2.0 can be built either for 2.0n (32-bit) or 2.0w - # (64-bit), but not both, so there's no option to choose the desired - # mode, we must instead detect which of the two it is. This is done by - # checking sizeof(long), either 4 or 8 bytes respectively. Do this in - # ABI=1.0 too, in case someone tries to build that with a 2.0w gcc. - # - gcc_cflags_optlist="arch" - gcc_testlist="sizeof-long-4" - SPEED_CYCLECOUNTER_OBJ=hppa.lo - cyclecounter_size=1 - - # FIXME: For hppa2.0*, path should be "pa32/hppa2_0 pa32/hppa1_1 pa32". - # (Can't remember why this isn't done already, have to check what .asm - # files are available in each and how they run on a typical 2.0 cpu.) - # - case $host_cpu in - hppa1.0*) path="pa32" ;; - hppa7000*) path="pa32/hppa1_1 pa32" ;; - hppa2.0* | hppa64) - path="pa32/hppa2_0 pa32/hppa1_1/pa7100 pa32/hppa1_1 pa32" ;; - *) # default to 7100 - path="pa32/hppa1_1/pa7100 pa32/hppa1_1 pa32" ;; - esac - - # gcc 2.7.2.3 knows -mpa-risc-1-0 and -mpa-risc-1-1 - # gcc 2.95 adds -mpa-risc-2-0, plus synonyms -march=1.0, 1.1 and 2.0 - # - # We don't use -mpa-risc-2-0 in ABI=1.0 because 64-bit registers may not - # be saved by the kernel on an old system. Actually gcc (as of 3.2) - # only adds a few float instructions with -mpa-risc-2-0, so it would - # probably be safe, but let's not take the chance. In any case, a - # configuration like --host=hppa2.0 ABI=1.0 is far from optimal. - # - case $host_cpu in - hppa1.0*) gcc_cflags_arch="-mpa-risc-1-0" ;; - *) # default to 7100 - gcc_cflags_arch="-mpa-risc-1-1" ;; - esac - - case $host_cpu in - hppa1.0*) cc_cflags="+O2" ;; - *) # default to 7100 - cc_cflags="+DA1.1 +O2" ;; - esac - - case $host in - hppa2.0*-*-* | hppa64-*-*) - cclist_20n="gcc cc" - abilist="2.0n 1.0" - path_20n="pa64" - limb_20n=longlong - any_20n_testlist="sizeof-long-4" - SPEED_CYCLECOUNTER_OBJ_20n=hppa2.lo - cyclecounter_size_20n=2 - - # -mpa-risc-2-0 is only an optional flag, in case an old gcc is - # used. Assembler support for 2.0 is essential though, for our asm - # files. - gcc_20n_cflags="$gcc_cflags" - gcc_20n_cflags_optlist="arch" - gcc_20n_cflags_arch="-mpa-risc-2-0 -mpa-risc-1-1" - gcc_20n_testlist="sizeof-long-4 hppa-level-2.0" - - cc_20n_cflags="+DA2.0 +e +O2 -Wl,+vnocompatwarnings" - cc_20n_testlist="hpc-hppa-2-0" - - # ABI=2.0w is available for hppa2.0w and hppa2.0, but not for - # hppa2.0n, on the assumption that that the latter indicates a - # desire for ABI=2.0n. - case $host in - hppa2.0n-*-*) ;; - *) - # HPUX 10 and earlier cannot run 2.0w. Not sure about other - # systems (GNU/Linux for instance), but lets assume they're ok. - case $host in - *-*-hpux[1-9] | *-*-hpux[1-9].* | *-*-hpux10 | *-*-hpux10.*) ;; - *-*-linux*) abilist="1.0" ;; # due to linux permanent kernel bug - *) abilist="2.0w $abilist" ;; - esac - - cclist_20w="gcc cc" - gcc_20w_cflags="$gcc_cflags -mpa-risc-2-0" - cc_20w_cflags="+DD64 +O2" - cc_20w_testlist="hpc-hppa-2-0" - path_20w="pa64" - any_20w_testlist="sizeof-long-8" - SPEED_CYCLECOUNTER_OBJ_20w=hppa2w.lo - cyclecounter_size_20w=2 - ;; - esac - ;; - esac - ;; - - - ia64*-*-* | itanium-*-* | itanium2-*-*) - abilist="64" - -echo "include_mpn(\`ia64/ia64-defs.m4')" >> $gmp_tmpconfigm4i - - SPEED_CYCLECOUNTER_OBJ=ia64.lo - any_32_testlist="sizeof-long-4" - - case $host_cpu in - itanium) path="ia64/itanium ia64" ;; - itanium2) path="ia64/itanium2 ia64" ;; - *) path="ia64" ;; - esac - - gcc_64_cflags_optlist="tune" - gcc_32_cflags_optlist=$gcc_64_cflags_optlist - - # gcc pre-release 3.4 adds -mtune itanium and itanium2 - case $host_cpu in - itanium) gcc_cflags_tune="-mtune=itanium" ;; - itanium2) gcc_cflags_tune="-mtune=itanium2" ;; - esac - - case $host in - *-*-linux*) - cclist="gcc icc" - icc_cflags="-no-gcc" - icc_cflags_optlist="opt" - # Don't use -O3, it is for "large data sets" and also miscompiles GMP. - # But icc miscompiles GMP at any optimization level, at higher levels - # it miscompiles more files... - icc_cflags_opt="-O2 -O1" - icc_cflags_opt_maybe="-fp-model~precise" - ;; - - *-*-hpux*) - # HP cc sometimes gets internal errors if the optimization level is - # too high. GMP_PROG_CC_WORKS detects this, the "_opt" fallbacks - # let us use whatever seems to work. - # - abilist="32 64" - any_64_testlist="sizeof-long-8" - - cclist_32="gcc cc" - path_32="ia64" - cc_32_cflags="" - cc_32_cflags_optlist="opt" - cc_32_cflags_opt="+O2 +O1" - gcc_32_cflags="$gcc_cflags -milp32" - limb_32=longlong - SPEED_CYCLECOUNTER_OBJ_32=ia64.lo - cyclecounter_size_32=2 - - # Must have +DD64 in CPPFLAGS to get the right __LP64__ for headers, - # but also need it in CFLAGS for linking programs, since automake - # only uses CFLAGS when linking, not CPPFLAGS. - # FIXME: Maybe should use cc_64_ldflags for this, but that would - # need GMP_LDFLAGS used consistently by all the programs. - # - cc_64_cflags="+DD64" - cc_64_cppflags="+DD64" - cc_64_cflags_optlist="opt" - cc_64_cflags_opt="+O2 +O1" - gcc_64_cflags="$gcc_cflags -mlp64" - ;; - esac - ;; - - - # Motorola 68k - # - m68k-*-* | m68[0-9][0-9][0-9]-*-*) - $as_echo "@%:@define HAVE_HOST_CPU_FAMILY_m68k 1" >>confdefs.h - - -echo "include_mpn(\`m68k/m68k-defs.m4')" >> $gmp_tmpconfigm4i - - gcc_cflags="$gcc_cflags $fomit_frame_pointer" - gcc_cflags_optlist="arch" - - # gcc 2.7.2 knows -m68000, -m68020, -m68030, -m68040. - # gcc 2.95 adds -mcpu32, -m68060. - # FIXME: Maybe "-m68020 -mnobitfield" would suit cpu32 on 2.7.2. - # - case $host_cpu in - m68020) gcc_cflags_arch="-m68020" ;; - m68030) gcc_cflags_arch="-m68030" ;; - m68040) gcc_cflags_arch="-m68040" ;; - m68060) gcc_cflags_arch="-m68060 -m68000" ;; - m68360) gcc_cflags_arch="-mcpu32 -m68000" ;; - *) gcc_cflags_arch="-m68000" ;; - esac - - # FIXME: m68k/mc68020 looks like it's ok for cpu32, but this wants to be - # tested. Will need to introduce an m68k/cpu32 if m68k/mc68020 ever uses - # the bitfield instructions. - case $host_cpu in - m680[234]0 | m68360) path="m68k/mc68020 m68k" ;; - *) path="m68k" ;; - esac - ;; - - - # Motorola 88k - m88k*-*-*) - path="m88k" - ;; - m88110*-*-*) - gcc_cflags="$gcc_cflags -m88110" - path="m88k/mc88110 m88k" - ;; - - - # IRIX 5 and earlier can only run 32-bit o32. - # - # IRIX 6 and up always has a 64-bit mips CPU can run n32 or 64. n32 is - # preferred over 64, but only because that's been the default in past - # versions of GMP. The two are equally efficient. - # - # Linux kernel 2.2.13 arch/mips/kernel/irixelf.c has a comment about not - # supporting n32 or 64. - # - # For reference, libtool (eg. 1.5.6) recognises the n32 ABI and knows the - # right options to use when linking (both cc and gcc), so no need for - # anything special from us. - # - mips*-*-*) - abilist="o32" - gcc_cflags_optlist="abi" - gcc_cflags_abi="-mabi=32 -m32" - gcc_testlist="gcc-mips-o32" - path="mips32" - cc_cflags="-O2 -o32" # no -g, it disables all optimizations - # this suits both mips32 and mips64 - -echo "include_mpn(\`mips32/mips-defs.m4')" >> $gmp_tmpconfigm4i - - - case $host in - mips64*-*-* | mips*-*-irix[6789]*) - abilist="n32 64 o32" - - cclist_n32="gcc cc" - gcc_n32_cflags_optlist="abi" - gcc_n32_cflags="$gcc_cflags" - gcc_n32_cflags_abi="-mabi=n32 -mn32" - cc_n32_cflags="-O2 -n32" # no -g, it disables all optimizations - limb_n32=longlong - path_n32="mips64" - - cclist_64="gcc cc" - gcc_64_cflags_optlist="abi" - gcc_64_cflags="$gcc_cflags" - gcc_64_cflags_abi="-mabi=64 -m64" - gcc_64_ldflags="-Wc,-mabi=64" - cc_64_cflags="-O2 -64" # no -g, it disables all optimizations - cc_64_ldflags="-Wc,-64" - path_64="mips64" - ;; - esac - ;; - - - # Darwin (powerpc-apple-darwin1.3) has it's hacked gcc installed as cc. - # Our usual "gcc in disguise" detection means gcc_cflags etc here gets - # used. - # - # The darwin pre-compiling preprocessor is disabled with -no-cpp-precomp - # since it doesn't like "__attribute__ ((mode (SI)))" etc in gmp-impl.h, - # and so always ends up running the plain preprocessor anyway. This could - # be done in CPPFLAGS rather than CFLAGS, but there's not many places - # preprocessing is done separately, and this is only a speedup, the normal - # preprocessor gets run if there's any problems. - # - # We used to use -Wa,-mppc with gcc, but can't remember exactly why. - # Presumably it was for old versions of gcc where -mpowerpc doesn't put - # the assembler in the right mode. In any case -Wa,-mppc is not good, for - # instance -mcpu=604 makes recent gcc use -m604 to get access to the - # "fsel" instruction, but a -Wa,-mppc overrides that, making code that - # comes out with fsel fail. - # - # (Note also that the darwin assembler doesn't accept "-mppc", so any - # -Wa,-mppc was used only if it worked. The right flag on darwin would be - # "-arch ppc" or some such, but that's already the default.) - # - powerpc*-*-* | power[3-9]-*-*) - $as_echo "@%:@define HAVE_HOST_CPU_FAMILY_powerpc 1" >>confdefs.h - - HAVE_HOST_CPU_FAMILY_powerpc=1 - abilist="32" - cclist="gcc cc" - cc_cflags="-O2" - gcc_32_cflags_maybe="-m32" - gcc_cflags_optlist="precomp subtype asm cpu" - gcc_cflags_precomp="-no-cpp-precomp" - gcc_cflags_subtype="-force_cpusubtype_ALL" # for vmx on darwin - gcc_cflags_asm="" - gcc_cflags_cpu="" - vmx_path="" - - # grab this object, though it's not a true cycle counter routine - SPEED_CYCLECOUNTER_OBJ=powerpc.lo - cyclecounter_size=0 - - case $host_cpu in - powerpc740 | powerpc750) - path="powerpc32/750 powerpc32" ;; - powerpc7400 | powerpc7410) - path="powerpc32/vmx powerpc32/750 powerpc32" ;; - powerpc74[45]?) - path="powerpc32/vmx powerpc32" ;; - *) - path="powerpc32" ;; - esac - - case $host_cpu in - powerpc401) gcc_cflags_cpu="-mcpu=401" ;; - powerpc403) gcc_cflags_cpu="-mcpu=403" - xlc_cflags_arch="-qarch=403 -qarch=ppc" ;; - powerpc405) gcc_cflags_cpu="-mcpu=405" ;; - powerpc505) gcc_cflags_cpu="-mcpu=505" ;; - powerpc601) gcc_cflags_cpu="-mcpu=601" - xlc_cflags_arch="-qarch=601 -qarch=ppc" ;; - powerpc602) gcc_cflags_cpu="-mcpu=602" - xlc_cflags_arch="-qarch=602 -qarch=ppc" ;; - powerpc603) gcc_cflags_cpu="-mcpu=603" - xlc_cflags_arch="-qarch=603 -qarch=ppc" ;; - powerpc603e) gcc_cflags_cpu="-mcpu=603e -mcpu=603" - xlc_cflags_arch="-qarch=603 -qarch=ppc" ;; - powerpc604) gcc_cflags_cpu="-mcpu=604" - xlc_cflags_arch="-qarch=604 -qarch=ppc" ;; - powerpc604e) gcc_cflags_cpu="-mcpu=604e -mcpu=604" - xlc_cflags_arch="-qarch=604 -qarch=ppc" ;; - powerpc620) gcc_cflags_cpu="-mcpu=620" ;; - powerpc630) gcc_cflags_cpu="-mcpu=630" - xlc_cflags_arch="-qarch=pwr3" - cpu_path="p3 p3-p7" ;; - powerpc740) gcc_cflags_cpu="-mcpu=740" ;; - powerpc7400 | powerpc7410) - gcc_cflags_asm="-Wa,-maltivec" - gcc_cflags_cpu="-mcpu=7400 -mcpu=750" ;; - powerpc74[45]?) - gcc_cflags_asm="-Wa,-maltivec" - gcc_cflags_cpu="-mcpu=7450" ;; - powerpc750) gcc_cflags_cpu="-mcpu=750" ;; - powerpc801) gcc_cflags_cpu="-mcpu=801" ;; - powerpc821) gcc_cflags_cpu="-mcpu=821" ;; - powerpc823) gcc_cflags_cpu="-mcpu=823" ;; - powerpc860) gcc_cflags_cpu="-mcpu=860" ;; - powerpc970) gcc_cflags_cpu="-mtune=970" - xlc_cflags_arch="-qarch=970 -qarch=pwr3" - vmx_path="powerpc64/vmx" - cpu_path="p4 p3-p7" ;; - power4) gcc_cflags_cpu="-mtune=power4" - xlc_cflags_arch="-qarch=pwr4" - cpu_path="p4 p3-p7" ;; - power5) gcc_cflags_cpu="-mtune=power5 -mtune=power4" - xlc_cflags_arch="-qarch=pwr5" - cpu_path="p5 p4 p3-p7" ;; - power6) gcc_cflags_cpu="-mtune=power6" - xlc_cflags_arch="-qarch=pwr6" - cpu_path="p6 p3-p7" ;; - power7) gcc_cflags_cpu="-mtune=power7 -mtune=power5" - xlc_cflags_arch="-qarch=pwr7 -qarch=pwr5" - cpu_path="p7 p5 p4 p3-p7" ;; - power[89]) gcc_cflags_cpu="-mtune=power8 -mtune=power7 -mtune=power5" - xlc_cflags_arch="-qarch=pwr8 -qarch=pwr7 -qarch=pwr5" - cpu_path="p8 p7 p5 p4 p3-p7" ;; - esac - - case $host in - *-*-aix*) - cclist="gcc xlc cc" - gcc_32_cflags_maybe="-maix32" - xlc_cflags="-O2 -qmaxmem=20000" - xlc_cflags_optlist="arch" - xlc_32_cflags_maybe="-q32" - ar_32_flags="-X32" - nm_32_flags="-X32" - esac - - case $host in - powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*) - case $host in - *-*-aix*) - # On AIX a true 64-bit ABI is available. - # Need -Wc to pass object type flags through to the linker. - abilist="mode64 $abilist" - cclist_mode64="gcc xlc" - gcc_mode64_cflags="$gcc_cflags -maix64 -mpowerpc64" - gcc_mode64_cflags_optlist="cpu" - gcc_mode64_ldflags="-Wc,-maix64" - xlc_mode64_cflags="-O2 -q64 -qmaxmem=20000" - xlc_mode64_cflags_optlist="arch" - xlc_mode64_ldflags="-Wc,-q64" - # Must indicate object type to ar and nm - ar_mode64_flags="-X64" - nm_mode64_flags="-X64" - path_mode64="" - p="" - for i in $cpu_path - do path_mode64="${path_mode64}powerpc64/mode64/$i " - path_mode64="${path_mode64}powerpc64/$i " - p="${p} powerpc32/$i " - done - path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64" - path="$p $path" - # grab this object, though it's not a true cycle counter routine - SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo - cyclecounter_size_mode64=0 - ;; - *-*-darwin*) - # On Darwin we can use 64-bit instructions with a longlong limb, - # but the chip still in 32-bit mode. - # In theory this can be used on any OS which knows how to save - # 64-bit registers in a context switch. - # - # Note that we must use -mpowerpc64 with gcc, since the - # longlong.h macros expect limb operands in a single 64-bit - # register, not two 32-bit registers as would be given for a - # long long without -mpowerpc64. In theory we could detect and - # accommodate both styles, but the proper 64-bit registers will - # be fastest and are what we really want to use. - # - # One would think -mpowerpc64 would set the assembler in the right - # mode to handle 64-bit instructions. But for that, also - # -force_cpusubtype_ALL is needed. - # - # Do not use -fast for Darwin, it actually adds options - # incompatible with a shared library. - # - abilist="mode64 mode32 $abilist" - gcc_cflags_opt="-O3 -O2 -O1" # will this become used? - cclist_mode32="gcc" - gcc_mode32_cflags_maybe="-m32" - gcc_mode32_cflags="-mpowerpc64" - gcc_mode32_cflags_optlist="subtype cpu opt" - gcc_mode32_cflags_subtype="-force_cpusubtype_ALL" - gcc_mode32_cflags_opt="-O3 -O2 -O1" - limb_mode32=longlong - cclist_mode64="gcc" - gcc_mode64_cflags="-m64" - gcc_mode64_cflags_optlist="cpu opt" - gcc_mode64_cflags_opt="-O3 -O2 -O1" - path_mode64="" - path_mode32="" - p="" - for i in $cpu_path - do path_mode64="${path_mode64}powerpc64/mode64/$i " - path_mode64="${path_mode64}powerpc64/$i " - path_mode32="${path_mode32}powerpc64/mode32/$i " - path_mode32="${path_mode32}powerpc64/$i " - p="${p} powerpc32/$i " - done - path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64" - path_mode32="${path_mode32}powerpc64/mode32 $vmx_path powerpc64" - path="$p $path" - SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo - cyclecounter_size_mode64=0 - any_mode64_testlist="sizeof-long-8" - ;; - *-*-linux* | *-*-*bsd*) - # On GNU/Linux, assume the processor is in 64-bit mode. Some - # environments have a gcc that is always in 64-bit mode, while - # others require -m64, hence the use of cflags_maybe. The - # sizeof-long-8 test checks the mode is right (for the no option - # case). - # - # -mpowerpc64 is not used, since it should be the default in - # 64-bit mode. (We need its effect for the various longlong.h - # asm macros to be right of course.) - # - # gcc64 was an early port of gcc to 64-bit mode, but should be - # obsolete before too long. We prefer plain gcc when it knows - # 64-bits. - # - abilist="mode64 mode32 $abilist" - cclist_mode32="gcc" - gcc_mode32_cflags_maybe="-m32" - gcc_mode32_cflags="-mpowerpc64" - gcc_mode32_cflags_optlist="cpu opt" - gcc_mode32_cflags_opt="-O3 -O2 -O1" - limb_mode32=longlong - cclist_mode64="gcc gcc64" - gcc_mode64_cflags_maybe="-m64" - gcc_mode64_cflags_optlist="cpu opt" - gcc_mode64_cflags_opt="-O3 -O2 -O1" - path_mode64="" - path_mode32="" - p="" - for i in $cpu_path - do path_mode64="${path_mode64}powerpc64/mode64/$i " - path_mode64="${path_mode64}powerpc64/$i " - path_mode32="${path_mode32}powerpc64/mode32/$i " - path_mode32="${path_mode32}powerpc64/$i " - p="${p} powerpc32/$i " - done - path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64" - path_mode32="${path_mode32}powerpc64/mode32 $vmx_path powerpc64" - path="$p $path" - SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo - cyclecounter_size_mode64=0 - any_mode64_testlist="sizeof-long-8" - ;; - esac - ;; - esac - ;; - - - # POWER 32-bit - power-*-* | power[12]-*-* | power2sc-*-*) - $as_echo "@%:@define HAVE_HOST_CPU_FAMILY_power 1" >>confdefs.h - - HAVE_HOST_CPU_FAMILY_power=1 - cclist="gcc" - extra_functions="udiv_w_sdiv" - path="power" - - # gcc 2.7.2 knows rios1, rios2, rsc - # - # -mcpu=rios2 can tickle an AIX assembler bug (see GMP_PROG_CC_WORKS) so - # there needs to be a fallback to just -mpower. - # - gcc_cflags_optlist="cpu" - case $host in - power-*-*) gcc_cflags_cpu="-mcpu=power -mpower" ;; - power1-*-*) gcc_cflags_cpu="-mcpu=rios1 -mpower" ;; - power2-*-*) gcc_cflags_cpu="-mcpu=rios2 -mpower" ;; - power2sc-*-*) gcc_cflags_cpu="-mcpu=rsc -mpower" ;; - esac - case $host in - *-*-aix*) - cclist="gcc xlc" - xlc_cflags="-O2 -qarch=pwr -qmaxmem=20000" - ;; - esac - ;; - - - # IBM System/390 and z/Architecture - s390-*-* | z900esa-*-* | z990esa-*-* | z9esa-*-* | z10esa-*-* | z196esa-*-* | s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*) - abilist="32" - gcc_cflags="$gcc_cflags $fomit_frame_pointer" - gcc_cflags_optlist="arch" - path="s390_32" - extra_functions="udiv_w_sdiv" - gcc_32_cflags_maybe="-m31" - - case $host_cpu in - s390) - ;; - z900 | z900esa) - cpu="z900" - gccarch="$cpu" - path="s390_32/esame/$cpu s390_32/esame s390_32" - gcc_cflags_arch="-march=$gccarch" - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_HOST_CPU_s390_$cpu 1 -_ACEOF - - $as_echo "@%:@define HAVE_HOST_CPU_s390_zarch 1" >>confdefs.h - - extra_functions="" - ;; - z990 | z990esa) - cpu="z990" - gccarch="$cpu" - path="s390_32/esame/$cpu s390_32/esame s390_32" - gcc_cflags_arch="-march=$gccarch" - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_HOST_CPU_s390_$cpu 1 -_ACEOF - - $as_echo "@%:@define HAVE_HOST_CPU_s390_zarch 1" >>confdefs.h - - extra_functions="" - ;; - z9 | z9esa) - cpu="z9" - gccarch="z9-109" - path="s390_32/esame/$cpu s390_32/esame s390_32" - gcc_cflags_arch="-march=$gccarch" - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_HOST_CPU_s390_$cpu 1 -_ACEOF - - $as_echo "@%:@define HAVE_HOST_CPU_s390_zarch 1" >>confdefs.h - - extra_functions="" - ;; - z10 | z10esa) - cpu="z10" - gccarch="z10" - path="s390_32/esame/$cpu s390_32/esame s390_32" - gcc_cflags_arch="-march=$gccarch" - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_HOST_CPU_s390_$cpu 1 -_ACEOF - - $as_echo "@%:@define HAVE_HOST_CPU_s390_zarch 1" >>confdefs.h - - extra_functions="" - ;; - z196 | z196esa) - cpu="z196" - gccarch="z196" - path="s390_32/esame/$cpu s390_32/esame s390_32" - gcc_cflags_arch="-march=$gccarch" - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_HOST_CPU_s390_$cpu 1 -_ACEOF - - $as_echo "@%:@define HAVE_HOST_CPU_s390_zarch 1" >>confdefs.h - - extra_functions="" - ;; - esac - - case $host in - s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*) - abilist="64 32" - cclist_64="gcc" - gcc_64_cflags_optlist="arch" - gcc_64_cflags="$gcc_cflags -m64" - path_64="s390_64/$host_cpu s390_64" - extra_functions="" - ;; - esac - ;; - - - sh-*-*) path="sh" ;; - sh[2-4]-*-*) path="sh/sh2 sh" ;; - - - *sparc*-*-*) - # sizeof(long)==4 or 8 is tested, to ensure we get the right ABI. We've - # had various bug reports where users have set CFLAGS for their desired - # mode, but not set our ABI. For some reason it's sparc where this - # keeps coming up, presumably users there are accustomed to driving the - # compiler mode that way. The effect of our testlist setting is to - # reject ABI=64 in favour of ABI=32 if the user has forced the flags to - # 32-bit mode. - # - abilist="32" - cclist="gcc acc cc" - any_testlist="sizeof-long-4" - -echo "include_mpn(\`sparc32/sparc-defs.m4')" >> $gmp_tmpconfigm4i - - - case $host_cpu in - sparcv8 | microsparc | turbosparc) - path="sparc32/v8 sparc32" ;; - supersparc) - path="sparc32/v8/supersparc sparc32/v8 sparc32" ;; - sparc64 | sparcv9* | ultrasparc | ultrasparc[234]*) - path="sparc32/v9 sparc32/v8 sparc32" ;; - ultrasparct[12345]) - path="sparc32/ultrasparct1 sparc32/v8 sparc32" ;; - *) - path="sparc32" ;; - esac - - # gcc 2.7.2 doesn't know about v9 and doesn't pass -xarch=v8plus to the - # assembler. Add it explicitly since the solaris assembler won't accept - # our sparc32/v9 asm code without it. gas accepts -xarch=v8plus too, so - # it can be in the cflags unconditionally (though gas doesn't need it). - # - # gcc -m32 is needed to force 32-bit mode on a dual-ABI system, but past - # gcc doesn't know that flag, hence cflags_maybe. Note that -m32 cannot - # be done through the optlist since the plain cflags would be run first - # and we don't want to require the default mode (whatever it is) works. - # - # Note it's gcc_32_cflags_maybe and not gcc_cflags_maybe because the - # latter would be used in the 64-bit ABI on systems like "*bsd" where - # abilist="64" only. - # - gcc_32_cflags_maybe="-m32" - gcc_cflags_optlist="cpu asm" - - # gcc 2.7.2 knows -mcypress, -msupersparc, -mv8, -msparclite. - # gcc 2.95 knows -mcpu= v7, hypersparc, sparclite86x, f930, f934, - # sparclet, tsc701, v9, ultrasparc. A warning is given that the - # plain -m forms will disappear. - # gcc 3.3 adds ultrasparc3. - # - case $host_cpu in - supersparc*) - gcc_cflags_cpu="-mcpu=supersparc -msupersparc" - gcc_cflags_asm="-Wa,-Av8 -Wa,-xarch=v8";; - sparcv8 | microsparc* | turbosparc | hypersparc*) - gcc_cflags_cpu="-mcpu=v8 -mv8" - gcc_cflags_asm="-Wa,-Av8 -Wa,-xarch=v8";; - sparc64 | sparcv9*) - gcc_cflags_cpu="-mcpu=v9" - gcc_32_cflags_asm="-Wa,-Av8 -Wa,-xarch=v8plus" - gcc_64_cflags_asm="-Wa,-Av9 -Wa,-xarch=v9";; - ultrasparc1 | ultrasparc2*) - gcc_cflags_cpu="-mcpu=ultrasparc -mcpu=v9" - gcc_32_cflags_asm="-Wa,-Av8plusa -Wa,-xarch=v8plusa" - gcc_64_cflags_asm="-Wa,-Av9a -Wa,-xarch=v9a";; - ultrasparc[34]) - gcc_cflags_cpu="-mcpu=ultrasparc3 -mcpu=ultrasparc -mcpu=v9" - gcc_32_cflags_asm="-Wa,-Av8plusb -Wa,-xarch=v8plusb" - gcc_64_cflags_asm="-Wa,-Av9b -Wa,-xarch=v9b";; - ultrasparct[12]) - gcc_cflags_cpu="-mcpu=niagara -mcpu=v9" - gcc_32_cflags_asm="-Wa,-Av8plusc -Wa,-xarch=v8plusc" - gcc_64_cflags_asm="-Wa,-Av9c -Wa,-xarch=v9c";; - ultrasparct3) - gcc_cflags_cpu="-mcpu=niagara3 -mcpu=niagara -mcpu=v9" - gcc_32_cflags_asm="-Wa,-Av8plusd -Wa,-xarch=v8plusd" - gcc_64_cflags_asm="-Wa,-Av9d -Wa,-xarch=v9d";; - ultrasparct[45]) - gcc_cflags_cpu="-mcpu=niagara4 -mcpu=niagara3 -mcpu=niagara -mcpu=v9" - gcc_32_cflags_asm="-Wa,-Av8plusd -Wa,-xarch=v8plusd" - gcc_64_cflags_asm="-Wa,-Av9d -Wa,-xarch=v9d";; - *) - gcc_cflags_cpu="-mcpu=v7 -mcypress" - gcc_cflags_asm="";; - esac - - # SunPRO cc and acc, and SunOS bundled cc - case $host in - *-*-solaris* | *-*-sunos*) - # Note no -g, it disables all optimizations. - cc_cflags= - cc_cflags_optlist="opt arch cpu" - - # SunOS <= 4 cc doesn't know -xO3, fallback to -O2. - cc_cflags_opt="-xO3 -O2" - - # SunOS cc doesn't know -xarch, apparently always generating v7 - # code, so make this optional - case $host_cpu in - sparcv8 | microsparc* | supersparc* | turbosparc | hypersparc*) - cc_cflags_arch="-xarch=v8";; - ultrasparct[345]) - cc_cflags_arch="-xarch=v8plusd" ;; - sparc64 | sparcv9* | ultrasparc*) - cc_cflags_arch="-xarch=v8plus" ;; - *) - cc_cflags_arch="-xarch=v7" ;; - esac - - # SunOS cc doesn't know -xchip and doesn't seem to have an equivalent. - # SunPRO cc 5 recognises -xchip=generic, old, super, super2, micro, - # micro2, hyper, hyper2, powerup, ultra, ultra2, ultra2i. - # SunPRO cc 6 adds -xchip=ultra2e, ultra3cu. - # - case $host_cpu in - supersparc*) cc_cflags_cpu="-xchip=super" ;; - microsparc*) cc_cflags_cpu="-xchip=micro" ;; - turbosparc) cc_cflags_cpu="-xchip=micro2" ;; - hypersparc*) cc_cflags_cpu="-xchip=hyper" ;; - ultrasparc) cc_cflags_cpu="-xchip=ultra" ;; - ultrasparc2) cc_cflags_cpu="-xchip=ultra2 -xchip=ultra" ;; - ultrasparc2i) cc_cflags_cpu="-xchip=ultra2i -xchip=ultra2 -xchip=ultra" ;; - ultrasparc3) cc_cflags_cpu="-xchip=ultra3 -xchip=ultra" ;; - ultrasparc4) cc_cflags_cpu="-xchip=ultra4 -xchip=ultra3 -xchip=ultra" ;; - ultrasparct1) cc_cflags_cpu="-xchip=ultraT1" ;; - ultrasparct2) cc_cflags_cpu="-xchip=ultraT2 -xchip=ultraT1" ;; - ultrasparct3) cc_cflags_cpu="-xchip=ultraT3 -xchip=ultraT2" ;; - ultrasparct4) cc_cflags_cpu="-xchip=T4" ;; - ultrasparct5) cc_cflags_cpu="-xchip=T5 -xchip=T4" ;; - *) cc_cflags_cpu="-xchip=generic" ;; - esac - esac - - case $host_cpu in - sparc64 | sparcv9* | ultrasparc*) - case $host in - # Solaris 6 and earlier cannot run ABI=64 since it doesn't save - # registers properly, so ABI=32 is left as the only choice. - # - *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;; - - # BSD sparc64 ports are 64-bit-only systems, so ABI=64 is the only - # choice. In fact they need no special compiler flags, gcc -m64 - # is the default, but it doesn't hurt to add it. v9 CPUs always - # use the sparc64 port, since the plain 32-bit sparc ports don't - # run on a v9. - # - *-*-*bsd*) abilist="64" ;; - - # For all other systems, we try both 64 and 32. - # - # GNU/Linux sparc64 has only recently gained a 64-bit user mode. - # In the past sparc64 meant a v9 cpu, but there were no 64-bit - # operations in user mode. We assume that if "gcc -m64" works - # then the system is suitable. Hopefully even if someone attempts - # to put a new gcc and/or glibc on an old system it won't run. - # - *) abilist="64 32" ;; - esac - - case $host_cpu in - ultrasparc | ultrasparc2 | ultrasparc2i) - path_64="sparc64/ultrasparc1234 sparc64" ;; - ultrasparc[34]) - path_64="sparc64/ultrasparc34 sparc64/ultrasparc1234 sparc64" ;; - ultrasparct[12]) - path_64="sparc64/ultrasparct1 sparc64" ;; - ultrasparct[345]) - path_64="sparc64/ultrasparct3 sparc64" ;; - *) - path_64="sparc64" - esac - - cclist_64="gcc" - any_64_testlist="sizeof-long-8" - - # gcc -mptr64 is probably implied by -m64, but we're not sure if - # this was always so. On Solaris in the past we always used both - # "-m64 -mptr64". - # - # gcc -Wa,-xarch=v9 is thought to be necessary in some cases on - # solaris, but it would seem likely that if gcc is going to generate - # 64-bit code it will have to add that option itself where needed. - # An extra copy of this option should be harmless though, but leave - # it until we're sure. (Might want -xarch=v9a or -xarch=v9b for the - # higher cpu types instead.) - # - gcc_64_cflags="$gcc_cflags -m64 -mptr64" - gcc_64_ldflags="-Wc,-m64" - gcc_64_cflags_optlist="cpu asm" - - case $host in - *-*-solaris*) - # Sun cc. - # - # We used to have -fast and some fixup options here, but it - # recurrently caused problems with miscompilation. Of course, - # -fast is documented as miscompiling things for the sake of speed. - # - cclist_64="$cclist_64 cc" - cc_64_cflags_optlist="cpu" - case $host_cpu in - ultrasparct[345]) - cc_64_cflags="$cc_64_cflags -xO3 -xarch=v9d" ;; - *) - cc_64_cflags="-xO3 -xarch=v9" ;; - esac - ;; - esac - - # using the v9 %tick register - SPEED_CYCLECOUNTER_OBJ_32=sparcv9.lo - SPEED_CYCLECOUNTER_OBJ_64=sparcv9.lo - cyclecounter_size_32=2 - cyclecounter_size_64=2 - ;; - esac - ;; - - - # VAX - vax*-*-*elf*) - # Use elf conventions (i.e., '%' register prefix, no global prefix) - # - -echo "include_mpn(\`vax/elf.m4')" >> $gmp_tmpconfigm4i - - gcc_cflags="$gcc_cflags $fomit_frame_pointer" - path="vax" - extra_functions="udiv_w_sdiv" - ;; - vax*-*-*) - # Default to aout conventions (i.e., no register prefix, '_' global prefix) - # - gcc_cflags="$gcc_cflags $fomit_frame_pointer" - path="vax" - extra_functions="udiv_w_sdiv" - ;; - - - # AMD and Intel x86 configurations, including AMD64 - # - # Rumour has it gcc -O2 used to give worse register allocation than just - # -O, but lets assume that's no longer true. - # - # -m32 forces 32-bit mode on a bi-arch 32/64 amd64 build of gcc. -m64 is - # the default in such a build (we think), so -m32 is essential for ABI=32. - # This is, of course, done for any $host_cpu, not just x86_64, so we can - # get such a gcc into the right mode to cross-compile to say i486-*-*. - # - # -m32 is not available in gcc 2.95 and earlier, hence cflags_maybe to use - # it when it works. We check sizeof(long)==4 to ensure we get the right - # mode, in case -m32 has failed not because it's an old gcc, but because - # it's a dual 32/64-bit gcc without a 32-bit libc, or whatever. - # - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | cabylake*-*-*) - abilist="32" - cclist="gcc icc cc" - gcc_cflags="$gcc_cflags $fomit_frame_pointer" - gcc_32_cflags_maybe="-m32" - icc_cflags="-no-gcc" - icc_cflags_optlist="opt" - icc_cflags_opt="-O3 -O2 -O1" - icc_cflags_opt_maybe="-fp-model~precise" - any_32_testlist="sizeof-long-4" - gcc_cflags_optlist="cpu arch noavx" - CALLING_CONVENTIONS_OBJS='x86call.lo x86check$U.lo' - - # Availability of rdtsc is checked at run-time. - SPEED_CYCLECOUNTER_OBJ=pentium.lo - - # gcc 2.7.2 only knows i386 and i486, using -m386 or -m486. These - # represent -mcpu= since -m486 doesn't generate 486 specific insns. - # gcc 2.95 adds k6, pentium and pentiumpro, and takes -march= and -mcpu=. - # gcc 3.0 adds athlon. - # gcc 3.1 adds k6-2, k6-3, pentium-mmx, pentium2, pentium3, pentium4, - # athlon-tbird, athlon-4, athlon-xp, athlon-mp. - # gcc 3.2 adds winchip2. - # gcc 3.3 adds winchip-c6. - # gcc 3.3.1 from mandrake adds k8 and knows -mtune. - # gcc 3.4 adds c3, c3-2, k8, and deprecates -mcpu in favour of -mtune. - # - # In gcc 2.95.[0123], -march=pentiumpro provoked a stack slot bug in an - # old version of mpz/powm.c. Seems to be fine with the current code, so - # no need for any restrictions on that option. - # - # -march=pentiumpro can fail if the assembler doesn't know "cmov" - # (eg. solaris 2.8 native "as"), so always have -march=pentium after - # that as a fallback. - # - # -march=pentium4 and -march=k8 enable SSE2 instructions, which may or - # may not be supported by the assembler and/or the OS, and is bad in gcc - # prior to 3.3. The tests will reject these if no good, so fallbacks - # like "-march=pentium4 -mno-sse2" are given to try also without SSE2. - # Note the relevant -march types are listed in the optflags handling - # below, be sure to update there if adding new types emitting SSE2. - # - # -mtune is used at the start of each cpu option list to give something - # gcc 3.4 will use, thereby avoiding warnings from -mcpu. -mcpu forms - # are retained for use by prior gcc. For example pentium has - # "-mtune=pentium -mcpu=pentium ...", the -mtune is for 3.4 and the - # -mcpu for prior. If there's a brand new choice in 3.4 for a chip, - # like k8 for x86_64, then it can be the -mtune at the start, no need to - # duplicate anything. - # - case $host_cpu in - i386*) - gcc_cflags_cpu="-mtune=i386 -mcpu=i386 -m386" - gcc_cflags_arch="-march=i386" - path="x86" - ;; - i486*) - gcc_cflags_cpu="-mtune=i486 -mcpu=i486 -m486" - gcc_cflags_arch="-march=i486" - path="x86/i486 x86" - ;; - i586 | pentium) - gcc_cflags_cpu="-mtune=pentium -mcpu=pentium -m486" - gcc_cflags_arch="-march=pentium" - path="x86/pentium x86" - ;; - pentiummmx) - gcc_cflags_cpu="-mtune=pentium-mmx -mcpu=pentium-mmx -mcpu=pentium -m486" - gcc_cflags_arch="-march=pentium-mmx -march=pentium" - path="x86/pentium/mmx x86/pentium x86/mmx x86" - ;; - i686 | pentiumpro) - gcc_cflags_cpu="-mtune=pentiumpro -mcpu=pentiumpro -mcpu=i486 -m486" - gcc_cflags_arch="-march=pentiumpro -march=pentium" - path="x86/p6 x86" - ;; - pentium2) - gcc_cflags_cpu="-mtune=pentium2 -mcpu=pentium2 -mcpu=pentiumpro -mcpu=i486 -m486" - gcc_cflags_arch="-march=pentium2 -march=pentiumpro -march=pentium" - path="x86/p6/mmx x86/p6 x86/mmx x86" - ;; - pentium3) - gcc_cflags_cpu="-mtune=pentium3 -mcpu=pentium3 -mcpu=pentiumpro -mcpu=i486 -m486" - gcc_cflags_arch="-march=pentium3 -march=pentiumpro -march=pentium" - path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - ;; - pentiumm) - gcc_cflags_cpu="-mtune=pentium3 -mcpu=pentium3 -mcpu=pentiumpro -mcpu=i486 -m486" - gcc_cflags_arch="-march=pentium3 -march=pentiumpro -march=pentium" - path="x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - ;; - k6) - gcc_cflags_cpu="-mtune=k6 -mcpu=k6 -mcpu=i486 -m486" - gcc_cflags_arch="-march=k6" - path="x86/k6/mmx x86/k6 x86/mmx x86" - ;; - k62) - gcc_cflags_cpu="-mtune=k6-2 -mcpu=k6-2 -mcpu=k6 -mcpu=i486 -m486" - gcc_cflags_arch="-march=k6-2 -march=k6" - path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86/mmx x86" - ;; - k63) - gcc_cflags_cpu="-mtune=k6-3 -mcpu=k6-3 -mcpu=k6 -mcpu=i486 -m486" - gcc_cflags_arch="-march=k6-3 -march=k6" - path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86/mmx x86" - ;; - geode) - gcc_cflags_cpu="-mtune=k6-3 -mcpu=k6-3 -mcpu=k6 -mcpu=i486 -m486" - gcc_cflags_arch="-march=k6-3 -march=k6" - path="x86/geode x86/k6/k62mmx x86/k6/mmx x86/k6 x86/mmx x86" - ;; - athlon) - # Athlon instruction costs are close to P6 (3 cycle load latency, - # 4-6 cycle mul, 40 cycle div, pairable adc, etc) so if gcc doesn't - # know athlon (eg. 2.95.2 doesn't) then fall back on pentiumpro. - gcc_cflags_cpu="-mtune=athlon -mcpu=athlon -mcpu=pentiumpro -mcpu=i486 -m486" - gcc_cflags_arch="-march=athlon -march=pentiumpro -march=pentium" - path="x86/k7/mmx x86/k7 x86/mmx x86" - ;; - i786 | pentium4) - # pentiumpro is the primary fallback when gcc doesn't know pentium4. - # This gets us cmov to eliminate branches. Maybe "athlon" would be - # a possibility on gcc 3.0. - # - gcc_cflags_cpu="-mtune=pentium4 -mcpu=pentium4 -mcpu=pentiumpro -mcpu=i486 -m486" - gcc_cflags_arch="-march=pentium4 -march=pentium4~-mno-sse2 -march=pentiumpro -march=pentium" - gcc_64_cflags_cpu="-mtune=nocona" - path="x86/pentium4/sse2 x86/pentium4/mmx x86/pentium4 x86/mmx x86" - path_64="x86_64/pentium4 x86_64" - ;; - viac32) - # Not sure of the best fallbacks here for -mcpu. - # c3-2 has sse and mmx, so pentium3 is good for -march. - gcc_cflags_cpu="-mtune=c3-2 -mcpu=c3-2 -mcpu=i486 -m486" - gcc_cflags_arch="-march=c3-2 -march=pentium3 -march=pentiumpro -march=pentium" - path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - ;; - viac3*) - # Not sure of the best fallbacks here. - gcc_cflags_cpu="-mtune=c3 -mcpu=c3 -mcpu=i486 -m486" - gcc_cflags_arch="-march=c3 -march=pentium-mmx -march=pentium" - path="x86/pentium/mmx x86/pentium x86/mmx x86" - ;; - athlon64 | k8 | x86_64) - gcc_cflags_cpu="-mtune=k8 -mcpu=athlon -mcpu=pentiumpro -mcpu=i486 -m486" - gcc_cflags_arch="-march=k8 -march=k8~-mno-sse2 -march=athlon -march=pentiumpro -march=pentium" - path="x86/k8 x86/k7/mmx x86/k7 x86/mmx x86" - path_64="x86_64/k8 x86_64" - ;; - k10) - gcc_cflags_cpu="-mtune=amdfam10 -mtune=k8" - gcc_cflags_arch="-march=amdfam10 -march=k8 -march=k8~-mno-sse2" - path="x86/k10 x86/k8 x86/k7/mmx x86/k7 x86/mmx x86" - path_64="x86_64/k10 x86_64/k8 x86_64" - ;; - bobcat) - gcc_cflags_cpu="-mtune=btver1 -mtune=amdfam10 -mtune=k8" - gcc_cflags_arch="-march=btver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2" - path="x86/bobcat x86/k7/mmx x86/k7 x86/mmx x86" - path_64="x86_64/bobcat x86_64/k10 x86_64/k8 x86_64" - ;; - jaguar | jaguarnoavx) - gcc_cflags_cpu="-mtune=btver2 -mtune=btver1 -mtune=amdfam10 -mtune=k8" - gcc_cflags_arch="-march=btver2 -march=btver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2" - path="x86/jaguar x86/bobcat x86/k7/mmx x86/k7 x86/mmx x86" - path_64="x86_64/jaguar x86_64/bobcat x86_64/k10 x86_64/k8 x86_64" - ;; - bulldozer | bd1 | bulldozernoavx | bd1noavx) - gcc_cflags_cpu="-mtune=bdver1 -mtune=amdfam10 -mtune=k8" - gcc_cflags_arch="-march=bdver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2" - path="x86/bd1 x86/k7/mmx x86/k7 x86/mmx x86" - path_64="x86_64/bd1 x86_64/k10 x86_64/k8 x86_64" - ;; - piledriver | bd2 | piledrivernoavx | bd2noavx) - gcc_cflags_cpu="-mtune=bdver2 -mtune=bdver1 -mtune=amdfam10 -mtune=k8" - gcc_cflags_arch="-march=bdver2 -march=bdver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2" - path="x86/bd2 x86/bd1 x86/k7/mmx x86/k7 x86/mmx x86" - path_64="x86_64/bd2 x86_64/bd1 x86_64/k10 x86_64/k8 x86_64" - ;; - steamroller | bd3 | steamrollernoavx | bd3noavx) - gcc_cflags_cpu="-mtune=bdver3 -mtune=bdver2 -mtune=bdver1 -mtune=amdfam10 -mtune=k8" - gcc_cflags_arch="-march=bdver3 -march=bdver2 -march=bdver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2" - path="x86/bd3 x86/bd2 x86/bd1 x86/k7/mmx x86/k7 x86/mmx x86" - path_64="x86_64/bd3 x86_64/bd2 x86_64/bd1 x86_64/k10 x86_64/k8 x86_64" - ;; - excavator | bd4 | excavatornoavx | bd4noavx) - gcc_cflags_cpu="-mtune=bdver4 -mtune=bdver3 -mtune=bdver2 -mtune=bdver1 -mtune=amdfam10 -mtune=k8" - gcc_cflags_arch="-march=bdver4 -march=bdver3 -march=bdver2 -march=bdver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2" - path="x86/bd4 x86/bd3 x86/bd2 x86/bd1 x86/k7/mmx x86/k7 x86/mmx x86" - path_64="x86_64/bd4 x86_64/bd3 x86_64/bd2 x86_64/bd1 x86_64/k10 x86_64/k8 x86_64" - ;; - core2) - gcc_cflags_cpu="-mtune=core2 -mtune=k8" - gcc_cflags_arch="-march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" - path="x86/core2 x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - path_64="x86_64/core2 x86_64" - ;; - corei | coreinhm | coreiwsm | nehalem | westmere) - gcc_cflags_cpu="-mtune=corei7 -mtune=core2 -mtune=k8" - gcc_cflags_arch="-march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" - path="x86/coreinhm x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - path_64="x86_64/coreinhm x86_64/core2 x86_64" - ;; - coreisbr | coreisbrnoavx | coreiibr | coreiibrnoavx | \ - sandybridge | sandybridgenoavx | ivybridge | ivybridgenoavx) - gcc_cflags_cpu="-mtune=sandybridge -mtune=corei7 -mtune=core2 -mtune=k8" - gcc_cflags_arch="-march=sandybridge -march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" - path="x86/coreisbr x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - path_64="x86_64/coreisbr x86_64/coreinhm x86_64/core2 x86_64" - ;; - coreihwl | coreihwlnoavx | haswell | haswellnoavx) - gcc_cflags_cpu="-mtune=haswell -mtune=corei7 -mtune=core2 -mtune=k8" - gcc_cflags_arch="-march=haswell -march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" - path="x86/coreisbr x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - path_64="x86_64/coreihwl x86_64/coreisbr x86_64/coreinhm x86_64/core2 x86_64" - ;; - coreibwl | coreibwlnoavx | broadwell | broadwellnoavx) - gcc_cflags_cpu="-mtune=broadwell -mtune=corei7 -mtune=core2 -mtune=k8" - gcc_cflags_arch="-march=broadwell -march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" - path="x86/coreisbr x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - path_64="x86_64/coreibwl x86_64/coreihwl x86_64/coreisbr x86_64/coreinhm x86_64/core2 x86_64" - # extra_functions_64="missing" # enable for bmi2/adx simulation - ;; - skylake | skylakenoavx | cabylake | cabylakenoavx) - gcc_cflags_cpu="-mtune=skylake -mtune=broadwell -mtune=corei7 -mtune=core2 -mtune=k8" - # Don't pass -march=skylake for now as then some compilers emit AVX512. - gcc_cflags_arch="-march=broadwell -march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" - path="x86/coreisbr x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86" - path_64="x86_64/skylake x86_64/coreibwl x86_64/coreihwl x86_64/coreisbr x86_64/coreinhm x86_64/core2 x86_64" - # extra_functions_64="missing" # enable for bmi2/adx simulation - ;; - atom) # in-order pipeline atom - gcc_cflags_cpu="-mtune=atom -mtune=pentium3" - gcc_cflags_arch="-march=atom -march=pentium3" - path="x86/atom/sse2 x86/atom/mmx x86/atom x86/mmx x86" - path_64="x86_64/atom x86_64" - ;; - silvermont | goldmont) # out-of-order pipeline atom - gcc_cflags_cpu="-mtune=slm -mtune=atom -mtune=pentium3" - gcc_cflags_arch="-march=slm -march=atom -march=pentium3" - path="x86/atom/sse2 x86/atom/mmx x86/atom x86/mmx x86" - path_64="x86_64/silvermont x86_64/atom x86_64" - ;; - nano) - gcc_cflags_cpu="-mtune=nano" - gcc_cflags_arch="-march=nano" - path="x86/nano x86/mmx x86" - path_64="x86_64/nano x86_64" - ;; - *) - gcc_cflags_cpu="-mtune=i486 -mcpu=i486 -m486" - gcc_cflags_arch="-march=i486" - path="x86" - path_64="x86_64" - ;; - esac - - case $host in - # Disable AVX if the CPU part tells us AVX is unavailable, but also - # unconditionally for NetBSD where they don't work but OSXSAVE is set - # to claim the contrary. - *noavx-*-* | *-*-netbsd*) - gcc_cflags_noavx="-mno-avx";; - esac - - case $host in - athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | cabylake*-*-*) - cclist_64="gcc cc" - gcc_64_cflags="$gcc_cflags -m64" - gcc_64_cflags_optlist="cpu arch noavx" - CALLING_CONVENTIONS_OBJS_64='amd64call.lo amd64check$U.lo' - SPEED_CYCLECOUNTER_OBJ_64=x86_64.lo - cyclecounter_size_64=2 - - cclist_x32="gcc cc" - gcc_x32_cflags="$gcc_cflags -mx32" - gcc_x32_cflags_optlist="$gcc_64_cflags_optlist" - CALLING_CONVENTIONS_OBJS_x32="$CALLING_CONVENTIONS_OBJS_64" - SPEED_CYCLECOUNTER_OBJ_x32="$SPEED_CYCLECOUNTER_OBJ_64" - cyclecounter_size_x32="$cyclecounter_size_64" - path_x32="$path_64" - limb_x32=longlong - any_x32_testlist="sizeof-long-4" - - abilist="64 x32 32" - if test "$enable_assembly" = "yes" ; then - extra_functions_64="$extra_functions_64 invert_limb_table" - extra_functions_x32=$extra_functions_64 - fi - - case $host in - *-*-solaris*) - # Sun cc. - cc_64_cflags="-xO3 -m64" - ;; - *-*-mingw* | *-*-cygwin) - limb_64=longlong - CALLING_CONVENTIONS_OBJS_64="" - -$as_echo "@%:@define HOST_DOS64 1" >>confdefs.h - - GMP_NONSTD_ABI_64=DOS64 - ;; - esac - ;; - esac - ;; - - - # Special CPU "none" used to select generic C, now this is obsolete. - none-*-*) - enable_assembly=no - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the \"none\" host is obsolete, use --disable-assembly" >&5 -$as_echo "$as_me: WARNING: the \"none\" host is obsolete, use --disable-assembly" >&2;} - ;; - -esac - -# mingw can be built by the cygwin gcc if -mno-cygwin is added. For -# convenience add this automatically if it works. Actual mingw gcc accepts -# -mno-cygwin too, but of course is the default. mingw only runs on the -# x86s, but allow any CPU here so as to catch "none" too. -# -case $host in - *-*-mingw*) - gcc_cflags_optlist="$gcc_cflags_optlist nocygwin" - gcc_cflags_nocygwin="-mno-cygwin" - ;; -esac - - -CFLAGS_or_unset=${CFLAGS-'(unset)'} -CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'} - -cat >&5 <<EOF -User: -ABI=$ABI -CC=$CC -CFLAGS=$CFLAGS_or_unset -CPPFLAGS=$CPPFLAGS_or_unset -MPN_PATH=$MPN_PATH -GMP: -abilist=$abilist -cclist=$cclist -EOF - - -test_CFLAGS=${CFLAGS+set} -test_CPPFLAGS=${CPPFLAGS+set} - -for abi in $abilist; do - abi_last="$abi" -done - -# If the user specifies an ABI then it must be in $abilist, after that -# $abilist is restricted to just that choice. -# -if test -n "$ABI"; then - found=no - for abi in $abilist; do - if test $abi = "$ABI"; then found=yes; break; fi - done - if test $found = no; then - as_fn_error $? "ABI=$ABI is not among the following valid choices: $abilist" "$LINENO" 5 - fi - abilist="$ABI" -fi - -found_compiler=no - -for abi in $abilist; do - - echo "checking ABI=$abi" - - # Suppose abilist="64 32", then for abi=64, will have abi1="_64" and - # abi2="_64". For abi=32, will have abi1="_32" and abi2="". This is how - # $gcc_cflags becomes a fallback for $gcc_32_cflags (the last in the - # abilist), but there's no fallback for $gcc_64_cflags. - # - abi1=`echo _$abi | sed 's/[.]//g'` - if test $abi = $abi_last; then abi2=; else abi2="$abi1"; fi - - # Compiler choices under this ABI - eval cclist_chosen=\"\$cclist$abi1\" - test -n "$cclist_chosen" || eval cclist_chosen=\"\$cclist$abi2\" - - # If there's a user specified $CC then don't use a list for - # $cclist_chosen, just a single value for $ccbase. - # - if test -n "$CC"; then - - # The first word of $CC, stripped of any directory. For instance - # CC="/usr/local/bin/gcc -pipe" will give "gcc". - # - for ccbase in $CC; do break; done - ccbase=`echo $ccbase | sed 's:.*/::'` - - # If this $ccbase is in $cclist_chosen then it's a compiler we know and - # we can do flags defaulting with it. If not, then $cclist_chosen is - # set to "unrecognised" so no default flags are used. - # - # "unrecognised" is used to avoid bad effects with eval if $ccbase has - # non-symbol characters. For instance ccbase=my+cc would end up with - # something like cflags="$my+cc_cflags" which would give - # cflags="+cc_cflags" rather than the intended empty string for an - # unknown compiler. - # - found=unrecognised - for i in $cclist_chosen; do - if test "$ccbase" = $i; then - found=$ccbase - break - fi - done - cclist_chosen=$found - fi - - for ccbase in $cclist_chosen; do - - # When cross compiling, look for a compiler with the $host_alias as a - # prefix, the same way that AC_CHECK_TOOL does. But don't do this to a - # user-selected $CC. - # - # $cross_compiling will be yes/no/maybe at this point. Do the host - # prefixing for "maybe" as well as "yes". - # - if test "$cross_compiling" != no && test -z "$CC"; then - cross_compiling_prefix="${host_alias}-" - fi - - for ccprefix in $cross_compiling_prefix ""; do - - cc="$CC" - test -n "$cc" || cc="$ccprefix$ccbase" - - # If the compiler is gcc but installed under another name, then change - # $ccbase so as to use the flags we know for gcc. This helps for - # instance when specifying CC=gcc272 on Debian GNU/Linux, or the - # native cc which is really gcc on NeXT or MacOS-X. - # - # FIXME: There's a slight misfeature here. If cc is actually gcc but - # gcc is not a known compiler under this $abi then we'll end up - # testing it with no flags and it'll work, but chances are it won't be - # in the right mode for the ABI we desire. Let's quietly hope this - # doesn't happen. - # - if test $ccbase != gcc; then - cat >conftest.c <<EOF -#if ! defined (__GNUC__) || defined (__INTEL_COMPILER) - choke me -#endif -EOF -gmp_compile="$cc -c conftest.c >&5" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - rm -f conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $cc is gcc" >&5 -$as_echo_n "checking whether $cc is gcc... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ccbase=gcc -else - rm -f conftest* - : -fi - - fi - - # Similarly if the compiler is IBM xlc but invoked as cc or whatever - # then change $ccbase and make the default xlc flags available. - if test $ccbase != xlc; then - gmp_command="$cc 2>&1 | grep xlc >/dev/null" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_command\""; } >&5 - (eval $gmp_command) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $cc is xlc" >&5 -$as_echo_n "checking whether $cc is xlc... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ccbase=xlc -else - : -fi - - fi - - # acc was Sun's first unbundled compiler back in the SunOS days, or - # something like that, but today its man page says it's not meant to - # be used directly (instead via /usr/ucb/cc). The options are pretty - # much the same as the main SunPRO cc, so share those configs. - # - case $host in - *sparc*-*-solaris* | *sparc*-*-sunos*) - if test "$ccbase" = acc; then ccbase=cc; fi ;; - esac - - for tmp_cflags_maybe in yes no; do - eval cflags=\"\$${ccbase}${abi1}_cflags\" - test -n "$cflags" || eval cflags=\"\$${ccbase}${abi2}_cflags\" - - if test "$tmp_cflags_maybe" = yes; then - # don't try cflags_maybe when the user set CFLAGS - if test "$test_CFLAGS" = set; then continue; fi - eval cflags_maybe=\"\$${ccbase}${abi1}_cflags_maybe\" - test -n "$cflags_maybe" || eval cflags_maybe=\"\$${ccbase}${abi2}_cflags_maybe\" - # don't try cflags_maybe if there's nothing set - if test -z "$cflags_maybe"; then continue; fi - cflags="$cflags_maybe $cflags" - fi - - # Any user CFLAGS, even an empty string, takes precedence - if test "$test_CFLAGS" = set; then cflags=$CFLAGS; fi - - # Any user CPPFLAGS, even an empty string, takes precedence - eval cppflags=\"\$${ccbase}${abi1}_cppflags\" - test -n "$cppflags" || eval cppflags=\"\$${ccbase}${abi2}_cppflags\" - if test "$test_CPPFLAGS" = set; then cppflags=$CPPFLAGS; fi - - # --enable-profiling adds -p/-pg even to user-specified CFLAGS. - # This is convenient, but it's perhaps a bit naughty to modify user - # CFLAGS. - case "$enable_profiling" in - prof) cflags="$cflags -p" ;; - gprof) cflags="$cflags -pg" ;; - instrument) cflags="$cflags -finstrument-functions" ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler $cc $cflags $cppflags" >&5 -$as_echo_n "checking compiler $cc $cflags $cppflags... " >&6; } -gmp_prog_cc_works=yes - -# first see a simple "main()" works, then go on to other checks -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF - -int main () { return 0; } -EOF - echo "Test compile: " >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no" - ;; - norun) - gmp_prog_cc_works="no, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 - (without -maix64), hence detecting an unusable compiler */ -void *g() { return (void *) 0; } -void *f() { return g(); } - -int main () { return 0; } -EOF - echo "Test compile: function pointer return" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, function pointer return" - ;; - norun) - gmp_prog_cc_works="no, function pointer return, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an invalid instruction syntax from i386 gcc - -march=pentiumpro on Solaris 2.8. The native sun assembler - requires a non-standard syntax for cmov which gcc (as of 2.95.2 at - least) doesn't know. */ -int n; -int cmov () { return (n >= 0 ? n : 0); } - -int main () { return 0; } -EOF - echo "Test compile: cmov instruction" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, cmov instruction" - ;; - norun) - gmp_prog_cc_works="no, cmov instruction, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes a linker invocation problem with gcc 3.0.3 - on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 - option causes gcc to incorrectly select the 32-bit libgcc.a, not - the 64-bit one, and consequently it misses out on the __fixunsdfdi - helper (double -> uint64 conversion). */ -double d; -unsigned long gcc303 () { return (unsigned long) d; } - -int main () { return 0; } -EOF - echo "Test compile: double -> ulong conversion" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, double -> ulong conversion" - ;; - norun) - gmp_prog_cc_works="no, double -> ulong conversion, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if - the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 - instruction, and a negation like this comes out using it. */ -double fneg_data; -unsigned long fneg () { return -fneg_data; } - -int main () { return 0; } -EOF - echo "Test compile: double negation" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, double negation" - ;; - norun) - gmp_prog_cc_works="no, double negation, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn - (cvtsd2ss) which will provoke an error if the assembler doesn't recognise - those instructions. Not sure how much of the gmp code will come out - wanting sse2, but it's easiest to reject an option we know is bad. */ -double ftod_data; -float ftod () { return (float) ftod_data; } - -int main () { return 0; } -EOF - echo "Test compile: double -> float conversion" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, double -> float conversion" - ;; - norun) - gmp_prog_cc_works="no, double -> float conversion, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal compiler error from gcc version - "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char - values being spilled into floating point registers. The problem doesn't - show up all the time, but has occurred enough in GMP for us to reject - this compiler+flags. */ -#include <string.h> /* for memcpy */ -struct try_t -{ - char dst[2]; - char size; - long d0, d1, d2, d3, d4, d5, d6; - char overlap; -}; -struct try_t param[6]; -int -param_init () -{ - struct try_t *p; - memcpy (p, ¶m[ 2 ], sizeof (*p)); - memcpy (p, ¶m[ 2 ], sizeof (*p)); - p->size = 2; - memcpy (p, ¶m[ 1 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 2; - memcpy (p, ¶m[ 3 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 8; - memcpy (p, ¶m[ 4 ], sizeof (*p)); - memcpy (p, ¶m[ 4 ], sizeof (*p)); - p->overlap = 8; - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - return 0; -} - -int main () { return 0; } -EOF - echo "Test compile: gnupro alpha ev6 char spilling" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, gnupro alpha ev6 char spilling" - ;; - norun) - gmp_prog_cc_works="no, gnupro alpha ev6 char spilling, program does not run" - ;; - esac -fi - - - - -# __builtin_alloca is not available everywhere, check it exists before -# seeing that it works -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -int k; int foo () { __builtin_alloca (k); } -EOF - echo "Test compile: __builtin_alloca availability" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal compiler error from Itanium HP-UX cc - under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ -int k; -int foo () -{ - int i, **a; - a = __builtin_alloca (k); - for (i = 0; i <= k; i++) - a[i] = __builtin_alloca (1 << i); -} - -int main () { return 0; } -EOF - echo "Test compile: alloca array" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, alloca array" - ;; - norun) - gmp_prog_cc_works="no, alloca array, program does not run" - ;; - esac -fi - - - - ;; - no) - - ;; - norun) - - ;; - esac -fi - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal error from the assembler on - power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this - results in "Internal error related to the source program domain". - - For reference it seems to be the combination of nabs+fcirz which is bad, - not either alone. This sort of thing occurs in mpz/get_str.c with the - way double chars_per_bit_exactly is applied in MPN_SIZEINBASE. Perhaps - if that code changes to a scaled-integer style then we won't need this - test. */ - -double fp[1]; -int x; -int f () -{ - int a; - a = (x >= 0 ? x : -x); - return a * fp[0]; -} - -int main () { return 0; } -EOF - echo "Test compile: abs int -> double conversion" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, abs int -> double conversion" - ;; - norun) - gmp_prog_cc_works="no, abs int -> double conversion, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes a segfault in the compiler on powerpc-apple-darwin. - Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to segfault with e.g., -O2 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -typedef unsigned long long t1;typedef t1*t2; -void g(){} -void h(){} -static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) -{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;} -void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i; -for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}} -#else -int dummy; -#endif - -int main () { return 0; } -EOF - echo "Test compile: long long reliability test 1" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, long long reliability test 1" - ;; - norun) - gmp_prog_cc_works="no, long long reliability test 1, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal compiler error on powerpc-apple-darwin. - Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to get an ICE with -O1 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int g(); -void f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();} -int g(){return 0;} -#else -int dummy; -#endif - -int main () { return 0; } -EOF - echo "Test compile: long long reliability test 2" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, long long reliability test 2" - ;; - norun) - gmp_prog_cc_works="no, long long reliability test 2, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* Provokes an ICE on i386-freebsd with the FreeBSD-hacked gcc, under - -O2 -march=amdfam10. We call helper functions here "open" and "close" in - order for linking to succeed. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int open(int*,int*,int);void*close(int);void g(int*rp,int*up,int un){ -__builtin_expect(un<=0x7f00,1)?__builtin_alloca(un):close(un);if(__builtin_clzl -(up[un])){open(rp,up,un);while(1){if(rp[un-1]!=0)break;un--;}}} -#else -int dummy; -#endif - -int main () { return 0; } -EOF - echo "Test compile: freebsd hacked gcc" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, freebsd hacked gcc" - ;; - norun) - gmp_prog_cc_works="no, freebsd hacked gcc, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following is mis-compiled by HP ia-64 cc version - cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003] - under "cc +O3", both in +DD32 and +DD64 modes. The mpn_lshift_com gets - inlined and its return value somehow botched to be 0 instead of 1. This - arises in the real mpn_lshift_com in mul_fft.c. A lower optimization - level, like +O2 seems ok. This code needs to be run to show the problem, - but that's fine, the offending cc is a native-only compiler so we don't - have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -unsigned long -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long retval, high_limb, low_limb; - unsigned tnc; - long i; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *up++; - retval = low_limb >> tnc; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *up++; - *rp++ = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - return retval; -} -int -main () -{ - unsigned long cy, rp[2], up[2]; - up[0] = ~ 0L; - up[1] = 0; - cy = lshift_com (rp, up, 2L, 1); - if (cy != 1L) - return 1; - return 0; -} -#else -int -main () -{ - return 0; -} -#endif - -EOF - echo "Test compile: mpn_lshift_com optimization" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, mpn_lshift_com optimization" - ;; - norun) - gmp_prog_cc_works="no, mpn_lshift_com optimization, program does not run" - ;; - esac -fi - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following is mis-compiled by Intel ia-64 icc version 1.8 under - "icc -O3", After several calls, the function writes partial garbage to - the result vector. Perhaps relates to the chk.a.nc insn. This code needs - to be run to show the problem, but that's fine, the offending cc is a - native-only compiler so we don't have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -#include <stdlib.h> -void -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long high_limb, low_limb; - unsigned tnc; - long i; - up += n; - rp += n; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *--up; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *--up; - *--rp = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - *--rp = ~high_limb; -} -int -main () -{ - unsigned long *r, *r2; - unsigned long a[88 + 1]; - long i; - for (i = 0; i < 88 + 1; i++) - a[i] = ~0L; - r = malloc (10000 * sizeof (unsigned long)); - r2 = r; - for (i = 0; i < 528; i += 22) - { - lshift_com (r2, a, - i / (8 * sizeof (unsigned long)) + 1, - i % (8 * sizeof (unsigned long))); - r2 += 88 + 1; - } - if (r[2048] != 0 || r[2049] != 0 || r[2050] != 0 || r[2051] != 0 || - r[2052] != 0 || r[2053] != 0 || r[2054] != 0) - abort (); - return 0; -} -#else -int -main () -{ - return 0; -} -#endif - -EOF - echo "Test compile: mpn_lshift_com optimization 2" >&5 - gmp_compile="$cc $cflags $cppflags conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, mpn_lshift_com optimization 2" - ;; - norun) - gmp_prog_cc_works="no, mpn_lshift_com optimization 2, program does not run" - ;; - esac -fi - - - - -# A certain _GLOBAL_OFFSET_TABLE_ problem in past versions of gas, tickled -# by recent versions of gcc. -# -if test "$gmp_prog_cc_works" = yes; then - case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*) - # this problem only arises in PIC code, so don't need to test when - # --disable-shared. We don't necessarily have $enable_shared set to - # yes at this point, it will still be unset for the default (which is - # yes); hence the use of "!= no". - if test "$enable_shared" != no; then - echo "Testing gcc GOT with eax emitted" >&5 -cat >conftest.c <<\EOF -int foo; -int bar () { return foo; } -EOF -tmp_got_emitted=no -gmp_compile="$cc $cflags $cppflags -fPIC -S conftest.c >&5 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if grep "addl.*_GLOBAL_OFFSET_TABLE_.*eax" conftest.s >/dev/null; then - tmp_got_emitted=yes - fi -fi -rm -f conftest.* -echo "Result: $tmp_got_emitted" >&5 -if test "$tmp_got_emitted" = yes; then - echo "Testing gas GOT with eax good" >&5 -cat >conftest.awk <<\EOF -BEGIN { - want[0] = "001" - want[1] = "043" - want[2] = "105" - want[3] = "147" - want[4] = "211" - want[5] = "253" - want[6] = "315" - want[7] = "357" - - want[8] = "005" - want[9] = "002" - want[10] = "000" - want[11] = "000" - want[12] = "000" - - want[13] = "376" - want[14] = "334" - want[15] = "272" - want[16] = "230" - want[17] = "166" - want[18] = "124" - want[19] = "062" - want[20] = "020" - - result = "yes" -} -{ - for (f = 2; f <= NF; f++) - { - for (i = 0; i < 20; i++) - got[i] = got[i+1]; - got[20] = $f; - - found = 1 - for (i = 0; i < 21; i++) - if (got[i] != want[i]) - { - found = 0 - break - } - if (found) - { - result = "no" - exit - } - } -} -END { - print result -} -EOF -cat >conftest.s <<\EOF - .text - .byte 1, 35, 69, 103, 137, 171, 205, 239 - addl $_GLOBAL_OFFSET_TABLE_, %eax - .byte 254, 220, 186, 152, 118, 84, 50, 16 -EOF -tmp_got_good=yes -gmp_compile="$cc $cflags $cppflags -fPIC -o conftest.o -c conftest.s >&5 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - tmp_got_good=`od -b conftest.o | $AWK -f conftest.awk` -fi -rm -f conftest.* -echo "Result: $tmp_got_good" >&5 -if test "$tmp_got_good" = no; then - gmp_prog_cc_works="no, bad gas GOT with eax" -else - : -fi - -else - : -fi - - fi - ;; - esac -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_prog_cc_works" >&5 -$as_echo "$gmp_prog_cc_works" >&6; } -case $gmp_prog_cc_works in - yes) - - ;; - *) - continue - ;; -esac - - - # If we're supposed to be using a "long long" for a limb, check that - # it works. - eval limb_chosen=\"\$limb$abi1\" - test -n "$limb_chosen" || eval limb_chosen=\"\$limb$abi2\" - if test "$limb_chosen" = longlong; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler $cc $cflags $cppflags has long long" >&5 -$as_echo_n "checking compiler $cc $cflags $cppflags has long long... " >&6; } -cat >conftest.c <<EOF -long long foo; -long long bar () { return foo; } -int main () { return 0; } -EOF -gmp_prog_cc_works=no -gmp_compile="$cc $cflags $cppflags -c conftest.c >&5" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - gmp_prog_cc_works=yes -else - echo "failed program was:" >&5 - cat conftest.c >&5 -fi -rm -f conftest* a.out b.out a.exe a_out.exe -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_prog_cc_works" >&5 -$as_echo "$gmp_prog_cc_works" >&6; } -if test $gmp_prog_cc_works = yes; then - : -else - continue -fi - - fi - - # The tests to perform on this $cc, if any - eval testlist=\"\$${ccbase}${abi1}_testlist\" - test -n "$testlist" || eval testlist=\"\$${ccbase}${abi2}_testlist\" - test -n "$testlist" || eval testlist=\"\$any${abi1}_testlist\" - test -n "$testlist" || eval testlist=\"\$any${abi2}_testlist\" - - testlist_pass=yes - for tst in $testlist; do - case $tst in - hpc-hppa-2-0) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HP compiler $cc is good for 64-bits" >&5 -$as_echo_n "checking whether HP compiler $cc is good for 64-bits... " >&6; } -# Bad compiler output: -# ccom: HP92453-01 G.10.32.05 HP C Compiler -# Good compiler output: -# ccom: HP92453-01 A.10.32.30 HP C Compiler -# Let A.10.32.30 or higher be ok. -echo >conftest.c -gmp_tmp_vs=`$cc -V -c -o conftest.$OBJEXT conftest.c 2>&1 | grep "^ccom:"` -echo "Version string: $gmp_tmp_vs" >&5 -rm conftest* -gmp_tmp_v1=`echo $gmp_tmp_vs | sed 's/.* .\.\([0-9]*\).*/\1/'` -gmp_tmp_v2=`echo $gmp_tmp_vs | sed 's/.* .\..*\.\(.*\)\..* HP C.*/\1/'` -gmp_tmp_v3=`echo $gmp_tmp_vs | sed 's/.* .\..*\..*\.\(.*\) HP C.*/\1/'` -echo "Version number: $gmp_tmp_v1.$gmp_tmp_v2.$gmp_tmp_v3" >&5 -if test -z "$gmp_tmp_v1"; then - gmp_hpc_64bit=not-applicable -else - gmp_compare_ge=no -if test -n "$gmp_tmp_v1"; then - if test "$gmp_tmp_v1" -gt 10; then - gmp_compare_ge=yes - else - if test "$gmp_tmp_v1" -eq 10; then - if test -n "$gmp_tmp_v2"; then - if test "$gmp_tmp_v2" -gt 32; then - gmp_compare_ge=yes - else - if test "$gmp_tmp_v2" -eq 32; then - if test -n "$gmp_tmp_v3" && test "$gmp_tmp_v3" -ge 30; then - gmp_compare_ge=yes -fi - - fi - fi -fi - - fi - fi -fi - - - gmp_hpc_64bit=$gmp_compare_ge -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_hpc_64bit" >&5 -$as_echo "$gmp_hpc_64bit" >&6; } -if test $gmp_hpc_64bit = yes; then - : -else - testlist_pass=no -fi - ;; - gcc-arm-umodsi) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ARM gcc unsigned division works" >&5 -$as_echo_n "checking whether ARM gcc unsigned division works... " >&6; } -tmp_version=`$cc --version` -echo "$tmp_version" >&5 -case $tmp_version in - 2.95 | 2.95.[123]) - testlist_pass=no - gmp_gcc_arm_umodsi_result="no, gcc 2.95.[0123]" ;; - *) - : - gmp_gcc_arm_umodsi_result=yes ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_gcc_arm_umodsi_result" >&5 -$as_echo "$gmp_gcc_arm_umodsi_result" >&6; } - ;; - gcc-mips-o32) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports o32" >&5 -$as_echo_n "checking whether gcc supports o32... " >&6; } -echo 'int x;' >conftest.c -echo "$cc -mabi=32 -c conftest.c" >&5 -if $cc -mabi=32 -c conftest.c >conftest.out 2>&1; then - result=yes -else - cat conftest.out >&5 - if grep "cc1: Invalid option \`abi=32'" conftest.out >/dev/null; then - result=yes - else - result=no - fi -fi -rm -f conftest.* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5 -$as_echo "$result" >&6; } -if test $result = yes; then - : -else - testlist_pass=no -fi - ;; - hppa-level-2.0) { $as_echo "$as_me:${as_lineno-$LINENO}: checking $cc $cflags assembler knows hppa 2.0" >&5 -$as_echo_n "checking $cc $cflags assembler knows hppa 2.0... " >&6; } -result=no -cat >conftest.s <<EOF - .level 2.0 -EOF -gmp_compile="$cc $cflags -c conftest.s >&5 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - result=yes -else - echo "failed program was" >&5 - cat conftest.s >&5 -fi -rm -f conftest* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5 -$as_echo "$result" >&6; } -if test "$result" = yes; then - : -else - testlist_pass=no -fi - ;; - sizeof*) echo "configure: testlist $tst" >&5 -gmp_sizeof_type=`echo "$tst" | sed 's/sizeof-\([a-z]*\).*/\1/'` -gmp_sizeof_want=`echo "$tst" | sed 's/sizeof-[a-z]*-\([0-9]*\).*/\1/'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler $cc $cflags has sizeof($gmp_sizeof_type)==$gmp_sizeof_want" >&5 -$as_echo_n "checking compiler $cc $cflags has sizeof($gmp_sizeof_type)==$gmp_sizeof_want... " >&6; } -cat >conftest.c <<EOF -int -main () -{ - static int test_array [1 - 2 * (long) (sizeof ($gmp_sizeof_type) != $gmp_sizeof_want)]; - test_array[0] = 0; - return 0; -} -EOF -gmp_c_testlist_sizeof=no -gmp_compile="$cc $cflags -c conftest.c >&5" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - gmp_c_testlist_sizeof=yes -fi -rm -f conftest* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_c_testlist_sizeof" >&5 -$as_echo "$gmp_c_testlist_sizeof" >&6; } -if test $gmp_c_testlist_sizeof = yes; then - : -else - testlist_pass=no -fi - ;; - esac - if test $testlist_pass = no; then break; fi - done - - if test $testlist_pass = yes; then - found_compiler=yes - break - fi - done - - if test $found_compiler = yes; then break; fi - done - - if test $found_compiler = yes; then break; fi - done - - if test $found_compiler = yes; then break; fi -done - - -# If we recognised the CPU, as indicated by $path being set, then insist -# that we have a working compiler, either from our $cclist choices or from -# $CC. We can't let AC_PROG_CC look around for a compiler because it might -# find one that we've rejected (for not supporting the modes our asm code -# demands, etc). -# -# If we didn't recognise the CPU (and this includes host_cpu=none), then -# fall through and let AC_PROG_CC look around for a compiler too. This is -# mostly in the interests of following a standard autoconf setup, after all -# we've already tested cc and gcc adequately (hopefully). As of autoconf -# 2.50 the only thing AC_PROG_CC really adds is a check for "cl" (Microsoft -# C on MS-DOS systems). -# -if test $found_compiler = no && test -n "$path"; then - as_fn_error $? "could not find a working compiler, see config.log for details" "$LINENO" 5 -fi - -case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | cabylake*-*-*) - # If the user asked for a fat build, override the path and flags set above - if test $enable_fat = yes; then - gcc_cflags_cpu="" - gcc_cflags_arch="" - - fat_functions="add_n addmul_1 bdiv_dbm1c com cnd_add_n cnd_sub_n - copyd copyi dive_1 divrem_1 - gcd_1 lshift lshiftc mod_1 mod_1_1 mod_1_1_cps mod_1_2 - mod_1_2_cps mod_1_4 mod_1_4_cps mod_34lsub1 mode1o mul_1 - mul_basecase mullo_basecase pre_divrem_1 pre_mod_1 redc_1 - redc_2 rshift sqr_basecase sub_n submul_1" - - if test "$abi" = 32; then - extra_functions="$extra_functions fat fat_entry" - path="x86/fat x86" - fat_path="x86 x86/fat x86/i486 - x86/k6 x86/k6/mmx x86/k6/k62mmx - x86/k7 x86/k7/mmx - x86/k8 x86/k10 x86/bobcat - x86/pentium x86/pentium/mmx - x86/p6 x86/p6/mmx x86/p6/p3mmx x86/p6/sse2 - x86/pentium4 x86/pentium4/mmx x86/pentium4/sse2 - x86/core2 x86/coreinhm x86/coreisbr - x86/atom x86/atom/mmx x86/atom/sse2 x86/nano" - fi - - if test "$abi" = 64; then - gcc_64_cflags="" - extra_functions_64="$extra_functions_64 fat fat_entry" - path_64="x86_64/fat x86_64" - fat_path="x86_64 x86_64/fat - x86_64/k8 x86_64/k10 x86_64/bd1 x86_64/bobcat x86_64/pentium4 - x86_64/core2 x86_64/coreinhm x86_64/coreisbr x86_64/coreihwl - x86_64/coreibwl x86_64/skylake x86_64/atom x86_64/silvermont - x86_64/nano" - fat_functions="$fat_functions addmul_2 addlsh1_n addlsh2_n sublsh1_n" - fi - - fat_thresholds="MUL_TOOM22_THRESHOLD MUL_TOOM33_THRESHOLD - SQR_TOOM2_THRESHOLD SQR_TOOM3_THRESHOLD - BMOD_1_TO_MOD_1_THRESHOLD" - fi - ;; -esac - - -if test $found_compiler = yes; then - - # If we're creating CFLAGS, then look for optional additions. If the user - # set CFLAGS then leave it alone. - # - if test "$test_CFLAGS" != set; then - eval optlist=\"\$${ccbase}${abi1}_cflags_optlist\" - test -n "$optlist" || eval optlist=\"\$${ccbase}${abi2}_cflags_optlist\" - - for opt in $optlist; do - eval optflags=\"\$${ccbase}${abi1}_cflags_${opt}\" - test -n "$optflags" || eval optflags=\"\$${ccbase}${abi2}_cflags_${opt}\" - test -n "$optflags" || eval optflags=\"\$${ccbase}_cflags_${opt}\" - - for flag in $optflags; do - - # ~ represents a space in an option spec - flag=`echo "$flag" | tr '~' ' '` - - case $flag in - -march=pentium4 | -march=k8) - # For -march settings which enable SSE2 we exclude certain bad - # gcc versions and we need an OS knowing how to save xmm regs. - # - # This is only for ABI=32, any 64-bit gcc is good and any OS - # knowing x86_64 will know xmm. - # - # -march=k8 was only introduced in gcc 3.3, so we shouldn't need - # the GMP_GCC_PENTIUM4_SSE2 check (for gcc 3.2 and prior). But - # it doesn't hurt to run it anyway, sharing code with the - # pentium4 case. - # - if test "$abi" = 32; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc is good for sse2" >&5 -$as_echo_n "checking whether gcc is good for sse2... " >&6; } -case `$cc $cflags $cppflags -dumpversion` in - 3.[012] | 3.[012].*) result=no ;; - *) result=yes ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5 -$as_echo "$result" >&6; } -if test "$result" = yes; then - : -else - continue -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the operating system supports XMM registers" >&5 -$as_echo_n "checking whether the operating system supports XMM registers... " >&6; } -if ${gmp_cv_os_x86_xmm+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$build" = "$host"; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.s <<EOF - .text -main: -_main: - .globl main - .globl _main - .byte 0x0f, 0x57, 0xc0 - xorl %eax, %eax - ret -EOF - gmp_compile="$cc $cflags $cppflags conftest.s -o conftest >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - gmp_cv_os_x86_xmm=yes - else - gmp_cv_os_x86_xmm=no - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Oops, cannot compile test program" >&5 -$as_echo "$as_me: WARNING: Oops, cannot compile test program" >&2;} - fi - rm -f conftest* -fi - -if test -z "$gmp_cv_os_x86_xmm"; then - case $host_os in - freebsd[123] | freebsd[123].*) - gmp_cv_os_x86_xmm=no ;; - freebsd*) - gmp_cv_os_x86_xmm=yes ;; - *) - gmp_cv_os_x86_xmm=probably ;; - esac -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_os_x86_xmm" >&5 -$as_echo "$gmp_cv_os_x86_xmm" >&6; } - -if test "$gmp_cv_os_x86_xmm" = probably; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not certain of OS support for xmm when cross compiling." >&5 -$as_echo "$as_me: WARNING: Not certain of OS support for xmm when cross compiling." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Will assume it's ok, expect a SIGILL if this is wrong." >&5 -$as_echo "$as_me: WARNING: Will assume it's ok, expect a SIGILL if this is wrong." >&2;} -fi - -case $gmp_cv_os_x86_xmm in -no) - continue - ;; -*) - - ;; -esac - - fi - ;; - -no-cpp-precomp) - # special check, avoiding a warning - if test "$ccbase" = gcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler $cc $cflags -no-cpp-precomp" >&5 -$as_echo_n "checking compiler $cc $cflags -no-cpp-precomp... " >&6; } - result=no - cat >conftest.c <<EOF -int main () { return 0; } -EOF - gmp_compile="$cc $cflags -no-cpp-precomp conftest.c >conftest.out 2>&1" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if grep "unrecognized option.*-no-cpp-precomp" conftest.out >/dev/null; then : ; - else - result=yes - fi - fi - cat conftest.out >&5 - rm -f conftest* a.out b.out a.exe a_out.exe - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5 -$as_echo "$result" >&6; } - if test "$result" = yes; then - cflags="$cflags $flag" - break - else - continue - fi -fi - - ;; - -Wa,-m*) - case $host in - alpha*-*-*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler $cc $cflags $flag" >&5 -$as_echo_n "checking assembler $cc $cflags $flag... " >&6; } -result=no -cat >conftest.c <<EOF -int main () {} -EOF -gmp_compile="$cc $cflags $flag -c conftest.c >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if grep "Unknown CPU identifier" conftest.out >/dev/null; then : ; - else - result=yes - fi -fi -cat conftest.out >&5 -rm -f conftest* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5 -$as_echo "$result" >&6; } -if test "$result" = yes; then - : -else - continue -fi - - ;; - esac - ;; - -Wa,-oldas) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cc $cflags $cppflags -Wa,-oldas" >&5 -$as_echo_n "checking for $cc $cflags $cppflags -Wa,-oldas... " >&6; } -result=no -cat >conftest.c <<EOF -EOF -echo "with empty conftest.c" >&5 -gmp_compile="$cc $cflags $cppflags -c conftest.c >&5 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : ; -else - # empty fails - gmp_compile="$cc $cflags $cppflags -Wa,-oldas -c conftest.c >&5 2>&1" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # but with -Wa,-oldas it works - result=yes - fi -fi -rm -f conftest* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5 -$as_echo "$result" >&6; } -if test "$result" = yes; then - cflags="$cflags $flag" - break -else - continue -fi - - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler $cc $cflags $cppflags $flag" >&5 -$as_echo_n "checking compiler $cc $cflags $cppflags $flag... " >&6; } -gmp_prog_cc_works=yes - -# first see a simple "main()" works, then go on to other checks -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF - -int main () { return 0; } -EOF - echo "Test compile: " >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no" - ;; - norun) - gmp_prog_cc_works="no, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 - (without -maix64), hence detecting an unusable compiler */ -void *g() { return (void *) 0; } -void *f() { return g(); } - -int main () { return 0; } -EOF - echo "Test compile: function pointer return" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, function pointer return" - ;; - norun) - gmp_prog_cc_works="no, function pointer return, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an invalid instruction syntax from i386 gcc - -march=pentiumpro on Solaris 2.8. The native sun assembler - requires a non-standard syntax for cmov which gcc (as of 2.95.2 at - least) doesn't know. */ -int n; -int cmov () { return (n >= 0 ? n : 0); } - -int main () { return 0; } -EOF - echo "Test compile: cmov instruction" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, cmov instruction" - ;; - norun) - gmp_prog_cc_works="no, cmov instruction, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes a linker invocation problem with gcc 3.0.3 - on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 - option causes gcc to incorrectly select the 32-bit libgcc.a, not - the 64-bit one, and consequently it misses out on the __fixunsdfdi - helper (double -> uint64 conversion). */ -double d; -unsigned long gcc303 () { return (unsigned long) d; } - -int main () { return 0; } -EOF - echo "Test compile: double -> ulong conversion" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, double -> ulong conversion" - ;; - norun) - gmp_prog_cc_works="no, double -> ulong conversion, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if - the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 - instruction, and a negation like this comes out using it. */ -double fneg_data; -unsigned long fneg () { return -fneg_data; } - -int main () { return 0; } -EOF - echo "Test compile: double negation" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, double negation" - ;; - norun) - gmp_prog_cc_works="no, double negation, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn - (cvtsd2ss) which will provoke an error if the assembler doesn't recognise - those instructions. Not sure how much of the gmp code will come out - wanting sse2, but it's easiest to reject an option we know is bad. */ -double ftod_data; -float ftod () { return (float) ftod_data; } - -int main () { return 0; } -EOF - echo "Test compile: double -> float conversion" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, double -> float conversion" - ;; - norun) - gmp_prog_cc_works="no, double -> float conversion, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal compiler error from gcc version - "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char - values being spilled into floating point registers. The problem doesn't - show up all the time, but has occurred enough in GMP for us to reject - this compiler+flags. */ -#include <string.h> /* for memcpy */ -struct try_t -{ - char dst[2]; - char size; - long d0, d1, d2, d3, d4, d5, d6; - char overlap; -}; -struct try_t param[6]; -int -param_init () -{ - struct try_t *p; - memcpy (p, ¶m[ 2 ], sizeof (*p)); - memcpy (p, ¶m[ 2 ], sizeof (*p)); - p->size = 2; - memcpy (p, ¶m[ 1 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 2; - memcpy (p, ¶m[ 3 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 8; - memcpy (p, ¶m[ 4 ], sizeof (*p)); - memcpy (p, ¶m[ 4 ], sizeof (*p)); - p->overlap = 8; - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - return 0; -} - -int main () { return 0; } -EOF - echo "Test compile: gnupro alpha ev6 char spilling" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, gnupro alpha ev6 char spilling" - ;; - norun) - gmp_prog_cc_works="no, gnupro alpha ev6 char spilling, program does not run" - ;; - esac -fi - - - - -# __builtin_alloca is not available everywhere, check it exists before -# seeing that it works -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -int k; int foo () { __builtin_alloca (k); } -EOF - echo "Test compile: __builtin_alloca availability" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal compiler error from Itanium HP-UX cc - under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ -int k; -int foo () -{ - int i, **a; - a = __builtin_alloca (k); - for (i = 0; i <= k; i++) - a[i] = __builtin_alloca (1 << i); -} - -int main () { return 0; } -EOF - echo "Test compile: alloca array" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, alloca array" - ;; - norun) - gmp_prog_cc_works="no, alloca array, program does not run" - ;; - esac -fi - - - - ;; - no) - - ;; - norun) - - ;; - esac -fi - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal error from the assembler on - power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this - results in "Internal error related to the source program domain". - - For reference it seems to be the combination of nabs+fcirz which is bad, - not either alone. This sort of thing occurs in mpz/get_str.c with the - way double chars_per_bit_exactly is applied in MPN_SIZEINBASE. Perhaps - if that code changes to a scaled-integer style then we won't need this - test. */ - -double fp[1]; -int x; -int f () -{ - int a; - a = (x >= 0 ? x : -x); - return a * fp[0]; -} - -int main () { return 0; } -EOF - echo "Test compile: abs int -> double conversion" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, abs int -> double conversion" - ;; - norun) - gmp_prog_cc_works="no, abs int -> double conversion, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes a segfault in the compiler on powerpc-apple-darwin. - Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to segfault with e.g., -O2 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -typedef unsigned long long t1;typedef t1*t2; -void g(){} -void h(){} -static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) -{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;} -void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i; -for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}} -#else -int dummy; -#endif - -int main () { return 0; } -EOF - echo "Test compile: long long reliability test 1" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, long long reliability test 1" - ;; - norun) - gmp_prog_cc_works="no, long long reliability test 1, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following provokes an internal compiler error on powerpc-apple-darwin. - Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to get an ICE with -O1 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int g(); -void f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();} -int g(){return 0;} -#else -int dummy; -#endif - -int main () { return 0; } -EOF - echo "Test compile: long long reliability test 2" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, long long reliability test 2" - ;; - norun) - gmp_prog_cc_works="no, long long reliability test 2, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* Provokes an ICE on i386-freebsd with the FreeBSD-hacked gcc, under - -O2 -march=amdfam10. We call helper functions here "open" and "close" in - order for linking to succeed. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int open(int*,int*,int);void*close(int);void g(int*rp,int*up,int un){ -__builtin_expect(un<=0x7f00,1)?__builtin_alloca(un):close(un);if(__builtin_clzl -(up[un])){open(rp,up,un);while(1){if(rp[un-1]!=0)break;un--;}}} -#else -int dummy; -#endif - -int main () { return 0; } -EOF - echo "Test compile: freebsd hacked gcc" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, freebsd hacked gcc" - ;; - norun) - gmp_prog_cc_works="no, freebsd hacked gcc, program does not run" - ;; - esac -fi - - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following is mis-compiled by HP ia-64 cc version - cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003] - under "cc +O3", both in +DD32 and +DD64 modes. The mpn_lshift_com gets - inlined and its return value somehow botched to be 0 instead of 1. This - arises in the real mpn_lshift_com in mul_fft.c. A lower optimization - level, like +O2 seems ok. This code needs to be run to show the problem, - but that's fine, the offending cc is a native-only compiler so we don't - have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -unsigned long -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long retval, high_limb, low_limb; - unsigned tnc; - long i; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *up++; - retval = low_limb >> tnc; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *up++; - *rp++ = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - return retval; -} -int -main () -{ - unsigned long cy, rp[2], up[2]; - up[0] = ~ 0L; - up[1] = 0; - cy = lshift_com (rp, up, 2L, 1); - if (cy != 1L) - return 1; - return 0; -} -#else -int -main () -{ - return 0; -} -#endif - -EOF - echo "Test compile: mpn_lshift_com optimization" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, mpn_lshift_com optimization" - ;; - norun) - gmp_prog_cc_works="no, mpn_lshift_com optimization, program does not run" - ;; - esac -fi - - - -if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -/* The following is mis-compiled by Intel ia-64 icc version 1.8 under - "icc -O3", After several calls, the function writes partial garbage to - the result vector. Perhaps relates to the chk.a.nc insn. This code needs - to be run to show the problem, but that's fine, the offending cc is a - native-only compiler so we don't have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -#include <stdlib.h> -void -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long high_limb, low_limb; - unsigned tnc; - long i; - up += n; - rp += n; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *--up; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *--up; - *--rp = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - *--rp = ~high_limb; -} -int -main () -{ - unsigned long *r, *r2; - unsigned long a[88 + 1]; - long i; - for (i = 0; i < 88 + 1; i++) - a[i] = ~0L; - r = malloc (10000 * sizeof (unsigned long)); - r2 = r; - for (i = 0; i < 528; i += 22) - { - lshift_com (r2, a, - i / (8 * sizeof (unsigned long)) + 1, - i % (8 * sizeof (unsigned long))); - r2 += 88 + 1; - } - if (r[2048] != 0 || r[2049] != 0 || r[2050] != 0 || r[2051] != 0 || - r[2052] != 0 || r[2053] != 0 || r[2054] != 0) - abort (); - return 0; -} -#else -int -main () -{ - return 0; -} -#endif - -EOF - echo "Test compile: mpn_lshift_com optimization 2" >&5 - gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cc_works_part=yes - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&5 - cat conftest.c >&5 - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - - ;; - no) - gmp_prog_cc_works="no, mpn_lshift_com optimization 2" - ;; - norun) - gmp_prog_cc_works="no, mpn_lshift_com optimization 2, program does not run" - ;; - esac -fi - - - - -# A certain _GLOBAL_OFFSET_TABLE_ problem in past versions of gas, tickled -# by recent versions of gcc. -# -if test "$gmp_prog_cc_works" = yes; then - case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*) - # this problem only arises in PIC code, so don't need to test when - # --disable-shared. We don't necessarily have $enable_shared set to - # yes at this point, it will still be unset for the default (which is - # yes); hence the use of "!= no". - if test "$enable_shared" != no; then - echo "Testing gcc GOT with eax emitted" >&5 -cat >conftest.c <<\EOF -int foo; -int bar () { return foo; } -EOF -tmp_got_emitted=no -gmp_compile="$cc $cflags $cppflags $flag -fPIC -S conftest.c >&5 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if grep "addl.*_GLOBAL_OFFSET_TABLE_.*eax" conftest.s >/dev/null; then - tmp_got_emitted=yes - fi -fi -rm -f conftest.* -echo "Result: $tmp_got_emitted" >&5 -if test "$tmp_got_emitted" = yes; then - echo "Testing gas GOT with eax good" >&5 -cat >conftest.awk <<\EOF -BEGIN { - want[0] = "001" - want[1] = "043" - want[2] = "105" - want[3] = "147" - want[4] = "211" - want[5] = "253" - want[6] = "315" - want[7] = "357" - - want[8] = "005" - want[9] = "002" - want[10] = "000" - want[11] = "000" - want[12] = "000" - - want[13] = "376" - want[14] = "334" - want[15] = "272" - want[16] = "230" - want[17] = "166" - want[18] = "124" - want[19] = "062" - want[20] = "020" - - result = "yes" -} -{ - for (f = 2; f <= NF; f++) - { - for (i = 0; i < 20; i++) - got[i] = got[i+1]; - got[20] = $f; - - found = 1 - for (i = 0; i < 21; i++) - if (got[i] != want[i]) - { - found = 0 - break - } - if (found) - { - result = "no" - exit - } - } -} -END { - print result -} -EOF -cat >conftest.s <<\EOF - .text - .byte 1, 35, 69, 103, 137, 171, 205, 239 - addl $_GLOBAL_OFFSET_TABLE_, %eax - .byte 254, 220, 186, 152, 118, 84, 50, 16 -EOF -tmp_got_good=yes -gmp_compile="$cc $cflags $cppflags $flag -fPIC -o conftest.o -c conftest.s >&5 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - tmp_got_good=`od -b conftest.o | $AWK -f conftest.awk` -fi -rm -f conftest.* -echo "Result: $tmp_got_good" >&5 -if test "$tmp_got_good" = no; then - gmp_prog_cc_works="no, bad gas GOT with eax" -else - : -fi - -else - : -fi - - fi - ;; - esac -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_prog_cc_works" >&5 -$as_echo "$gmp_prog_cc_works" >&6; } -case $gmp_prog_cc_works in - yes) - cflags="$cflags $flag" - break - ;; - *) - - ;; -esac - - done - done - fi - - ABI="$abi" - CC="$cc" - CFLAGS="$cflags" - CPPFLAGS="$cppflags" - eval GMP_NONSTD_ABI=\"\$GMP_NONSTD_ABI_$ABI\" - - # Could easily have this in config.h too, if desired. - ABI_nodots=`echo $ABI | sed 's/\./_/'` - -echo "define_not_for_expansion(\`HAVE_ABI_$ABI_nodots')" >> $gmp_tmpconfigm4p - - - - # GMP_LDFLAGS substitution, selected according to ABI. - # These are needed on libgmp.la and libmp.la, but currently not on - # convenience libraries like tune/libspeed.la or mpz/libmpz.la. - # - eval GMP_LDFLAGS=\"\$${ccbase}${abi1}_ldflags\" - test -n "$GMP_LDFLAGS" || eval GMP_LDFLAGS=\"\$${ccbase}${abi1}_ldflags\" - - - - - # extra_functions, selected according to ABI - eval tmp=\"\$extra_functions$abi1\" - test -n "$tmp" || eval tmp=\"\$extra_functions$abi2\" - extra_functions="$tmp" - - - # Cycle counter, selected according to ABI. - # - eval tmp=\"\$SPEED_CYCLECOUNTER_OBJ$abi1\" - test -n "$tmp" || eval tmp=\"\$SPEED_CYCLECOUNTER_OBJ$abi2\" - SPEED_CYCLECOUNTER_OBJ="$tmp" - eval tmp=\"\$cyclecounter_size$abi1\" - test -n "$tmp" || eval tmp=\"\$cyclecounter_size$abi2\" - cyclecounter_size="$tmp" - - if test -n "$SPEED_CYCLECOUNTER_OBJ"; then - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_SPEED_CYCLECOUNTER $cyclecounter_size -_ACEOF - - fi - - - - # Calling conventions checking, selected according to ABI. - # - eval tmp=\"\$CALLING_CONVENTIONS_OBJS$abi1\" - test -n "$tmp" || eval tmp=\"\$CALLING_CONVENTIONS_OBJS$abi2\" - if test "$enable_assembly" = "yes"; then - CALLING_CONVENTIONS_OBJS="$tmp" - else - CALLING_CONVENTIONS_OBJS="" - fi - - if test -n "$CALLING_CONVENTIONS_OBJS"; then - -$as_echo "@%:@define HAVE_CALLING_CONVENTIONS 1" >>confdefs.h - - fi - - -fi - - -# If the user gave an MPN_PATH, use that verbatim, otherwise choose -# according to the ABI and add "generic". -# -if test -n "$MPN_PATH"; then - path="$MPN_PATH" -else - eval tmp=\"\$path$abi1\" - test -n "$tmp" || eval tmp=\"\$path$abi2\" - path="$tmp generic" -fi - - -# Long long limb setup for gmp.h. -case $limb_chosen in -longlong) DEFN_LONG_LONG_LIMB="#define _LONG_LONG_LIMB 1" ;; -*) DEFN_LONG_LONG_LIMB="/* #undef _LONG_LONG_LIMB */" ;; -esac - - - -# The C compiler and preprocessor, put into ANSI mode if possible. -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $@%:@ != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <stdio.h> -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdarg.h> -#include <stdio.h> -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - case $ac_cv_prog_cc_stdc in @%:@( - no) : - ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; @%:@( - *) : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 -$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } -if ${ac_cv_prog_cc_c99+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdarg.h> -#include <stdbool.h> -#include <stdlib.h> -#include <wchar.h> -#include <stdio.h> - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -#define debug(...) fprintf (stderr, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - your preprocessor is broken; -#endif -#if BIG_OK -#else - your preprocessor is broken; -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\0'; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static void -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str; - int number; - float fnumber; - - while (*format) - { - switch (*format++) - { - case 's': // string - str = va_arg (args_copy, const char *); - break; - case 'd': // int - number = va_arg (args_copy, int); - break; - case 'f': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); -} - -int -main () -{ - - // Check bool. - _Bool success = false; - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - test_varargs ("s, d' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' - || dynamic_array[ni.number - 1] != 543); - - ; - return 0; -} -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c99" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c99" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c99" != xno; then : - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdarg.h> -#include <stdio.h> -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 -else - ac_cv_prog_cc_stdc=no -fi - -fi - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 -$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } - if ${ac_cv_prog_cc_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -fi - - case $ac_cv_prog_cc_stdc in @%:@( - no) : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; @%:@( - '') : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; @%:@( - *) : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 -$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; -esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include <limits.h> -@%:@else -@%:@ include <assert.h> -@%:@endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <ac_nonexistent.h> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include <limits.h> -@%:@else -@%:@ include <assert.h> -@%:@endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <ac_nonexistent.h> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# The C compiler on the build system, and associated tests. - -if test -n "$CC_FOR_BUILD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $CC_FOR_BUILD" >&5 -$as_echo_n "checking build system compiler $CC_FOR_BUILD... " >&6; } -# remove anything that might look like compiler output to our "||" expression -rm -f conftest* a.out b.out a.exe a_out.exe -cat >conftest.c <<EOF -int -main () -{ - return 0; -} -EOF -gmp_compile="$CC_FOR_BUILD conftest.c" -cc_for_build_works=no -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then - cc_for_build_works=yes - fi -fi -rm -f conftest* a.out b.out a.exe a_out.exe -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_for_build_works" >&5 -$as_echo "$cc_for_build_works" >&6; } -if test "$cc_for_build_works" = yes; then - : -else - as_fn_error $? "Specified CC_FOR_BUILD doesn't seem to work" "$LINENO" 5 -fi - -elif test -n "$HOST_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $HOST_CC" >&5 -$as_echo_n "checking build system compiler $HOST_CC... " >&6; } -# remove anything that might look like compiler output to our "||" expression -rm -f conftest* a.out b.out a.exe a_out.exe -cat >conftest.c <<EOF -int -main () -{ - return 0; -} -EOF -gmp_compile="$HOST_CC conftest.c" -cc_for_build_works=no -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then - cc_for_build_works=yes - fi -fi -rm -f conftest* a.out b.out a.exe a_out.exe -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_for_build_works" >&5 -$as_echo "$cc_for_build_works" >&6; } -if test "$cc_for_build_works" = yes; then - CC_FOR_BUILD=$HOST_CC -else - as_fn_error $? "Specified HOST_CC doesn't seem to work" "$LINENO" 5 -fi - -else - for i in "$CC" "$CC $CFLAGS $CPPFLAGS" cc gcc c89 c99; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $i" >&5 -$as_echo_n "checking build system compiler $i... " >&6; } -# remove anything that might look like compiler output to our "||" expression -rm -f conftest* a.out b.out a.exe a_out.exe -cat >conftest.c <<EOF -int -main () -{ - return 0; -} -EOF -gmp_compile="$i conftest.c" -cc_for_build_works=no -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then - cc_for_build_works=yes - fi -fi -rm -f conftest* a.out b.out a.exe a_out.exe -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_for_build_works" >&5 -$as_echo "$cc_for_build_works" >&6; } -if test "$cc_for_build_works" = yes; then - CC_FOR_BUILD=$i - break -else - : -fi - - done - if test -z "$CC_FOR_BUILD"; then - as_fn_error $? "Cannot find a build system compiler" "$LINENO" 5 - fi -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system preprocessor" >&5 -$as_echo_n "checking for build system preprocessor... " >&6; } -if test -z "$CPP_FOR_BUILD"; then - if ${gmp_cv_prog_cpp_for_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.c <<EOF -#define FOO BAR -EOF - for i in "$CC_FOR_BUILD -E" "$CC_FOR_BUILD -E -traditional-cpp" "/lib/cpp"; do - gmp_compile="$i conftest.c" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >&5 2>&1; then - gmp_cv_prog_cpp_for_build=$i - break - fi - done - rm -f conftest* a.out b.out a.exe a_out.exe - if test -z "$gmp_cv_prog_cpp_for_build"; then - as_fn_error $? "Cannot find build system C preprocessor." "$LINENO" 5 - fi - -fi - - CPP_FOR_BUILD=$gmp_cv_prog_cpp_for_build -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP_FOR_BUILD" >&5 -$as_echo "$CPP_FOR_BUILD" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system executable suffix" >&5 -$as_echo_n "checking for build system executable suffix... " >&6; } -if ${gmp_cv_prog_exeext_for_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.c <<EOF -int -main () -{ - return 0; -} -EOF -for i in .exe ,ff8 ""; do - gmp_compile="$CC_FOR_BUILD conftest.c -o conftest$i" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if (./conftest) 2>&5; then - gmp_cv_prog_exeext_for_build=$i - break - fi - fi -done -rm -f conftest* -if test "${gmp_cv_prog_exeext_for_build+set}" != set; then - as_fn_error $? "Cannot determine executable suffix" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_prog_exeext_for_build" >&5 -$as_echo "$gmp_cv_prog_exeext_for_build" >&6; } -EXEEXT_FOR_BUILD=$gmp_cv_prog_exeext_for_build - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build system compiler is ANSI" >&5 -$as_echo_n "checking whether build system compiler is ANSI... " >&6; } -if ${gmp_cv_c_for_build_ansi+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.c <<EOF -int -main (int argc, char **argv) -{ - return 0; -} -EOF -gmp_compile="$CC_FOR_BUILD conftest.c" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - gmp_cv_c_for_build_ansi=yes -else - gmp_cv_c_for_build_ansi=no -fi -rm -f conftest* a.out b.out a.exe a_out.exe - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_for_build_ansi" >&5 -$as_echo "$gmp_cv_c_for_build_ansi" >&6; } -if test "$gmp_cv_c_for_build_ansi" = yes; then - U_FOR_BUILD= -else - U_FOR_BUILD=_ - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system compiler math library" >&5 -$as_echo_n "checking for build system compiler math library... " >&6; } -if ${gmp_cv_check_libm_for_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.c <<EOF -#include <math.h> -int -main () -{ - return 0; -} -double d; -double -foo () -{ - return log (d); -} -EOF -gmp_compile="$CC_FOR_BUILD conftest.c -lm" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - gmp_cv_check_libm_for_build=-lm -else - gmp_cv_check_libm_for_build=no -fi -rm -f conftest* a.out b.out a.exe a_out.exe - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_check_libm_for_build" >&5 -$as_echo "$gmp_cv_check_libm_for_build" >&6; } -case $gmp_cv_check_libm_for_build in - yes) LIBM_FOR_BUILD=-lm - ;; - no) LIBM_FOR_BUILD= ;; - *) LIBM_FOR_BUILD=$gmp_cv_check_libm_for_build ;; -esac - - - -# How to assemble, used with CFLAGS etc, see mpn/Makeasm.am. -# Using the compiler is a lot easier than figuring out how to invoke the -# assembler directly. -# -test -n "$CCAS" || CCAS="$CC -c" - - - -# The C++ compiler, if desired. -want_cxx=no -if test $enable_cxx != no; then - test_CXXFLAGS=${CXXFLAGS+set} - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&5 - cxxflags_ac_prog_cxx=$CXXFLAGS - cxxflags_list=ac_prog_cxx - - # If the user didn't specify $CXXFLAGS, then try $CFLAGS, with -g removed - # if AC_PROG_CXX thinks that doesn't work. $CFLAGS stands a good chance - # of working, eg. on a GNU system where CC=gcc and CXX=g++. - # - if test "$test_CXXFLAGS" != set; then - cxxflags_cflags=$CFLAGS - cxxflags_list="cflags $cxxflags_list" - if test "$ac_prog_cxx_g" = no; then - cxxflags_cflags=`echo "$cxxflags_cflags" | sed -e 's/ -g //' -e 's/^-g //' -e 's/ -g$//'` - fi - fi - - # See if the C++ compiler works. If the user specified CXXFLAGS then all - # we're doing is checking whether AC_PROG_CXX succeeded, since it doesn't - # give a fatal error, just leaves CXX set to a default g++. If on the - # other hand the user didn't specify CXXFLAGS then we get to try here our - # $cxxflags_list alternatives. - # - # Automake includes $CPPFLAGS in a C++ compile, so we do the same here. - # - for cxxflags_choice in $cxxflags_list; do - eval CXXFLAGS=\"\$cxxflags_$cxxflags_choice\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler $CXX $CPPFLAGS $CXXFLAGS" >&5 -$as_echo_n "checking C++ compiler $CXX $CPPFLAGS $CXXFLAGS... " >&6; } -gmp_prog_cxx_works=yes - -# start with a plain "main()", then go on to further checks -if test "$gmp_prog_cxx_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.cc <<EOF - -int main (void) { return 0; } -EOF - echo "Test compile: " >&5 - gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_cxxcompile\""; } >&5 - (eval $gmp_cxxcompile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - gmp_prog_cxx_works="no, program does not run" - fi - fi - else - gmp_prog_cxx_works="no" - fi - case $gmp_prog_cxx_works in - no*) - echo "failed program was:" >&5 - cat conftest.cc >&5 - ;; - esac - rm -f conftest* a.out b.out a.exe a_out.exe -fi - - -if test "$gmp_prog_cxx_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.cc <<EOF -namespace foo { } -using namespace foo; - -int main (void) { return 0; } -EOF - echo "Test compile: namespace" >&5 - gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_cxxcompile\""; } >&5 - (eval $gmp_cxxcompile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - gmp_prog_cxx_works="no, namespace, program does not run" - fi - fi - else - gmp_prog_cxx_works="no, namespace" - fi - case $gmp_prog_cxx_works in - no*) - echo "failed program was:" >&5 - cat conftest.cc >&5 - ;; - esac - rm -f conftest* a.out b.out a.exe a_out.exe -fi - - -# GMP requires the standard C++ iostream classes -if test "$gmp_prog_cxx_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.cc <<EOF -/* This test rejects g++ 2.7.2 which doesn't have <iostream>, only a - pre-standard iostream.h. */ -#include <iostream> - -/* This test rejects OSF 5.1 Compaq C++ in its default pre-standard iostream - mode, since that mode puts cout in the global namespace, not "std". */ -void someoutput (void) { std::cout << 123; } - -int main (void) { return 0; } -EOF - echo "Test compile: std iostream" >&5 - gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_cxxcompile\""; } >&5 - (eval $gmp_cxxcompile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$cross_compiling" = no; then - if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then :; - else - gmp_prog_cxx_works="no, std iostream, program does not run" - fi - fi - else - gmp_prog_cxx_works="no, std iostream" - fi - case $gmp_prog_cxx_works in - no*) - echo "failed program was:" >&5 - cat conftest.cc >&5 - ;; - esac - rm -f conftest* a.out b.out a.exe a_out.exe -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_prog_cxx_works" >&5 -$as_echo "$gmp_prog_cxx_works" >&6; } -case $gmp_prog_cxx_works in - yes) - want_cxx=yes - break - ;; - *) - - ;; -esac - - done - - # If --enable-cxx=yes but a C++ compiler can't be found, then abort. - if test $want_cxx = no && test $enable_cxx = yes; then - as_fn_error $? "C++ compiler not available, see config.log for details" "$LINENO" 5 - fi -fi - - if test $want_cxx = yes; then - WANT_CXX_TRUE= - WANT_CXX_FALSE='#' -else - WANT_CXX_TRUE='#' - WANT_CXX_FALSE= -fi - - -# FIXME: We're not interested in CXXCPP for ourselves, but if we don't do it -# here then AC_PROG_LIBTOOL will AC_REQUIRE it (via _LT_AC_TAGCONFIG) and -# hence execute it unconditionally, and that will fail if there's no C++ -# compiler (and no generic /lib/cpp). -# -if test $want_cxx = yes; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include <limits.h> -@%:@else -@%:@ include <assert.h> -@%:@endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <ac_nonexistent.h> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include <limits.h> -@%:@else -@%:@ include <assert.h> -@%:@endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <ac_nonexistent.h> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi - - -# Path setups for Cray, according to IEEE or CFP. These must come after -# deciding the compiler. -# - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -case $host_cpu in - c90 | t90) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef _CRAYIEEE -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - add_path="cray/ieee" -else - add_path="cray/cfp"; extra_functions="mulwwc90" -fi -rm -f conftest* - - ;; - j90 | sv1) - add_path="cray/cfp"; extra_functions="mulwwj90" - ;; -esac - - - -if test -z "$MPN_PATH"; then - path="$add_path $path" -fi - -# For a nail build, also look in "nails" subdirectories. -# -if test $GMP_NAIL_BITS != 0 && test -z "$MPN_PATH"; then - new_path= - for i in $path; do - case $i in - generic) new_path="$new_path $i" ;; - *) new_path="$new_path $i/nails $i" ;; - esac - done - path=$new_path -fi - - -# Put all directories into CPUVEC_list so as to get a full set of -# CPUVEC_SETUP_$tmp_suffix defines into config.h, even if some of them are -# empty because mmx and/or sse2 had to be dropped. -# -for i in $fat_path; do - tmp_suffix=`echo $i | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'` - CPUVEC_list="$CPUVEC_list CPUVEC_SETUP_$tmp_suffix" -done - - -# If there's any sse2 or mmx in the path, check whether the assembler -# supports it, and remove if not. -# -# We only need this in ABI=32, for ABI=64 on x86_64 we can assume a new -# enough assembler. -# -case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | cabylake*-*-*) - if test "$ABI" = 32; then - case "$path $fat_path" in - *mmx*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler knows about MMX instructions" >&5 -$as_echo_n "checking if the assembler knows about MMX instructions... " >&6; } -if ${gmp_cv_asm_x86_mmx+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - .text - movq %mm0, %mm1 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_x86_mmx=yes -case $host in -*-*-solaris*) - if (dis conftest.$OBJEXT >conftest.out) 2>/dev/null; then - if grep "0f 6f c1" conftest.out >/dev/null; then - gmp_cv_asm_x86_mmx=movq-bug - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"dis\" not available to check for \"as\" movq bug" >&5 -$as_echo "$as_me: WARNING: \"dis\" not available to check for \"as\" movq bug" >&2;} - fi -esac -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_x86_mmx=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_mmx" >&5 -$as_echo "$gmp_cv_asm_x86_mmx" >&6; } - -case $gmp_cv_asm_x86_mmx in -movq-bug) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5 -$as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has MMX code, but the assembler" >&5 -$as_echo "$as_me: WARNING: | Host CPU has MMX code, but the assembler" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5 -$as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | has the Solaris 2.6 and 2.7 bug where register to register" >&5 -$as_echo "$as_me: WARNING: | has the Solaris 2.6 and 2.7 bug where register to register" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | movq operands are reversed." >&5 -$as_echo "$as_me: WARNING: | movq operands are reversed." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Non-MMX replacements will be used." >&5 -$as_echo "$as_me: WARNING: | Non-MMX replacements will be used." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5 -$as_echo "$as_me: WARNING: | This will be an inferior build." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - ;; -no) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5 -$as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has MMX code, but it can't be assembled by" >&5 -$as_echo "$as_me: WARNING: | Host CPU has MMX code, but it can't be assembled by" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5 -$as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Non-MMX replacements will be used." >&5 -$as_echo "$as_me: WARNING: | Non-MMX replacements will be used." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5 -$as_echo "$as_me: WARNING: | This will be an inferior build." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - ;; -esac -if test "$gmp_cv_asm_x86_mmx" = yes; then - : -else - tmp_path= -for i in $path; do - case $i in - */*mmx*) ;; - *) tmp_path="$tmp_path $i" ;; - esac -done -path="$tmp_path" - -tmp_path= -for i in $fat_path; do - case $i in - */*mmx*) ;; - *) tmp_path="$tmp_path $i" ;; - esac -done -fat_path="$tmp_path" - - -fi - ;; - esac - case "$path $fat_path" in - *sse2*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler knows about SSE2 instructions" >&5 -$as_echo_n "checking if the assembler knows about SSE2 instructions... " >&6; } -if ${gmp_cv_asm_x86_sse2+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - .text - paddq %mm0, %mm1 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_x86_sse2=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_x86_sse2=no -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_sse2" >&5 -$as_echo "$gmp_cv_asm_x86_sse2" >&6; } -case $gmp_cv_asm_x86_sse2 in -yes) - : - ;; -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5 -$as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has SSE2 code, but it can't be assembled by" >&5 -$as_echo "$as_me: WARNING: | Host CPU has SSE2 code, but it can't be assembled by" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5 -$as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Non-SSE2 replacements will be used." >&5 -$as_echo "$as_me: WARNING: | Non-SSE2 replacements will be used." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5 -$as_echo "$as_me: WARNING: | This will be an inferior build." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - tmp_path= -for i in $path; do - case $i in - */sse2) ;; - *) tmp_path="$tmp_path $i" ;; - esac -done -path="$tmp_path" - -tmp_path= -for i in $fat_path; do - case $i in - */sse2) ;; - *) tmp_path="$tmp_path $i" ;; - esac -done -fat_path="$tmp_path" - - - ;; -esac - ;; - esac - fi - case "$path $fat_path" in - *mulx*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler knows about the mulx instruction" >&5 -$as_echo_n "checking if the assembler knows about the mulx instruction... " >&6; } -if ${gmp_cv_asm_x86_mulx+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - .text - mulx %r8, %r9, %r10 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_x86_mulx=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_x86_mulx=no -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_mulx" >&5 -$as_echo "$gmp_cv_asm_x86_mulx" >&6; } -case $gmp_cv_asm_x86_mulx in -yes) - : - ;; -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5 -$as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has the mulx instruction, but it can't be" >&5 -$as_echo "$as_me: WARNING: | Host CPU has the mulx instruction, but it can't be" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | assembled by" >&5 -$as_echo "$as_me: WARNING: | assembled by" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5 -$as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Older x86 instructions will be used." >&5 -$as_echo "$as_me: WARNING: | Older x86 instructions will be used." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5 -$as_echo "$as_me: WARNING: | This will be an inferior build." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - tmp_path= -for i in $path; do - case $i in - */mulx) ;; - *) tmp_path="$tmp_path $i" ;; - esac -done -path="$tmp_path" - -tmp_path= -for i in $fat_path; do - case $i in - */mulx) ;; - *) tmp_path="$tmp_path $i" ;; - esac -done -fat_path="$tmp_path" - - - ;; -esac - ;; - esac - case "$path $fat_path" in - *adx*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler knows about the adox instruction" >&5 -$as_echo_n "checking if the assembler knows about the adox instruction... " >&6; } -if ${gmp_cv_asm_x86_adx+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - .text - adox %r8, %r9 - adcx %r8, %r9 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_x86_adx=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_x86_adx=no -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_adx" >&5 -$as_echo "$gmp_cv_asm_x86_adx" >&6; } -case $gmp_cv_asm_x86_adx in -yes) - : - ;; -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5 -$as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has the adcx and adox instructions, but they" >&5 -$as_echo "$as_me: WARNING: | Host CPU has the adcx and adox instructions, but they" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | can't be assembled by" >&5 -$as_echo "$as_me: WARNING: | can't be assembled by" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5 -$as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Older x86 instructions will be used." >&5 -$as_echo "$as_me: WARNING: | Older x86 instructions will be used." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5 -$as_echo "$as_me: WARNING: | This will be an inferior build." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - tmp_path= -for i in $path; do - case $i in - */adx) ;; - *) tmp_path="$tmp_path $i" ;; - esac -done -path="$tmp_path" - -tmp_path= -for i in $fat_path; do - case $i in - */adx) ;; - *) tmp_path="$tmp_path $i" ;; - esac -done -fat_path="$tmp_path" - - - ;; -esac - ;; - esac - ;; -esac - - -if test "$enable_assembly" = "no"; then - path="generic" - CFLAGS="$CFLAGS -DNO_ASM" -# for abi in $abilist; do -# eval unset "path_\$abi" -# eval gcc_${abi}_cflags=\"\$gcc_${abi}_cflags -DNO_ASM\" -# done -fi - - -cat >&5 <<EOF -Decided: -ABI=$ABI -CC=$CC -CFLAGS=$CFLAGS -CPPFLAGS=$CPPFLAGS -GMP_LDFLAGS=$GMP_LDFLAGS -CXX=$CXX -CXXFLAGS=$CXXFLAGS -path=$path -EOF -echo "using ABI=\"$ABI\"" -echo " CC=\"$CC\"" -echo " CFLAGS=\"$CFLAGS\"" -echo " CPPFLAGS=\"$CPPFLAGS\"" -if test $want_cxx = yes; then - echo " CXX=\"$CXX\"" - echo " CXXFLAGS=\"$CXXFLAGS\"" -fi -echo " MPN_PATH=\"$path\"" - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports --noexecstack option" >&5 -$as_echo_n "checking whether assembler supports --noexecstack option... " >&6; } -if ${cl_cv_as_noexecstack+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.c <<EOF -void foo() {} -EOF - if { ac_try='${CC} $CFLAGS $CPPFLAGS - -S -o conftest.s conftest.c >/dev/null' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } \ - && grep .note.GNU-stack conftest.s >/dev/null \ - && { ac_try='${CC} $CFLAGS $CPPFLAGS -Wa,--noexecstack - -c -o conftest.o conftest.s >/dev/null' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then - cl_cv_as_noexecstack=yes - else - cl_cv_as_noexecstack=no - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_as_noexecstack" >&5 -$as_echo "$cl_cv_as_noexecstack" >&6; } - if test "$cl_cv_as_noexecstack" = yes; then - ASMFLAGS="$ASMFLAGS -Wa,--noexecstack" - fi - - - - -gmp_user_AR=$AR -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="ar" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -if test -z "$gmp_user_AR"; then - eval arflags=\"\$ar${abi1}_flags\" - test -n "$arflags" || eval arflags=\"\$ar${abi2}_flags\" - if test -n "$arflags"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra ar flags" >&5 -$as_echo_n "checking for extra ar flags... " >&6; } - AR="$AR $arflags" - ac_cv_prog_AR="$AR $arflags" - ac_cv_prog_ac_ct_AR="$AR $arflags" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $arflags" >&5 -$as_echo "$arflags" >&6; } - fi -fi -if test -z "$AR_FLAGS"; then - AR_FLAGS=cq -fi - - -gmp_user_NM=$NM -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - - -# FIXME: When cross compiling (ie. $ac_tool_prefix not empty), libtool -# defaults to plain "nm" if a "${ac_tool_prefix}nm" is not found. In this -# case run it again to try the native "nm", firstly so that likely locations -# are searched, secondly so that -B or -p are added if necessary for BSD -# format. This is necessary for instance on OSF with "./configure -# --build=alphaev5-dec-osf --host=alphaev6-dec-osf". -# -if test -z "$gmp_user_NM" && test -n "$ac_tool_prefix" && test "$NM" = nm; then - $as_unset lt_cv_path_NM - gmp_save_ac_tool_prefix=$ac_tool_prefix - ac_tool_prefix= - NM= - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - - ac_tool_prefix=$gmp_save_ac_tool_prefix -fi - -if test -z "$gmp_user_NM"; then - eval nmflags=\"\$nm${abi1}_flags\" - test -n "$nmflags" || eval nmflags=\"\$nm${abi2}_flags\" - if test -n "$nmflags"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra nm flags" >&5 -$as_echo_n "checking for extra nm flags... " >&6; } - NM="$NM $nmflags" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nmflags" >&5 -$as_echo "$nmflags" >&6; } - fi -fi - - -case $host in - # FIXME: On AIX 3 and 4, $libname.a is included in libtool - # $library_names_spec, so libgmp.a becomes a symlink to libgmp.so, making - # it impossible to build shared and static libraries simultaneously. - # Disable shared libraries by default, but let the user override with - # --enable-shared --disable-static. - # - # FIXME: This $libname.a problem looks like it might apply to *-*-amigaos* - # and *-*-os2* too, but wait for someone to test this before worrying - # about it. If there is a problem then of course libtool is the right - # place to fix it. - # - *-*-aix[34]*) - if test -z "$enable_shared"; then enable_shared=no; fi ;; -esac - - -# Configs for Windows DLLs. - -enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AS="${ac_tool_prefix}as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AS="as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 -$as_echo "$ac_ct_AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AS" = x; then - AS="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AS=$ac_ct_AS - fi -else - AS="$ac_cv_prog_AS" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - - ;; -esac - -test -z "$AS" && AS=as - - - - - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - -LIBGMP_DLL=0 - -case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - # By default, build only static. - if test -z "$enable_shared"; then - enable_shared=no - fi - # Don't allow both static and DLL. - if test "$enable_shared" != no && test "$enable_static" != no; then - as_fn_error $? "cannot build both static and DLL, since gmp.h is different for each. -Use \"--disable-static --enable-shared\" to build just a DLL." "$LINENO" 5 - fi - - # "-no-undefined" is required when building a DLL, see documentation on - # AC_LIBTOOL_WIN32_DLL. - # - # "-Wl,--export-all-symbols" is a bit of a hack, it gets all libgmp and - # libgmpxx functions and variables exported. This is what libtool did - # in the past, and it's convenient for us in the test programs. - # - # Maybe it'd be prudent to check for --export-all-symbols before using - # it, but it seems to have been in ld since at least 2000, and there's - # not really any alternative we want to take up at the moment. - # - # "-Wl,output-def" is used to get a .def file for use by MS lib to make - # a .lib import library, described in the manual. libgmp-3.dll.def - # corresponds to the libmp-3.dll.def generated by libtool (as a result - # of -export-symbols on that library). - # - # Incidentally, libtool does generate an import library libgmp.dll.a, - # but it's "ar" format and cannot be used by the MS linker. There - # doesn't seem to be any GNU tool for generating or converting to .lib. - # - # FIXME: The .def files produced by -Wl,output-def include isascii, - # iscsym, iscsymf and toascii, apparently because mingw ctype.h doesn't - # inline isascii (used in gmp). It gives an extern inline for - # __isascii, but for some reason not the plain isascii. - # - if test "$enable_shared" = yes; then - GMP_LDFLAGS="$GMP_LDFLAGS -no-undefined -Wl,--export-all-symbols" - LIBGMP_LDFLAGS="$LIBGMP_LDFLAGS -Wl,--output-def,.libs/libgmp-3.dll.def" - LIBGMPXX_LDFLAGS="$LIBGMP_LDFLAGS -Wl,--output-def,.libs/libgmpxx-3.dll.def" - LIBGMP_DLL=1 - fi - ;; -esac - - -# Ensure that $CONFIG_SHELL is available for AC_LIBTOOL_SYS_MAX_CMD_LEN. -# It's often set already by _LT_AC_PROG_ECHO_BACKSLASH or -# _AS_LINENO_PREPARE, but not always. -# -# The symptom of CONFIG_SHELL unset is some "expr" errors during the test, -# and an empty result. This only happens when invoked as "sh configure", -# ie. no path, and can be seen for instance on ia64-*-hpux*. -# -# FIXME: Newer libtool should have it's own fix for this. -# -if test -z "$CONFIG_SHELL"; then - CONFIG_SHELL=$SHELL -fi - -# Enable CXX in libtool only if we want it, and never enable GCJ, nor RC on -# mingw and cygwin. Under --disable-cxx this avoids some error messages -# from libtool arising from the fact we didn't actually run AC_PROG_CXX. -# Notice that any user-supplied --with-tags setting takes precedence. -# -# FIXME: Is this the right way to get this effect? Very possibly not, but -# the current _LT_AC_TAGCONFIG doesn't really suggest an alternative. -# -if test "${with_tags+set}" != set; then - if test $want_cxx = yes; then - with_tags=CXX - else - with_tags= - fi -fi - -# The dead hand of AC_REQUIRE makes AC_PROG_LIBTOOL expand and execute -# AC_PROG_F77, even when F77 is not in the selected with_tags. This is -# probably harmless, but it's unsightly and bloats our configure, so pretend -# AC_PROG_F77 has been expanded already. -# -# FIXME: Rumour has it libtool will one day provide a way for a configure.in -# to say what it wants from among supported languages etc. -# -#AC_PROVIDE([AC_PROG_F77]) - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.6' -macro_revision='2.4.6' - - - - - - - - - - - - - -ltmain=$ac_aux_dir/ltmain.sh - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -@%:@ Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in - *GNU* | *'with BFD'*) - test no != "$with_gnu_ld" && break - ;; - *) - test yes != "$with_gnu_ld" && break - ;; - esac - fi - done - IFS=$lt_save_ifs -else - lt_cv_path_LD=$LD # Let the user override the test with a path. -fi -fi - -LD=$lt_cv_path_LD -if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 </dev/null` in -*GNU* | *'with BFD'*) - lt_cv_prog_gnu_ld=yes - ;; -*) - lt_cv_prog_gnu_ld=no - ;; -esac -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n "$lt_cv_sys_max_cmd_len"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test yes != "$GCC"; then - reload_cmds=false - fi - ;; - darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -@%:@ Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -if test -z "$lt_DD"; then - ac_path_lt_DD_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in dd; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_lt_DD" || continue -if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi - $ac_path_lt_DD_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_lt_DD"; then - : - fi -else - ac_cv_path_lt_DD=$lt_DD -fi - -rm -f conftest.i conftest2.i conftest.out -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } - - - - - - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in @S|@*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - -@%:@ Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x@S|@2 in - x) - ;; - *:) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" - ;; - x:*) - eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" - ;; - *) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - esac -} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <string.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ctype.h> -#include <stdlib.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - -func_stripname_cnf () -{ - case @S|@2 in - .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; - *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; - esac -} # func_stripname_cnf - - - - - -# Set options - - - - enable_dlopen=no - - - - @%:@ Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - @%:@ Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -@%:@ Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - pic_mode=default -fi - - - - - - - - - @%:@ Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[5-9]*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } - -@%:@ Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : - withval=$with_aix_soname; case $withval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_with_aix_soname=aix -fi - - with_aix_soname=$lt_cv_with_aix_soname -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -@%:@define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/${ac_tool_prefix}file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC=$CC -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test yes = "$GCC"; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - lt_prog_compiler_pic='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic@&t@ -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic@&t@ -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works"; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works"; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - export_dynamic_flag_spec='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='$wl--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - export_dynamic_flag_spec='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test no = "$ld_shlibs"; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct=no - hardcode_direct_absolute=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' $wl-bernotok' - allow_undefined_flag=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test yes = "$GCC"; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test yes = "$lt_cv_prog_compiler__b"; then - archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs=yes - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - else - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - osf3*) - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='$wl-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='$wl-z,text' - allow_undefined_flag='$wl-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='$wl-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test no = "$ld_shlibs" && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([A-Za-z]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib<name>.so - # instead of lib<name>.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - # Handle Gentoo/FreeBSD as it was Linux - case $host_vendor in - gentoo) - version_type=linux ;; - *) - version_type=freebsd-$objformat ;; - esac - - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - linux) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - need_lib_prefix=no - need_version=no - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test yes = "$hardcode_automatic"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && - test no != "$hardcode_minus_L"; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test relink = "$hardcode_action" || - test yes = "$inherit_rpath"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen=shl_load -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen=dlopen -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - -#include <stdio.h> - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - -#include <stdio.h> - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report what library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC=$lt_save_CC - - if test -n "$CXX" && ( test no != "$CXX" && - ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || - (test g++ != "$CXX"))); then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include <limits.h> -@%:@else -@%:@ include <assert.h> -@%:@endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <ac_nonexistent.h> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include <limits.h> -@%:@else -@%:@ include <assert.h> -@%:@endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include <ac_nonexistent.h> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - _lt_caught_CXX_error=yes -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -compiler_needs_object_CXX=no -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_direct_absolute_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -inherit_rpath_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -reload_flag_CXX=$reload_flag -reload_cmds_CXX=$reload_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_caught_CXX_error"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - compiler_CXX=$CC - func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test yes = "$GXX"; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' - else - lt_prog_compiler_no_builtin_flag_CXX= - fi - - if test yes = "$GXX"; then - # Set up default GNU C++ configuration - - - -@%:@ Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in - *GNU* | *'with BFD'*) - test no != "$with_gnu_ld" && break - ;; - *) - test yes != "$with_gnu_ld" && break - ;; - esac - fi - done - IFS=$lt_save_ifs -else - lt_cv_path_LD=$LD # Let the user override the test with a path. -fi -fi - -LD=$lt_cv_path_LD -if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 </dev/null` in -*GNU* | *'with BFD'*) - lt_cv_prog_gnu_ld=yes - ;; -*) - lt_cv_prog_gnu_ld=no - ;; -esac -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test yes = "$with_gnu_ld"; then - archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='$wl' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - ld_shlibs_CXX=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - file_list_spec_CXX='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct_CXX=no - hardcode_direct_absolute_CXX=no - ;; - esac - - if test yes = "$GXX"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag=$shared_flag' $wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec_CXX='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - always_export_symbols_CXX=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - # The "-G" linker flag allows undefined symbols. - no_undefined_flag_CXX='-bernotok' - # Determine the default libpath from the value encoded in an empty - # executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath__CXX -fi - - hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath__CXX -fi - - hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' $wl-bernotok' - allow_undefined_flag_CXX=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - fi - archive_cmds_need_lc_CXX=yes - archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared - # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_CXX=' ' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=yes - file_list_spec_CXX='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' - enable_shared_with_static_runtimes_CXX=yes - # Don't use ranlib - old_postinstall_cmds_CXX='chmod 644 $oldlib' - postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - export_dynamic_flag_spec_CXX='$wl--export-all-symbols' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - - - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec_CXX='' - fi - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - if test yes != "$lt_cv_apple_cc_single_mod"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" - fi - - else - ld_shlibs_CXX=no - fi - - ;; - - os2*) - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_minus_L_CXX=yes - allow_undefined_flag_CXX=unsupported - shrext_cmds=.dll - archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes_CXX=yes - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - ld_shlibs_CXX=no - ;; - - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - - haiku*) - archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs_CXX=yes - ;; - - hpux9*) - hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='$wl-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - export_dynamic_flag_spec_CXX='$wl-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - hardcode_libdir_separator_CXX=: - inherit_rpath_CXX=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [1-5].* | *pgcpp\ [1-5].*) - prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object_CXX=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - ld_shlibs_CXX=yes - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - hardcode_direct_absolute_CXX=yes - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='$wl-E' - whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - ld_shlibs_CXX=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - case $host in - osf3*) - allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' - archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - ;; - *) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ - $RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - ;; - esac - - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes,no = "$GXX,$with_gnu_ld"; then - allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' - case $host in - osf3*) - archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - *) - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test yes,no = "$GXX,$with_gnu_ld"; then - no_undefined_flag_CXX=' $wl-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require '-G' NOT '-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='$wl-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_CXX='$wl-z,text' - allow_undefined_flag_CXX='$wl-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ - '"$old_archive_cmds_CXX" - reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ - '"$reload_cmds_CXX" - ;; - *) - archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } - test no = "$ld_shlibs_CXX" && can_build_shared=no - - GCC_CXX=$GXX - LD_CXX=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF - - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test x-L = "$p" || - test x-R = "$p"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test no = "$pre_test_object_deps_done"; then - case $prev in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX=$prev$p - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX=$prev$p - else - postdeps_CXX="${postdeps_CXX} $prev$p" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test no = "$pre_test_object_deps_done"; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX=$p - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX=$p - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - compiler_lib_search_dirs_CXX= -if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - - - # C++ specific cases for pic, static, wl, etc. - if test yes = "$GXX"; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - lt_prog_compiler_pic_CXX='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_CXX='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static_CXX='$wl-static' - ;; - esac - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='$wl-a ${wl}archive' - if test ia64 != "$host_cpu"; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='$wl-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64, which still supported -KPIC. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-qpic' - lt_prog_compiler_static_CXX='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX@&t@ -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } -lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX@&t@ -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then - : -else - lt_prog_compiler_static_CXX= -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX=$ltdll_cmds - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - ;; - esac - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } -test no = "$ld_shlibs_CXX" && can_build_shared=no - -with_gnu_ld_CXX=$with_gnu_ld - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc_CXX=no - else - lt_cv_archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } - archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib<name>.so - # instead of lib<name>.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - # Handle Gentoo/FreeBSD as it was Linux - case $host_vendor in - gentoo) - version_type=linux ;; - *) - version_type=freebsd-$objformat ;; - esac - - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - linux) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - need_lib_prefix=no - need_version=no - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec_CXX='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || - test -n "$runpath_var_CXX" || - test yes = "$hardcode_automatic_CXX"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct_CXX" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && - test no != "$hardcode_minus_L_CXX"; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 -$as_echo "$hardcode_action_CXX" >&6; } - -if test relink = "$hardcode_action_CXX" || - test yes = "$inherit_rpath_CXX"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test yes != "$_lt_caught_CXX_error" - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - -# Generate an error here if attempting to build both shared and static when -# $libname.a is in $library_names_spec (as mentioned above), rather than -# wait for ar or ld to fail. -# -if test "$enable_shared" = yes && test "$enable_static" = yes; then - case $library_names_spec in - *libname.a*) - as_fn_error $? "cannot create both shared and static libraries on this system, --disable one of the two" "$LINENO" 5 - ;; - esac -fi - - if test "$enable_static" = yes; then - ENABLE_STATIC_TRUE= - ENABLE_STATIC_FALSE='#' -else - ENABLE_STATIC_TRUE='#' - ENABLE_STATIC_FALSE= -fi - - - -# Many of these library and header checks are for the benefit of -# supplementary programs. libgmp doesn't use anything too weird. - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <string.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ctype.h> -#include <stdlib.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> -#include <sys/time.h> -#include <time.h> - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "@%:@define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi - - -# Reasons for testing: -# float.h - not in SunOS bundled cc -# invent.h - IRIX specific -# langinfo.h - X/Open standard only, not in djgpp for instance -# locale.h - old systems won't have this -# nl_types.h - X/Open standard only, not in djgpp for instance -# (usually langinfo.h gives nl_item etc, but not on netbsd 1.4.1) -# sys/attributes.h - IRIX specific -# sys/iograph.h - IRIX specific -# sys/mman.h - not in Cray Unicos -# sys/param.h - not in mingw -# sys/processor.h - solaris specific, though also present in macos -# sys/pstat.h - HPUX specific -# sys/resource.h - not in mingw -# sys/sysctl.h - not in mingw -# sys/sysinfo.h - OSF specific -# sys/syssgi.h - IRIX specific -# sys/systemcfg.h - AIX specific -# sys/time.h - autoconf suggests testing, don't know anywhere without it -# sys/times.h - not in mingw -# machine/hal_sysinfo.h - OSF specific -# -# inttypes.h, stdint.h, unistd.h and sys/types.h are already in the autoconf -# default tests -# -for ac_header in fcntl.h float.h invent.h langinfo.h locale.h nl_types.h sys/attributes.h sys/iograph.h sys/mman.h sys/param.h sys/processor.h sys/pstat.h sys/sysinfo.h sys/syssgi.h sys/systemcfg.h sys/time.h sys/times.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -# On SunOS, sys/resource.h needs sys/time.h (for struct timeval) -for ac_header in sys/resource.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "#if TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -#else -# if HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif -#endif -" -if test "x$ac_cv_header_sys_resource_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_SYS_RESOURCE_H 1 -_ACEOF - -fi - -done - - -# On NetBSD and OpenBSD, sys/sysctl.h needs sys/param.h for various constants -for ac_header in sys/sysctl.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "#if HAVE_SYS_PARAM_H -# include <sys/param.h> -#endif -" -if test "x$ac_cv_header_sys_sysctl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_SYS_SYSCTL_H 1 -_ACEOF - -fi - -done - - -# On OSF 4.0, <machine/hal_sysinfo.h> must have <sys/sysinfo.h> for ulong_t -for ac_header in machine/hal_sysinfo.h -do : - ac_fn_c_check_header_compile "$LINENO" "machine/hal_sysinfo.h" "ac_cv_header_machine_hal_sysinfo_h" "#if HAVE_SYS_SYSINFO_H -# include <sys/sysinfo.h> -#endif -" -if test "x$ac_cv_header_machine_hal_sysinfo_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_MACHINE_HAL_SYSINFO_H 1 -_ACEOF - -fi - -done - - -# Reasons for testing: -# optarg - not declared in mingw -# fgetc, fscanf, ungetc, vfprintf - not declared in SunOS 4 -# sys_errlist, sys_nerr - not declared in SunOS 4 -# -# optarg should be in unistd.h and the rest in stdio.h, both of which are -# in the autoconf default includes. -# -# sys_errlist and sys_nerr are supposed to be in <errno.h> on SunOS according -# to the man page (but aren't), in glibc they're in stdio.h. -# -ac_fn_c_check_decl "$LINENO" "fgetc" "ac_cv_have_decl_fgetc" "$ac_includes_default" -if test "x$ac_cv_have_decl_fgetc" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DECL_FGETC $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "fscanf" "ac_cv_have_decl_fscanf" "$ac_includes_default" -if test "x$ac_cv_have_decl_fscanf" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DECL_FSCANF $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "optarg" "ac_cv_have_decl_optarg" "$ac_includes_default" -if test "x$ac_cv_have_decl_optarg" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DECL_OPTARG $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "ungetc" "ac_cv_have_decl_ungetc" "$ac_includes_default" -if test "x$ac_cv_have_decl_ungetc" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DECL_UNGETC $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "vfprintf" "ac_cv_have_decl_vfprintf" "$ac_includes_default" -if test "x$ac_cv_have_decl_vfprintf" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DECL_VFPRINTF $ac_have_decl -_ACEOF - -ac_fn_c_check_decl "$LINENO" "sys_errlist" "ac_cv_have_decl_sys_errlist" "#include <stdio.h> -#include <errno.h> -" -if test "x$ac_cv_have_decl_sys_errlist" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DECL_SYS_ERRLIST $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "sys_nerr" "ac_cv_have_decl_sys_nerr" "#include <stdio.h> -#include <errno.h> -" -if test "x$ac_cv_have_decl_sys_nerr" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DECL_SYS_NERR $ac_have_decl -_ACEOF - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } -if ${ac_cv_type_signal+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> -#include <signal.h> - -int -main () -{ -return *(signal (0, 0)) (0) == 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_signal=int -else - ac_cv_type_signal=void -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } - -cat >>confdefs.h <<_ACEOF -@%:@define RETSIGTYPE $ac_cv_type_signal -_ACEOF - - - -# Reasons for testing: -# intmax_t - C99 -# long double - not in the HP bundled K&R cc -# long long - only in reasonably recent compilers -# ptrdiff_t - seems to be everywhere, maybe don't need to check this -# quad_t - BSD specific -# uint_least32_t - C99 -# -# the default includes are sufficient for all these types -# -ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default" -if test "x$ac_cv_type_intmax_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_INTMAX_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "long double" "ac_cv_type_long_double" "$ac_includes_default" -if test "x$ac_cv_type_long_double" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LONG_DOUBLE 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" -if test "x$ac_cv_type_long_long" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LONG_LONG 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" -if test "x$ac_cv_type_ptrdiff_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_PTRDIFF_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "quad_t" "ac_cv_type_quad_t" "$ac_includes_default" -if test "x$ac_cv_type_quad_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_QUAD_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "uint_least32_t" "ac_cv_type_uint_least32_t" "$ac_includes_default" -if test "x$ac_cv_type_uint_least32_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_UINT_LEAST32_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" -if test "x$ac_cv_type_intptr_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_INTPTR_T 1 -_ACEOF - - -fi - - -# FIXME: Really want #ifndef __cplusplus around the #define volatile -# replacement autoconf gives, since volatile is always available in C++. -# But we don't use it in C++ currently. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 -$as_echo_n "checking for working volatile... " >&6; } -if ${ac_cv_c_volatile+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -volatile int x; -int * volatile y = (int *) 0; -return !x && !y; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_volatile=yes -else - ac_cv_c_volatile=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 -$as_echo "$ac_cv_c_volatile" >&6; } -if test $ac_cv_c_volatile = no; then - -$as_echo "@%:@define volatile /**/" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 -$as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if ${ac_cv_c_restrict+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - } -int -main () -{ -int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_restrict=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_restrict" != no && break - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 -$as_echo "$ac_cv_c_restrict" >&6; } - - case $ac_cv_c_restrict in - restrict) ;; - no) $as_echo "@%:@define restrict /**/" >>confdefs.h - ;; - *) cat >>confdefs.h <<_ACEOF -@%:@define restrict $ac_cv_c_restrict -_ACEOF - ;; - esac - - -# GMP_C_STDARG -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((const)) works" >&5 -$as_echo_n "checking whether gcc __attribute__ ((const)) works... " >&6; } -if ${gmp_cv_c_attribute_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (int x) __attribute__ ((const)); -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gmp_cv_c_attribute_const=yes -else - gmp_cv_c_attribute_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_attribute_const" >&5 -$as_echo "$gmp_cv_c_attribute_const" >&6; } -if test $gmp_cv_c_attribute_const = yes; then - -$as_echo "@%:@define HAVE_ATTRIBUTE_CONST 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((malloc)) works" >&5 -$as_echo_n "checking whether gcc __attribute__ ((malloc)) works... " >&6; } -if ${gmp_cv_c_attribute_malloc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.c <<EOF -void *foo (int x) __attribute__ ((malloc)); -EOF -gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if grep "attribute directive ignored" conftest.out >/dev/null; then - gmp_cv_c_attribute_malloc=no - else - gmp_cv_c_attribute_malloc=yes - fi -else - gmp_cv_c_attribute_malloc=no -fi -cat conftest.out >&5 -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_attribute_malloc" >&5 -$as_echo "$gmp_cv_c_attribute_malloc" >&6; } -if test $gmp_cv_c_attribute_malloc = yes; then - -$as_echo "@%:@define HAVE_ATTRIBUTE_MALLOC 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((mode (XX))) works" >&5 -$as_echo_n "checking whether gcc __attribute__ ((mode (XX))) works... " >&6; } -if ${gmp_cv_c_attribute_mode+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -typedef int SItype __attribute__ ((mode (SI))); -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gmp_cv_c_attribute_mode=yes -else - gmp_cv_c_attribute_mode=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_attribute_mode" >&5 -$as_echo "$gmp_cv_c_attribute_mode" >&6; } -if test $gmp_cv_c_attribute_mode = yes; then - -$as_echo "@%:@define HAVE_ATTRIBUTE_MODE 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((noreturn)) works" >&5 -$as_echo_n "checking whether gcc __attribute__ ((noreturn)) works... " >&6; } -if ${gmp_cv_c_attribute_noreturn+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void foo (int x) __attribute__ ((noreturn)); -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gmp_cv_c_attribute_noreturn=yes -else - gmp_cv_c_attribute_noreturn=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_attribute_noreturn" >&5 -$as_echo "$gmp_cv_c_attribute_noreturn" >&6; } -if test $gmp_cv_c_attribute_noreturn = yes; then - -$as_echo "@%:@define HAVE_ATTRIBUTE_NORETURN 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc hidden aliases work" >&5 -$as_echo_n "checking whether gcc hidden aliases work... " >&6; } -if ${gmp_cv_c_hidden_alias+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void hid() __attribute__ ((visibility("hidden"))); -void hid() {} -void pub() __attribute__ ((alias("hid"))); -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gmp_cv_c_hidden_alias=yes -else - gmp_cv_c_hidden_alias=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_hidden_alias" >&5 -$as_echo "$gmp_cv_c_hidden_alias" >&6; } -if test $gmp_cv_c_hidden_alias = yes; then - -$as_echo "@%:@define HAVE_HIDDEN_ALIAS 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - - -case $ac_cv_c_inline in -no) ;; -*) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define __GMP_WITHIN_CONFIGURE_INLINE 1 -#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ -#define GMP_NAIL_BITS $GMP_NAIL_BITS -#define GMP_LIMB_BITS 123 -$DEFN_LONG_LONG_LIMB -#include "$srcdir/gmp-h.in" - -#ifndef __GMP_EXTERN_INLINE -die die die -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - case $ac_cv_c_inline in - yes) tmp_inline=inline ;; - *) tmp_inline=$ac_cv_c_inline ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gmp.h doesnt recognise compiler \"$tmp_inline\", inlines will be unavailable" >&5 -$as_echo "$as_me: WARNING: gmp.h doesnt recognise compiler \"$tmp_inline\", inlines will be unavailable" >&2;} -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ;; -esac - - -# from libtool -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 -$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } -if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmw $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char _mwvalidcheckl (); -int -main () -{ -return _mwvalidcheckl (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mw__mwvalidcheckl=yes -else - ac_cv_lib_mw__mwvalidcheckl=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 -$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } -if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : - LIBM=-lmw -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -$as_echo_n "checking for cos in -lm... " >&6; } -if ${ac_cv_lib_m_cos+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char cos (); -int -main () -{ -return cos (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_cos=yes -else - ac_cv_lib_m_cos=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -$as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes; then : - LIBM="$LIBM -lm" -fi - - ;; -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -$as_echo_n "checking for cos in -lm... " >&6; } -if ${ac_cv_lib_m_cos+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char cos (); -int -main () -{ -return cos (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_cos=yes -else - ac_cv_lib_m_cos=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -$as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes; then : - LIBM=-lm -fi - - ;; -esac - - - - -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if ${gmp_cv_header_alloca+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <alloca.h> -int -main () -{ -char *p = (char *) alloca (2 * sizeof (int)); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gmp_cv_header_alloca=yes -else - gmp_cv_header_alloca=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_header_alloca" >&5 -$as_echo "$gmp_cv_header_alloca" >&6; } -if test $gmp_cv_header_alloca = yes; then - -$as_echo "@%:@define HAVE_ALLOCA_H 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca (via gmp-impl.h)" >&5 -$as_echo_n "checking for alloca (via gmp-impl.h)... " >&6; } -if ${gmp_cv_func_alloca+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ -#define GMP_NAIL_BITS $GMP_NAIL_BITS -#define GMP_LIMB_BITS 123 -$DEFN_LONG_LONG_LIMB -#include "$srcdir/gmp-h.in" - -#include "$srcdir/gmp-impl.h" - -int -main () -{ -char *p = (char *) alloca (1); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gmp_cv_func_alloca=yes -else - gmp_cv_func_alloca=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_func_alloca" >&5 -$as_echo "$gmp_cv_func_alloca" >&6; } -if test $gmp_cv_func_alloca = yes; then - -$as_echo "@%:@define HAVE_ALLOCA 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to allocate temporary memory" >&5 -$as_echo_n "checking how to allocate temporary memory... " >&6; } -if ${gmp_cv_option_alloca+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $enable_alloca in - yes) - gmp_cv_option_alloca=alloca - ;; - no) - gmp_cv_option_alloca=malloc-reentrant - ;; - reentrant | notreentrant) - case $gmp_cv_func_alloca in - yes) gmp_cv_option_alloca=alloca ;; - *) gmp_cv_option_alloca=malloc-$enable_alloca ;; - esac - ;; - *) - gmp_cv_option_alloca=$enable_alloca - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_option_alloca" >&5 -$as_echo "$gmp_cv_option_alloca" >&6; } - - - -case $gmp_cv_option_alloca in - alloca) - if test $gmp_cv_func_alloca = no; then - as_fn_error $? "--enable-alloca=alloca specified, but alloca not available" "$LINENO" 5 - fi - $as_echo "@%:@define WANT_TMP_ALLOCA 1" >>confdefs.h - - TAL_OBJECT=tal-reent$U.lo - ;; - malloc-reentrant) - $as_echo "@%:@define WANT_TMP_REENTRANT 1" >>confdefs.h - - TAL_OBJECT=tal-reent$U.lo - ;; - malloc-notreentrant) - $as_echo "@%:@define WANT_TMP_NOTREENTRANT 1" >>confdefs.h - - TAL_OBJECT=tal-notreent$U.lo - ;; - debug) - $as_echo "@%:@define WANT_TMP_DEBUG 1" >>confdefs.h - - TAL_OBJECT=tal-debug$U.lo - ;; - *) - # checks at the start of configure.in should protect us - as_fn_error $? "unrecognised --enable-alloca=$gmp_cv_option_alloca" "$LINENO" 5 - ;; -esac - - - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdio.h> -#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ -#define GMP_NAIL_BITS $GMP_NAIL_BITS -#define GMP_LIMB_BITS 123 -$DEFN_LONG_LONG_LIMB -#include "$srcdir/gmp-h.in" - -#if ! _GMP_H_HAVE_FILE -die die die -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gmp.h doesnt recognise <stdio.h>, FILE prototypes will be unavailable" >&5 -$as_echo "$as_me: WARNING: gmp.h doesnt recognise <stdio.h>, FILE prototypes will be unavailable" >&2;} -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> - #include <sys/param.h> - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> - #include <sys/param.h> - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <limits.h> - -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <limits.h> - -int -main () -{ -#ifndef _BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no -else - ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "@%:@define HAVE_LIMB_BIG_ENDIAN 1" >>confdefs.h - - -echo "define_not_for_expansion(\`HAVE_LIMB_BIG_ENDIAN')" >> $gmp_tmpconfigm4p -;; #( - no) - $as_echo "@%:@define HAVE_LIMB_LITTLE_ENDIAN 1" >>confdefs.h - - -echo "define_not_for_expansion(\`HAVE_LIMB_LITTLE_ENDIAN')" >> $gmp_tmpconfigm4p - - ;; #( - universal) - -$as_echo "@%:@define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - - ;; #( - *) - : ;; - esac - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking format of \`double' floating point" >&5 -$as_echo_n "checking format of \`double' floating point... " >&6; } -if ${gmp_cv_c_double_format+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_cv_c_double_format=unknown -cat >conftest.c <<\EOF -struct foo { - char before[8]; - double x; - char after[8]; -}; -extern struct foo foo; -struct foo foo = { - { '\001', '\043', '\105', '\147', '\211', '\253', '\315', '\357' }, - -123456789.0, - { '\376', '\334', '\272', '\230', '\166', '\124', '\062', '\020' }, -}; -EOF -gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >&5 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -cat >conftest.awk <<\EOF - -BEGIN { - found = 0 -} - -{ - for (f = 2; f <= NF; f++) - { - for (i = 0; i < 23; i++) - got[i] = got[i+1]; - got[23] = $f; - - # match the special begin and end sequences - if (got[0] != "001") continue - if (got[1] != "043") continue - if (got[2] != "105") continue - if (got[3] != "147") continue - if (got[4] != "211") continue - if (got[5] != "253") continue - if (got[6] != "315") continue - if (got[7] != "357") continue - if (got[16] != "376") continue - if (got[17] != "334") continue - if (got[18] != "272") continue - if (got[19] != "230") continue - if (got[20] != "166") continue - if (got[21] != "124") continue - if (got[22] != "062") continue - if (got[23] != "020") continue - - saw = " (" got[8] " " got[9] " " got[10] " " got[11] " " got[12] " " got[13] " " got[14] " " got[15] ")" - - if (got[8] == "000" && \ - got[9] == "000" && \ - got[10] == "000" && \ - got[11] == "124" && \ - got[12] == "064" && \ - got[13] == "157" && \ - got[14] == "235" && \ - got[15] == "301") - { - print "IEEE little endian" - found = 1 - exit - } - - # Little endian with the two 4-byte halves swapped, as used by ARM - # when the chip is in little endian mode. - # - if (got[8] == "064" && \ - got[9] == "157" && \ - got[10] == "235" && \ - got[11] == "301" && \ - got[12] == "000" && \ - got[13] == "000" && \ - got[14] == "000" && \ - got[15] == "124") - { - print "IEEE little endian, swapped halves" - found = 1 - exit - } - - # gcc 2.95.4 on one GNU/Linux ARM system was seen generating 000 in - # the last byte, whereas 124 is correct. Not sure where the bug - # actually lies, but a running program didn't seem to get a full - # mantissa worth of working bits. - # - # We match this case explicitly so we can give a nice result message, - # but we deliberately exclude it from the normal IEEE double setups - # since it's too broken. - # - if (got[8] == "064" && \ - got[9] == "157" && \ - got[10] == "235" && \ - got[11] == "301" && \ - got[12] == "000" && \ - got[13] == "000" && \ - got[14] == "000" && \ - got[15] == "000") - { - print "bad ARM software floats" - found = 1 - exit - } - - if (got[8] == "301" && \ - got[9] == "235" && \ - got[10] == "157" && \ - got[11] == "064" && \ - got[12] == "124" && \ - got[13] == "000" && \ - got[14] == "000" && \ - got[15] == "000") - { - print "IEEE big endian" - found = 1 - exit - } - - if (got[8] == "353" && \ - got[9] == "315" && \ - got[10] == "242" && \ - got[11] == "171" && \ - got[12] == "000" && \ - got[13] == "240" && \ - got[14] == "000" && \ - got[15] == "000") - { - print "VAX D" - found = 1 - exit - } - - if (got[8] == "275" && \ - got[9] == "301" && \ - got[10] == "064" && \ - got[11] == "157" && \ - got[12] == "000" && \ - got[13] == "124" && \ - got[14] == "000" && \ - got[15] == "000") - { - print "VAX G" - found = 1 - exit - } - - if (got[8] == "300" && \ - got[9] == "033" && \ - got[10] == "353" && \ - got[11] == "171" && \ - got[12] == "242" && \ - got[13] == "240" && \ - got[14] == "000" && \ - got[15] == "000") - { - print "Cray CFP" - found = 1 - exit - } - } -} - -END { - if (! found) - print "unknown", saw -} - -EOF - gmp_cv_c_double_format=`od -b conftest.$OBJEXT | $AWK -f conftest.awk` - case $gmp_cv_c_double_format in - unknown*) - echo "cannot match anything, conftest.$OBJEXT contains" >&5 - od -b conftest.$OBJEXT >&5 - ;; - esac -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: oops, cannot compile test program" >&5 -$as_echo "$as_me: WARNING: oops, cannot compile test program" >&2;} -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_double_format" >&5 -$as_echo "$gmp_cv_c_double_format" >&6; } - - - -case $gmp_cv_c_double_format in - "IEEE big endian") - $as_echo "@%:@define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1" >>confdefs.h - - -echo "define_not_for_expansion(\`HAVE_DOUBLE_IEEE_BIG_ENDIAN')" >> $gmp_tmpconfigm4p - - ;; - "IEEE little endian") - $as_echo "@%:@define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1" >>confdefs.h - - -echo "define_not_for_expansion(\`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN')" >> $gmp_tmpconfigm4p - - ;; - "IEEE little endian, swapped halves") - $as_echo "@%:@define HAVE_DOUBLE_IEEE_LITTLE_SWAPPED 1" >>confdefs.h - ;; - "VAX D") - $as_echo "@%:@define HAVE_DOUBLE_VAX_D 1" >>confdefs.h - ;; - "VAX G") - $as_echo "@%:@define HAVE_DOUBLE_VAX_G 1" >>confdefs.h - ;; - "Cray CFP") - $as_echo "@%:@define HAVE_DOUBLE_CRAY_CFP 1" >>confdefs.h - ;; - "bad ARM software floats") - ;; - unknown*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not determine float format." >&5 -$as_echo "$as_me: WARNING: Could not determine float format." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Conversions to and from \"double\" may be slow." >&5 -$as_echo "$as_me: WARNING: Conversions to and from \"double\" may be slow." >&2;} - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: oops, unrecognised float format: $gmp_cv_c_double_format" >&5 -$as_echo "$as_me: WARNING: oops, unrecognised float format: $gmp_cv_c_double_format" >&2;} - ;; -esac - - - -# Reasons for testing: -# alarm - not in mingw -# attr_get - IRIX specific -# clock_gettime - not in glibc 2.2.4, only very recent systems -# cputime - not in glibc -# getsysinfo - OSF specific -# getrusage - not in mingw -# gettimeofday - not in mingw -# mmap - not in mingw, djgpp -# nl_langinfo - X/Open standard only, not in djgpp for instance -# obstack_vprintf - glibc specific -# processor_info - solaris specific -# pstat_getprocessor - HPUX specific (10.x and up) -# raise - an ANSI-ism, though probably almost universal by now -# read_real_time - AIX specific -# sigaction - not in mingw -# sigaltstack - not in mingw, or old AIX (reputedly) -# sigstack - not in mingw -# strerror - not in SunOS -# strnlen - glibc extension (some other systems too) -# syssgi - IRIX specific -# times - not in mingw -# -# AC_FUNC_STRNLEN is not used because we don't want the AC_LIBOBJ -# replacement setups it gives. It detects a faulty strnlen on AIX, but -# missing out on that test is ok since our only use of strnlen is in -# __gmp_replacement_vsnprintf which is not required on AIX since it has a -# vsnprintf. -# -for ac_func in alarm attr_get clock cputime getpagesize getrusage gettimeofday getsysinfo localeconv memset mmap mprotect nl_langinfo obstack_vprintf popen processor_info pstat_getprocessor raise read_real_time sigaction sigaltstack sigstack syssgi strchr strerror strnlen strtol strtoul sysconf sysctl sysctlbyname times -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -@%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -# clock_gettime is in librt on *-*-osf5.1 and on glibc, so att -lrt to -# TUNE_LIBS if needed. On linux (tested on x86_32, 2.6.26), -# clock_getres reports ns accuracy, while in a quick test on osf -# clock_getres said only 1 millisecond. - -old_LIBS="$LIBS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 -$as_echo_n "checking for library containing clock_gettime... " >&6; } -if ${ac_cv_search_clock_gettime+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char clock_gettime (); -int -main () -{ -return clock_gettime (); - ; - return 0; -} -_ACEOF -for ac_lib in '' rt; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_clock_gettime=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_clock_gettime+:} false; then : - break -fi -done -if ${ac_cv_search_clock_gettime+:} false; then : - -else - ac_cv_search_clock_gettime=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 -$as_echo "$ac_cv_search_clock_gettime" >&6; } -ac_res=$ac_cv_search_clock_gettime -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - - -$as_echo "@%:@define HAVE_CLOCK_GETTIME 1" >>confdefs.h - -fi - -TUNE_LIBS="$LIBS" -LIBS="$old_LIBS" - - - -ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" -if test "x$ac_cv_func_vsnprintf" = xyes; then : - gmp_vsnprintf_exists=yes -else - gmp_vsnprintf_exists=no -fi - -if test "$gmp_vsnprintf_exists" = no; then - gmp_cv_func_vsnprintf=no -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf works" >&5 -$as_echo_n "checking whether vsnprintf works... " >&6; } -if ${gmp_cv_func_vsnprintf+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_cv_func_vsnprintf=yes - for i in 'return check ("hello world");' 'int n; return check ("%nhello world", &n);'; do - if test "$cross_compiling" = yes; then : - gmp_cv_func_vsnprintf=probably; break -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <string.h> /* for strcmp */ -#include <stdio.h> /* for vsnprintf */ - -#include <stdarg.h> - -int -check (const char *fmt, ...) -{ - static char buf[128]; - va_list ap; - int ret; - - va_start (ap, fmt); - - ret = vsnprintf (buf, 4, fmt, ap); - - if (strcmp (buf, "hel") != 0) - return 1; - - /* allowed return values */ - if (ret != -1 && ret != 3 && ret != 11) - return 2; - - return 0; -} - -int -main () -{ -$i -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - : -else - gmp_cv_func_vsnprintf=no; break -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_func_vsnprintf" >&5 -$as_echo "$gmp_cv_func_vsnprintf" >&6; } - if test "$gmp_cv_func_vsnprintf" = probably; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for properly working vsnprintf when cross compiling, will assume it's ok" >&5 -$as_echo "$as_me: WARNING: cannot check for properly working vsnprintf when cross compiling, will assume it's ok" >&2;} - fi - if test "$gmp_cv_func_vsnprintf" != no; then - -$as_echo "@%:@define HAVE_VSNPRINTF 1" >>confdefs.h - - fi -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sscanf needs writable input" >&5 -$as_echo_n "checking whether sscanf needs writable input... " >&6; } -if ${gmp_cv_func_sscanf_writable_input+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-hpux9 | *-*-hpux9.*) - gmp_cv_func_sscanf_writable_input=yes ;; - *) gmp_cv_func_sscanf_writable_input=no ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_func_sscanf_writable_input" >&5 -$as_echo "$gmp_cv_func_sscanf_writable_input" >&6; } -case $gmp_cv_func_sscanf_writable_input in - yes) -$as_echo "@%:@define SSCANF_WRITABLE_INPUT 1" >>confdefs.h - ;; - no) ;; - *) as_fn_error $? "unrecognised \$gmp_cv_func_sscanf_writable_input" "$LINENO" 5 ;; -esac - - -# Reasons for checking: -# pst_processor psp_iticksperclktick - not in hpux 9 -# -ac_fn_c_check_member "$LINENO" "struct pst_processor" "psp_iticksperclktick" "ac_cv_member_struct_pst_processor_psp_iticksperclktick" "#include <sys/pstat.h> -" -if test "x$ac_cv_member_struct_pst_processor_psp_iticksperclktick" = xyes; then : - -$as_echo "@%:@define HAVE_PSP_ITICKSPERCLKTICK 1" >>confdefs.h - -fi - - -# C++ tests, when required -# -if test $enable_cxx = yes; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - # Reasons for testing: - # <sstream> - not in g++ 2.95.2 - # std::locale - not in g++ 2.95.4 - # - -for ac_header in sstream -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "sstream" "ac_cv_header_sstream" "$ac_includes_default" -if test "x$ac_cv_header_sstream" = xyes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_SSTREAM 1 -_ACEOF - -fi - -done - - ac_fn_cxx_check_type "$LINENO" "std::locale" "ac_cv_type_std__locale" "#include <locale> -" -if test "x$ac_cv_type_std__locale" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_STD__LOCALE 1 -_ACEOF - - -fi - - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi - - -# Pick the correct source files in $path and link them to mpn/. -# $gmp_mpn_functions lists all functions we need. -# -# The rule is to find a file with the function name and a .asm, .S, -# .s, or .c extension. Certain multi-function files with special names -# can provide some functions too. (mpn/Makefile.am passes -# -DOPERATION_<func> to get them to generate the right code.) - -# Note: $gmp_mpn_functions must have mod_1 before pre_mod_1 so the former -# can optionally provide the latter as an extra entrypoint. Likewise -# divrem_1 and pre_divrem_1. - -gmp_mpn_functions_optional="umul udiv \ - invert_limb sqr_diagonal sqr_diag_addlsh1 \ - mul_2 mul_3 mul_4 mul_5 mul_6 \ - addmul_2 addmul_3 addmul_4 addmul_5 addmul_6 addmul_7 addmul_8 \ - addlsh1_n sublsh1_n rsblsh1_n rsh1add_n rsh1sub_n \ - addlsh2_n sublsh2_n rsblsh2_n \ - addlsh_n sublsh_n rsblsh_n \ - add_n_sub_n addaddmul_1msb0" - -gmp_mpn_functions="$extra_functions \ - add add_1 add_n sub sub_1 sub_n cnd_add_n cnd_sub_n cnd_swap neg com \ - mul_1 addmul_1 submul_1 \ - add_err1_n add_err2_n add_err3_n sub_err1_n sub_err2_n sub_err3_n \ - lshift rshift dive_1 diveby3 divis divrem divrem_1 divrem_2 \ - fib2_ui mod_1 mod_34lsub1 mode1o pre_divrem_1 pre_mod_1 dump \ - mod_1_1 mod_1_2 mod_1_3 mod_1_4 lshiftc \ - mul mul_fft mul_n sqr mul_basecase sqr_basecase nussbaumer_mul \ - mulmid_basecase toom42_mulmid mulmid_n mulmid \ - random random2 pow_1 \ - rootrem sqrtrem sizeinbase get_str set_str \ - scan0 scan1 popcount hamdist cmp zero_p \ - perfsqr perfpow \ - gcd_1 gcd gcdext_1 gcdext gcd_subdiv_step \ - gcdext_lehmer \ - div_q tdiv_qr jacbase jacobi_2 jacobi get_d \ - matrix22_mul matrix22_mul1_inverse_vector \ - hgcd_matrix hgcd2 hgcd_step hgcd_reduce hgcd hgcd_appr \ - hgcd2_jacobi hgcd_jacobi \ - mullo_n mullo_basecase sqrlo sqrlo_basecase \ - toom22_mul toom32_mul toom42_mul toom52_mul toom62_mul \ - toom33_mul toom43_mul toom53_mul toom54_mul toom63_mul \ - toom44_mul \ - toom6h_mul toom6_sqr toom8h_mul toom8_sqr \ - toom_couple_handling \ - toom2_sqr toom3_sqr toom4_sqr \ - toom_eval_dgr3_pm1 toom_eval_dgr3_pm2 \ - toom_eval_pm1 toom_eval_pm2 toom_eval_pm2exp toom_eval_pm2rexp \ - toom_interpolate_5pts toom_interpolate_6pts toom_interpolate_7pts \ - toom_interpolate_8pts toom_interpolate_12pts toom_interpolate_16pts \ - invertappr invert binvert mulmod_bnm1 sqrmod_bnm1 \ - div_qr_1 div_qr_1n_pi1 \ - div_qr_2 div_qr_2n_pi1 div_qr_2u_pi1 \ - sbpi1_div_q sbpi1_div_qr sbpi1_divappr_q \ - dcpi1_div_q dcpi1_div_qr dcpi1_divappr_q \ - mu_div_qr mu_divappr_q mu_div_q \ - bdiv_q_1 \ - sbpi1_bdiv_q sbpi1_bdiv_qr \ - dcpi1_bdiv_q dcpi1_bdiv_qr \ - mu_bdiv_q mu_bdiv_qr \ - bdiv_q bdiv_qr broot brootinv bsqrt bsqrtinv \ - divexact bdiv_dbm1c redc_1 redc_2 redc_n powm powlo sec_powm \ - sec_mul sec_sqr sec_div_qr sec_div_r sec_pi1_div_qr sec_pi1_div_r \ - sec_add_1 sec_sub_1 sec_invert \ - trialdiv remove \ - and_n andn_n nand_n ior_n iorn_n nior_n xor_n xnor_n \ - copyi copyd zero sec_tabselect \ - comb_tables \ - $gmp_mpn_functions_optional" - - - -# the list of all object files used by mpn/Makefile.in and the -# top-level Makefile.in, respectively -mpn_objects= -mpn_objs_in_libgmp= - -# links from the sources, to be removed by "make distclean" -gmp_srclinks= - - -# mpn_relative_top_srcdir is $top_srcdir, but for use from within the mpn -# build directory. If $srcdir is relative then we use a relative path too, -# so the two trees can be moved together. -case $srcdir in - [\\/]* | ?:[\\/]*) # absolute, as per autoconf - mpn_relative_top_srcdir=$srcdir ;; - *) # relative - mpn_relative_top_srcdir=../$srcdir ;; -esac - - - - - - -# Fat binary setups. -# -# We proceed through each $fat_path directory, and look for $fat_function -# routines there. Those found are incorporated in the build by generating a -# little mpn/<foo>.asm or mpn/<foo>.c file in the build directory, with -# suitable function renaming, and adding that to $mpn_objects (the same as a -# normal mpn file). -# -# fat.h is generated with macros to let internal calls to each $fat_function -# go directly through __gmpn_cpuvec, plus macros and declarations helping to -# setup that structure, on a per-directory basis ready for -# mpn/<cpu>/fat/fat.c. -# -# fat.h includes thresholds listed in $fat_thresholds, extracted from -# gmp-mparam.h in each directory. An overall maximum for each threshold is -# established, for use in making fixed size arrays of temporary space. -# (Eg. MUL_TOOM33_THRESHOLD_LIMIT used by mpn/generic/mul.c.) -# -# It'd be possible to do some of this manually, but when there's more than a -# few functions and a few directories it becomes very tedious, and very -# prone to having some routine accidentally omitted. On that basis it seems -# best to automate as much as possible, even if the code to do so is a bit -# ugly. -# - -if test -n "$fat_path"; then - # Usually the mpn build directory is created with mpn/Makefile - # instantiation, but we want to write to it sooner. - mkdir mpn 2>/dev/null - - echo "/* fat.h - setups for fat binaries." >fat.h - echo " Generated by configure - DO NOT EDIT. */" >>fat.h - - -$as_echo "@%:@define WANT_FAT_BINARY 1" >>confdefs.h - - -echo 'define(<WANT_FAT_BINARY>, <yes>)' >>$gmp_tmpconfigm4 - - - # Don't want normal copies of fat functions - for tmp_fn in $fat_functions; do - remove_from_list_tmp= -for remove_from_list_i in $gmp_mpn_functions; do - if test $remove_from_list_i = $tmp_fn; then :; - else - remove_from_list_tmp="$remove_from_list_tmp $remove_from_list_i" - fi -done -gmp_mpn_functions=$remove_from_list_tmp - - remove_from_list_tmp= -for remove_from_list_i in $gmp_mpn_functions_optional; do - if test $remove_from_list_i = $tmp_fn; then :; - else - remove_from_list_tmp="$remove_from_list_tmp $remove_from_list_i" - fi -done -gmp_mpn_functions_optional=$remove_from_list_tmp - - done - - for tmp_fn in $fat_functions; do - case $tmp_fn in - dive_1) tmp_fbase=divexact_1 ;; - diveby3) tmp_fbase=divexact_by3c ;; - pre_divrem_1) tmp_fbase=preinv_divrem_1 ;; - mode1o) tmp_fbase=modexact_1c_odd ;; - pre_mod_1) tmp_fbase=preinv_mod_1 ;; - mod_1_1) tmp_fbase=mod_1_1p ;; - mod_1_1_cps) tmp_fbase=mod_1_1p_cps ;; - mod_1_2) tmp_fbase=mod_1s_2p ;; - mod_1_2_cps) tmp_fbase=mod_1s_2p_cps ;; - mod_1_3) tmp_fbase=mod_1s_3p ;; - mod_1_3_cps) tmp_fbase=mod_1s_3p_cps ;; - mod_1_4) tmp_fbase=mod_1s_4p ;; - mod_1_4_cps) tmp_fbase=mod_1s_4p_cps ;; - *) tmp_fbase=$tmp_fn ;; -esac - - echo " -#ifndef OPERATION_$tmp_fn -#undef mpn_$tmp_fbase -#define mpn_$tmp_fbase (*__gmpn_cpuvec.$tmp_fbase) -#endif -DECL_$tmp_fbase (__MPN(${tmp_fbase}_init));" >>fat.h - # encourage various macros to use fat functions - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_NATIVE_mpn_$tmp_fbase 1 -_ACEOF - - done - - echo "" >>fat.h - echo "/* variable thresholds */" >>fat.h - for tmp_tn in $fat_thresholds; do - echo "#undef $tmp_tn" >>fat.h - echo "#define $tmp_tn CPUVEC_THRESHOLD (`echo $tmp_tn | tr [A-Z] [a-z]`)" >>fat.h - done - - echo " -/* Copy all fields into __gmpn_cpuvec. - memcpy is not used because it might operate byte-wise (depending on its - implementation), and we need the function pointer writes to be atomic. - "volatile" discourages the compiler from trying to optimize this. */ -#define CPUVEC_INSTALL(vec) \\ - do { \\ - volatile struct cpuvec_t *p = &__gmpn_cpuvec; \\" >>fat.h - for tmp_fn in $fat_functions; do - case $tmp_fn in - dive_1) tmp_fbase=divexact_1 ;; - diveby3) tmp_fbase=divexact_by3c ;; - pre_divrem_1) tmp_fbase=preinv_divrem_1 ;; - mode1o) tmp_fbase=modexact_1c_odd ;; - pre_mod_1) tmp_fbase=preinv_mod_1 ;; - mod_1_1) tmp_fbase=mod_1_1p ;; - mod_1_1_cps) tmp_fbase=mod_1_1p_cps ;; - mod_1_2) tmp_fbase=mod_1s_2p ;; - mod_1_2_cps) tmp_fbase=mod_1s_2p_cps ;; - mod_1_3) tmp_fbase=mod_1s_3p ;; - mod_1_3_cps) tmp_fbase=mod_1s_3p_cps ;; - mod_1_4) tmp_fbase=mod_1s_4p ;; - mod_1_4_cps) tmp_fbase=mod_1s_4p_cps ;; - *) tmp_fbase=$tmp_fn ;; -esac - - echo " p->$tmp_fbase = vec.$tmp_fbase; \\" >>fat.h - done - for tmp_tn in $fat_thresholds; do - tmp_field_name=`echo $tmp_tn | tr [A-Z] [a-z]` - echo " p->$tmp_field_name = vec.$tmp_field_name; \\" >>fat.h - done - echo " } while (0)" >>fat.h - - echo " -/* A helper to check all fields are filled. */ -#define ASSERT_CPUVEC(vec) \\ - do { \\" >>fat.h - for tmp_fn in $fat_functions; do - case $tmp_fn in - dive_1) tmp_fbase=divexact_1 ;; - diveby3) tmp_fbase=divexact_by3c ;; - pre_divrem_1) tmp_fbase=preinv_divrem_1 ;; - mode1o) tmp_fbase=modexact_1c_odd ;; - pre_mod_1) tmp_fbase=preinv_mod_1 ;; - mod_1_1) tmp_fbase=mod_1_1p ;; - mod_1_1_cps) tmp_fbase=mod_1_1p_cps ;; - mod_1_2) tmp_fbase=mod_1s_2p ;; - mod_1_2_cps) tmp_fbase=mod_1s_2p_cps ;; - mod_1_3) tmp_fbase=mod_1s_3p ;; - mod_1_3_cps) tmp_fbase=mod_1s_3p_cps ;; - mod_1_4) tmp_fbase=mod_1s_4p ;; - mod_1_4_cps) tmp_fbase=mod_1s_4p_cps ;; - *) tmp_fbase=$tmp_fn ;; -esac - - echo " ASSERT (vec.$tmp_fbase != NULL); \\" >>fat.h - done - for tmp_tn in $fat_thresholds; do - tmp_field_name=`echo $tmp_tn | tr [A-Z] [a-z]` - echo " ASSERT (vec.$tmp_field_name != 0); \\" >>fat.h - done - echo " } while (0)" >>fat.h - - echo " -/* Call ITERATE(field) for each fat threshold field. */ -#define ITERATE_FAT_THRESHOLDS() \\ - do { \\" >>fat.h - for tmp_tn in $fat_thresholds; do - tmp_field_name=`echo $tmp_tn | tr [A-Z] [a-z]` - echo " ITERATE ($tmp_tn, $tmp_field_name); \\" >>fat.h - done - echo " } while (0)" >>fat.h - - for tmp_dir in $fat_path; do - CPUVEC_SETUP= - THRESH_ASM_SETUP= - echo "" >>fat.h - tmp_suffix=`echo $tmp_dir | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'` - - # In order to keep names unique on a DOS 8.3 filesystem, use a prefix - # (rather than a suffix) for the generated file names, and abbreviate. - case $tmp_suffix in - pentium) tmp_prefix=p ;; - pentium_mmx) tmp_prefix=pm ;; - p6_mmx) tmp_prefix=p2 ;; - p6_p3mmx) tmp_prefix=p3 ;; - pentium4) tmp_prefix=p4 ;; - pentium4_mmx) tmp_prefix=p4m ;; - pentium4_sse2) tmp_prefix=p4s ;; - k6_mmx) tmp_prefix=k6m ;; - k6_k62mmx) tmp_prefix=k62 ;; - k7_mmx) tmp_prefix=k7m ;; - *) tmp_prefix=$tmp_suffix ;; - esac - - # Extract desired thresholds from gmp-mparam.h file in this directory, - # if present. - tmp_mparam=$srcdir/mpn/$tmp_dir/gmp-mparam.h - if test -f $tmp_mparam; then - for tmp_tn in $fat_thresholds; do - tmp_thresh=`sed -n "s/^#define $tmp_tn[ ]*\\([0-9][0-9]*\\).*$/\\1/p" $tmp_mparam` - if test -n "$tmp_thresh"; then - THRESH_ASM_SETUP="${THRESH_ASM_SETUP}define($tmp_tn,$tmp_thresh) -" - CPUVEC_SETUP="$CPUVEC_SETUP decided_cpuvec.`echo $tmp_tn | tr [A-Z] [a-z]` = $tmp_thresh; \\ -" - eval tmp_limit=\$${tmp_tn}_LIMIT - if test -z "$tmp_limit"; then - tmp_limit=0 - fi - if test $tmp_thresh -gt $tmp_limit; then - eval ${tmp_tn}_LIMIT=$tmp_thresh - fi - fi - done - fi - - for tmp_fn in $fat_functions; do - # functions that can be provided by multi-function files -tmp_mulfunc= -case $tmp_fn in - add_n|sub_n) tmp_mulfunc="aors_n" ;; - add_err1_n|sub_err1_n) - tmp_mulfunc="aors_err1_n" ;; - add_err2_n|sub_err2_n) - tmp_mulfunc="aors_err2_n" ;; - add_err3_n|sub_err3_n) - tmp_mulfunc="aors_err3_n" ;; - cnd_add_n|cnd_sub_n) tmp_mulfunc="cnd_aors_n" ;; - sec_add_1|sec_sub_1) tmp_mulfunc="sec_aors_1" ;; - addmul_1|submul_1) tmp_mulfunc="aorsmul_1" ;; - mul_2|addmul_2) tmp_mulfunc="aormul_2" ;; - mul_3|addmul_3) tmp_mulfunc="aormul_3" ;; - mul_4|addmul_4) tmp_mulfunc="aormul_4" ;; - popcount|hamdist) tmp_mulfunc="popham" ;; - and_n|andn_n|nand_n | ior_n|iorn_n|nior_n | xor_n|xnor_n) - tmp_mulfunc="logops_n" ;; - lshift|rshift) tmp_mulfunc="lorrshift";; - addlsh1_n) - tmp_mulfunc="aorslsh1_n aorrlsh1_n aorsorrlsh1_n";; - sublsh1_n) - tmp_mulfunc="aorslsh1_n sorrlsh1_n aorsorrlsh1_n";; - rsblsh1_n) - tmp_mulfunc="aorrlsh1_n sorrlsh1_n aorsorrlsh1_n";; - addlsh2_n) - tmp_mulfunc="aorslsh2_n aorrlsh2_n aorsorrlsh2_n";; - sublsh2_n) - tmp_mulfunc="aorslsh2_n sorrlsh2_n aorsorrlsh2_n";; - rsblsh2_n) - tmp_mulfunc="aorrlsh2_n sorrlsh2_n aorsorrlsh2_n";; - addlsh_n) - tmp_mulfunc="aorslsh_n aorrlsh_n aorsorrlsh_n";; - sublsh_n) - tmp_mulfunc="aorslsh_n sorrlsh_n aorsorrlsh_n";; - rsblsh_n) - tmp_mulfunc="aorrlsh_n sorrlsh_n aorsorrlsh_n";; - rsh1add_n|rsh1sub_n) - tmp_mulfunc="rsh1aors_n";; - sec_div_qr|sec_div_r) - tmp_mulfunc="sec_div";; - sec_pi1_div_qr|sec_pi1_div_r) - tmp_mulfunc="sec_pi1_div";; -esac - - - for tmp_base in $tmp_fn $tmp_mulfunc; do - for tmp_ext in asm S s c; do - tmp_file=$srcdir/mpn/$tmp_dir/$tmp_base.$tmp_ext - if test -f $tmp_file; then - - # If the host uses a non-standard ABI, check if tmp_file supports it - # - if test -n "$GMP_NONSTD_ABI" && test $tmp_ext != "c"; then - abi=`sed -n 's/^[ ]*ABI_SUPPORT(\(.*\))/\1/p' $tmp_file ` - if echo "$abi" | grep -q "\\b${GMP_NONSTD_ABI}\\b"; then - true - else - continue - fi - fi - - mpn_objects="$mpn_objects ${tmp_prefix}_$tmp_fn.lo" - mpn_objs_in_libgmp="$mpn_objs_in_libgmp mpn/${tmp_prefix}_$tmp_fn.lo" - - case $tmp_fn in - dive_1) tmp_fbase=divexact_1 ;; - diveby3) tmp_fbase=divexact_by3c ;; - pre_divrem_1) tmp_fbase=preinv_divrem_1 ;; - mode1o) tmp_fbase=modexact_1c_odd ;; - pre_mod_1) tmp_fbase=preinv_mod_1 ;; - mod_1_1) tmp_fbase=mod_1_1p ;; - mod_1_1_cps) tmp_fbase=mod_1_1p_cps ;; - mod_1_2) tmp_fbase=mod_1s_2p ;; - mod_1_2_cps) tmp_fbase=mod_1s_2p_cps ;; - mod_1_3) tmp_fbase=mod_1s_3p ;; - mod_1_3_cps) tmp_fbase=mod_1s_3p_cps ;; - mod_1_4) tmp_fbase=mod_1s_4p ;; - mod_1_4_cps) tmp_fbase=mod_1s_4p_cps ;; - *) tmp_fbase=$tmp_fn ;; -esac - - - # carry-in variant, eg. divrem_1c or modexact_1c_odd - case $tmp_fbase in - *_1*) tmp_fbasec=`echo $tmp_fbase | sed 's/_1/_1c/'` ;; - *) tmp_fbasec=${tmp_fbase}c ;; - esac - - # Create a little file doing an include from srcdir. The - # OPERATION and renamings aren't all needed all the time, but - # they don't hurt if unused. - # - # FIXME: Should generate these via config.status commands. - # Would need them all in one AC_CONFIG_COMMANDS though, since - # that macro doesn't accept a set of separate commands generated - # by shell code. - # - case $tmp_ext in - asm) - # hide the d-n-l from autoconf's error checking - tmp_d_n_l=d""nl - echo "$tmp_d_n_l mpn_$tmp_fbase - from $tmp_dir directory for fat binary. -$tmp_d_n_l Generated by configure - DO NOT EDIT. - -define(OPERATION_$tmp_fn) -define(__gmpn_$tmp_fbase, __gmpn_${tmp_fbase}_$tmp_suffix) -define(__gmpn_$tmp_fbasec,__gmpn_${tmp_fbasec}_${tmp_suffix}) -define(__gmpn_preinv_${tmp_fbase},__gmpn_preinv_${tmp_fbase}_${tmp_suffix}) -define(__gmpn_${tmp_fbase}_cps,__gmpn_${tmp_fbase}_cps_${tmp_suffix}) - -$tmp_d_n_l For k6 and k7 gcd_1 calling their corresponding mpn_modexact_1_odd -ifdef(\`__gmpn_modexact_1_odd',, -\`define(__gmpn_modexact_1_odd,__gmpn_modexact_1_odd_${tmp_suffix})') - -$THRESH_ASM_SETUP -include($mpn_relative_top_srcdir/mpn/$tmp_dir/$tmp_base.asm) -" >mpn/${tmp_prefix}_$tmp_fn.asm - ;; - c) - echo "/* mpn_$tmp_fbase - from $tmp_dir directory for fat binary. - Generated by configure - DO NOT EDIT. */ - -#define OPERATION_$tmp_fn 1 -#define __gmpn_$tmp_fbase __gmpn_${tmp_fbase}_$tmp_suffix -#define __gmpn_$tmp_fbasec __gmpn_${tmp_fbasec}_${tmp_suffix} -#define __gmpn_preinv_${tmp_fbase} __gmpn_preinv_${tmp_fbase}_${tmp_suffix} -#define __gmpn_${tmp_fbase}_cps __gmpn_${tmp_fbase}_cps_${tmp_suffix} - -#include \"$mpn_relative_top_srcdir/mpn/$tmp_dir/$tmp_base.c\" -" >mpn/${tmp_prefix}_$tmp_fn.c - ;; - esac - - # Prototype, and append to CPUVEC_SETUP for this directory. - echo "DECL_$tmp_fbase (__gmpn_${tmp_fbase}_$tmp_suffix);" >>fat.h - CPUVEC_SETUP="$CPUVEC_SETUP decided_cpuvec.$tmp_fbase = __gmpn_${tmp_fbase}_${tmp_suffix}; \\ -" - # Ditto for any preinv variant (preinv_divrem_1, preinv_mod_1). - if grep "^PROLOGUE(mpn_preinv_$tmp_fn)" $tmp_file >/dev/null; then - echo "DECL_preinv_$tmp_fbase (__gmpn_preinv_${tmp_fbase}_$tmp_suffix);" >>fat.h - CPUVEC_SETUP="$CPUVEC_SETUP decided_cpuvec.preinv_$tmp_fbase = __gmpn_preinv_${tmp_fbase}_${tmp_suffix}; \\ -" - fi - - # Ditto for any mod_1...cps variant - if grep "^PROLOGUE(mpn_${tmp_fbase}_cps)" $tmp_file >/dev/null; then - echo "DECL_${tmp_fbase}_cps (__gmpn_${tmp_fbase}_cps_$tmp_suffix);" >>fat.h - CPUVEC_SETUP="$CPUVEC_SETUP decided_cpuvec.${tmp_fbase}_cps = __gmpn_${tmp_fbase}_cps_${tmp_suffix}; \\ -" - fi - fi - done - done - done - - # Emit CPUVEC_SETUP for this directory - echo "" >>fat.h - echo "#define CPUVEC_SETUP_$tmp_suffix \\" >>fat.h - echo " do { \\" >>fat.h - echo "$CPUVEC_SETUP } while (0)" >>fat.h - done - - # Emit threshold limits - echo "" >>fat.h - for tmp_tn in $fat_thresholds; do - eval tmp_limit=\$${tmp_tn}_LIMIT - echo "#define ${tmp_tn}_LIMIT $tmp_limit" >>fat.h - done -fi - - -# Normal binary setups. -# - -for tmp_ext in asm S s c; do - eval found_$tmp_ext=no -done - -for tmp_fn in $gmp_mpn_functions; do - for tmp_ext in asm S s c; do - test "$no_create" = yes || rm -f mpn/$tmp_fn.$tmp_ext - done - - # mpn_preinv_divrem_1 might have been provided by divrem_1.asm, likewise - # mpn_preinv_mod_1 by mod_1.asm. - case $tmp_fn in - pre_divrem_1) - if test "$HAVE_NATIVE_mpn_preinv_divrem_1" = yes; then continue; fi ;; - pre_mod_1) - if test "$HAVE_NATIVE_mpn_preinv_mod_1" = yes; then continue; fi ;; - esac - - # functions that can be provided by multi-function files -tmp_mulfunc= -case $tmp_fn in - add_n|sub_n) tmp_mulfunc="aors_n" ;; - add_err1_n|sub_err1_n) - tmp_mulfunc="aors_err1_n" ;; - add_err2_n|sub_err2_n) - tmp_mulfunc="aors_err2_n" ;; - add_err3_n|sub_err3_n) - tmp_mulfunc="aors_err3_n" ;; - cnd_add_n|cnd_sub_n) tmp_mulfunc="cnd_aors_n" ;; - sec_add_1|sec_sub_1) tmp_mulfunc="sec_aors_1" ;; - addmul_1|submul_1) tmp_mulfunc="aorsmul_1" ;; - mul_2|addmul_2) tmp_mulfunc="aormul_2" ;; - mul_3|addmul_3) tmp_mulfunc="aormul_3" ;; - mul_4|addmul_4) tmp_mulfunc="aormul_4" ;; - popcount|hamdist) tmp_mulfunc="popham" ;; - and_n|andn_n|nand_n | ior_n|iorn_n|nior_n | xor_n|xnor_n) - tmp_mulfunc="logops_n" ;; - lshift|rshift) tmp_mulfunc="lorrshift";; - addlsh1_n) - tmp_mulfunc="aorslsh1_n aorrlsh1_n aorsorrlsh1_n";; - sublsh1_n) - tmp_mulfunc="aorslsh1_n sorrlsh1_n aorsorrlsh1_n";; - rsblsh1_n) - tmp_mulfunc="aorrlsh1_n sorrlsh1_n aorsorrlsh1_n";; - addlsh2_n) - tmp_mulfunc="aorslsh2_n aorrlsh2_n aorsorrlsh2_n";; - sublsh2_n) - tmp_mulfunc="aorslsh2_n sorrlsh2_n aorsorrlsh2_n";; - rsblsh2_n) - tmp_mulfunc="aorrlsh2_n sorrlsh2_n aorsorrlsh2_n";; - addlsh_n) - tmp_mulfunc="aorslsh_n aorrlsh_n aorsorrlsh_n";; - sublsh_n) - tmp_mulfunc="aorslsh_n sorrlsh_n aorsorrlsh_n";; - rsblsh_n) - tmp_mulfunc="aorrlsh_n sorrlsh_n aorsorrlsh_n";; - rsh1add_n|rsh1sub_n) - tmp_mulfunc="rsh1aors_n";; - sec_div_qr|sec_div_r) - tmp_mulfunc="sec_div";; - sec_pi1_div_qr|sec_pi1_div_r) - tmp_mulfunc="sec_pi1_div";; -esac - - - found=no - for tmp_dir in $path; do - for tmp_base in $tmp_fn $tmp_mulfunc; do - for tmp_ext in asm S s c; do - tmp_file=$srcdir/mpn/$tmp_dir/$tmp_base.$tmp_ext - if test -f $tmp_file; then - - # For a nails build, check if the file supports our nail bits. - # Generic code always supports all nails. - # - # FIXME: When a multi-function file is selected to provide one of - # the nails-neutral routines, like logops_n for and_n, the - # PROLOGUE grepping will create HAVE_NATIVE_mpn_<foo> defines for - # all functions in that file, even if they haven't all been - # nailified. Not sure what to do about this, it's only really a - # problem for logops_n, and it's not too terrible to insist those - # get nailified always. - # - if test $GMP_NAIL_BITS != 0 && test $tmp_dir != generic; then - case $tmp_fn in - and_n | ior_n | xor_n | andn_n | \ - copyi | copyd | \ - popcount | hamdist | \ - udiv | udiv_w_sdiv | umul | \ - cntlz | invert_limb) - # these operations are either unaffected by nails or defined - # to operate on full limbs - ;; - *) - nails=`sed -n 's/^[ ]*NAILS_SUPPORT(\(.*\))/\1/p' $tmp_file ` - for n in $nails; do - case $n in - *-*) - n_start=`echo "$n" | sed -n 's/\(.*\)-.*/\1/p'` - n_end=`echo "$n" | sed -n 's/.*-\(.*\)/\1/p'` - ;; - *) - n_start=$n - n_end=$n - ;; - esac - if test $GMP_NAIL_BITS -ge $n_start && test $GMP_NAIL_BITS -le $n_end; then - found=yes - break - fi - done - if test $found != yes; then - continue - fi - ;; - esac - fi - - # If the host uses a non-standard ABI, check if tmp_file supports it - # - if test -n "$GMP_NONSTD_ABI" && test $tmp_ext != "c"; then - abi=`sed -n 's/^[ ]*ABI_SUPPORT(\(.*\))/\1/p' $tmp_file ` - if echo "$abi" | grep -q "\\b${GMP_NONSTD_ABI}\\b"; then - true - else - continue - fi - fi - - found=yes - eval found_$tmp_ext=yes - - if test $tmp_ext = c; then - tmp_u='$U' - else - tmp_u= - fi - - mpn_objects="$mpn_objects $tmp_fn$tmp_u.lo" - mpn_objs_in_libgmp="$mpn_objs_in_libgmp mpn/$tmp_fn$tmp_u.lo" - ac_config_links="$ac_config_links mpn/$tmp_fn.$tmp_ext:mpn/$tmp_dir/$tmp_base.$tmp_ext" - - gmp_srclinks="$gmp_srclinks mpn/$tmp_fn.$tmp_ext" - - # Duplicate AC_DEFINEs are harmless, so it doesn't matter - # that multi-function files get grepped here repeatedly. - # The PROLOGUE pattern excludes the optional second parameter. - gmp_ep=` - sed -n 's/^[ ]*MULFUNC_PROLOGUE(\(.*\))/\1/p' $tmp_file ; - sed -n 's/^[ ]*PROLOGUE(\([^,]*\).*)/\1/p' $tmp_file - ` - for gmp_tmp in $gmp_ep; do - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_NATIVE_$gmp_tmp 1 -_ACEOF - - eval HAVE_NATIVE_$gmp_tmp=yes - done - - case $tmp_fn in - sqr_basecase) sqr_basecase_source=$tmp_file ;; - esac - - break - fi - done - if test $found = yes; then break ; fi - done - if test $found = yes; then break ; fi - done - - if test $found = no; then - for tmp_optional in $gmp_mpn_functions_optional; do - if test $tmp_optional = $tmp_fn; then - found=yes - fi - done - if test $found = no; then - as_fn_error $? "no version of $tmp_fn found in path: $path" "$LINENO" 5 - fi - fi -done - -# All cycle counters are .asm files currently -if test -n "$SPEED_CYCLECOUNTER_OBJ"; then - found_asm=yes -fi - - - - - -# Don't demand an m4 unless it's actually needed. -if test $found_asm = yes; then - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suitable m4" >&5 -$as_echo_n "checking for suitable m4... " >&6; } -if ${gmp_cv_prog_m4+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$M4"; then - gmp_cv_prog_m4="$M4" -else - cat >conftest.m4 <<\EOF -define(dollarhash,``$#'')ifelse(dollarhash(x),1,`define(t1,Y)', -``bad: $# not supported (SunOS /usr/bin/m4) -'')ifelse(eval(89),89,`define(t2,Y)', -`bad: eval() doesnt support 8 or 9 in a constant (OpenBSD 2.6 m4) -')ifelse(eval(9,9),10,`define(t3,Y)', -`bad: eval() doesnt support radix in eval (FreeBSD 8.x,9.0,9.1,9.2 m4) -')ifelse(t1`'t2`'t3,YYY,`good -') -EOF - echo "trying m4" >&5 - gmp_tmp_val=`(m4 conftest.m4) 2>&5` - echo "$gmp_tmp_val" >&5 - if test "$gmp_tmp_val" = good; then - gmp_cv_prog_m4="m4" - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH:/usr/5bin" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - echo "trying $ac_dir/m4" >&5 - gmp_tmp_val=`($ac_dir/m4 conftest.m4) 2>&5` - echo "$gmp_tmp_val" >&5 - if test "$gmp_tmp_val" = good; then - gmp_cv_prog_m4="$ac_dir/m4" - break - fi - done - IFS="$ac_save_ifs" - if test -z "$gmp_cv_prog_m4"; then - as_fn_error $? "No usable m4 in \$PATH or /usr/5bin (see config.log for reasons)." "$LINENO" 5 - fi - fi - rm -f conftest.m4 -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_prog_m4" >&5 -$as_echo "$gmp_cv_prog_m4" >&6; } -M4="$gmp_cv_prog_m4" - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if m4wrap produces spurious output" >&5 -$as_echo_n "checking if m4wrap produces spurious output... " >&6; } -if ${gmp_cv_m4_m4wrap_spurious+:} false; then : - $as_echo_n "(cached) " >&6 -else - # hide the d-n-l from autoconf's error checking -tmp_d_n_l=d""nl -cat >conftest.m4 <<EOF -changequote({,})define(x,)m4wrap({x})$tmp_d_n_l -EOF -echo test input is >&5 -cat conftest.m4 >&5 -tmp_chars=`$M4 conftest.m4 | wc -c` -echo produces $tmp_chars chars output >&5 -rm -f conftest.m4 -if test $tmp_chars = 0; then - gmp_cv_m4_m4wrap_spurious=no -else - gmp_cv_m4_m4wrap_spurious=yes -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_m4_m4wrap_spurious" >&5 -$as_echo "$gmp_cv_m4_m4wrap_spurious" >&6; } - -echo "define(<M4WRAP_SPURIOUS>,<$gmp_cv_m4_m4wrap_spurious>)" >> $gmp_tmpconfigm4 - - -# else -# It's unclear why this m4-not-needed stuff was ever done. -# if test -z "$M4" ; then -# M4=m4-not-needed -# fi -fi - -# Only do the GMP_ASM checks if there's a .S or .asm wanting them. -if test $found_asm = no && test $found_S = no; then - gmp_asm_syntax_testing=no -fi - -if test "$gmp_asm_syntax_testing" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to text section" >&5 -$as_echo_n "checking how to switch to text section... " >&6; } -if ${gmp_cv_asm_text+:} false; then : - $as_echo_n "(cached) " >&6 -else - for i in ".text" ".code" ".csect .text[PR]"; do - echo "trying $i" >&5 - cat >conftest.s <<EOF - $i -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_text=$i - rm -f conftest* - break -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - : -fi -rm -f conftest* - -done -if test -z "$gmp_cv_asm_text"; then - as_fn_error $? "Cannot determine text section directive" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_text" >&5 -$as_echo "$gmp_cv_asm_text" >&6; } -echo "define(<TEXT>, <$gmp_cv_asm_text>)" >> $gmp_tmpconfigm4 - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to data section" >&5 -$as_echo_n "checking how to switch to data section... " >&6; } -if ${gmp_cv_asm_data+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-aix*) gmp_cv_asm_data=".csect .data[RW]" ;; - *) gmp_cv_asm_data=".data" ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_data" >&5 -$as_echo "$gmp_cv_asm_data" >&6; } -echo "define(<DATA>, <$gmp_cv_asm_data>)" >> $gmp_tmpconfigm4 - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler label suffix" >&5 -$as_echo_n "checking for assembler label suffix... " >&6; } -if ${gmp_cv_asm_label_suffix+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_cv_asm_label_suffix=unknown -for i in "" ":"; do - echo "trying $i" >&5 - cat >conftest.s <<EOF - $gmp_cv_asm_text -somelabel$i -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_label_suffix=$i - rm -f conftest* - break -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - cat conftest.out >&5 -fi -rm -f conftest* - -done -if test "$gmp_cv_asm_label_suffix" = "unknown"; then - as_fn_error $? "Cannot determine label suffix" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_label_suffix" >&5 -$as_echo "$gmp_cv_asm_label_suffix" >&6; } -echo "define(<LABEL_SUFFIX>, <$gmp_cv_asm_label_suffix>)" >> $gmp_tmpconfigm4 - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler global directive" >&5 -$as_echo_n "checking for assembler global directive... " >&6; } -if ${gmp_cv_asm_globl+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - hppa*-*-*) gmp_cv_asm_globl=.export ;; - ia64*-*-* | itanium-*-* | itanium2-*-*) gmp_cv_asm_globl=.global ;; - *) gmp_cv_asm_globl=.globl ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_globl" >&5 -$as_echo "$gmp_cv_asm_globl" >&6; } -echo "define(<GLOBL>, <$gmp_cv_asm_globl>)" >> $gmp_tmpconfigm4 - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler global directive attribute" >&5 -$as_echo_n "checking for assembler global directive attribute... " >&6; } -if ${gmp_cv_asm_globl_attr+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $gmp_cv_asm_globl in - .export) gmp_cv_asm_globl_attr=",entry" ;; - *) gmp_cv_asm_globl_attr="" ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_globl_attr" >&5 -$as_echo "$gmp_cv_asm_globl_attr" >&6; } -echo "define(<GLOBL_ATTR>, <$gmp_cv_asm_globl_attr>)" >> $gmp_tmpconfigm4 - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if globals are prefixed by underscore" >&5 -$as_echo_n "checking if globals are prefixed by underscore... " >&6; } -if ${gmp_cv_asm_underscore+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_cv_asm_underscore="unknown" -cat >conftest.c <<EOF -int gurkmacka; -EOF -gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >&5" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - $NM conftest.$OBJEXT >conftest.out - if grep _gurkmacka conftest.out >/dev/null; then - gmp_cv_asm_underscore=yes - elif grep gurkmacka conftest.out >/dev/null; then - gmp_cv_asm_underscore=no - else - echo "configure: $NM doesn't have gurkmacka:" >&5 - cat conftest.out >&5 - fi -else - echo "configure: failed program was:" >&5 - cat conftest.c >&5 -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_underscore" >&5 -$as_echo "$gmp_cv_asm_underscore" >&6; } -case $gmp_cv_asm_underscore in - yes) - -echo 'define(<GSYM_PREFIX>, <_>)' >>$gmp_tmpconfigm4 - ;; - no) - -echo 'define(<GSYM_PREFIX>, <>)' >>$gmp_tmpconfigm4 - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Cannot determine global symbol prefix." >&5 -$as_echo "$as_me: WARNING: | Cannot determine global symbol prefix." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $NM output doesn't contain a global data symbol." >&5 -$as_echo "$as_me: WARNING: | $NM output doesn't contain a global data symbol." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Will proceed with no underscore." >&5 -$as_echo "$as_me: WARNING: | Will proceed with no underscore." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | If this is wrong then you'll get link errors referring" >&5 -$as_echo "$as_me: WARNING: | If this is wrong then you'll get link errors referring" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | to ___gmpn_add_n (note three underscores)." >&5 -$as_echo "$as_me: WARNING: | to ___gmpn_add_n (note three underscores)." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | In this case do a fresh build with an override," >&5 -$as_echo "$as_me: WARNING: | In this case do a fresh build with an override," >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | ./configure gmp_cv_asm_underscore=yes" >&5 -$as_echo "$as_me: WARNING: | ./configure gmp_cv_asm_underscore=yes" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5 -$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;} - -echo 'define(<GSYM_PREFIX>, <>)' >>$gmp_tmpconfigm4 - - ;; -esac - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to read-only data section" >&5 -$as_echo_n "checking how to switch to read-only data section... " >&6; } -if ${gmp_cv_asm_rodata+:} false; then : - $as_echo_n "(cached) " >&6 -else - -case $host in -i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | x86_64-*-*) - gmp_cv_asm_rodata="$gmp_cv_asm_data" ;; -*) - gmp_cv_asm_rodata="$gmp_cv_asm_text" ;; -esac - -cat >conftest.c <<EOF -extern const int foo[]; /* Suppresses C++'s suppression of foo */ -const int foo[] = {1,2,3}; -EOF -echo "Test program:" >&5 -cat conftest.c >&5 -gmp_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c >&5" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - echo "Compiler output:" >&5 - cat conftest.s >&5 - if test $gmp_cv_asm_underscore = yes; then - tmp_gsym_prefix=_ - else - tmp_gsym_prefix= - fi - # must see our label - if grep "^${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix" conftest.s >/dev/null 2>&5; then - # take the last directive before our label (hence skipping segments - # getting debugging info etc) - tmp_match=`sed -n "/^${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix/q - /^[. ]*data/p - /^[. ]*rdata/p - /^[. ]*text/p - /^[. ]*section/p - /^[. ]*csect/p - /^[. ]*CSECT/p" conftest.s | sed -n '$p'` - echo "Match: $tmp_match" >&5 - if test -n "$tmp_match"; then - gmp_cv_asm_rodata=$tmp_match - fi - else - echo "Couldn't find label: ^${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix" >&5 - fi -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_rodata" >&5 -$as_echo "$gmp_cv_asm_rodata" >&6; } -echo "define(<RODATA>, <$gmp_cv_asm_rodata>)" >> $gmp_tmpconfigm4 - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .type directive" >&5 -$as_echo_n "checking for assembler .type directive... " >&6; } -if ${gmp_cv_asm_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_cv_asm_type= -for gmp_tmp_prefix in @ \# %; do - cat >conftest.s <<EOF - .type sym,${gmp_tmp_prefix}function -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - if grep "\.type pseudo-op used outside of \.def/\.endef ignored" conftest.out >/dev/null; then : ; - else - gmp_cv_asm_type=".type \$1,${gmp_tmp_prefix}\$2" - break - fi -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - : -fi -rm -f conftest* - -done -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_type" >&5 -$as_echo "$gmp_cv_asm_type" >&6; } -echo "define(<TYPE>, <$gmp_cv_asm_type>)" >> $gmp_tmpconfigm4 - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .size directive" >&5 -$as_echo_n "checking for assembler .size directive... " >&6; } -if ${gmp_cv_asm_size+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_cv_asm_size= -cat >conftest.s <<EOF - .size sym,1 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - if grep "\.size pseudo-op used outside of \.def/\.endef ignored" conftest.out >/dev/null; then : ; - else - gmp_cv_asm_size=".size \$1,\$2" - fi -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - : -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_size" >&5 -$as_echo "$gmp_cv_asm_size" >&6; } -echo "define(<SIZE>, <$gmp_cv_asm_size>)" >> $gmp_tmpconfigm4 - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler local label prefix" >&5 -$as_echo_n "checking for assembler local label prefix... " >&6; } -if ${gmp_cv_asm_lsym_prefix+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_tmp_pre_appears=yes -for gmp_tmp_pre in L .L $L $ L$; do - echo "Trying $gmp_tmp_pre" >&5 - cat >conftest.s <<EOF - $gmp_cv_asm_text -dummy${gmp_cv_asm_label_suffix} -${gmp_tmp_pre}gurkmacka${gmp_cv_asm_label_suffix} -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - if $NM conftest.$OBJEXT >conftest.nm 2>&5; then : ; else - cat conftest.nm >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"$NM\" failure" >&5 -$as_echo "$as_me: WARNING: \"$NM\" failure" >&2;} - break - fi - cat conftest.nm >&5 - if grep gurkmacka conftest.nm >/dev/null; then : ; else - # no mention of the symbol, this is good - echo "$gmp_tmp_pre label doesn't appear in object file at all (good)" >&5 - gmp_cv_asm_lsym_prefix="$gmp_tmp_pre" - gmp_tmp_pre_appears=no - break - fi - if grep ' [a-zN] .*gurkmacka' conftest.nm >/dev/null; then - # symbol mentioned as a local, use this if nothing better - echo "$gmp_tmp_pre label is local but still in object file" >&5 - if test -z "$gmp_cv_asm_lsym_prefix"; then - gmp_cv_asm_lsym_prefix="$gmp_tmp_pre" - fi - else - echo "$gmp_tmp_pre label is something unknown" >&5 - fi - -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - : -fi -rm -f conftest* - -done -rm -f conftest* -if test -z "$gmp_cv_asm_lsym_prefix"; then - gmp_cv_asm_lsym_prefix=L - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine local label, using default $gmp_cv_asm_lsym_prefix" >&5 -$as_echo "$as_me: WARNING: cannot determine local label, using default $gmp_cv_asm_lsym_prefix" >&2;} -fi -# for development purposes, note whether we got a purely temporary local label -echo "Local label appears in object files: $gmp_tmp_pre_appears" >&5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_lsym_prefix" >&5 -$as_echo "$gmp_cv_asm_lsym_prefix" >&6; } -echo "define(<LSYM_PREFIX>, <${gmp_cv_asm_lsym_prefix}>)" >> $gmp_tmpconfigm4 - -cat >>confdefs.h <<_ACEOF -@%:@define LSYM_PREFIX "$gmp_cv_asm_lsym_prefix" -_ACEOF - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler byte directive" >&5 -$as_echo_n "checking for assembler byte directive... " >&6; } -if ${gmp_cv_asm_byte+:} false; then : - $as_echo_n "(cached) " >&6 -else - for i in .byte data1; do - echo "trying $i" >&5 - cat >conftest.s <<EOF - $gmp_cv_asm_data - $i 0 - -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_byte=$i - rm -f conftest* - break -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - cat conftest.out >&5 -fi -rm -f conftest* - -done -if test -z "$gmp_cv_asm_byte"; then - as_fn_error $? "Cannot determine how to emit a data byte" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_byte" >&5 -$as_echo "$gmp_cv_asm_byte" >&6; } - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to define a 32-bit word" >&5 -$as_echo_n "checking how to define a 32-bit word... " >&6; } -if ${gmp_cv_asm_w32+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-hpux*) - # FIXME: HPUX puts first symbol at 0x40000000, breaking our assumption - # that it's at 0x0. We'll have to declare another symbol before the - # .long/.word and look at the distance between the two symbols. The - # only problem is that the sed expression(s) barfs (on Solaris, for - # example) for the symbol with value 0. For now, HPUX uses .word. - gmp_cv_asm_w32=".word" - ;; - *-*-*) - gmp_tmp_val= - for gmp_tmp_op in .long .word data4; do - cat >conftest.s <<EOF - $gmp_cv_asm_data - $gmp_cv_asm_globl foo - $gmp_tmp_op 0 -foo$gmp_cv_asm_label_suffix - $gmp_cv_asm_byte 0 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_tmp_val=`$NM conftest.$OBJEXT | grep foo | \ - sed -e 's;[[][0-9][]]\(.*\);\1;' -e 's;[^1-9]*\([0-9]*\).*;\1;'` - if test "$gmp_tmp_val" = 4; then - gmp_cv_asm_w32="$gmp_tmp_op" - break - fi -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - : -fi -rm -f conftest* - - done - rm -f conftest* - ;; -esac -if test -z "$gmp_cv_asm_w32"; then - as_fn_error $? "cannot determine how to define a 32-bit word" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_w32" >&5 -$as_echo "$gmp_cv_asm_w32" >&6; } -echo "define(<W32>, <$gmp_cv_asm_w32>)" >> $gmp_tmpconfigm4 - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if .align assembly directive is logarithmic" >&5 -$as_echo_n "checking if .align assembly directive is logarithmic... " >&6; } -if ${gmp_cv_asm_align_log+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - $gmp_cv_asm_data - .align 4 - $gmp_cv_asm_globl foo - $gmp_cv_asm_byte 1 - .align 4 -foo$gmp_cv_asm_label_suffix - $gmp_cv_asm_byte 2 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_tmp_val=`$NM conftest.$OBJEXT | grep foo | \ - sed -e 's;[[][0-9][]]\(.*\);\1;' -e 's;[^1-9]*\([0-9]*\).*;\1;'` - if test "$gmp_tmp_val" = "10" || test "$gmp_tmp_val" = "16"; then - gmp_cv_asm_align_log=yes - else - gmp_cv_asm_align_log=no - fi -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - as_fn_error $? "cannot assemble alignment test" "$LINENO" 5 -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_align_log" >&5 -$as_echo "$gmp_cv_asm_align_log" >&6; } - - -echo "define(<ALIGN_LOGARITHMIC>,<$gmp_cv_asm_align_log>)" >> $gmp_tmpconfigm4 - - - - case $host in - hppa*-*-*) - # for both pa32 and pa64 - -echo "include_mpn(\`pa32/pa-defs.m4')" >> $gmp_tmpconfigm4i - - ;; - ia64*-*-* | itanium-*-* | itanium2-*-*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler .align padding is good" >&5 -$as_echo_n "checking whether assembler .align padding is good... " >&6; } -if ${gmp_cv_asm_ia64_align_ok+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.awk <<\EOF -BEGIN { - want[0] = "011" - want[1] = "160" - want[2] = "074" - want[3] = "040" - want[4] = "000" - want[5] = "040" - want[6] = "020" - want[7] = "221" - want[8] = "114" - want[9] = "000" - want[10] = "100" - want[11] = "200" - want[12] = "122" - want[13] = "261" - want[14] = "000" - want[15] = "200" - - want[16] = "000" - want[17] = "004" - want[18] = "000" - want[19] = "000" - want[20] = "000" - want[21] = "000" - want[22] = "002" - want[23] = "000" - want[24] = "000" - want[25] = "000" - want[26] = "000" - want[27] = "001" - want[28] = "000" - want[29] = "000" - want[30] = "000" - want[31] = "014" - - want[32] = "011" - want[33] = "270" - want[34] = "140" - want[35] = "062" - want[36] = "000" - want[37] = "040" - want[38] = "240" - want[39] = "331" - want[40] = "160" - want[41] = "000" - want[42] = "100" - want[43] = "240" - want[44] = "343" - want[45] = "371" - want[46] = "000" - want[47] = "200" - - result = "yes" -} -{ - for (f = 2; f <= NF; f++) - { - for (i = 0; i < 47; i++) - got[i] = got[i+1]; - got[47] = $f; - - found = 1 - for (i = 0; i < 48; i++) - if (got[i] != want[i]) - { - found = 0 - break - } - if (found) - { - result = "no" - exit - } - } -} -END { - print result -} -EOF -cat >conftest.s <<EOF - .text - .align 32 -{ .mmi; add r14 = r15, r16 - add r17 = r18, r19 - add r20 = r21, r22 ;; } - .align 32 -{ .mmi; add r23 = r24, r25 - add r26 = r27, r28 - add r29 = r30, r31 ;; } - -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_ia64_align_ok=`od -b conftest.$OBJEXT | $AWK -f conftest.awk` -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: oops, cannot compile test program" >&5 -$as_echo "$as_me: WARNING: oops, cannot compile test program" >&2;} - gmp_cv_asm_ia64_align_ok=yes -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_ia64_align_ok" >&5 -$as_echo "$gmp_cv_asm_ia64_align_ok" >&6; } - -echo "define(<IA64_ALIGN_OK>, <\`$gmp_cv_asm_ia64_align_ok'>)" >> $gmp_tmpconfigm4 - - - ;; - m68k-*-* | m68[0-9][0-9][0-9]-*-*) - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler instruction and register style" >&5 -$as_echo_n "checking assembler instruction and register style... " >&6; } -if ${gmp_cv_asm_m68k_instruction+:} false; then : - $as_echo_n "(cached) " >&6 -else - for i in "addl %d0,%d1" "add.l %d0,%d1" "addl d0,d1" "add.l d0,d1"; do - cat >conftest.s <<EOF - $gmp_cv_asm_text - $i -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_m68k_instruction=$i - rm -f conftest* - break -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - : -fi -rm -f conftest* - -done -if test -z "$gmp_cv_asm_m68k_instruction"; then - as_fn_error $? "cannot determine assembler instruction and register style" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_m68k_instruction" >&5 -$as_echo "$gmp_cv_asm_m68k_instruction" >&6; } -case $gmp_cv_asm_m68k_instruction in -"addl d0,d1") want_dot_size=no; want_register_percent=no ;; -"addl %d0,%d1") want_dot_size=no; want_register_percent=yes ;; -"add.l d0,d1") want_dot_size=yes; want_register_percent=no ;; -"add.l %d0,%d1") want_dot_size=yes; want_register_percent=yes ;; -*) as_fn_error $? "oops, unrecognised instruction and register style" "$LINENO" 5 ;; -esac - -echo "define(<WANT_REGISTER_PERCENT>, <\`$want_register_percent'>)" >> $gmp_tmpconfigm4 - - -echo "define(<WANT_DOT_SIZE>, <\`$want_dot_size'>)" >> $gmp_tmpconfigm4 - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler addressing style" >&5 -$as_echo_n "checking assembler addressing style... " >&6; } -if ${gmp_cv_asm_m68k_addressing+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $gmp_cv_asm_m68k_instruction in -addl*) movel=movel ;; -add.l*) movel=move.l ;; -*) as_fn_error $? "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;; -esac -case $gmp_cv_asm_m68k_instruction in -*"%d0,%d1") dreg=%d0; areg=%a0 ;; -*"d0,d1") dreg=d0; areg=a0 ;; -*) as_fn_error $? "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;; -esac -cat >conftest.s <<EOF - $gmp_cv_asm_text - $movel $dreg, $areg@- -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_m68k_addressing=mit -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - cat >conftest.s <<EOF - $gmp_cv_asm_text - $movel $dreg, -($areg) -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_m68k_addressing=motorola -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - as_fn_error $? "cannot determine assembler addressing style" "$LINENO" 5 -fi -rm -f conftest* - -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_m68k_addressing" >&5 -$as_echo "$gmp_cv_asm_m68k_addressing" >&6; } - -echo "define(<WANT_ADDRESSING>, <\`$gmp_cv_asm_m68k_addressing'>)" >> $gmp_tmpconfigm4 - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler shortest branches" >&5 -$as_echo_n "checking assembler shortest branches... " >&6; } -if ${gmp_cv_asm_m68k_branches+:} false; then : - $as_echo_n "(cached) " >&6 -else - for i in jra jbra bra; do - cat >conftest.s <<EOF - $gmp_cv_asm_text -foo$gmp_cv_asm_label_suffix - $i foo -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_m68k_branches=$i - rm -f conftest* - break -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - : -fi -rm -f conftest* - -done -if test -z "$gmp_cv_asm_m68k_branches"; then - as_fn_error $? "cannot determine assembler branching style" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_m68k_branches" >&5 -$as_echo "$gmp_cv_asm_m68k_branches" >&6; } - -echo "define(<WANT_BRANCHES>, <\`$gmp_cv_asm_m68k_branches'>)" >> $gmp_tmpconfigm4 - - - ;; - powerpc*-*-* | power[3-9]-*-*) - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler output is PIC by default" >&5 -$as_echo_n "checking whether compiler output is PIC by default... " >&6; } -if ${gmp_cv_asm_powerpc_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_cv_asm_powerpc_pic=yes -cat >conftest.c <<EOF -int foo; -int *bar() { return &foo; } -EOF -echo "Test program:" >&5 -cat conftest.c >&5 -gmp_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c >&5" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - echo "Compiler output:" >&5 - cat conftest.s >&5 - if grep 'foo@ha' conftest.s >/dev/null 2>&5; then - gmp_cv_asm_powerpc_pic=no - fi - if grep 'ha16(_foo)' conftest.s >/dev/null 2>&5; then - gmp_cv_asm_powerpc_pic=no - fi -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_powerpc_pic" >&5 -$as_echo "$gmp_cv_asm_powerpc_pic" >&6; } - -echo "define(<PIC_ALWAYS>,<$gmp_cv_asm_powerpc_pic>)" >> $gmp_tmpconfigm4 - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler needs r on registers" >&5 -$as_echo_n "checking if the assembler needs r on registers... " >&6; } -if ${gmp_cv_asm_powerpc_r_registers+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - $gmp_cv_asm_text - mtctr 6 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_powerpc_r_registers=no -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - cat >conftest.s <<EOF - $gmp_cv_asm_text - mtctr r6 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_powerpc_r_registers=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - as_fn_error $? "neither \"mtctr 6\" nor \"mtctr r6\" works" "$LINENO" 5 -fi -rm -f conftest* - -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_powerpc_r_registers" >&5 -$as_echo "$gmp_cv_asm_powerpc_r_registers" >&6; } - - -echo "define(<WANT_R_REGISTERS>,<$gmp_cv_asm_powerpc_r_registers>)" >> $gmp_tmpconfigm4 - - - -echo "include_mpn(\`powerpc32/powerpc-defs.m4')" >> $gmp_tmpconfigm4i - - - # Check for Linux ELFv2 ABI - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if _CALL_ELF == 2 -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - -echo "define(<ELFv2_ABI>)" >> $gmp_tmpconfigm4 - -fi -rm -f conftest* - - - case $host in - *-*-aix*) - case $ABI in - mode64) -echo "include_mpn(\`powerpc64/aix.m4')" >> $gmp_tmpconfigm4i - ;; - *) -echo "include_mpn(\`powerpc32/aix.m4')" >> $gmp_tmpconfigm4i - ;; - esac - ;; - *-*-linux* | *-*-*bsd*) - case $ABI in - mode64) -echo "include_mpn(\`powerpc64/elf.m4')" >> $gmp_tmpconfigm4i - ;; - mode32 | 32) -echo "include_mpn(\`powerpc32/elf.m4')" >> $gmp_tmpconfigm4i - ;; - esac - ;; - *-*-darwin*) - case $ABI in - mode64) -echo "include_mpn(\`powerpc64/darwin.m4')" >> $gmp_tmpconfigm4i - ;; - mode32 | 32) -echo "include_mpn(\`powerpc32/darwin.m4')" >> $gmp_tmpconfigm4i - ;; - esac - ;; - *) - # Assume unrecognized operating system is the powerpc eABI - -echo "include_mpn(\`powerpc32/eabi.m4')" >> $gmp_tmpconfigm4i - - ;; - esac - ;; - power*-*-aix*) - -echo "include_mpn(\`powerpc32/aix.m4')" >> $gmp_tmpconfigm4i - - ;; - *sparc*-*-*) - case $ABI in - 64) - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler accepts \".register\"" >&5 -$as_echo_n "checking if the assembler accepts \".register\"... " >&6; } -if ${gmp_cv_asm_sparc_register+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - $gmp_cv_asm_text - .register %g2,#scratch - -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_sparc_register=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_sparc_register=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_sparc_register" >&5 -$as_echo "$gmp_cv_asm_sparc_register" >&6; } - - -echo "define(<HAVE_REGISTER>,<$gmp_cv_asm_sparc_register>)" >> $gmp_tmpconfigm4 - - - ;; - esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler accepts gotdata relocations" >&5 -$as_echo_n "checking if the assembler accepts gotdata relocations... " >&6; } -if ${gmp_cv_asm_sparc_gotdata+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - $gmp_cv_asm_text - .text - sethi %gdop_hix22(symbol), %g1 - or %g1, %gdop_lox10(symbol), %g1 - -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_sparc_gotdata=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_sparc_gotdata=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_sparc_gotdata" >&5 -$as_echo "$gmp_cv_asm_sparc_gotdata" >&6; } - - -echo "define(<HAVE_GOTDATA>,<$gmp_cv_asm_sparc_gotdata>)" >> $gmp_tmpconfigm4 - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler can support shared PIC thunks" >&5 -$as_echo_n "checking if the assembler can support shared PIC thunks... " >&6; } -if ${gmp_cv_asm_sparc_shared_thunks+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - $gmp_cv_asm_text - .section .text.__sparc_get_pc_thunk.l7,"axG",@progbits,__sparc_get_pc_thunk.l7,comdat - .weak __sparc_get_pc_thunk.l7 - .hidden __sparc_get_pc_thunk.l7 - .type __sparc_get_pc_thunk.l7, #function -__sparc_get_pc_thunk.l7: - jmp %o7+8 - add %o7, %l7, %l7 - -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_sparc_shared_thunks=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_sparc_shared_thunks=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_sparc_shared_thunks" >&5 -$as_echo "$gmp_cv_asm_sparc_shared_thunks" >&6; } - - -echo "define(<HAVE_SHARED_THUNKS>,<$gmp_cv_asm_sparc_shared_thunks>)" >> $gmp_tmpconfigm4 - - - ;; - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | cabylake*-*-*) - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the .align directive accepts an 0x90 fill in .text" >&5 -$as_echo_n "checking if the .align directive accepts an 0x90 fill in .text... " >&6; } -if ${gmp_cv_asm_align_fill_0x90+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - $gmp_cv_asm_text - .align 4, 0x90 - .byte 0 - .align 4, 0x90 -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - if grep "Warning: Fill parameter ignored for executable section" conftest.out >/dev/null; then - echo "Suppressing this warning by omitting 0x90" 1>&5 - gmp_cv_asm_align_fill_0x90=no -else - gmp_cv_asm_align_fill_0x90=yes -fi -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_align_fill_0x90=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_align_fill_0x90" >&5 -$as_echo "$gmp_cv_asm_align_fill_0x90" >&6; } - - -echo "define(<ALIGN_FILL_0x90>,<$gmp_cv_asm_align_fill_0x90>)" >> $gmp_tmpconfigm4 - - - case $ABI in - 32) - -echo "include_mpn(\`x86/x86-defs.m4')" >> $gmp_tmpconfigm4i - - $as_echo "@%:@define HAVE_HOST_CPU_FAMILY_x86 1" >>confdefs.h - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler COFF type directives" >&5 -$as_echo_n "checking for assembler COFF type directives... " >&6; } -if ${gmp_cv_asm_x86_coff_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - $gmp_cv_asm_text - $gmp_cv_asm_globl ${tmp_gsym_prefix}foo$gmp_cv_asm_globl_attr - .def ${tmp_gsym_prefix}foo - .scl 2 - .type 32 - .endef -${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix - -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_x86_coff_type=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_x86_coff_type=no -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_coff_type" >&5 -$as_echo "$gmp_cv_asm_x86_coff_type" >&6; } -echo "define(<HAVE_COFF_TYPE>, <$gmp_cv_asm_x86_coff_type>)" >> $gmp_tmpconfigm4 - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if _GLOBAL_OFFSET_TABLE_ is prefixed by underscore" >&5 -$as_echo_n "checking if _GLOBAL_OFFSET_TABLE_ is prefixed by underscore... " >&6; } -if ${gmp_cv_asm_x86_got_underscore+:} false; then : - $as_echo_n "(cached) " >&6 -else - gmp_cv_asm_x86_got_underscore="not applicable" -if test $gmp_cv_asm_underscore = yes; then - tmp_gsym_prefix=_ -else - tmp_gsym_prefix= -fi -for tmp_underscore in "" "_"; do - cat >conftest.s <<EOF - $gmp_cv_asm_text - $gmp_cv_asm_globl ${tmp_gsym_prefix}main$gmp_cv_asm_globl_attr -${tmp_gsym_prefix}main$gmp_cv_asm_label_suffix - addl $ ${tmp_underscore}_GLOBAL_OFFSET_TABLE_, %ebx -EOF - gmp_compile="$CCAS $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.s >&5 && $CC $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.$OBJEXT >&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 - (eval $gmp_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$tmp_underscore" = "_"; then - gmp_cv_asm_x86_got_underscore=yes - else - gmp_cv_asm_x86_got_underscore=no - fi - break - fi -done -rm -f conftest* a.out b.out a.exe a_out.exe - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_got_underscore" >&5 -$as_echo "$gmp_cv_asm_x86_got_underscore" >&6; } -if test "$gmp_cv_asm_x86_got_underscore" = "yes"; then - -echo 'define(<GOT_GSYM_PREFIX>, <_>)' >>$gmp_tmpconfigm4 - -else - -echo 'define(<GOT_GSYM_PREFIX>, <>)' >>$gmp_tmpconfigm4 - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler takes cl with shldl" >&5 -$as_echo_n "checking if the assembler takes cl with shldl... " >&6; } -if ${gmp_cv_asm_x86_shldl_cl+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.s <<EOF - $gmp_cv_asm_text - shldl %cl, %eax, %ebx -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5 - (eval $gmp_assemble) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - cat conftest.out >&5 - gmp_cv_asm_x86_shldl_cl=yes -else - cat conftest.out >&5 - echo "configure: failed program was:" >&5 - cat conftest.s >&5 - gmp_cv_asm_x86_shldl_cl=no -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_shldl_cl" >&5 -$as_echo "$gmp_cv_asm_x86_shldl_cl" >&6; } -if test "$gmp_cv_asm_x86_shldl_cl" = "yes"; then - -echo 'define(<WANT_SHLDL_CL>, <1>)' >>$gmp_tmpconfigm4 - -else - -echo 'define(<WANT_SHLDL_CL>, <0>)' >>$gmp_tmpconfigm4 - -fi - - case $enable_profiling in - prof | gprof) @%:@ Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_shared=yes -fi - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call x86 mcount" >&5 -$as_echo_n "checking how to call x86 mcount... " >&6; } -cat >conftest.c <<EOF -foo(){bar();} -EOF - -if test "$enable_static" = yes; then - gmp_asmout_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c 1>&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_asmout_compile\""; } >&5 - (eval $gmp_asmout_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if grep '\.data' conftest.s >/dev/null; then - mcount_nonpic_reg=`sed -n '/esp/!s/.*movl.*,\(%[a-z]*\).*$/\1/p' conftest.s` - else - mcount_nonpic_reg= - fi - mcount_nonpic_call=`grep 'call.*mcount' conftest.s` - if test -z "$mcount_nonpic_call"; then - as_fn_error $? "Cannot find mcount call for non-PIC" "$LINENO" 5 - fi - else - as_fn_error $? "Cannot compile test program for non-PIC" "$LINENO" 5 - fi -fi - -if test "$enable_shared" = yes; then - gmp_asmout_compile="$CC $CFLAGS $CPPFLAGS $lt_prog_compiler_pic -S conftest.c 1>&5" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_asmout_compile\""; } >&5 - (eval $gmp_asmout_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if grep '\.data' conftest.s >/dev/null; then - case $lt_prog_compiler_pic in - *-DDLL_EXPORT*) - # Windows DLLs have non-PIC style mcount - mcount_pic_reg=`sed -n '/esp/!s/.*movl.*,\(%[a-z]*\).*$/\1/p' conftest.s` - ;; - *) - mcount_pic_reg=`sed -n 's/.*GOTOFF.*,\(%[a-z]*\).*$/\1/p' conftest.s` - ;; - esac - else - mcount_pic_reg= - fi - mcount_pic_call=`grep 'call.*mcount' conftest.s` - if test -z "$mcount_pic_call"; then - as_fn_error $? "Cannot find mcount call for PIC" "$LINENO" 5 - fi - else - as_fn_error $? "Cannot compile test program for PIC" "$LINENO" 5 - fi -fi - - -echo "define(<MCOUNT_NONPIC_REG>, <\`$mcount_nonpic_reg'>)" >> $gmp_tmpconfigm4 - - -echo "define(<MCOUNT_NONPIC_CALL>,<\`$mcount_nonpic_call'>)" >> $gmp_tmpconfigm4 - - -echo "define(<MCOUNT_PIC_REG>, <\`$mcount_pic_reg'>)" >> $gmp_tmpconfigm4 - - -echo "define(<MCOUNT_PIC_CALL>, <\`$mcount_pic_call'>)" >> $gmp_tmpconfigm4 - - -rm -f conftest.* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: determined" >&5 -$as_echo "determined" >&6; } - ;; - esac - case $host in - *-*-darwin*) - -echo "include_mpn(\`x86/darwin.m4')" >> $gmp_tmpconfigm4i - ;; - esac - ;; - 64|x32) - -echo "include_mpn(\`x86_64/x86_64-defs.m4')" >> $gmp_tmpconfigm4i - - $as_echo "@%:@define HAVE_HOST_CPU_FAMILY_x86_64 1" >>confdefs.h - - case $host in - *-*-darwin*) - -echo "include_mpn(\`x86_64/darwin.m4')" >> $gmp_tmpconfigm4i - ;; - *-*-mingw* | *-*-cygwin) - -echo "include_mpn(\`x86_64/dos64.m4')" >> $gmp_tmpconfigm4i - ;; - *-openbsd*) - -echo "define(<OPENBSD>,1)" >> $gmp_tmpconfigm4 - ;; - esac - ;; - esac - ;; - esac -fi - -# For --enable-minithres, prepend "minithres" to path so that its special -# gmp-mparam.h will be used. -if test $enable_minithres = yes; then - path="minithres $path" -fi - -# Create link for gmp-mparam.h. -gmp_mparam_source= -for gmp_mparam_dir in $path; do - test "$no_create" = yes || rm -f gmp-mparam.h - tmp_file=$srcdir/mpn/$gmp_mparam_dir/gmp-mparam.h - if test -f $tmp_file; then - ac_config_links="$ac_config_links gmp-mparam.h:mpn/$gmp_mparam_dir/gmp-mparam.h" - - gmp_srclinks="$gmp_srclinks gmp-mparam.h" - gmp_mparam_source=$tmp_file - break - fi -done -if test -z "$gmp_mparam_source"; then - as_fn_error $? "no version of gmp-mparam.h found in path: $path" "$LINENO" 5 -fi - -# For a helpful message from tune/tuneup.c -gmp_mparam_suggest=$gmp_mparam_source -if test "$gmp_mparam_dir" = generic; then - for i in $path; do break; done - if test "$i" != generic; then - gmp_mparam_suggest="new file $srcdir/mpn/$i/gmp-mparam.h" - fi -fi - -cat >>confdefs.h <<_ACEOF -@%:@define GMP_MPARAM_H_SUGGEST "$gmp_mparam_source" -_ACEOF - - - -# Copy relevant parameters from gmp-mparam.h to config.m4. -# We only do this for parameters that are used by some assembly files. -# Fat binaries do this on a per-file basis, so skip in that case. -# -if test -z "$fat_path"; then - for i in SQR_TOOM2_THRESHOLD BMOD_1_TO_MOD_1_THRESHOLD SHLD_SLOW SHRD_SLOW; do - value=`sed -n 's/^#define '$i'[ ]*\([0-9][0-9]*\).*$/\1/p' $gmp_mparam_source` - if test -n "$value"; then - -echo "define(<$i>,<$value>)" >> $gmp_tmpconfigm4 - - fi - done -fi - - -# Sizes of some types, needed at preprocessing time. -# -# FIXME: The assumption that GMP_LIMB_BITS is 8*sizeof(mp_limb_t) might -# be slightly rash, but it's true everywhere we know of and ought to be true -# of any sensible system. In a generic C build, grepping LONG_BIT out of -# <limits.h> might be an alternative, for maximum portability. -# -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 -$as_echo_n "checking size of void *... " >&6; } -if ${ac_cv_sizeof_void_p+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_void_p" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (void *) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_void_p=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 -$as_echo "$ac_cv_sizeof_void_p" >&6; } - - - -cat >>confdefs.h <<_ACEOF -@%:@define SIZEOF_VOID_P $ac_cv_sizeof_void_p -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned short" >&5 -$as_echo_n "checking size of unsigned short... " >&6; } -if ${ac_cv_sizeof_unsigned_short+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned short))" "ac_cv_sizeof_unsigned_short" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_unsigned_short" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (unsigned short) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_unsigned_short=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_short" >&5 -$as_echo "$ac_cv_sizeof_unsigned_short" >&6; } - - - -cat >>confdefs.h <<_ACEOF -@%:@define SIZEOF_UNSIGNED_SHORT $ac_cv_sizeof_unsigned_short -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned" >&5 -$as_echo_n "checking size of unsigned... " >&6; } -if ${ac_cv_sizeof_unsigned+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned))" "ac_cv_sizeof_unsigned" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_unsigned" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (unsigned) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_unsigned=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned" >&5 -$as_echo "$ac_cv_sizeof_unsigned" >&6; } - - - -cat >>confdefs.h <<_ACEOF -@%:@define SIZEOF_UNSIGNED $ac_cv_sizeof_unsigned -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 -$as_echo_n "checking size of unsigned long... " >&6; } -if ${ac_cv_sizeof_unsigned_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_unsigned_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (unsigned long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_unsigned_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 -$as_echo "$ac_cv_sizeof_unsigned_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -@%:@define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of mp_limb_t" >&5 -$as_echo_n "checking size of mp_limb_t... " >&6; } -if ${ac_cv_sizeof_mp_limb_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (mp_limb_t))" "ac_cv_sizeof_mp_limb_t" "#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ -#define GMP_NAIL_BITS $GMP_NAIL_BITS -#define GMP_LIMB_BITS 123 -$DEFN_LONG_LONG_LIMB -#include \"$srcdir/gmp-h.in\" - -"; then : - -else - if test "$ac_cv_type_mp_limb_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (mp_limb_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_mp_limb_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_mp_limb_t" >&5 -$as_echo "$ac_cv_sizeof_mp_limb_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -@%:@define SIZEOF_MP_LIMB_T $ac_cv_sizeof_mp_limb_t -_ACEOF - - -if test "$ac_cv_sizeof_mp_limb_t" = 0; then - as_fn_error $? "Oops, mp_limb_t doesn't seem to work" "$LINENO" 5 -fi -GMP_LIMB_BITS=`expr 8 \* $ac_cv_sizeof_mp_limb_t` - - -echo "define(<SIZEOF_UNSIGNED>,<$ac_cv_sizeof_unsigned>)" >> $gmp_tmpconfigm4 - - -# Check compiler limb size matches gmp-mparam.h -# -# FIXME: Some of the cycle counter objects in the tune directory depend on -# the size of ulong, it'd be possible to check that here, though a mismatch -# probably wouldn't want to be fatal, none of the libgmp assembler code -# depends on ulong. -# -mparam_bits=`sed -n 's/^#define GMP_LIMB_BITS[ ][ ]*\([0-9]*\).*$/\1/p' $gmp_mparam_source` -if test -n "$mparam_bits" && test "$mparam_bits" -ne $GMP_LIMB_BITS; then - if test "$test_CFLAGS" = set; then - as_fn_error $? "Oops, mp_limb_t is $GMP_LIMB_BITS bits, but the assembler code -in this configuration expects $mparam_bits bits. -You appear to have set \$CFLAGS, perhaps you also need to tell GMP the -intended ABI, see \"ABI and ISA\" in the manual." "$LINENO" 5 - else - as_fn_error $? "Oops, mp_limb_t is $GMP_LIMB_BITS bits, but the assembler code -in this configuration expects $mparam_bits bits." "$LINENO" 5 - fi -fi - - -echo "define(<GMP_LIMB_BITS>,$GMP_LIMB_BITS)" >> $gmp_tmpconfigm4 - - -echo "define(<GMP_NAIL_BITS>,$GMP_NAIL_BITS)" >> $gmp_tmpconfigm4 - - -echo "define(<GMP_NUMB_BITS>,eval(GMP_LIMB_BITS-GMP_NAIL_BITS))" >> $gmp_tmpconfigm4 - - - - - - - - -# A recompiled sqr_basecase for use in the tune program, if necessary. -TUNE_SQR_OBJ= -test -d tune || mkdir tune -case $sqr_basecase_source in - *.asm) - sqr_max=`sed -n 's/^def...(SQR_TOOM2_THRESHOLD_MAX, *\([0-9]*\))/\1/p' $sqr_basecase_source` - if test -n "$sqr_max"; then - TUNE_SQR_OBJ=sqr_asm.o - -cat >>confdefs.h <<_ACEOF -@%:@define TUNE_SQR_TOOM2_MAX $sqr_max -_ACEOF - - fi - cat >tune/sqr_basecase.c <<EOF -/* not sure that an empty file can compile, so put in a dummy */ -int sqr_basecase_dummy; -EOF - ;; - *.c) - TUNE_SQR_OBJ= - $as_echo "@%:@define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC" >>confdefs.h - - cat >tune/sqr_basecase.c <<EOF -#define TUNE_PROGRAM_BUILD 1 -#define TUNE_PROGRAM_BUILD_SQR 1 -#include "mpn/sqr_basecase.c" -EOF - ;; -esac - - - -# Configs for demos/pexpr.c. -# -ac_config_files="$ac_config_files demos/pexpr-config.h:demos/pexpr-config-h.in" - -case $ac_cv_func_clock in -yes) HAVE_CLOCK_01=1 - ;; -no) HAVE_CLOCK_01=0 ;; -esac - -case $ac_cv_func_cputime in -yes) HAVE_CPUTIME_01=1 - ;; -no) HAVE_CPUTIME_01=0 ;; -esac - -case $ac_cv_func_getrusage in -yes) HAVE_GETRUSAGE_01=1 - ;; -no) HAVE_GETRUSAGE_01=0 ;; -esac - -case $ac_cv_func_gettimeofday in -yes) HAVE_GETTIMEOFDAY_01=1 - ;; -no) HAVE_GETTIMEOFDAY_01=0 ;; -esac - -case $ac_cv_func_sigaction in -yes) HAVE_SIGACTION_01=1 - ;; -no) HAVE_SIGACTION_01=0 ;; -esac - -case $ac_cv_func_sigaltstack in -yes) HAVE_SIGALTSTACK_01=1 - ;; -no) HAVE_SIGALTSTACK_01=0 ;; -esac - -case $ac_cv_func_sigstack in -yes) HAVE_SIGSTACK_01=1 - ;; -no) HAVE_SIGSTACK_01=0 ;; -esac - - -case $ac_cv_header_sys_resource_h in -yes) HAVE_SYS_RESOURCE_H_01=1 - ;; -no) HAVE_SYS_RESOURCE_H_01=0 ;; -esac - - -ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include <signal.h> -" -if test "x$ac_cv_type_stack_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -@%:@define HAVE_STACK_T 1 -_ACEOF - -HAVE_STACK_T_01=1 -else - HAVE_STACK_T_01=0 -fi - - - -# Configs for demos/calc directory -# -# AC_SUBST+AC_CONFIG_FILES is used for calc-config.h, rather than AC_DEFINE+ -# AC_CONFIG_HEADERS, since with the latter automake (1.8) will then put the -# directory (ie. demos/calc) into $(DEFAULT_INCLUDES) for every Makefile.in, -# which would look very strange. -# -# -lcurses is required by libreadline. On a typical SVR4 style system this -# normally doesn't have to be given explicitly, since libreadline.so will -# have a NEEDED record for it. But if someone for some reason is using only -# a static libreadline.a then we must give -lcurses. Readline (as of -# version 4.3) doesn't use libtool, so we can't rely on a .la to cover -# necessary dependencies. -# -# On a couple of systems we've seen libreadline available, but the headers -# not in the default include path, so check for readline/readline.h. We've -# also seen readline/history.h missing, not sure if that's just a broken -# install or a very old version, but check that too. -# -ac_config_files="$ac_config_files demos/calc/calc-config.h:demos/calc/calc-config-h.in" - -LIBCURSES= -if test $with_readline != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lncurses" >&5 -$as_echo_n "checking for tputs in -lncurses... " >&6; } -if ${ac_cv_lib_ncurses_tputs+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lncurses $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tputs (); -int -main () -{ -return tputs (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ncurses_tputs=yes -else - ac_cv_lib_ncurses_tputs=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tputs" >&5 -$as_echo "$ac_cv_lib_ncurses_tputs" >&6; } -if test "x$ac_cv_lib_ncurses_tputs" = xyes; then : - LIBCURSES=-lncurses -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lcurses" >&5 -$as_echo_n "checking for tputs in -lcurses... " >&6; } -if ${ac_cv_lib_curses_tputs+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcurses $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tputs (); -int -main () -{ -return tputs (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_curses_tputs=yes -else - ac_cv_lib_curses_tputs=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tputs" >&5 -$as_echo "$ac_cv_lib_curses_tputs" >&6; } -if test "x$ac_cv_lib_curses_tputs" = xyes; then : - LIBCURSES=-lcurses -fi - -fi - -fi - -use_readline=$with_readline -if test $with_readline = detect; then - use_readline=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 -$as_echo_n "checking for readline in -lreadline... " >&6; } -if ${ac_cv_lib_readline_readline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lreadline $LIBCURSES $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char readline (); -int -main () -{ -return readline (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_readline_readline=yes -else - ac_cv_lib_readline_readline=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 -$as_echo "$ac_cv_lib_readline_readline" >&6; } -if test "x$ac_cv_lib_readline_readline" = xyes; then : - ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_readline_h" = xyes; then : - ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_history_h" = xyes; then : - use_readline=yes -fi - - -fi - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking readline detected" >&5 -$as_echo_n "checking readline detected... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_readline" >&5 -$as_echo "$use_readline" >&6; } -fi -if test $use_readline = yes; then - WITH_READLINE_01=1 - - LIBREADLINE=-lreadline - -else - WITH_READLINE_01=0 -fi -for ac_prog in 'bison -y' byacc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_YACC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_YACC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -YACC=$ac_cv_prog_YACC -if test -n "$YACC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 -$as_echo "$YACC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$YACC" && break -done -test -n "$YACC" || YACC="yacc" - -for ac_prog in flex lex -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LEX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LEX"; then - ac_cv_prog_LEX="$LEX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LEX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LEX=$ac_cv_prog_LEX -if test -n "$LEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 -$as_echo "$LEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$LEX" && break -done -test -n "$LEX" || LEX=":" - -if test "x$LEX" != "x:"; then - cat >conftest.l <<_ACEOF -%% -a { ECHO; } -b { REJECT; } -c { yymore (); } -d { yyless (1); } -e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ - yyless ((input () != 0)); } -f { unput (yytext[0]); } -. { BEGIN INITIAL; } -%% -#ifdef YYTEXT_POINTER -extern char *yytext; -#endif -int -main (void) -{ - return ! yylex () + ! yywrap (); -} -_ACEOF -{ { ac_try="$LEX conftest.l" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$LEX conftest.l") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 -$as_echo_n "checking lex output file root... " >&6; } -if ${ac_cv_prog_lex_root+:} false; then : - $as_echo_n "(cached) " >&6 -else - -if test -f lex.yy.c; then - ac_cv_prog_lex_root=lex.yy -elif test -f lexyy.c; then - ac_cv_prog_lex_root=lexyy -else - as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 -$as_echo "$ac_cv_prog_lex_root" >&6; } -LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root - -if test -z "${LEXLIB+set}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 -$as_echo_n "checking lex library... " >&6; } -if ${ac_cv_lib_lex+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ac_save_LIBS=$LIBS - ac_cv_lib_lex='none needed' - for ac_lib in '' -lfl -ll; do - LIBS="$ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lex=$ac_lib -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - test "$ac_cv_lib_lex" != 'none needed' && break - done - LIBS=$ac_save_LIBS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 -$as_echo "$ac_cv_lib_lex" >&6; } - test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 -$as_echo_n "checking whether yytext is a pointer... " >&6; } -if ${ac_cv_prog_lex_yytext_pointer+:} false; then : - $as_echo_n "(cached) " >&6 -else - # POSIX says lex can declare yytext either as a pointer or an array; the -# default is implementation-dependent. Figure out which it is, since -# not all implementations provide the %pointer and %array declarations. -ac_cv_prog_lex_yytext_pointer=no -ac_save_LIBS=$LIBS -LIBS="$LEXLIB $ac_save_LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #define YYTEXT_POINTER 1 -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_prog_lex_yytext_pointer=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_save_LIBS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 -$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } -if test $ac_cv_prog_lex_yytext_pointer = yes; then - -$as_echo "@%:@define YYTEXT_POINTER 1" >>confdefs.h - -fi -rm -f conftest.l $LEX_OUTPUT_ROOT.c - -fi -if test "$LEX" = :; then - LEX=${am_missing_run}flex -fi - -# Configs for demos/expr directory -# -# Libtool already runs an AC_CHECK_TOOL for ranlib, but we give -# AC_PROG_RANLIB anyway since automake is supposed to complain if it's not -# called. (Automake 1.8.4 doesn't, at least not when the only library is in -# an EXTRA_LIBRARIES.) -# -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - - - -# Create config.m4. - -echo "creating $gmp_configm4" -echo "d""nl $gmp_configm4. Generated automatically by configure." > $gmp_configm4 -if test -f $gmp_tmpconfigm4; then - echo "changequote(<,>)" >> $gmp_configm4 - echo "ifdef(<__CONFIG_M4_INCLUDED__>,,<" >> $gmp_configm4 - cat $gmp_tmpconfigm4 >> $gmp_configm4 - echo ">)" >> $gmp_configm4 - echo "changequote(\`,')" >> $gmp_configm4 - rm $gmp_tmpconfigm4 -fi -echo "ifdef(\`__CONFIG_M4_INCLUDED__',,\`" >> $gmp_configm4 -if test -f $gmp_tmpconfigm4i; then - cat $gmp_tmpconfigm4i >> $gmp_configm4 - rm $gmp_tmpconfigm4i -fi -if test -f $gmp_tmpconfigm4p; then - cat $gmp_tmpconfigm4p >> $gmp_configm4 - rm $gmp_tmpconfigm4p -fi -echo "')" >> $gmp_configm4 -echo "define(\`__CONFIG_M4_INCLUDED__')" >> $gmp_configm4 - - -# Create Makefiles -# FIXME: Upcoming version of autoconf/automake may not like broken lines. -# Right now automake isn't accepting the new AC_CONFIG_FILES scheme. - -ac_config_files="$ac_config_files Makefile mpf/Makefile mpn/Makefile mpq/Makefile mpz/Makefile printf/Makefile scanf/Makefile rand/Makefile cxx/Makefile tests/Makefile tests/devel/Makefile tests/mpf/Makefile tests/mpn/Makefile tests/mpq/Makefile tests/mpz/Makefile tests/rand/Makefile tests/misc/Makefile tests/cxx/Makefile doc/Makefile tune/Makefile demos/Makefile demos/calc/Makefile demos/expr/Makefile gmp.h:gmp-h.in" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIB@&t@OBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WANT_CXX_TRUE}" && test -z "${WANT_CXX_FALSE}"; then - as_fn_error $? "conditional \"WANT_CXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${ENABLE_STATIC_TRUE}" && test -z "${ENABLE_STATIC_FALSE}"; then - as_fn_error $? "conditional \"ENABLE_STATIC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in @%:@( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in @%:@(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] -@%:@ ---------------------------------------- -@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are -@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the -@%:@ script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} @%:@ as_fn_error - - -@%:@ as_fn_set_status STATUS -@%:@ ----------------------- -@%:@ Set @S|@? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} @%:@ as_fn_set_status - -@%:@ as_fn_exit STATUS -@%:@ ----------------- -@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} @%:@ as_fn_exit - -@%:@ as_fn_unset VAR -@%:@ --------------- -@%:@ Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -@%:@ as_fn_append VAR VALUE -@%:@ ---------------------- -@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take -@%:@ advantage of any shell optimizations that allow amortized linear growth over -@%:@ repeated appends, instead of the typical quadratic growth present in naive -@%:@ implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -@%:@ as_fn_arith ARG... -@%:@ ------------------ -@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the -@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments -@%:@ must be portable across @S|@(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in @%:@((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -@%:@ as_fn_mkdir_p -@%:@ ------------- -@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} @%:@ as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -@%:@ as_fn_executable_p FILE -@%:@ ----------------------- -@%:@ Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} @%:@ as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by GNU MP $as_me 6.1.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_links="$ac_config_links" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration links: -$config_links - -Configuration commands: -$config_commands - -Report bugs to <gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html>. -GNU MP home page: <http://www.gnu.org/software/gmp/>. -General help using GNU software: <http://www.gnu.org/gethelp/>." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -GNU MP config.status 6.1.0 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX -@%:@@%:@ Running $as_me. @%:@@%:@ -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' -configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' -predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' -predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' -postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' -reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' -reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in NM \ -AS \ -DLLTOOL \ -OBJDUMP \ -SHELL \ -ECHO \ -PATH_SEPARATOR \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_import \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_cv_nm_interface \ -nm_file_list_spec \ -lt_cv_truncate_bin \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib \ -compiler_lib_search_dirs \ -predep_objects \ -postdep_objects \ -predeps \ -postdeps \ -compiler_lib_search_path \ -LD_CXX \ -reload_flag_CXX \ -compiler_CXX \ -lt_prog_compiler_no_builtin_flag_CXX \ -lt_prog_compiler_pic_CXX \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_static_CXX \ -lt_cv_prog_compiler_c_o_CXX \ -export_dynamic_flag_spec_CXX \ -whole_archive_flag_spec_CXX \ -compiler_needs_object_CXX \ -with_gnu_ld_CXX \ -allow_undefined_flag_CXX \ -no_undefined_flag_CXX \ -hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_separator_CXX \ -exclude_expsyms_CXX \ -include_expsyms_CXX \ -file_list_spec_CXX \ -compiler_lib_search_dirs_CXX \ -predep_objects_CXX \ -postdep_objects_CXX \ -predeps_CXX \ -postdeps_CXX \ -compiler_lib_search_path_CXX; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -configure_time_dlsearch_path \ -configure_time_lt_sys_library_path \ -reload_cmds_CXX \ -old_archive_cmds_CXX \ -old_archive_from_new_cmds_CXX \ -old_archive_from_expsyms_cmds_CXX \ -archive_cmds_CXX \ -archive_expsym_cmds_CXX \ -module_cmds_CXX \ -module_expsym_cmds_CXX \ -export_symbols_cmds_CXX \ -prelink_cmds_CXX \ -postlink_cmds_CXX; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' - -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile' - - - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "mpn/$tmp_fn.$tmp_ext") CONFIG_LINKS="$CONFIG_LINKS mpn/$tmp_fn.$tmp_ext:mpn/$tmp_dir/$tmp_base.$tmp_ext" ;; - "gmp-mparam.h") CONFIG_LINKS="$CONFIG_LINKS gmp-mparam.h:mpn/$gmp_mparam_dir/gmp-mparam.h" ;; - "demos/pexpr-config.h") CONFIG_FILES="$CONFIG_FILES demos/pexpr-config.h:demos/pexpr-config-h.in" ;; - "demos/calc/calc-config.h") CONFIG_FILES="$CONFIG_FILES demos/calc/calc-config.h:demos/calc/calc-config-h.in" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "mpf/Makefile") CONFIG_FILES="$CONFIG_FILES mpf/Makefile" ;; - "mpn/Makefile") CONFIG_FILES="$CONFIG_FILES mpn/Makefile" ;; - "mpq/Makefile") CONFIG_FILES="$CONFIG_FILES mpq/Makefile" ;; - "mpz/Makefile") CONFIG_FILES="$CONFIG_FILES mpz/Makefile" ;; - "printf/Makefile") CONFIG_FILES="$CONFIG_FILES printf/Makefile" ;; - "scanf/Makefile") CONFIG_FILES="$CONFIG_FILES scanf/Makefile" ;; - "rand/Makefile") CONFIG_FILES="$CONFIG_FILES rand/Makefile" ;; - "cxx/Makefile") CONFIG_FILES="$CONFIG_FILES cxx/Makefile" ;; - "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - "tests/devel/Makefile") CONFIG_FILES="$CONFIG_FILES tests/devel/Makefile" ;; - "tests/mpf/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mpf/Makefile" ;; - "tests/mpn/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mpn/Makefile" ;; - "tests/mpq/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mpq/Makefile" ;; - "tests/mpz/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mpz/Makefile" ;; - "tests/rand/Makefile") CONFIG_FILES="$CONFIG_FILES tests/rand/Makefile" ;; - "tests/misc/Makefile") CONFIG_FILES="$CONFIG_FILES tests/misc/Makefile" ;; - "tests/cxx/Makefile") CONFIG_FILES="$CONFIG_FILES tests/cxx/Makefile" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "tune/Makefile") CONFIG_FILES="$CONFIG_FILES tune/Makefile" ;; - "demos/Makefile") CONFIG_FILES="$CONFIG_FILES demos/Makefile" ;; - "demos/calc/Makefile") CONFIG_FILES="$CONFIG_FILES demos/calc/Makefile" ;; - "demos/expr/Makefile") CONFIG_FILES="$CONFIG_FILES demos/expr/Makefile" ;; - "gmp.h") CONFIG_FILES="$CONFIG_FILES gmp.h:gmp-h.in" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' <conf$$subs.awk | sed ' -/^[^""]/{ - N - s/\n// -} -' >>$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' <confdefs.h | sed ' -s/'"$ac_delim"'/"\\\ -"/g' >>$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - :L) - # - # CONFIG_LINK - # - - if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then - : - else - # Prefer the file from the source tree if names are identical. - if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then - ac_source=$srcdir/$ac_source - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 -$as_echo "$as_me: linking $ac_source to $ac_file" >&6;} - - if test ! -r "$ac_source"; then - as_fn_error $? "$ac_source: file not found" "$LINENO" 5 - fi - rm -f "$ac_file" - - # Try a relative symlink, then a hard link, then a copy. - case $ac_source in - [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; - *) ac_rel_source=$ac_top_build_prefix$ac_source ;; - esac - ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || - ln "$ac_source" "$ac_file" 2>/dev/null || - cp -p "$ac_source" "$ac_file" || - as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 - fi - ;; - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "libtool":C) - - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - - -# The names of the tagged configurations supported by this script. -available_tags='CXX ' - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Assembler program. -AS=$lt_AS - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Object dumper program. -OBJDUMP=$lt_OBJDUMP - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec=$shared_archive_member_spec - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm into a list of symbols to manually relocate. -global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name lister interface. -nm_interface=$lt_lt_cv_nm_interface - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and where our libraries should be installed. -lt_sysroot=$lt_sysroot - -# Command to truncate a binary pipe. -lt_truncate_bin=$lt_lt_cv_truncate_bin - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects -postdep_objects=$lt_postdep_objects -predeps=$lt_predeps -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x@S|@2 in - x) - ;; - *:) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" - ;; - x:*) - eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" - ;; - *) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in @S|@*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain=$ac_aux_dir/ltmain.sh - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# How to create reloadable object files. -reload_flag=$lt_reload_flag_CXX -reload_cmds=$lt_reload_cmds_CXX - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_CXX - -# A language specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU compiler? -with_gcc=$GCC_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_CXX - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_CXX - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_CXX - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_CXX - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_CXX - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds_CXX - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_CXX - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_CXX -postdep_objects=$lt_postdep_objects_CXX -predeps=$lt_predeps_CXX -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# ### END LIBTOOL TAG CONFIG: CXX -_LT_EOF - - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: summary of build options: - - Version: ${PACKAGE_STRING} - Host type: ${host} - ABI: ${ABI} - Install prefix: ${prefix} - Compiler: ${CC} - Static libraries: ${enable_static} - Shared libraries: ${enable_shared} -" >&5 -$as_echo "$as_me: summary of build options: - - Version: ${PACKAGE_STRING} - Host type: ${host} - ABI: ${ABI} - Install prefix: ${prefix} - Compiler: ${CC} - Static libraries: ${enable_static} - Shared libraries: ${enable_shared} -" >&6;} - -if test x$cross_compiling = xyes ; then - case "$host" in - *-*-mingw* | *-*-cygwin) - if test x$ABI = x64 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: If wine64 is installed, use make check TESTS_ENVIRONMENT=wine64." >&5 -$as_echo "$as_me: If wine64 is installed, use make check TESTS_ENVIRONMENT=wine64." >&6;} - else - { $as_echo "$as_me:${as_lineno-$LINENO}: If wine is installed, use make check TESTS_ENVIRONMENT=wine." >&5 -$as_echo "$as_me: If wine is installed, use make check TESTS_ENVIRONMENT=wine." >&6;} - fi - ;; - esac -fi diff --git a/src/plugins/e-acsl/contrib/libgmp/autom4te.cache/requests b/src/plugins/e-acsl/contrib/libgmp/autom4te.cache/requests deleted file mode 100644 index 1e5ccc46890..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/autom4te.cache/requests +++ /dev/null @@ -1,393 +0,0 @@ -# This file was generated. -# It contains the lists of macros which have been traced. -# It can be safely removed. - -@request = ( - bless( [ - '0', - 1, - [ - '/usr/share/autoconf-2.69' - ], - [ - '/usr/share/autoconf-2.69/autoconf/autoconf.m4f', - '-', - '/usr/share/aclocal-1.15/internal/ac-config-macro-dirs.m4', - '/usr/share/aclocal/libtool.m4', - '/usr/share/aclocal/ltargz.m4', - '/usr/share/aclocal/ltdl.m4', - '/usr/share/aclocal/ltoptions.m4', - '/usr/share/aclocal/ltsugar.m4', - '/usr/share/aclocal/ltversion.m4', - '/usr/share/aclocal/lt~obsolete.m4', - '/usr/share/aclocal-1.15/amversion.m4', - '/usr/share/aclocal-1.15/auxdir.m4', - '/usr/share/aclocal-1.15/cond.m4', - '/usr/share/aclocal-1.15/depend.m4', - '/usr/share/aclocal-1.15/depout.m4', - '/usr/share/aclocal-1.15/init.m4', - '/usr/share/aclocal-1.15/install-sh.m4', - '/usr/share/aclocal-1.15/lead-dot.m4', - '/usr/share/aclocal-1.15/lex.m4', - '/usr/share/aclocal-1.15/maintainer.m4', - '/usr/share/aclocal-1.15/make.m4', - '/usr/share/aclocal-1.15/missing.m4', - '/usr/share/aclocal-1.15/options.m4', - '/usr/share/aclocal-1.15/prog-cc-c-o.m4', - '/usr/share/aclocal-1.15/runlog.m4', - '/usr/share/aclocal-1.15/sanity.m4', - '/usr/share/aclocal-1.15/silent.m4', - '/usr/share/aclocal-1.15/strip.m4', - '/usr/share/aclocal-1.15/substnot.m4', - '/usr/share/aclocal-1.15/tar.m4', - 'acinclude.m4', - 'configure.ac' - ], - { - 'GMP_ASM_SPARC_GOTDATA' => 1, - 'LT_SYS_DLSEARCH_PATH' => 1, - 'GMP_ASM_X86_MULX' => 1, - 'GMP_CRAY_OPTIONS' => 1, - 'GMP_HPC_HPPA_2_0' => 1, - 'GMP_ASM_M68K_BRANCHES' => 1, - 'GMP_C_DOUBLE_FORMAT' => 1, - 'GMP_C_FOR_BUILD_ANSI' => 1, - '_LT_AC_LANG_F77' => 1, - '_m4_warn' => 1, - '_AM_SUBST_NOTMAKE' => 1, - 'GMP_ASM_POWERPC_PIC_ALWAYS' => 1, - 'm4_include' => 1, - '_AM_MANGLE_OPTION' => 1, - 'AC_CONFIG_MACRO_DIR' => 1, - 'AC_ENABLE_STATIC' => 1, - 'GMP_ASM_BYTE' => 1, - '_AM_DEPENDENCIES' => 1, - 'GMP_PROG_M4' => 1, - 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, - '_LT_AC_SHELL_INIT' => 1, - '_LT_COMPILER_OPTION' => 1, - 'GMP_ASM_ALIGN_FILL_0x90' => 1, - 'GMP_OPTION_ALLOCA' => 1, - '_LT_AC_TRY_DLOPEN_SELF' => 1, - '_AM_AUTOCONF_VERSION' => 1, - 'GMP_C_TEST_SIZEOF' => 1, - 'GMP_PROG_CC_FOR_BUILD' => 1, - 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, - 'GMP_ASM_X86_MMX' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'AC_CHECK_LIBM' => 1, - 'LT_PATH_LD' => 1, - 'LT_AC_PROG_RC' => 1, - 'GMP_CHECK_LIBM_FOR_BUILD' => 1, - 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, - 'AC_PROG_LD' => 1, - '_AM_PROG_TAR' => 1, - '_LT_PROG_F77' => 1, - 'AM_CONDITIONAL' => 1, - 'LT_WITH_LTDL' => 1, - 'GMP_M4_M4WRAP_SPURIOUS' => 1, - 'AC_LTDL_SYSSEARCHPATH' => 1, - '_LT_AC_CHECK_DLFCN' => 1, - 'AU_DEFUN' => 1, - 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, - 'AM_MISSING_PROG' => 1, - 'AC_LIBTOOL_PICMODE' => 1, - 'AM_PROG_CC_C_O' => 1, - 'AM_PROG_LEX' => 1, - 'AC_LIBTOOL_CXX' => 1, - 'AC_LTDL_SHLIBEXT' => 1, - 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, - '_LT_AC_LANG_GCJ_CONFIG' => 1, - 'LT_LANG' => 1, - 'm4_pattern_forbid' => 1, - '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - 'LT_CMD_MAX_LEN' => 1, - '_LT_AC_FILE_LTDLL_C' => 1, - 'LT_FUNC_DLSYM_USCORE' => 1, - 'GMP_PROG_CC_WORKS_LONGLONG' => 1, - 'GMP_PROG_CC_X86_GOT_EAX_EMITTED' => 1, - 'GMP_COMPARE_GE_INTERNAL' => 1, - 'GMP_SUBST_CHECK_FUNCS' => 1, - 'GMP_ASM_IA64_ALIGN_OK' => 1, - '_AC_AM_CONFIG_HEADER_HOOK' => 1, - 'AC_LIBTOOL_LANG_C_CONFIG' => 1, - 'AC_PROG_LD_GNU' => 1, - 'GMP_PROG_CC_WORKS' => 1, - 'm4_pattern_allow' => 1, - 'GMP_ASM_X86_MCOUNT' => 1, - 'AC_LTDL_SYS_DLOPEN_DEPLIBS' => 1, - 'AM_SUBST_NOTMAKE' => 1, - 'AM_MISSING_HAS_RUN' => 1, - 'LT_AC_PROG_SED' => 1, - 'LTSUGAR_VERSION' => 1, - 'AM_PROG_LIBTOOL' => 1, - 'GMP_ASM_LSYM_PREFIX' => 1, - 'GMP_INCLUDE_MPN' => 1, - 'AC_LIBLTDL_CONVENIENCE' => 1, - 'AM_PROG_INSTALL_SH' => 1, - '_LTDL_SETUP' => 1, - 'AM_RUN_LOG' => 1, - 'GMP_ASM_ALIGN_LOG' => 1, - '_LT_COMPILER_BOILERPLATE' => 1, - 'LT_PROG_RC' => 1, - 'GMP_SUBST_CHECK_HEADERS' => 1, - 'AC_LIB_LTDL' => 1, - 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, - 'AC_WITH_LTDL' => 1, - '_AM_SET_OPTION' => 1, - 'AC_DEFUN_ONCE' => 1, - 'GMP_ASM_TEXT' => 1, - 'LT_INIT' => 1, - '_LT_LIBOBJ' => 1, - 'LT_AC_PROG_EGREP' => 1, - 'GMP_ASM_GLOBL_ATTR' => 1, - 'AC_LIBTOOL_DLOPEN_SELF' => 1, - 'AC_LIBTOOL_SETUP' => 1, - '_LT_PROG_CXX' => 1, - 'AC_LTDL_SHLIBPATH' => 1, - 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, - 'AM_MAINTAINER_MODE' => 1, - 'AC_LTDL_ENABLE_INSTALL' => 1, - 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, - 'AC_PROG_EGREP' => 1, - 'GMP_PROG_CC_IS_GNU' => 1, - '_LT_AC_PROG_CXXCPP' => 1, - 'GMP_GCC_MIPS_O32' => 1, - 'AC_LIBTOOL_CONFIG' => 1, - 'LTVERSION_VERSION' => 1, - '_LT_REQUIRED_DARWIN_CHECKS' => 1, - '_LT_AC_SYS_COMPILER' => 1, - 'AC_LIBTOOL_FC' => 1, - 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, - 'GMP_FUNC_ALLOCA' => 1, - '_LT_PROG_LTMAIN' => 1, - 'GMP_HPPA_LEVEL_20' => 1, - 'LT_AC_PROG_GCJ' => 1, - '_LT_LINKER_BOILERPLATE' => 1, - 'GMP_ASM_GLOBL' => 1, - 'GMP_ASM_RODATA' => 1, - '_LT_AC_LANG_GCJ' => 1, - 'GMP_FUNC_VSNPRINTF' => 1, - 'AC_LIBTOOL_LINKER_OPTION' => 1, - '_LT_AC_LANG_C_CONFIG' => 1, - 'AM_PROG_LD' => 1, - 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, - 'LTDL_INIT' => 1, - 'AC_LIBTOOL_COMPILER_OPTION' => 1, - 'LT_SUPPORTED_TAG' => 1, - '_AM_IF_OPTION' => 1, - 'AC_DISABLE_FAST_INSTALL' => 1, - 'GMP_TRY_ASSEMBLE' => 1, - 'AM_ENABLE_SHARED' => 1, - 'AM_DEP_TRACK' => 1, - '_AM_SET_OPTIONS' => 1, - 'LTOPTIONS_VERSION' => 1, - 'AC_LTDL_DLLIB' => 1, - 'AC_DEPLIBS_CHECK_METHOD' => 1, - 'GMP_ASM_M68K_ADDRESSING' => 1, - 'GMP_GCC_WA_MCPU' => 1, - 'GMP_PROG_CC_FOR_BUILD_WORKS' => 1, - 'GMP_FUNC_SSCANF_WRITABLE_INPUT' => 1, - '_LT_AC_LANG_F77_CONFIG' => 1, - 'GMP_ASM_X86_SSE2' => 1, - 'AC_LIBTOOL_F77' => 1, - 'GMP_FINISH' => 1, - 'GMP_ASM_X86_GOT_UNDERSCORE' => 1, - 'GMP_GCC_PENTIUM4_SSE2' => 1, - 'LT_LIB_DLLOAD' => 1, - 'GMP_C_ATTRIBUTE_CONST' => 1, - 'GMP_ASM_X86_GOT_EAX_OK' => 1, - 'GMP_C_ATTRIBUTE_MALLOC' => 1, - 'AC_LTDL_DLSYM_USCORE' => 1, - '_LT_AC_SYS_LIBPATH_AIX' => 1, - 'LTDL_INSTALLABLE' => 1, - '_AM_CONFIG_MACRO_DIRS' => 1, - '_LT_WITH_SYSROOT' => 1, - 'AC_LIBTOOL_GCJ' => 1, - 'GMP_C_ATTRIBUTE_NORETURN' => 1, - 'AM_SET_LEADING_DOT' => 1, - 'AC_ENABLE_FAST_INSTALL' => 1, - 'GMP_ASM_COFF_TYPE' => 1, - 'GMP_GCC_NO_CPP_PRECOMP' => 1, - '_LT_AC_PROG_ECHO_BACKSLASH' => 1, - '_LT_AC_TAGCONFIG' => 1, - 'AM_SET_DEPDIR' => 1, - 'LT_SYS_MODULE_EXT' => 1, - 'AC_LTDL_PREOPEN' => 1, - 'AM_ENABLE_STATIC' => 1, - 'GMP_ASM_SPARC_REGISTER' => 1, - 'GMP_DEFINE_RAW' => 1, - '_LT_PROG_FC' => 1, - 'GMP_PROG_CC_WORKS_PART_MAIN' => 1, - '_AM_PROG_CC_C_O' => 1, - 'GMP_ASM_TYPE' => 1, - 'GMP_PROG_CXX_WORKS' => 1, - 'GMP_ASM_SPARC_SHARED_THUNKS' => 1, - 'GMP_INIT' => 1, - 'CL_AS_NOEXECSTACK' => 1, - 'AM_SILENT_RULES' => 1, - '_LT_DLL_DEF_P' => 1, - '_LT_CC_BASENAME' => 1, - '_LT_AC_TAGVAR' => 1, - 'AC_DISABLE_STATIC' => 1, - 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, - 'LT_SYS_DLOPEN_DEPLIBS' => 1, - '_GMP_SUBST_CHECK_FUNCS' => 1, - 'GMP_PROG_AR' => 1, - 'LT_PATH_NM' => 1, - 'AC_LIBTOOL_WIN32_DLL' => 1, - 'GMP_ASM_POWERPC_R_REGISTERS' => 1, - 'GMP_GCC_ARM_UMODSI' => 1, - '_LT_PREPARE_SED_QUOTE_VARS' => 1, - 'AM_MAKE_INCLUDE' => 1, - 'AC_PROG_NM' => 1, - 'AM_DISABLE_SHARED' => 1, - 'GMP_ASM_W32' => 1, - 'AC_PATH_MAGIC' => 1, - '_LT_PROG_ECHO_BACKSLASH' => 1, - 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, - 'AC_LIBTOOL_DLOPEN' => 1, - 'LT_SYS_MODULE_PATH' => 1, - 'LTOBSOLETE_VERSION' => 1, - 'LT_OUTPUT' => 1, - 'AM_PROG_NM' => 1, - 'LT_CONFIG_LTDL_DIR' => 1, - 'GMP_ASM_UNDERSCORE' => 1, - 'GMP_GCC_WA_OLDAS' => 1, - '_LT_LINKER_OPTION' => 1, - '_GMP_SUBST_CHECK_HEADERS' => 1, - 'GMP_H_EXTERN_INLINE' => 1, - 'AC_LTDL_OBJDIR' => 1, - 'GMP_ASM_X86_SHLDL_CL' => 1, - 'LT_SYS_DLOPEN_SELF' => 1, - 'GMP_PROG_EXEEXT_FOR_BUILD' => 1, - 'GMP_COMPARE_GE' => 1, - 'LT_LIB_M' => 1, - 'GMP_DEFINE' => 1, - 'GMP_PROG_CC_WORKS_PART' => 1, - 'AC_LIBTOOL_RC' => 1, - 'AC_LIBLTDL_INSTALLABLE' => 1, - 'AC_ENABLE_SHARED' => 1, - 'GMP_ASM_SIZE' => 1, - 'AC_LTDL_SYMBOL_USCORE' => 1, - 'LT_PROG_GO' => 1, - 'GMP_C_ATTRIBUTE_MODE' => 1, - 'AM_DISABLE_STATIC' => 1, - 'GMP_OS_X86_XMM' => 1, - 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, - 'LT_PROG_GCJ' => 1, - '_LT_AC_LOCK' => 1, - 'GMP_ASM_X86_ADX' => 1, - 'AC_DEFUN' => 1, - 'AM_AUX_DIR_EXPAND' => 1, - 'GMP_PROG_CC_IS_XLC' => 1, - 'AC_LIBTOOL_OBJDIR' => 1, - 'GMP_HEADER_ALLOCA' => 1, - 'AC_PROG_LD_RELOAD_FLAG' => 1, - 'GMP_PROG_CXX_WORKS_PART' => 1, - 'GMP_ASM_LABEL_SUFFIX' => 1, - 'GMP_ASM_DATA' => 1, - 'AC_CONFIG_MACRO_DIR_TRACE' => 1, - 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1, - 'include' => 1, - 'LT_SYS_SYMBOL_USCORE' => 1, - 'GMP_PROG_CC_WORKS_PART_TEST' => 1, - 'LTDL_CONVENIENCE' => 1, - 'AM_PROG_INSTALL_STRIP' => 1, - 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, - '_LT_AC_LANG_CXX_CONFIG' => 1, - 'AC_LIBTOOL_PROG_CC_C_O' => 1, - '_LT_AC_LANG_RC_CONFIG' => 1, - 'GMP_H_HAVE_FILE' => 1, - '_LT_PATH_TOOL_PREFIX' => 1, - 'GMP_ASM_M68K_INSTRUCTION' => 1, - 'AC_DISABLE_SHARED' => 1, - 'LT_FUNC_ARGZ' => 1, - '_AC_PROG_LIBTOOL' => 1, - '_LT_AC_LANG_CXX' => 1, - 'GMP_PROG_NM' => 1, - 'AC_PROG_LIBTOOL' => 1, - 'AM_SANITY_CHECK' => 1, - 'GMP_C_HIDDEN_ALIAS' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'AC_PATH_TOOL_PREFIX' => 1, - 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, - 'GMP_PROG_CPP_FOR_BUILD' => 1 - } - ], 'Autom4te::Request' ), - bless( [ - '1', - 1, - [ - '/usr/share/autoconf-2.69' - ], - [ - '/usr/share/autoconf-2.69/autoconf/autoconf.m4f', - 'aclocal.m4', - 'configure.ac' - ], - { - 'AC_CANONICAL_HOST' => 1, - '_AM_COND_IF' => 1, - 'AC_LIBSOURCE' => 1, - 'm4_pattern_forbid' => 1, - 'AM_PROG_F77_C_O' => 1, - 'AC_SUBST' => 1, - 'AC_FC_FREEFORM' => 1, - 'AC_REQUIRE_AUX_FILE' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'AC_PROG_LIBTOOL' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'AM_PROG_MOC' => 1, - 'AC_CANONICAL_TARGET' => 1, - 'AC_CONFIG_FILES' => 1, - 'AM_PATH_GUILE' => 1, - 'AC_INIT' => 1, - 'LT_SUPPORTED_TAG' => 1, - 'AC_CONFIG_AUX_DIR' => 1, - 'AC_CONFIG_SUBDIRS' => 1, - 'AM_PROG_CXX_C_O' => 1, - 'LT_INIT' => 1, - '_LT_AC_TAGCONFIG' => 1, - 'AM_PROG_MKDIR_P' => 1, - 'AC_FC_PP_SRCEXT' => 1, - 'AC_FC_PP_DEFINE' => 1, - 'AC_DEFINE_TRACE_LITERAL' => 1, - 'AM_EXTRA_RECURSIVE_TARGETS' => 1, - 'AM_CONDITIONAL' => 1, - 'AM_GNU_GETTEXT' => 1, - 'AC_CONFIG_HEADERS' => 1, - 'AC_CONFIG_LIBOBJ_DIR' => 1, - 'AM_MAKEFILE_INCLUDE' => 1, - 'AC_CANONICAL_BUILD' => 1, - 'm4_sinclude' => 1, - 'AM_ENABLE_MULTILIB' => 1, - 'LT_CONFIG_LTDL_DIR' => 1, - 'm4_pattern_allow' => 1, - 'AC_SUBST_TRACE' => 1, - '_AM_SUBST_NOTMAKE' => 1, - 'AH_OUTPUT' => 1, - 'AM_XGETTEXT_OPTION' => 1, - 'AM_PROG_CC_C_O' => 1, - 'AC_CONFIG_LINKS' => 1, - '_m4_warn' => 1, - 'include' => 1, - 'AM_MAINTAINER_MODE' => 1, - 'AM_PROG_FC_C_O' => 1, - 'AM_SILENT_RULES' => 1, - '_AM_MAKEFILE_INCLUDE' => 1, - 'sinclude' => 1, - 'AC_FC_SRCEXT' => 1, - 'AC_CANONICAL_SYSTEM' => 1, - 'AM_POT_TOOLS' => 1, - 'AM_NLS' => 1, - '_AM_COND_ENDIF' => 1, - 'AM_PROG_AR' => 1, - 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, - 'm4_include' => 1, - '_AM_COND_ELSE' => 1 - } - ], 'Autom4te::Request' ) - ); - diff --git a/src/plugins/e-acsl/contrib/libgmp/autom4te.cache/traces.0 b/src/plugins/e-acsl/contrib/libgmp/autom4te.cache/traces.0 deleted file mode 100644 index 4724f30f017..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/autom4te.cache/traces.0 +++ /dev/null @@ -1,9505 +0,0 @@ -m4trace:/usr/share/aclocal/libtool.m4:61: -1- AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -]) -m4trace:/usr/share/aclocal/libtool.m4:99: -1- AU_DEFUN([AC_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:99: -1- AC_DEFUN([AC_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LIBTOOL' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:100: -1- AU_DEFUN([AM_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:100: -1- AC_DEFUN([AM_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LIBTOOL' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:619: -1- AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -'$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to <bug-libtool@gnu.org>." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2011 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test 0 != $[#] -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try '$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try '$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test yes = "$silent" && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -]) -m4trace:/usr/share/aclocal/libtool.m4:812: -1- AC_DEFUN([LT_SUPPORTED_TAG], []) -m4trace:/usr/share/aclocal/libtool.m4:823: -1- AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Go], [_LT_LANG(GO)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -]) -m4trace:/usr/share/aclocal/libtool.m4:915: -1- AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -m4trace:/usr/share/aclocal/libtool.m4:915: -1- AC_DEFUN([AC_LIBTOOL_CXX], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_CXX' is obsolete. -You should run autoupdate.])dnl -LT_LANG(C++)]) -m4trace:/usr/share/aclocal/libtool.m4:916: -1- AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -m4trace:/usr/share/aclocal/libtool.m4:916: -1- AC_DEFUN([AC_LIBTOOL_F77], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_F77' is obsolete. -You should run autoupdate.])dnl -LT_LANG(Fortran 77)]) -m4trace:/usr/share/aclocal/libtool.m4:917: -1- AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -m4trace:/usr/share/aclocal/libtool.m4:917: -1- AC_DEFUN([AC_LIBTOOL_FC], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_FC' is obsolete. -You should run autoupdate.])dnl -LT_LANG(Fortran)]) -m4trace:/usr/share/aclocal/libtool.m4:918: -1- AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -m4trace:/usr/share/aclocal/libtool.m4:918: -1- AC_DEFUN([AC_LIBTOOL_GCJ], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_GCJ' is obsolete. -You should run autoupdate.])dnl -LT_LANG(Java)]) -m4trace:/usr/share/aclocal/libtool.m4:919: -1- AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -m4trace:/usr/share/aclocal/libtool.m4:919: -1- AC_DEFUN([AC_LIBTOOL_RC], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_RC' is obsolete. -You should run autoupdate.])dnl -LT_LANG(Windows Resource)]) -m4trace:/usr/share/aclocal/libtool.m4:1247: -1- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) -AC_ARG_WITH([sysroot], -[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], - [Search for dependent libraries within DIR (or the compiler's sysroot - if not specified).])], -[], [with_sysroot=no]) - -dnl lt_sysroot will always be passed unquoted. We quote it here -dnl in case the user passed a directory name. -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - AC_MSG_RESULT([$with_sysroot]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; -esac - - AC_MSG_RESULT([${lt_sysroot:-no}]) -_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and where our libraries should be installed.])]) -m4trace:/usr/share/aclocal/libtool.m4:1578: -1- AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test yes = "[$]$2"; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -]) -m4trace:/usr/share/aclocal/libtool.m4:1620: -1- AU_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1620: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1629: -1- AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS -]) - -if test yes = "[$]$2"; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -]) -m4trace:/usr/share/aclocal/libtool.m4:1664: -1- AU_DEFUN([AC_LIBTOOL_LINKER_OPTION], [m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1664: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_LINKER_OPTION' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1671: -1- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n "$lt_cv_sys_max_cmd_len"; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -]) -m4trace:/usr/share/aclocal/libtool.m4:1810: -1- AU_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1810: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_SYS_MAX_CMD_LEN' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1921: -1- AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen=shl_load], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen=dlopen], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -]) -m4trace:/usr/share/aclocal/libtool.m4:2046: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:2046: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN_SELF' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3168: -1- AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$1"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac]) -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -]) -m4trace:/usr/share/aclocal/libtool.m4:3230: -1- AU_DEFUN([AC_PATH_TOOL_PREFIX], [m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3230: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_DIAGNOSE([obsolete], [The macro `AC_PATH_TOOL_PREFIX' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3253: -1- AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test no = "$withval" || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in - *GNU* | *'with BFD'*) - test no != "$with_gnu_ld" && break - ;; - *) - test yes != "$with_gnu_ld" && break - ;; - esac - fi - done - IFS=$lt_save_ifs -else - lt_cv_path_LD=$LD # Let the user override the test with a path. -fi]) -LD=$lt_cv_path_LD -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -_LT_PATH_LD_GNU -AC_SUBST([LD]) - -_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) -]) -m4trace:/usr/share/aclocal/libtool.m4:3342: -1- AU_DEFUN([AM_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3342: -1- AC_DEFUN([AM_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LD' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3343: -1- AU_DEFUN([AC_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3343: -1- AC_DEFUN([AC_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LD' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3672: -1- AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi]) -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -]) -m4trace:/usr/share/aclocal/libtool.m4:3767: -1- AU_DEFUN([AM_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3767: -1- AC_DEFUN([AM_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_NM' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3768: -1- AU_DEFUN([AC_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3768: -1- AC_DEFUN([AC_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_NM' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3839: -1- AC_DEFUN([_LT_DLL_DEF_P], [dnl - test DEF = "`$SED -n dnl - -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace - -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments - -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl - -e q dnl Only consider the first "real" line - $1`" dnl -]) -m4trace:/usr/share/aclocal/libtool.m4:3853: -1- AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM=-lm) - ;; -esac -AC_SUBST([LIBM]) -]) -m4trace:/usr/share/aclocal/libtool.m4:3872: -1- AU_DEFUN([AC_CHECK_LIBM], [m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3872: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_DIAGNOSE([obsolete], [The macro `AC_CHECK_LIBM' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:8135: -1- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) -m4trace:/usr/share/aclocal/libtool.m4:8144: -1- AU_DEFUN([LT_AC_PROG_GCJ], [m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:8144: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_GCJ' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:8151: -1- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) -]) -m4trace:/usr/share/aclocal/libtool.m4:8158: -1- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) -]) -m4trace:/usr/share/aclocal/libtool.m4:8163: -1- AU_DEFUN([LT_AC_PROG_RC], [m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:8163: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_RC' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:8283: -1- AU_DEFUN([LT_AC_PROG_SED], [m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:8283: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_SED' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])]) -m4trace:/usr/share/aclocal/ltargz.m4:12: -1- AC_DEFUN([LT_FUNC_ARGZ], [ -AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT]) - -AC_CHECK_TYPES([error_t], - [], - [AC_DEFINE([error_t], [int], - [Define to a type to use for 'error_t' if it is not otherwise available.]) - AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h - does not typedef error_t.])], - [#if defined(HAVE_ARGZ_H) -# include <argz.h> -#endif]) - -LT_ARGZ_H= -AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \ - argz_next argz_stringify], [], [LT_ARGZ_H=lt__argz.h; AC_LIBOBJ([lt__argz])]) - -dnl if have system argz functions, allow forced use of -dnl libltdl-supplied implementation (and default to do so -dnl on "known bad" systems). Could use a runtime check, but -dnl (a) detecting malloc issues is notoriously unreliable -dnl (b) only known system that declares argz functions, -dnl provides them, yet they are broken, is cygwin -dnl releases prior to 16-Mar-2007 (1.5.24 and earlier) -dnl So, it's more straightforward simply to special case -dnl this for known bad systems. -AS_IF([test -z "$LT_ARGZ_H"], - [AC_CACHE_CHECK( - [if argz actually works], - [lt_cv_sys_argz_works], - [[case $host_os in #( - *cygwin*) - lt_cv_sys_argz_works=no - if test no != "$cross_compiling"; then - lt_cv_sys_argz_works="guessing no" - else - lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/' - save_IFS=$IFS - IFS=-. - set x `uname -r | sed -e "$lt_sed_extract_leading_digits"` - IFS=$save_IFS - lt_os_major=${2-0} - lt_os_minor=${3-0} - lt_os_micro=${4-0} - if test 1 -lt "$lt_os_major" \ - || { test 1 -eq "$lt_os_major" \ - && { test 5 -lt "$lt_os_minor" \ - || { test 5 -eq "$lt_os_minor" \ - && test 24 -lt "$lt_os_micro"; }; }; }; then - lt_cv_sys_argz_works=yes - fi - fi - ;; #( - *) lt_cv_sys_argz_works=yes ;; - esac]]) - AS_IF([test yes = "$lt_cv_sys_argz_works"], - [AC_DEFINE([HAVE_WORKING_ARGZ], 1, - [This value is set to 1 to indicate that the system argz facility works])], - [LT_ARGZ_H=lt__argz.h - AC_LIBOBJ([lt__argz])])]) - -AC_SUBST([LT_ARGZ_H]) -]) -m4trace:/usr/share/aclocal/ltdl.m4:16: -1- AC_DEFUN([LT_CONFIG_LTDL_DIR], [AC_BEFORE([$0], [LTDL_INIT]) -_$0($*) -]) -m4trace:/usr/share/aclocal/ltdl.m4:68: -1- AC_DEFUN([LTDL_CONVENIENCE], [AC_BEFORE([$0], [LTDL_INIT])dnl -dnl Although the argument is deprecated and no longer documented, -dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one -dnl here make sure it is the same as any other declaration of libltdl's -dnl location! This also ensures lt_ltdl_dir is set when configure.ac is -dnl not yet using an explicit LT_CONFIG_LTDL_DIR. -m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl -_$0() -]) -m4trace:/usr/share/aclocal/ltdl.m4:81: -1- AU_DEFUN([AC_LIBLTDL_CONVENIENCE], [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) -_LTDL_CONVENIENCE]) -m4trace:/usr/share/aclocal/ltdl.m4:81: -1- AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBLTDL_CONVENIENCE' is obsolete. -You should run autoupdate.])dnl -_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) -_LTDL_CONVENIENCE]) -m4trace:/usr/share/aclocal/ltdl.m4:124: -1- AC_DEFUN([LTDL_INSTALLABLE], [AC_BEFORE([$0], [LTDL_INIT])dnl -dnl Although the argument is deprecated and no longer documented, -dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one -dnl here make sure it is the same as any other declaration of libltdl's -dnl location! This also ensures lt_ltdl_dir is set when configure.ac is -dnl not yet using an explicit LT_CONFIG_LTDL_DIR. -m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl -_$0() -]) -m4trace:/usr/share/aclocal/ltdl.m4:137: -1- AU_DEFUN([AC_LIBLTDL_INSTALLABLE], [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) -_LTDL_INSTALLABLE]) -m4trace:/usr/share/aclocal/ltdl.m4:137: -1- AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBLTDL_INSTALLABLE' is obsolete. -You should run autoupdate.])dnl -_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) -_LTDL_INSTALLABLE]) -m4trace:/usr/share/aclocal/ltdl.m4:213: -1- AC_DEFUN([_LT_LIBOBJ], [ - m4_pattern_allow([^_LT_LIBOBJS$]) - _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext" -]) -m4trace:/usr/share/aclocal/ltdl.m4:226: -1- AC_DEFUN([LTDL_INIT], [dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -dnl We need to keep our own list of libobjs separate from our parent project, -dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while -dnl we look for our own LIBOBJs. -m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ])) -m4_pushdef([AC_LIBSOURCES]) - -dnl If not otherwise defined, default to the 1.5.x compatible subproject mode: -m4_if(_LTDL_MODE, [], - [m4_define([_LTDL_MODE], m4_default([$2], [subproject])) - m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])], - [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])]) - -AC_ARG_WITH([included_ltdl], - [AS_HELP_STRING([--with-included-ltdl], - [use the GNU ltdl sources included here])]) - -if test yes != "$with_included_ltdl"; then - # We are not being forced to use the included libltdl sources, so - # decide whether there is a useful installed version we can use. - AC_CHECK_HEADER([ltdl.h], - [AC_CHECK_DECL([lt_dlinterface_register], - [AC_CHECK_LIB([ltdl], [lt_dladvise_preload], - [with_included_ltdl=no], - [with_included_ltdl=yes])], - [with_included_ltdl=yes], - [AC_INCLUDES_DEFAULT - #include <ltdl.h>])], - [with_included_ltdl=yes], - [AC_INCLUDES_DEFAULT] - ) -fi - -dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE -dnl was called yet, then for old times' sake, we assume libltdl is in an -dnl eponymous directory: -AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])]) - -AC_ARG_WITH([ltdl_include], - [AS_HELP_STRING([--with-ltdl-include=DIR], - [use the ltdl headers installed in DIR])]) - -if test -n "$with_ltdl_include"; then - if test -f "$with_ltdl_include/ltdl.h"; then : - else - AC_MSG_ERROR([invalid ltdl include directory: '$with_ltdl_include']) - fi -else - with_ltdl_include=no -fi - -AC_ARG_WITH([ltdl_lib], - [AS_HELP_STRING([--with-ltdl-lib=DIR], - [use the libltdl.la installed in DIR])]) - -if test -n "$with_ltdl_lib"; then - if test -f "$with_ltdl_lib/libltdl.la"; then : - else - AC_MSG_ERROR([invalid ltdl library directory: '$with_ltdl_lib']) - fi -else - with_ltdl_lib=no -fi - -case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in - ,yes,no,no,) - m4_case(m4_default(_LTDL_TYPE, [convenience]), - [convenience], [_LTDL_CONVENIENCE], - [installable], [_LTDL_INSTALLABLE], - [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)]) - ;; - ,no,no,no,) - # If the included ltdl is not to be used, then use the - # preinstalled libltdl we found. - AC_DEFINE([HAVE_LTDL], [1], - [Define this if a modern libltdl is already installed]) - LIBLTDL=-lltdl - LTDLDEPS= - LTDLINCL= - ;; - ,no*,no,*) - AC_MSG_ERROR(['--with-ltdl-include' and '--with-ltdl-lib' options must be used together]) - ;; - *) with_included_ltdl=no - LIBLTDL="-L$with_ltdl_lib -lltdl" - LTDLDEPS= - LTDLINCL=-I$with_ltdl_include - ;; -esac -INCLTDL=$LTDLINCL - -# Report our decision... -AC_MSG_CHECKING([where to find libltdl headers]) -AC_MSG_RESULT([$LTDLINCL]) -AC_MSG_CHECKING([where to find libltdl library]) -AC_MSG_RESULT([$LIBLTDL]) - -_LTDL_SETUP - -dnl restore autoconf definition. -m4_popdef([AC_LIBOBJ]) -m4_popdef([AC_LIBSOURCES]) - -AC_CONFIG_COMMANDS_PRE([ - _ltdl_libobjs= - _ltdl_ltlibobjs= - if test -n "$_LT_LIBOBJS"; then - # Remove the extension. - _lt_sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do - _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext" - _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo" - done - fi - AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs]) - AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs]) -]) - -# Only expand once: -m4_define([LTDL_INIT]) -]) -m4trace:/usr/share/aclocal/ltdl.m4:352: -1- AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)]) -m4trace:/usr/share/aclocal/ltdl.m4:352: -1- AC_DEFUN([AC_LIB_LTDL], [AC_DIAGNOSE([obsolete], [The macro `AC_LIB_LTDL' is obsolete. -You should run autoupdate.])dnl -LTDL_INIT($@)]) -m4trace:/usr/share/aclocal/ltdl.m4:353: -1- AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)]) -m4trace:/usr/share/aclocal/ltdl.m4:353: -1- AC_DEFUN([AC_WITH_LTDL], [AC_DIAGNOSE([obsolete], [The macro `AC_WITH_LTDL' is obsolete. -You should run autoupdate.])dnl -LTDL_INIT($@)]) -m4trace:/usr/share/aclocal/ltdl.m4:354: -1- AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)]) -m4trace:/usr/share/aclocal/ltdl.m4:354: -1- AC_DEFUN([LT_WITH_LTDL], [AC_DIAGNOSE([obsolete], [The macro `LT_WITH_LTDL' is obsolete. -You should run autoupdate.])dnl -LTDL_INIT($@)]) -m4trace:/usr/share/aclocal/ltdl.m4:367: -1- AC_DEFUN([_LTDL_SETUP], [AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_SYS_MODULE_EXT])dnl -AC_REQUIRE([LT_SYS_MODULE_PATH])dnl -AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl -AC_REQUIRE([LT_LIB_DLLOAD])dnl -AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl -AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl -AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl -AC_REQUIRE([LT_FUNC_ARGZ])dnl - -m4_require([_LT_CHECK_OBJDIR])dnl -m4_require([_LT_HEADER_DLFCN])dnl -m4_require([_LT_CHECK_DLPREOPEN])dnl -m4_require([_LT_DECL_SED])dnl - -dnl Don't require this, or it will be expanded earlier than the code -dnl that sets the variables it relies on: -_LT_ENABLE_INSTALL - -dnl _LTDL_MODE specific code must be called at least once: -_LTDL_MODE_DISPATCH - -# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS -# the user used. This is so that ltdl.h can pick up the parent projects -# config.h file, The first file in AC_CONFIG_HEADERS must contain the -# definitions required by ltdl.c. -# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility). -AC_CONFIG_COMMANDS_PRE([dnl -m4_pattern_allow([^LT_CONFIG_H$])dnl -m4_ifset([AH_HEADER], - [LT_CONFIG_H=AH_HEADER], - [m4_ifset([AC_LIST_HEADERS], - [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's|^[[ ]]*||;s|[[ :]].*$||'`], - [])])]) -AC_SUBST([LT_CONFIG_H]) - -AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h], - [], [], [AC_INCLUDES_DEFAULT]) - -AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])]) -AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])]) - -m4_pattern_allow([LT_LIBEXT])dnl -AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension]) - -name= -eval "lt_libprefix=\"$libname_spec\"" -m4_pattern_allow([LT_LIBPREFIX])dnl -AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix]) - -name=ltdl -eval "LTDLOPEN=\"$libname_spec\"" -AC_SUBST([LTDLOPEN]) -]) -m4trace:/usr/share/aclocal/ltdl.m4:443: -1- AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_CACHE_CHECK([whether deplibs are loaded by dlopen], - [lt_cv_sys_dlopen_deplibs], - [# PORTME does your system automatically load deplibs for dlopen? - # or its logical equivalent (e.g. shl_load for HP-UX < 11) - # For now, we just catch OSes we know something about -- in the - # future, we'll try test this programmatically. - lt_cv_sys_dlopen_deplibs=unknown - case $host_os in - aix3*|aix4.1.*|aix4.2.*) - # Unknown whether this is true for these versions of AIX, but - # we want this 'case' here to explicitly catch those versions. - lt_cv_sys_dlopen_deplibs=unknown - ;; - aix[[4-9]]*) - lt_cv_sys_dlopen_deplibs=yes - ;; - amigaos*) - case $host_cpu in - powerpc) - lt_cv_sys_dlopen_deplibs=no - ;; - esac - ;; - bitrig*) - lt_cv_sys_dlopen_deplibs=yes - ;; - darwin*) - # Assuming the user has installed a libdl from somewhere, this is true - # If you are looking for one http://www.opendarwin.org/projects/dlcompat - lt_cv_sys_dlopen_deplibs=yes - ;; - freebsd* | dragonfly*) - lt_cv_sys_dlopen_deplibs=yes - ;; - gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu) - # GNU and its variants, using gnu ld.so (Glibc) - lt_cv_sys_dlopen_deplibs=yes - ;; - hpux10*|hpux11*) - lt_cv_sys_dlopen_deplibs=yes - ;; - interix*) - lt_cv_sys_dlopen_deplibs=yes - ;; - irix[[12345]]*|irix6.[[01]]*) - # Catch all versions of IRIX before 6.2, and indicate that we don't - # know how it worked for any of those versions. - lt_cv_sys_dlopen_deplibs=unknown - ;; - irix*) - # The case above catches anything before 6.2, and it's known that - # at 6.2 and later dlopen does load deplibs. - lt_cv_sys_dlopen_deplibs=yes - ;; - netbsd*) - lt_cv_sys_dlopen_deplibs=yes - ;; - openbsd*) - lt_cv_sys_dlopen_deplibs=yes - ;; - osf[[1234]]*) - # dlopen did load deplibs (at least at 4.x), but until the 5.x series, - # it did *not* use an RPATH in a shared library to find objects the - # library depends on, so we explicitly say 'no'. - lt_cv_sys_dlopen_deplibs=no - ;; - osf5.0|osf5.0a|osf5.1) - # dlopen *does* load deplibs and with the right loader patch applied - # it even uses RPATH in a shared library to search for shared objects - # that the library depends on, but there's no easy way to know if that - # patch is installed. Since this is the case, all we can really - # say is unknown -- it depends on the patch being installed. If - # it is, this changes to 'yes'. Without it, it would be 'no'. - lt_cv_sys_dlopen_deplibs=unknown - ;; - osf*) - # the two cases above should catch all versions of osf <= 5.1. Read - # the comments above for what we know about them. - # At > 5.1, deplibs are loaded *and* any RPATH in a shared library - # is used to find them so we can finally say 'yes'. - lt_cv_sys_dlopen_deplibs=yes - ;; - qnx*) - lt_cv_sys_dlopen_deplibs=yes - ;; - solaris*) - lt_cv_sys_dlopen_deplibs=yes - ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - libltdl_cv_sys_dlopen_deplibs=yes - ;; - esac - ]) -if test yes != "$lt_cv_sys_dlopen_deplibs"; then - AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1], - [Define if the OS needs help to load dependent libraries for dlopen().]) -fi -]) -m4trace:/usr/share/aclocal/ltdl.m4:545: -1- AU_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [m4_if($#, 0, [LT_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:545: -1- AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SYS_DLOPEN_DEPLIBS' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:552: -1- AC_DEFUN([LT_SYS_MODULE_EXT], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl -AC_CACHE_CHECK([what extension is used for runtime loadable modules], - [libltdl_cv_shlibext], -[ -module=yes -eval libltdl_cv_shlibext=$shrext_cmds -module=no -eval libltdl_cv_shrext=$shrext_cmds - ]) -if test -n "$libltdl_cv_shlibext"; then - m4_pattern_allow([LT_MODULE_EXT])dnl - AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"], - [Define to the extension used for runtime loadable modules, say, ".so".]) -fi -if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then - m4_pattern_allow([LT_SHARED_EXT])dnl - AC_DEFINE_UNQUOTED([LT_SHARED_EXT], ["$libltdl_cv_shrext"], - [Define to the shared library suffix, say, ".dylib".]) -fi -if test -n "$shared_archive_member_spec"; then - m4_pattern_allow([LT_SHARED_LIB_MEMBER])dnl - AC_DEFINE_UNQUOTED([LT_SHARED_LIB_MEMBER], ["($shared_archive_member_spec.o)"], - [Define to the shared archive member specification, say "(shr.o)".]) -fi -]) -m4trace:/usr/share/aclocal/ltdl.m4:580: -1- AU_DEFUN([AC_LTDL_SHLIBEXT], [m4_if($#, 0, [LT_SYS_MODULE_EXT], [LT_SYS_MODULE_EXT($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:580: -1- AC_DEFUN([AC_LTDL_SHLIBEXT], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SHLIBEXT' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_SYS_MODULE_EXT], [LT_SYS_MODULE_EXT($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:587: -1- AC_DEFUN([LT_SYS_MODULE_PATH], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl -AC_CACHE_CHECK([what variable specifies run-time module search path], - [lt_cv_module_path_var], [lt_cv_module_path_var=$shlibpath_var]) -if test -n "$lt_cv_module_path_var"; then - m4_pattern_allow([LT_MODULE_PATH_VAR])dnl - AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"], - [Define to the name of the environment variable that determines the run-time module search path.]) -fi -]) -m4trace:/usr/share/aclocal/ltdl.m4:599: -1- AU_DEFUN([AC_LTDL_SHLIBPATH], [m4_if($#, 0, [LT_SYS_MODULE_PATH], [LT_SYS_MODULE_PATH($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:599: -1- AC_DEFUN([AC_LTDL_SHLIBPATH], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SHLIBPATH' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_SYS_MODULE_PATH], [LT_SYS_MODULE_PATH($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:606: -1- AC_DEFUN([LT_SYS_DLSEARCH_PATH], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl -AC_CACHE_CHECK([for the default library search path], - [lt_cv_sys_dlsearch_path], - [lt_cv_sys_dlsearch_path=$sys_lib_dlsearch_path_spec]) -if test -n "$lt_cv_sys_dlsearch_path"; then - sys_dlsearch_path= - for dir in $lt_cv_sys_dlsearch_path; do - if test -z "$sys_dlsearch_path"; then - sys_dlsearch_path=$dir - else - sys_dlsearch_path=$sys_dlsearch_path$PATH_SEPARATOR$dir - fi - done - m4_pattern_allow([LT_DLSEARCH_PATH])dnl - AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"], - [Define to the system default library search path.]) -fi -]) -m4trace:/usr/share/aclocal/ltdl.m4:627: -1- AU_DEFUN([AC_LTDL_SYSSEARCHPATH], [m4_if($#, 0, [LT_SYS_DLSEARCH_PATH], [LT_SYS_DLSEARCH_PATH($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:627: -1- AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SYSSEARCHPATH' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_SYS_DLSEARCH_PATH], [LT_SYS_DLSEARCH_PATH($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:653: -1- AC_DEFUN([LT_LIB_DLLOAD], [m4_pattern_allow([^LT_DLLOADERS$]) -LT_DLLOADERS= -AC_SUBST([LT_DLLOADERS]) - -AC_LANG_PUSH([C]) -lt_dlload_save_LIBS=$LIBS - -LIBADD_DLOPEN= -AC_SEARCH_LIBS([dlopen], [dl], - [AC_DEFINE([HAVE_LIBDL], [1], - [Define if you have the libdl library or equivalent.]) - if test "$ac_cv_search_dlopen" != "none required"; then - LIBADD_DLOPEN=-ldl - fi - libltdl_cv_lib_dl_dlopen=yes - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"], - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H -# include <dlfcn.h> -#endif - ]], [[dlopen(0, 0);]])], - [AC_DEFINE([HAVE_LIBDL], [1], - [Define if you have the libdl library or equivalent.]) - libltdl_cv_func_dlopen=yes - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"], - [AC_CHECK_LIB([svld], [dlopen], - [AC_DEFINE([HAVE_LIBDL], [1], - [Define if you have the libdl library or equivalent.]) - LIBADD_DLOPEN=-lsvld libltdl_cv_func_dlopen=yes - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])]) -if test yes = "$libltdl_cv_func_dlopen" || test yes = "$libltdl_cv_lib_dl_dlopen" -then - lt_save_LIBS=$LIBS - LIBS="$LIBS $LIBADD_DLOPEN" - AC_CHECK_FUNCS([dlerror]) - LIBS=$lt_save_LIBS -fi -AC_SUBST([LIBADD_DLOPEN]) - -LIBADD_SHL_LOAD= -AC_CHECK_FUNC([shl_load], - [AC_DEFINE([HAVE_SHL_LOAD], [1], - [Define if you have the shl_load function.]) - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"], - [AC_CHECK_LIB([dld], [shl_load], - [AC_DEFINE([HAVE_SHL_LOAD], [1], - [Define if you have the shl_load function.]) - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la" - LIBADD_SHL_LOAD=-ldld])]) -AC_SUBST([LIBADD_SHL_LOAD]) - -case $host_os in -darwin[[1567]].*) -# We only want this for pre-Mac OS X 10.4. - AC_CHECK_FUNC([_dyld_func_lookup], - [AC_DEFINE([HAVE_DYLD], [1], - [Define if you have the _dyld_func_lookup function.]) - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"]) - ;; -beos*) - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la" - ;; -cygwin* | mingw* | pw32*) - AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]]) - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la" - ;; -esac - -AC_CHECK_LIB([dld], [dld_link], - [AC_DEFINE([HAVE_DLD], [1], - [Define if you have the GNU dld library.]) - LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"]) -AC_SUBST([LIBADD_DLD_LINK]) - -m4_pattern_allow([^LT_DLPREOPEN$]) -LT_DLPREOPEN= -if test -n "$LT_DLLOADERS" -then - for lt_loader in $LT_DLLOADERS; do - LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader " - done - AC_DEFINE([HAVE_LIBDLLOADER], [1], - [Define if libdlloader will be built on this platform]) -fi -AC_SUBST([LT_DLPREOPEN]) - -dnl This isn't used anymore, but set it for backwards compatibility -LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD" -AC_SUBST([LIBADD_DL]) - -LIBS=$lt_dlload_save_LIBS -AC_LANG_POP -]) -m4trace:/usr/share/aclocal/ltdl.m4:748: -1- AU_DEFUN([AC_LTDL_DLLIB], [m4_if($#, 0, [LT_LIB_DLLOAD], [LT_LIB_DLLOAD($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:748: -1- AC_DEFUN([AC_LTDL_DLLIB], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_DLLIB' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_LIB_DLLOAD], [LT_LIB_DLLOAD($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:756: -1- AC_DEFUN([LT_SYS_SYMBOL_USCORE], [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -AC_CACHE_CHECK([for _ prefix in compiled symbols], - [lt_cv_sys_symbol_underscore], - [lt_cv_sys_symbol_underscore=no - cat > conftest.$ac_ext <<_LT_EOF -void nm_test_func(){} -int main(){nm_test_func;return 0;} -_LT_EOF - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - ac_nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then - # See whether the symbols have a leading underscore. - if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then - lt_cv_sys_symbol_underscore=yes - else - if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then - : - else - echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD - fi - fi - else - echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.c >&AS_MESSAGE_LOG_FD - fi - rm -rf conftest* - ]) - sys_symbol_underscore=$lt_cv_sys_symbol_underscore - AC_SUBST([sys_symbol_underscore]) -]) -m4trace:/usr/share/aclocal/ltdl.m4:793: -1- AU_DEFUN([AC_LTDL_SYMBOL_USCORE], [m4_if($#, 0, [LT_SYS_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:793: -1- AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SYMBOL_USCORE' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_SYS_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:800: -1- AC_DEFUN([LT_FUNC_DLSYM_USCORE], [AC_REQUIRE([_LT_COMPILER_PIC])dnl for lt_prog_compiler_wl -AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl for lt_cv_sys_symbol_underscore -AC_REQUIRE([LT_SYS_MODULE_EXT])dnl for libltdl_cv_shlibext -if test yes = "$lt_cv_sys_symbol_underscore"; then - if test yes = "$libltdl_cv_func_dlopen" || test yes = "$libltdl_cv_lib_dl_dlopen"; then - AC_CACHE_CHECK([whether we have to add an underscore for dlsym], - [libltdl_cv_need_uscore], - [libltdl_cv_need_uscore=unknown - dlsym_uscore_save_LIBS=$LIBS - LIBS="$LIBS $LIBADD_DLOPEN" - libname=conftmod # stay within 8.3 filename limits! - cat >$libname.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif -int fnord () { return 42; }] -_LT_EOF - - # ltfn_module_cmds module_cmds - # Execute tilde-delimited MODULE_CMDS with environment primed for - # $module_cmds or $archive_cmds type content. - ltfn_module_cmds () - {( # subshell avoids polluting parent global environment - module_cmds_save_ifs=$IFS; IFS='~' - for cmd in @S|@1; do - IFS=$module_cmds_save_ifs - libobjs=$libname.$ac_objext; lib=$libname$libltdl_cv_shlibext - rpath=/not-exists; soname=$libname$libltdl_cv_shlibext; output_objdir=. - major=; versuffix=; verstring=; deplibs= - ECHO=echo; wl=$lt_prog_compiler_wl; allow_undefined_flag= - eval $cmd - done - IFS=$module_cmds_save_ifs - )} - - # Compile a loadable module using libtool macro expansion results. - $CC $pic_flag -c $libname.$ac_ext - ltfn_module_cmds "${module_cmds:-$archive_cmds}" - - # Try to fetch fnord with dlsym(). - libltdl_dlunknown=0; libltdl_dlnouscore=1; libltdl_dluscore=2 - cat >conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif -#include <stdio.h> -#ifndef RTLD_GLOBAL -# ifdef DL_GLOBAL -# define RTLD_GLOBAL DL_GLOBAL -# else -# define RTLD_GLOBAL 0 -# endif -#endif -#ifndef RTLD_NOW -# ifdef DL_NOW -# define RTLD_NOW DL_NOW -# else -# define RTLD_NOW 0 -# endif -#endif -int main () { - void *handle = dlopen ("`pwd`/$libname$libltdl_cv_shlibext", RTLD_GLOBAL|RTLD_NOW); - int status = $libltdl_dlunknown; - if (handle) { - if (dlsym (handle, "fnord")) - status = $libltdl_dlnouscore; - else { - if (dlsym (handle, "_fnord")) - status = $libltdl_dluscore; - else - puts (dlerror ()); - } - dlclose (handle); - } else - puts (dlerror ()); - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - libltdl_status=$? - case x$libltdl_status in - x$libltdl_dlnouscore) libltdl_cv_need_uscore=no ;; - x$libltdl_dluscore) libltdl_cv_need_uscore=yes ;; - x*) libltdl_cv_need_uscore=unknown ;; - esac - fi - rm -rf conftest* $libname* - LIBS=$dlsym_uscore_save_LIBS - ]) - fi -fi - -if test yes = "$libltdl_cv_need_uscore"; then - AC_DEFINE([NEED_USCORE], [1], - [Define if dlsym() requires a leading underscore in symbol names.]) -fi -]) -m4trace:/usr/share/aclocal/ltdl.m4:907: -1- AU_DEFUN([AC_LTDL_DLSYM_USCORE], [m4_if($#, 0, [LT_FUNC_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:907: -1- AC_DEFUN([AC_LTDL_DLSYM_USCORE], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_DLSYM_USCORE' is obsolete. -You should run autoupdate.])dnl -m4_if($#, 0, [LT_FUNC_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE($@)])]) -m4trace:/usr/share/aclocal/ltoptions.m4:14: -1- AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) -m4trace:/usr/share/aclocal/ltoptions.m4:113: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'dlopen' option into LT_INIT's first parameter.]) -]) -m4trace:/usr/share/aclocal/ltoptions.m4:113: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN' is obsolete. -You should run autoupdate.])dnl -_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'dlopen' option into LT_INIT's first parameter.]) -]) -m4trace:/usr/share/aclocal/ltoptions.m4:148: -1- AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'win32-dll' option into LT_INIT's first parameter.]) -]) -m4trace:/usr/share/aclocal/ltoptions.m4:148: -1- AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete. -You should run autoupdate.])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'win32-dll' option into LT_INIT's first parameter.]) -]) -m4trace:/usr/share/aclocal/ltoptions.m4:197: -1- AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) -m4trace:/usr/share/aclocal/ltoptions.m4:201: -1- AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) -m4trace:/usr/share/aclocal/ltoptions.m4:205: -1- AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -m4trace:/usr/share/aclocal/ltoptions.m4:205: -1- AC_DEFUN([AM_ENABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_SHARED' is obsolete. -You should run autoupdate.])dnl -AC_ENABLE_SHARED($@)]) -m4trace:/usr/share/aclocal/ltoptions.m4:206: -1- AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -m4trace:/usr/share/aclocal/ltoptions.m4:206: -1- AC_DEFUN([AM_DISABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_SHARED' is obsolete. -You should run autoupdate.])dnl -AC_DISABLE_SHARED($@)]) -m4trace:/usr/share/aclocal/ltoptions.m4:251: -1- AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) -m4trace:/usr/share/aclocal/ltoptions.m4:255: -1- AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) -]) -m4trace:/usr/share/aclocal/ltoptions.m4:259: -1- AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -m4trace:/usr/share/aclocal/ltoptions.m4:259: -1- AC_DEFUN([AM_ENABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_STATIC' is obsolete. -You should run autoupdate.])dnl -AC_ENABLE_STATIC($@)]) -m4trace:/usr/share/aclocal/ltoptions.m4:260: -1- AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -m4trace:/usr/share/aclocal/ltoptions.m4:260: -1- AC_DEFUN([AM_DISABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_STATIC' is obsolete. -You should run autoupdate.])dnl -AC_DISABLE_STATIC($@)]) -m4trace:/usr/share/aclocal/ltoptions.m4:305: -1- AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'fast-install' option into LT_INIT's first parameter.]) -]) -m4trace:/usr/share/aclocal/ltoptions.m4:305: -1- AC_DEFUN([AC_ENABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_ENABLE_FAST_INSTALL' is obsolete. -You should run autoupdate.])dnl -_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'fast-install' option into LT_INIT's first parameter.]) -]) -m4trace:/usr/share/aclocal/ltoptions.m4:312: -1- AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'disable-fast-install' option into LT_INIT's first parameter.]) -]) -m4trace:/usr/share/aclocal/ltoptions.m4:312: -1- AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_DISABLE_FAST_INSTALL' is obsolete. -You should run autoupdate.])dnl -_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'disable-fast-install' option into LT_INIT's first parameter.]) -]) -m4trace:/usr/share/aclocal/ltoptions.m4:411: -1- AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'pic-only' option into LT_INIT's first parameter.]) -]) -m4trace:/usr/share/aclocal/ltoptions.m4:411: -1- AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_PICMODE' is obsolete. -You should run autoupdate.])dnl -_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'pic-only' option into LT_INIT's first parameter.]) -]) -m4trace:/usr/share/aclocal/ltsugar.m4:14: -1- AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) -m4trace:/usr/share/aclocal/ltversion.m4:18: -1- AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' -macro_revision='2.4.6' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:37: -1- AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:41: -1- AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:42: -1- AC_DEFUN([_LT_AC_SHELL_INIT]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:43: -1- AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:45: -1- AC_DEFUN([_LT_AC_TAGVAR]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:46: -1- AC_DEFUN([AC_LTDL_ENABLE_INSTALL]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:47: -1- AC_DEFUN([AC_LTDL_PREOPEN]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:48: -1- AC_DEFUN([_LT_AC_SYS_COMPILER]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:49: -1- AC_DEFUN([_LT_AC_LOCK]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:50: -1- AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:51: -1- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:52: -1- AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:53: -1- AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:54: -1- AC_DEFUN([AC_LIBTOOL_OBJDIR]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:55: -1- AC_DEFUN([AC_LTDL_OBJDIR]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:56: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:57: -1- AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:58: -1- AC_DEFUN([AC_PATH_MAGIC]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:59: -1- AC_DEFUN([AC_PROG_LD_GNU]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:60: -1- AC_DEFUN([AC_PROG_LD_RELOAD_FLAG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:61: -1- AC_DEFUN([AC_DEPLIBS_CHECK_METHOD]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:62: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:63: -1- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:64: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:65: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:66: -1- AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:67: -1- AC_DEFUN([LT_AC_PROG_EGREP]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:72: -1- AC_DEFUN([_AC_PROG_LIBTOOL]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:73: -1- AC_DEFUN([AC_LIBTOOL_SETUP]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:74: -1- AC_DEFUN([_LT_AC_CHECK_DLFCN]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:75: -1- AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:76: -1- AC_DEFUN([_LT_AC_TAGCONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:78: -1- AC_DEFUN([_LT_AC_LANG_CXX]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:79: -1- AC_DEFUN([_LT_AC_LANG_F77]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:80: -1- AC_DEFUN([_LT_AC_LANG_GCJ]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:81: -1- AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:82: -1- AC_DEFUN([_LT_AC_LANG_C_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:83: -1- AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:84: -1- AC_DEFUN([_LT_AC_LANG_CXX_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:85: -1- AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:86: -1- AC_DEFUN([_LT_AC_LANG_F77_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:87: -1- AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:88: -1- AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:89: -1- AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:90: -1- AC_DEFUN([_LT_AC_LANG_RC_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:91: -1- AC_DEFUN([AC_LIBTOOL_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:92: -1- AC_DEFUN([_LT_AC_FILE_LTDLL_C]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:94: -1- AC_DEFUN([_LT_AC_PROG_CXXCPP]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:97: -1- AC_DEFUN([_LT_PROG_F77]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:98: -1- AC_DEFUN([_LT_PROG_FC]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:99: -1- AC_DEFUN([_LT_PROG_CXX]) -m4trace:/usr/share/aclocal-1.15/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) -m4trace:/usr/share/aclocal-1.15/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -m4trace:/usr/share/aclocal-1.15/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` -]) -m4trace:/usr/share/aclocal-1.15/cond.m4:12: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl - m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) -m4trace:/usr/share/aclocal-1.15/depend.m4:26: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], - [$1], [CXX], [depcc="$CXX" am_compiler_list=], - [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], - [$1], [UPC], [depcc="$UPC" am_compiler_list=], - [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) -m4trace:/usr/share/aclocal-1.15/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) -m4trace:/usr/share/aclocal-1.15/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl -AS_HELP_STRING( - [--enable-dependency-tracking], - [do not reject slow dependency extractors]) -AS_HELP_STRING( - [--disable-dependency-tracking], - [speeds up one-time build])]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -AC_SUBST([am__nodep])dnl -_AM_SUBST_NOTMAKE([am__nodep])dnl -]) -m4trace:/usr/share/aclocal-1.15/depout.m4:12: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -]) -m4trace:/usr/share/aclocal-1.15/depout.m4:71: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) -m4trace:/usr/share/aclocal-1.15/init.m4:29: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[AC_DIAGNOSE([obsolete], - [$0: two- and three-arguments forms are deprecated.]) -m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if( - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), - [ok:ok],, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) - AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) -AM_MISSING_PROG([AUTOCONF], [autoconf]) -AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) -AM_MISSING_PROG([AUTOHEADER], [autoheader]) -AM_MISSING_PROG([MAKEINFO], [makeinfo]) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> -# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> -AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES([CC])], - [m4_define([AC_PROG_CC], - m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES([CXX])], - [m4_define([AC_PROG_CXX], - m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES([OBJC])], - [m4_define([AC_PROG_OBJC], - m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], - [_AM_DEPENDENCIES([OBJCXX])], - [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl -]) -AC_REQUIRE([AM_SILENT_RULES])dnl -dnl The testsuite driver may need to know about EXEEXT, so add the -dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This -dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: <http://www.gnu.org/software/coreutils/>. - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) - fi -fi -dnl The trailing newline in this macro's definition is deliberate, for -dnl backward compatibility and to allow trailing 'dnl'-style comments -dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. -]) -m4trace:/usr/share/aclocal-1.15/init.m4:186: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -m4trace:/usr/share/aclocal-1.15/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST([install_sh])]) -m4trace:/usr/share/aclocal-1.15/lead-dot.m4:10: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) -m4trace:/usr/share/aclocal-1.15/lex.m4:13: -1- AC_DEFUN([AM_PROG_LEX], [AC_PREREQ([2.50])dnl -AC_REQUIRE([AM_MISSING_HAS_RUN])dnl -AC_REQUIRE([AC_PROG_LEX])dnl -if test "$LEX" = :; then - LEX=${am_missing_run}flex -fi]) -m4trace:/usr/share/aclocal-1.15/maintainer.m4:16: -1- AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), - [enable], [m4_define([am_maintainer_other], [disable])], - [disable], [m4_define([am_maintainer_other], [enable])], - [m4_define([am_maintainer_other], [enable]) - m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode's default is 'disable' unless 'enable' is passed - AC_ARG_ENABLE([maintainer-mode], - [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], - am_maintainer_other[ make rules and dependencies not useful - (and sometimes confusing) to the casual installer])], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) - AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST([MAINT])dnl - -]) -m4trace:/usr/share/aclocal-1.15/make.m4:12: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) -m4trace:/usr/share/aclocal-1.15/missing.m4:11: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) -m4trace:/usr/share/aclocal-1.15/missing.m4:20: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - AC_MSG_WARN(['missing' script is too old or missing]) -fi -]) -m4trace:/usr/share/aclocal-1.15/options.m4:11: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) -m4trace:/usr/share/aclocal-1.15/options.m4:17: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) -m4trace:/usr/share/aclocal-1.15/options.m4:23: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) -m4trace:/usr/share/aclocal-1.15/options.m4:29: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -m4trace:/usr/share/aclocal-1.15/prog-cc-c-o.m4:12: -1- AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -AC_LANG_PUSH([C])dnl -AC_CACHE_CHECK( - [whether $CC understands -c and -o together], - [am_cv_prog_cc_c_o], - [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i]) -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -AC_LANG_POP([C])]) -m4trace:/usr/share/aclocal-1.15/prog-cc-c-o.m4:47: -1- AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -m4trace:/usr/share/aclocal-1.15/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD - ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - (exit $ac_status); }]) -m4trace:/usr/share/aclocal-1.15/sanity.m4:11: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken - alias in your environment]) - fi - if test "$[2]" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT([yes]) -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi -AC_CONFIG_COMMANDS_PRE( - [AC_MSG_CHECKING([that generated files are newer than configure]) - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - AC_MSG_RESULT([done])]) -rm -f conftest.file -]) -m4trace:/usr/share/aclocal-1.15/silent.m4:12: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl -AS_HELP_STRING( - [--enable-silent-rules], - [less verbose build output (undo: "make V=1")]) -AS_HELP_STRING( - [--disable-silent-rules], - [verbose build output (undo: "make V=0")])dnl -]) -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac -dnl -dnl A few 'make' implementations (e.g., NonStop OS and NextStep) -dnl do not support nested variable expansions. -dnl See automake bug#9928 and bug#10237. -am_make=${MAKE-make} -AC_CACHE_CHECK([whether $am_make supports nested variables], - [am_cv_make_support_nested_variables], - [if AS_ECHO([['TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi]) -if test $am_cv_make_support_nested_variables = yes; then - dnl Using '$V' instead of '$(V)' breaks IRIX make. - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AC_SUBST([AM_V])dnl -AM_SUBST_NOTMAKE([AM_V])dnl -AC_SUBST([AM_DEFAULT_V])dnl -AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) -m4trace:/usr/share/aclocal-1.15/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) -m4trace:/usr/share/aclocal-1.15/substnot.m4:12: -1- AC_DEFUN([_AM_SUBST_NOTMAKE]) -m4trace:/usr/share/aclocal-1.15/substnot.m4:17: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) -m4trace:/usr/share/aclocal-1.15/tar.m4:23: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AC_SUBST([AMTAR], ['$${TAR-tar}']) - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' - -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - - [m4_case([$1], - [ustar], - [# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) - if test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi - AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) - if test $am_gid -le $am_max_gid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi], - - [pax], - [], - - [m4_fatal([Unknown tar format])]) - - AC_MSG_CHECKING([how to create a $1 tar archive]) - - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_$1-$_am_tools} - - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar <conftest.tar]) - AM_RUN_LOG([cat conftest.dir/file]) - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi - done - rm -rf conftest.dir - - AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) - AC_MSG_RESULT([$am_cv_prog_tar_$1])]) - -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) -m4trace:acinclude.m4:173: -1- AC_DEFUN([GMP_SUBST_CHECK_FUNCS], [m4_if([$1],,, -[_GMP_SUBST_CHECK_FUNCS(ac_cv_func_[$1],HAVE_[]m4_translit([$1],[a-z],[A-Z])_01) -GMP_SUBST_CHECK_FUNCS(m4_shift($@))])]) -m4trace:acinclude.m4:179: -1- AC_DEFUN([_GMP_SUBST_CHECK_FUNCS], [case $[$1] in -yes) AC_SUBST([$2],1) ;; -no) [$2]=0 ;; -esac -]) -m4trace:acinclude.m4:191: -1- AC_DEFUN([GMP_SUBST_CHECK_HEADERS], [m4_if([$1],,, -[_GMP_SUBST_CHECK_HEADERS(ac_cv_header_[]m4_translit([$1],[./],[__]), -HAVE_[]m4_translit([$1],[a-z./],[A-Z__])_01) -GMP_SUBST_CHECK_HEADERS(m4_shift($@))])]) -m4trace:acinclude.m4:198: -1- AC_DEFUN([_GMP_SUBST_CHECK_HEADERS], [case $[$1] in -yes) AC_SUBST([$2],1) ;; -no) [$2]=0 ;; -esac -]) -m4trace:acinclude.m4:221: -1- AC_DEFUN([GMP_COMPARE_GE], [gmp_compare_ge=no -GMP_COMPARE_GE_INTERNAL($@) -]) -m4trace:acinclude.m4:226: -1- AC_DEFUN([GMP_COMPARE_GE_INTERNAL], [ifelse(len([$3]),0, -[if test -n "$1" && test "$1" -ge $2; then - gmp_compare_ge=yes -fi], -[if test -n "$1"; then - if test "$1" -gt $2; then - gmp_compare_ge=yes - else - if test "$1" -eq $2; then - GMP_COMPARE_GE_INTERNAL(m4_shift(m4_shift($@))) - fi - fi -fi]) -]) -m4trace:acinclude.m4:276: -1- AC_DEFUN([GMP_PROG_AR], [dnl Want to establish $AR before libtool initialization. -AC_BEFORE([$0],[AC_PROG_LIBTOOL]) -gmp_user_AR=$AR -AC_CHECK_TOOL(AR, ar, ar) -if test -z "$gmp_user_AR"; then - eval arflags=\"\$ar${abi1}_flags\" - test -n "$arflags" || eval arflags=\"\$ar${abi2}_flags\" - if test -n "$arflags"; then - AC_MSG_CHECKING([for extra ar flags]) - AR="$AR $arflags" - ac_cv_prog_AR="$AR $arflags" - ac_cv_prog_ac_ct_AR="$AR $arflags" - AC_MSG_RESULT([$arflags]) - fi -fi -if test -z "$AR_FLAGS"; then - AR_FLAGS=cq -fi -]) -m4trace:acinclude.m4:308: -1- AC_DEFUN([GMP_PROG_M4], [AC_ARG_VAR(M4,[m4 macro processor]) -AC_CACHE_CHECK([for suitable m4], - gmp_cv_prog_m4, -[if test -n "$M4"; then - gmp_cv_prog_m4="$M4" -else - cat >conftest.m4 <<\EOF -dnl Must protect this against being expanded during autoconf m4! -dnl Dont put "dnl"s in this as autoconf will flag an error for unexpanded -dnl macros. -[define(dollarhash,``$][#'')ifelse(dollarhash(x),1,`define(t1,Y)', -``bad: $][# not supported (SunOS /usr/bin/m4) -'')ifelse(eval(89),89,`define(t2,Y)', -`bad: eval() doesnt support 8 or 9 in a constant (OpenBSD 2.6 m4) -')ifelse(eval(9,9),10,`define(t3,Y)', -`bad: eval() doesnt support radix in eval (FreeBSD 8.x,9.0,9.1,9.2 m4) -')ifelse(t1`'t2`'t3,YYY,`good -')] -EOF -dnl ' <- balance the quotes for emacs sh-mode - echo "trying m4" >&AC_FD_CC - gmp_tmp_val=`(m4 conftest.m4) 2>&AC_FD_CC` - echo "$gmp_tmp_val" >&AC_FD_CC - if test "$gmp_tmp_val" = good; then - gmp_cv_prog_m4="m4" - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="$PATH:/usr/5bin" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - echo "trying $ac_dir/m4" >&AC_FD_CC - gmp_tmp_val=`($ac_dir/m4 conftest.m4) 2>&AC_FD_CC` - echo "$gmp_tmp_val" >&AC_FD_CC - if test "$gmp_tmp_val" = good; then - gmp_cv_prog_m4="$ac_dir/m4" - break - fi - done - IFS="$ac_save_ifs" - if test -z "$gmp_cv_prog_m4"; then - AC_MSG_ERROR([No usable m4 in \$PATH or /usr/5bin (see config.log for reasons).]) - fi - fi - rm -f conftest.m4 -fi]) -M4="$gmp_cv_prog_m4" -AC_SUBST(M4) -]) -m4trace:acinclude.m4:378: -1- AC_DEFUN([GMP_M4_M4WRAP_SPURIOUS], [AC_REQUIRE([GMP_PROG_M4]) -AC_CACHE_CHECK([if m4wrap produces spurious output], - gmp_cv_m4_m4wrap_spurious, -[# hide the d-n-l from autoconf's error checking -tmp_d_n_l=d""nl -cat >conftest.m4 <<EOF -[changequote({,})define(x,)m4wrap({x})$tmp_d_n_l] -EOF -echo test input is >&AC_FD_CC -cat conftest.m4 >&AC_FD_CC -tmp_chars=`$M4 conftest.m4 | wc -c` -echo produces $tmp_chars chars output >&AC_FD_CC -rm -f conftest.m4 -if test $tmp_chars = 0; then - gmp_cv_m4_m4wrap_spurious=no -else - gmp_cv_m4_m4wrap_spurious=yes -fi -]) -GMP_DEFINE_RAW(["define(<M4WRAP_SPURIOUS>,<$gmp_cv_m4_m4wrap_spurious>)"]) -]) -m4trace:acinclude.m4:422: -1- AC_DEFUN([GMP_PROG_NM], [dnl Make sure we're the first to call AC_PROG_NM, so our extra flags are -dnl used by everyone. -AC_BEFORE([$0],[AC_PROG_NM]) -gmp_user_NM=$NM -AC_PROG_NM - -# FIXME: When cross compiling (ie. $ac_tool_prefix not empty), libtool -# defaults to plain "nm" if a "${ac_tool_prefix}nm" is not found. In this -# case run it again to try the native "nm", firstly so that likely locations -# are searched, secondly so that -B or -p are added if necessary for BSD -# format. This is necessary for instance on OSF with "./configure -# --build=alphaev5-dec-osf --host=alphaev6-dec-osf". -# -if test -z "$gmp_user_NM" && test -n "$ac_tool_prefix" && test "$NM" = nm; then - $as_unset lt_cv_path_NM - gmp_save_ac_tool_prefix=$ac_tool_prefix - ac_tool_prefix= - NM= - AC_PROG_NM - ac_tool_prefix=$gmp_save_ac_tool_prefix -fi - -if test -z "$gmp_user_NM"; then - eval nmflags=\"\$nm${abi1}_flags\" - test -n "$nmflags" || eval nmflags=\"\$nm${abi2}_flags\" - if test -n "$nmflags"; then - AC_MSG_CHECKING([for extra nm flags]) - NM="$NM $nmflags" - AC_MSG_RESULT([$nmflags]) - fi -fi -]) -m4trace:acinclude.m4:479: -1- AC_DEFUN([GMP_PROG_CC_WORKS], [AC_MSG_CHECKING([compiler $1]) -gmp_prog_cc_works=yes - -# first see a simple "main()" works, then go on to other checks -GMP_PROG_CC_WORKS_PART([$1], []) - -GMP_PROG_CC_WORKS_PART([$1], [function pointer return], -[/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 - (without -maix64), hence detecting an unusable compiler */ -void *g() { return (void *) 0; } -void *f() { return g(); } -]) - -GMP_PROG_CC_WORKS_PART([$1], [cmov instruction], -[/* The following provokes an invalid instruction syntax from i386 gcc - -march=pentiumpro on Solaris 2.8. The native sun assembler - requires a non-standard syntax for cmov which gcc (as of 2.95.2 at - least) doesn't know. */ -int n; -int cmov () { return (n >= 0 ? n : 0); } -]) - -GMP_PROG_CC_WORKS_PART([$1], [double -> ulong conversion], -[/* The following provokes a linker invocation problem with gcc 3.0.3 - on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 - option causes gcc to incorrectly select the 32-bit libgcc.a, not - the 64-bit one, and consequently it misses out on the __fixunsdfdi - helper (double -> uint64 conversion). */ -double d; -unsigned long gcc303 () { return (unsigned long) d; } -]) - -GMP_PROG_CC_WORKS_PART([$1], [double negation], -[/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if - the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 - instruction, and a negation like this comes out using it. */ -double fneg_data; -unsigned long fneg () { return -fneg_data; } -]) - -GMP_PROG_CC_WORKS_PART([$1], [double -> float conversion], -[/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn - (cvtsd2ss) which will provoke an error if the assembler doesn't recognise - those instructions. Not sure how much of the gmp code will come out - wanting sse2, but it's easiest to reject an option we know is bad. */ -double ftod_data; -float ftod () { return (float) ftod_data; } -]) - -GMP_PROG_CC_WORKS_PART([$1], [gnupro alpha ev6 char spilling], -[/* The following provokes an internal compiler error from gcc version - "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char - values being spilled into floating point registers. The problem doesn't - show up all the time, but has occurred enough in GMP for us to reject - this compiler+flags. */ -#include <string.h> /* for memcpy */ -struct try_t -{ - char dst[2]; - char size; - long d0, d1, d2, d3, d4, d5, d6; - char overlap; -}; -struct try_t param[6]; -int -param_init () -{ - struct try_t *p; - memcpy (p, ¶m[ 2 ], sizeof (*p)); - memcpy (p, ¶m[ 2 ], sizeof (*p)); - p->size = 2; - memcpy (p, ¶m[ 1 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 2; - memcpy (p, ¶m[ 3 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 8; - memcpy (p, ¶m[ 4 ], sizeof (*p)); - memcpy (p, ¶m[ 4 ], sizeof (*p)); - p->overlap = 8; - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - return 0; -} -]) - -# __builtin_alloca is not available everywhere, check it exists before -# seeing that it works -GMP_PROG_CC_WORKS_PART_TEST([$1],[__builtin_alloca availability], -[int k; int foo () { __builtin_alloca (k); }], - [GMP_PROG_CC_WORKS_PART([$1], [alloca array], -[/* The following provokes an internal compiler error from Itanium HP-UX cc - under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ -int k; -int foo () -{ - int i, **a; - a = __builtin_alloca (k); - for (i = 0; i <= k; i++) - a[i] = __builtin_alloca (1 << i); -} -])]) - -GMP_PROG_CC_WORKS_PART([$1], [abs int -> double conversion], -[/* The following provokes an internal error from the assembler on - power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this - results in "Internal error related to the source program domain". - - For reference it seems to be the combination of nabs+fcirz which is bad, - not either alone. This sort of thing occurs in mpz/get_str.c with the - way double chars_per_bit_exactly is applied in MPN_SIZEINBASE. Perhaps - if that code changes to a scaled-integer style then we won't need this - test. */ - -double fp[1]; -int x; -int f () -{ - int a; - a = (x >= 0 ? x : -x); - return a * fp[0]; -} -]) - -GMP_PROG_CC_WORKS_PART([$1], [long long reliability test 1], -[/* The following provokes a segfault in the compiler on powerpc-apple-darwin. - Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to segfault with e.g., -O2 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -typedef unsigned long long t1;typedef t1*t2; -void g(){} -void h(){} -static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) -{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;} -void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i; -for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}} -#else -int dummy; -#endif -]) - -GMP_PROG_CC_WORKS_PART([$1], [long long reliability test 2], -[/* The following provokes an internal compiler error on powerpc-apple-darwin. - Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to get an ICE with -O1 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int g(); -void f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();} -int g(){return 0;} -#else -int dummy; -#endif -]) - -GMP_PROG_CC_WORKS_PART([$1], [freebsd hacked gcc], -[/* Provokes an ICE on i386-freebsd with the FreeBSD-hacked gcc, under - -O2 -march=amdfam10. We call helper functions here "open" and "close" in - order for linking to succeed. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int open(int*,int*,int);void*close(int);void g(int*rp,int*up,int un){ -__builtin_expect(un<=0x7f00,1)?__builtin_alloca(un):close(un);if(__builtin_clzl -(up[un])){open(rp,up,un);while(1){if(rp[un-1]!=0)break;un--;}}} -#else -int dummy; -#endif -]) - -GMP_PROG_CC_WORKS_PART_MAIN([$1], [mpn_lshift_com optimization], -[/* The following is mis-compiled by HP ia-64 cc version - cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003] - under "cc +O3", both in +DD32 and +DD64 modes. The mpn_lshift_com gets - inlined and its return value somehow botched to be 0 instead of 1. This - arises in the real mpn_lshift_com in mul_fft.c. A lower optimization - level, like +O2 seems ok. This code needs to be run to show the problem, - but that's fine, the offending cc is a native-only compiler so we don't - have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -unsigned long -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long retval, high_limb, low_limb; - unsigned tnc; - long i; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *up++; - retval = low_limb >> tnc; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *up++; - *rp++ = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - return retval; -} -int -main () -{ - unsigned long cy, rp[2], up[2]; - up[0] = ~ 0L; - up[1] = 0; - cy = lshift_com (rp, up, 2L, 1); - if (cy != 1L) - return 1; - return 0; -} -#else -int -main () -{ - return 0; -} -#endif -]) - -GMP_PROG_CC_WORKS_PART_MAIN([$1], [mpn_lshift_com optimization 2], -[/* The following is mis-compiled by Intel ia-64 icc version 1.8 under - "icc -O3", After several calls, the function writes partial garbage to - the result vector. Perhaps relates to the chk.a.nc insn. This code needs - to be run to show the problem, but that's fine, the offending cc is a - native-only compiler so we don't have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -#include <stdlib.h> -void -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long high_limb, low_limb; - unsigned tnc; - long i; - up += n; - rp += n; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *--up; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *--up; - *--rp = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - *--rp = ~high_limb; -} -int -main () -{ - unsigned long *r, *r2; - unsigned long a[88 + 1]; - long i; - for (i = 0; i < 88 + 1; i++) - a[i] = ~0L; - r = malloc (10000 * sizeof (unsigned long)); - r2 = r; - for (i = 0; i < 528; i += 22) - { - lshift_com (r2, a, - i / (8 * sizeof (unsigned long)) + 1, - i % (8 * sizeof (unsigned long))); - r2 += 88 + 1; - } - if (r[2048] != 0 || r[2049] != 0 || r[2050] != 0 || r[2051] != 0 || - r[2052] != 0 || r[2053] != 0 || r[2054] != 0) - abort (); - return 0; -} -#else -int -main () -{ - return 0; -} -#endif -]) - - -# A certain _GLOBAL_OFFSET_TABLE_ problem in past versions of gas, tickled -# by recent versions of gcc. -# -if test "$gmp_prog_cc_works" = yes; then - case $host in - X86_PATTERN) - # this problem only arises in PIC code, so don't need to test when - # --disable-shared. We don't necessarily have $enable_shared set to - # yes at this point, it will still be unset for the default (which is - # yes); hence the use of "!= no". - if test "$enable_shared" != no; then - GMP_PROG_CC_X86_GOT_EAX_EMITTED([$1], - [GMP_ASM_X86_GOT_EAX_OK([$1],, - [gmp_prog_cc_works="no, bad gas GOT with eax"])]) - fi - ;; - esac -fi - -AC_MSG_RESULT($gmp_prog_cc_works) -case $gmp_prog_cc_works in - yes) - [$2] - ;; - *) - [$3] - ;; -esac -]) -m4trace:acinclude.m4:801: -1- AC_DEFUN([GMP_PROG_CC_WORKS_PART], [GMP_PROG_CC_WORKS_PART_MAIN([$1],[$2], -[$3] -[int main () { return 0; }]) -]) -m4trace:acinclude.m4:810: -1- AC_DEFUN([GMP_PROG_CC_WORKS_PART_MAIN], [GMP_PROG_CC_WORKS_PART_TEST([$1],[$2],[$3], - [], - gmp_prog_cc_works="no[]m4_if([$2],,,[[, ]])[$2]", - gmp_prog_cc_works="no[]m4_if([$2],,,[[, ]])[$2][[, program does not run]]") -]) -m4trace:acinclude.m4:820: -1- AC_DEFUN([GMP_PROG_CC_WORKS_PART_TEST], [if test "$gmp_prog_cc_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.c <<EOF -[$3] -EOF - echo "Test compile: [$2]" >&AC_FD_CC - gmp_compile="$1 conftest.c >&AC_FD_CC" - if AC_TRY_EVAL(gmp_compile); then - cc_works_part=yes - if test "$cross_compiling" = no; then - if AC_TRY_COMMAND([./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest]); then :; - else - cc_works_part=norun - fi - fi - else - cc_works_part=no - fi - if test "$cc_works_part" != yes; then - echo "failed program was:" >&AC_FD_CC - cat conftest.c >&AC_FD_CC - fi - rm -f conftest* a.out b.out a.exe a_out.exe - case $cc_works_part in - yes) - $4 - ;; - no) - $5 - ;; - norun) - $6 - ;; - esac -fi -]) -m4trace:acinclude.m4:867: -1- AC_DEFUN([GMP_PROG_CC_WORKS_LONGLONG], [AC_MSG_CHECKING([compiler $1 has long long]) -cat >conftest.c <<EOF -long long foo; -long long bar () { return foo; } -int main () { return 0; } -EOF -gmp_prog_cc_works=no -gmp_compile="$1 -c conftest.c >&AC_FD_CC" -if AC_TRY_EVAL(gmp_compile); then - gmp_prog_cc_works=yes -else - echo "failed program was:" >&AC_FD_CC - cat conftest.c >&AC_FD_CC -fi -rm -f conftest* a.out b.out a.exe a_out.exe -AC_MSG_RESULT($gmp_prog_cc_works) -if test $gmp_prog_cc_works = yes; then - ifelse([$2],,:,[$2]) -else - ifelse([$3],,:,[$3]) -fi -]) -m4trace:acinclude.m4:907: -1- AC_DEFUN([GMP_C_TEST_SIZEOF], [echo "configure: testlist $2" >&AC_FD_CC -[gmp_sizeof_type=`echo "$2" | sed 's/sizeof-\([a-z]*\).*/\1/'`] -[gmp_sizeof_want=`echo "$2" | sed 's/sizeof-[a-z]*-\([0-9]*\).*/\1/'`] -AC_MSG_CHECKING([compiler $1 has sizeof($gmp_sizeof_type)==$gmp_sizeof_want]) -cat >conftest.c <<EOF -[int -main () -{ - static int test_array [1 - 2 * (long) (sizeof ($gmp_sizeof_type) != $gmp_sizeof_want)]; - test_array[0] = 0; - return 0; -}] -EOF -gmp_c_testlist_sizeof=no -gmp_compile="$1 -c conftest.c >&AC_FD_CC" -if AC_TRY_EVAL(gmp_compile); then - gmp_c_testlist_sizeof=yes -fi -rm -f conftest* -AC_MSG_RESULT($gmp_c_testlist_sizeof) -if test $gmp_c_testlist_sizeof = yes; then - ifelse([$3],,:,[$3]) -else - ifelse([$4],,:,[$4]) -fi -]) -m4trace:acinclude.m4:944: -1- AC_DEFUN([GMP_PROG_CC_IS_GNU], [cat >conftest.c <<EOF -#if ! defined (__GNUC__) || defined (__INTEL_COMPILER) - choke me -#endif -EOF -gmp_compile="$1 -c conftest.c >&AC_FD_CC" -if AC_TRY_EVAL(gmp_compile); then - rm -f conftest* - AC_MSG_CHECKING([whether $1 is gcc]) - AC_MSG_RESULT(yes) - ifelse([$2],,:,[$2]) -else - rm -f conftest* - ifelse([$3],,:,[$3]) -fi -]) -m4trace:acinclude.m4:971: -1- AC_DEFUN([GMP_PROG_CC_IS_XLC], [gmp_command="$1 2>&1 | grep xlc >/dev/null" -if AC_TRY_EVAL(gmp_command); then - AC_MSG_CHECKING([whether $1 is xlc]) - AC_MSG_RESULT(yes) - ifelse([$2],,:,[$2]) -else - ifelse([$3],,:,[$3]) -fi -]) -m4trace:acinclude.m4:1011: -1- AC_DEFUN([GMP_PROG_CC_X86_GOT_EAX_EMITTED], [echo "Testing gcc GOT with eax emitted" >&AC_FD_CC -cat >conftest.c <<\EOF -[int foo; -int bar () { return foo; } -]EOF -tmp_got_emitted=no -gmp_compile="$1 -fPIC -S conftest.c >&AC_FD_CC 2>&1" -if AC_TRY_EVAL(gmp_compile); then - if grep "addl.*_GLOBAL_OFFSET_TABLE_.*eax" conftest.s >/dev/null; then - tmp_got_emitted=yes - fi -fi -rm -f conftest.* -echo "Result: $tmp_got_emitted" >&AC_FD_CC -if test "$tmp_got_emitted" = yes; then - ifelse([$2],,:,[$2]) -else - ifelse([$3],,:,[$3]) -fi -]) -m4trace:acinclude.m4:1041: -1- AC_DEFUN([GMP_HPC_HPPA_2_0], [AC_MSG_CHECKING([whether HP compiler $1 is good for 64-bits]) -# Bad compiler output: -# ccom: HP92453-01 G.10.32.05 HP C Compiler -# Good compiler output: -# ccom: HP92453-01 A.10.32.30 HP C Compiler -# Let A.10.32.30 or higher be ok. -echo >conftest.c -gmp_tmp_vs=`$1 $2 -V -c -o conftest.$OBJEXT conftest.c 2>&1 | grep "^ccom:"` -echo "Version string: $gmp_tmp_vs" >&AC_FD_CC -rm conftest* -gmp_tmp_v1=`echo $gmp_tmp_vs | sed 's/.* .\.\([[0-9]]*\).*/\1/'` -gmp_tmp_v2=`echo $gmp_tmp_vs | sed 's/.* .\..*\.\(.*\)\..* HP C.*/\1/'` -gmp_tmp_v3=`echo $gmp_tmp_vs | sed 's/.* .\..*\..*\.\(.*\) HP C.*/\1/'` -echo "Version number: $gmp_tmp_v1.$gmp_tmp_v2.$gmp_tmp_v3" >&AC_FD_CC -if test -z "$gmp_tmp_v1"; then - gmp_hpc_64bit=not-applicable -else - GMP_COMPARE_GE($gmp_tmp_v1, 10, $gmp_tmp_v2, 32, $gmp_tmp_v3, 30) - gmp_hpc_64bit=$gmp_compare_ge -fi -AC_MSG_RESULT($gmp_hpc_64bit) -if test $gmp_hpc_64bit = yes; then - ifelse([$2],,:,[$2]) -else - ifelse([$3],,:,[$3]) -fi -]) -m4trace:acinclude.m4:1082: -1- AC_DEFUN([GMP_GCC_ARM_UMODSI], [AC_MSG_CHECKING([whether ARM gcc unsigned division works]) -tmp_version=`$1 --version` -echo "$tmp_version" >&AC_FD_CC -case $tmp_version in - [2.95 | 2.95.[123]]) - ifelse([$3],,:,[$3]) - gmp_gcc_arm_umodsi_result=["no, gcc 2.95.[0123]"] ;; - *) - ifelse([$2],,:,[$2]) - gmp_gcc_arm_umodsi_result=yes ;; -esac -AC_MSG_RESULT([$gmp_gcc_arm_umodsi_result]) -]) -m4trace:acinclude.m4:1107: -1- AC_DEFUN([GMP_GCC_MIPS_O32], [AC_MSG_CHECKING([whether gcc supports o32]) -echo 'int x;' >conftest.c -echo "$1 -mabi=32 -c conftest.c" >&AC_FD_CC -if $1 -mabi=32 -c conftest.c >conftest.out 2>&1; then - result=yes -else - cat conftest.out >&AC_FD_CC - if grep "cc1: Invalid option \`abi=32'" conftest.out >/dev/null; then - result=yes - else - result=no - fi -fi -rm -f conftest.* -AC_MSG_RESULT($result) -if test $result = yes; then - ifelse([$2],,:,[$2]) -else - ifelse([$3],,:,[$3]) -fi -]) -m4trace:acinclude.m4:1142: -1- AC_DEFUN([GMP_GCC_NO_CPP_PRECOMP], [if test "$ccbase" = gcc; then - AC_MSG_CHECKING([compiler $2 $3 -no-cpp-precomp]) - result=no - cat >conftest.c <<EOF -int main () { return 0; } -EOF - gmp_compile="$2 $3 -no-cpp-precomp conftest.c >conftest.out 2>&1" - if AC_TRY_EVAL(gmp_compile); then - if grep "unrecognized option.*-no-cpp-precomp" conftest.out >/dev/null; then : ; - else - result=yes - fi - fi - cat conftest.out >&AC_FD_CC - rm -f conftest* a.out b.out a.exe a_out.exe - AC_MSG_RESULT($result) - if test "$result" = yes; then - ifelse([$4],,:,[$4]) - else - ifelse([$5],,:,[$5]) - fi -fi -]) -m4trace:acinclude.m4:1177: -1- AC_DEFUN([GMP_GCC_PENTIUM4_SSE2], [AC_MSG_CHECKING([whether gcc is good for sse2]) -case `$1 -dumpversion` in - [3.[012] | 3.[012].*]) result=no ;; - *) result=yes ;; -esac -AC_MSG_RESULT($result) -if test "$result" = yes; then - ifelse([$2],,:,[$2]) -else - ifelse([$3],,:,[$3]) -fi -]) -m4trace:acinclude.m4:1202: -1- AC_DEFUN([GMP_GCC_WA_MCPU], [AC_MSG_CHECKING([assembler $1 $2]) -result=no -cat >conftest.c <<EOF -int main () {} -EOF -gmp_compile="$1 $2 -c conftest.c >conftest.out 2>&1" -if AC_TRY_EVAL(gmp_compile); then - if grep "Unknown CPU identifier" conftest.out >/dev/null; then : ; - else - result=yes - fi -fi -cat conftest.out >&AC_FD_CC -rm -f conftest* -AC_MSG_RESULT($result) -if test "$result" = yes; then - ifelse([$3],,:,[$3]) -else - ifelse([$4],,:,[$4]) -fi -]) -m4trace:acinclude.m4:1254: -1- AC_DEFUN([GMP_GCC_WA_OLDAS], [AC_MSG_CHECKING([for $1 -Wa,-oldas]) -result=no -cat >conftest.c <<EOF -EOF -echo "with empty conftest.c" >&AC_FD_CC -gmp_compile="$1 -c conftest.c >&AC_FD_CC 2>&1" -if AC_TRY_EVAL(gmp_compile); then : ; -else - # empty fails - gmp_compile="$1 -Wa,-oldas -c conftest.c >&AC_FD_CC 2>&1" - if AC_TRY_EVAL(gmp_compile); then - # but with -Wa,-oldas it works - result=yes - fi -fi -rm -f conftest* -AC_MSG_RESULT($result) -if test "$result" = yes; then - ifelse([$2],,:,[$2]) -else - ifelse([$3],,:,[$3]) -fi -]) -m4trace:acinclude.m4:1314: -1- AC_DEFUN([GMP_OS_X86_XMM], [AC_CACHE_CHECK([whether the operating system supports XMM registers], - gmp_cv_os_x86_xmm, -[if test "$build" = "$host"; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.s <<EOF - .text -main: -_main: - .globl main - .globl _main - .byte 0x0f, 0x57, 0xc0 - xorl %eax, %eax - ret -EOF - gmp_compile="$1 conftest.s -o conftest >&AC_FD_CC" - if AC_TRY_EVAL(gmp_compile); then - if AC_TRY_COMMAND([./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest]); then - gmp_cv_os_x86_xmm=yes - else - gmp_cv_os_x86_xmm=no - fi - else - AC_MSG_WARN([Oops, cannot compile test program]) - fi - rm -f conftest* -fi - -if test -z "$gmp_cv_os_x86_xmm"; then - case $host_os in - [freebsd[123] | freebsd[123].*]) - gmp_cv_os_x86_xmm=no ;; - freebsd*) - gmp_cv_os_x86_xmm=yes ;; - *) - gmp_cv_os_x86_xmm=probably ;; - esac -fi -]) - -if test "$gmp_cv_os_x86_xmm" = probably; then - AC_MSG_WARN([Not certain of OS support for xmm when cross compiling.]) - AC_MSG_WARN([Will assume it's ok, expect a SIGILL if this is wrong.]) -fi - -case $gmp_cv_os_x86_xmm in -no) - $3 - ;; -*) - $2 - ;; -esac -]) -m4trace:acinclude.m4:1385: -1- AC_DEFUN([GMP_CRAY_OPTIONS], [case $host_cpu in - c90 | t90) - AC_EGREP_CPP(yes, -[#ifdef _CRAYIEEE -yes -#endif], - [$1], - [$2]) - ;; - j90 | sv1) - [$3] - ;; -esac -]) -m4trace:acinclude.m4:1412: -1- AC_DEFUN([GMP_HPPA_LEVEL_20], [AC_MSG_CHECKING([$1 assembler knows hppa 2.0]) -result=no -cat >conftest.s <<EOF - .level 2.0 -EOF -gmp_compile="$1 -c conftest.s >&AC_FD_CC 2>&1" -if AC_TRY_EVAL(gmp_compile); then - result=yes -else - echo "failed program was" >&AC_FD_CC - cat conftest.s >&AC_FD_CC -fi -rm -f conftest* -AC_MSG_RESULT($result) -if test "$result" = yes; then - ifelse([$2],,:,[$2]) -else - ifelse([$3],,:,[$3]) -fi -]) -m4trace:acinclude.m4:1452: -1- AC_DEFUN([GMP_PROG_CXX_WORKS], [AC_MSG_CHECKING([C++ compiler $1]) -gmp_prog_cxx_works=yes - -# start with a plain "main()", then go on to further checks -GMP_PROG_CXX_WORKS_PART([$1], []) - -GMP_PROG_CXX_WORKS_PART([$1], [namespace], -[namespace foo { } -using namespace foo; -]) - -# GMP requires the standard C++ iostream classes -GMP_PROG_CXX_WORKS_PART([$1], [std iostream], -[/* This test rejects g++ 2.7.2 which doesn't have <iostream>, only a - pre-standard iostream.h. */ -#include <iostream> - -/* This test rejects OSF 5.1 Compaq C++ in its default pre-standard iostream - mode, since that mode puts cout in the global namespace, not "std". */ -void someoutput (void) { std::cout << 123; } -]) - -AC_MSG_RESULT($gmp_prog_cxx_works) -case $gmp_prog_cxx_works in - yes) - [$2] - ;; - *) - [$3] - ;; -esac -]) -m4trace:acinclude.m4:1488: -1- AC_DEFUN([GMP_PROG_CXX_WORKS_PART], [if test "$gmp_prog_cxx_works" = yes; then - # remove anything that might look like compiler output to our "||" expression - rm -f conftest* a.out b.out a.exe a_out.exe - cat >conftest.cc <<EOF -[$3] -int main (void) { return 0; } -EOF - echo "Test compile: [$2]" >&AC_FD_CC - gmp_cxxcompile="$1 conftest.cc >&AC_FD_CC" - if AC_TRY_EVAL(gmp_cxxcompile); then - if test "$cross_compiling" = no; then - if AC_TRY_COMMAND([./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest]); then :; - else - gmp_prog_cxx_works="no[]m4_if([$2],,,[, ])[$2], program does not run" - fi - fi - else - gmp_prog_cxx_works="no[]m4_if([$2],,,[, ])[$2]" - fi - case $gmp_prog_cxx_works in - no*) - echo "failed program was:" >&AC_FD_CC - cat conftest.cc >&AC_FD_CC - ;; - esac - rm -f conftest* a.out b.out a.exe a_out.exe -fi -]) -m4trace:acinclude.m4:1526: -1- AC_DEFUN([GMP_INIT], [ifelse([$1], , gmp_configm4=config.m4, gmp_configm4="[$1]") -gmp_tmpconfigm4=cnfm4.tmp -gmp_tmpconfigm4i=cnfm4i.tmp -gmp_tmpconfigm4p=cnfm4p.tmp -rm -f $gmp_tmpconfigm4 $gmp_tmpconfigm4i $gmp_tmpconfigm4p - -# CONFIG_TOP_SRCDIR is a path from the mpn builddir to the top srcdir. -# The pattern here tests for an absolute path the same way as -# _AC_OUTPUT_FILES in autoconf acgeneral.m4. -case $srcdir in -[[\\/]]* | ?:[[\\/]]* ) tmp="$srcdir" ;; -*) tmp="../$srcdir" ;; -esac -echo ["define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)"] >>$gmp_tmpconfigm4 - -# All CPUs use asm-defs.m4 -echo ["include][(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')"] >>$gmp_tmpconfigm4i -]) -m4trace:acinclude.m4:1564: -1- AC_DEFUN([GMP_FINISH], [AC_REQUIRE([GMP_INIT]) -echo "creating $gmp_configm4" -echo ["d""nl $gmp_configm4. Generated automatically by configure."] > $gmp_configm4 -if test -f $gmp_tmpconfigm4; then - echo ["changequote(<,>)"] >> $gmp_configm4 - echo ["ifdef(<__CONFIG_M4_INCLUDED__>,,<"] >> $gmp_configm4 - cat $gmp_tmpconfigm4 >> $gmp_configm4 - echo [">)"] >> $gmp_configm4 - echo ["changequote(\`,')"] >> $gmp_configm4 - rm $gmp_tmpconfigm4 -fi -echo ["ifdef(\`__CONFIG_M4_INCLUDED__',,\`"] >> $gmp_configm4 -if test -f $gmp_tmpconfigm4i; then - cat $gmp_tmpconfigm4i >> $gmp_configm4 - rm $gmp_tmpconfigm4i -fi -if test -f $gmp_tmpconfigm4p; then - cat $gmp_tmpconfigm4p >> $gmp_configm4 - rm $gmp_tmpconfigm4p -fi -echo ["')"] >> $gmp_configm4 -echo ["define(\`__CONFIG_M4_INCLUDED__')"] >> $gmp_configm4 -]) -m4trace:acinclude.m4:1598: -1- AC_DEFUN([GMP_INCLUDE_MPN], [AC_REQUIRE([GMP_INIT]) -echo ["include_mpn(\`$1')"] >> $gmp_tmpconfigm4i -]) -m4trace:acinclude.m4:1614: -1- AC_DEFUN([GMP_DEFINE], [AC_REQUIRE([GMP_INIT]) -echo ['define(<$1>, <$2>)'] >>ifelse([$3], [POST], - $gmp_tmpconfigm4p, $gmp_tmpconfigm4) -]) -m4trace:acinclude.m4:1629: -1- AC_DEFUN([GMP_DEFINE_RAW], [AC_REQUIRE([GMP_INIT]) -echo [$1] >> ifelse([$2], [POST], $gmp_tmpconfigm4p, $gmp_tmpconfigm4) -]) -m4trace:acinclude.m4:1647: -1- AC_DEFUN([GMP_TRY_ASSEMBLE], [cat >conftest.s <<EOF -[$1] -EOF -gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1" -if AC_TRY_EVAL(gmp_assemble); then - cat conftest.out >&AC_FD_CC - ifelse([$2],,:,[$2]) -else - cat conftest.out >&AC_FD_CC - echo "configure: failed program was:" >&AC_FD_CC - cat conftest.s >&AC_FD_CC - ifelse([$3],,:,[$3]) -fi -rm -f conftest* -]) -m4trace:acinclude.m4:1671: -1- AC_DEFUN([CL_AS_NOEXECSTACK], [ -dnl AC_REQUIRE([AC_PROG_CC]) GMP uses something else -AC_CACHE_CHECK([whether assembler supports --noexecstack option], -cl_cv_as_noexecstack, [dnl - cat > conftest.c <<EOF -void foo() {} -EOF - if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS - -S -o conftest.s conftest.c >/dev/null]) \ - && grep .note.GNU-stack conftest.s >/dev/null \ - && AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -Wa,--noexecstack - -c -o conftest.o conftest.s >/dev/null]) - then - cl_cv_as_noexecstack=yes - else - cl_cv_as_noexecstack=no - fi - rm -f conftest*]) - if test "$cl_cv_as_noexecstack" = yes; then - ASMFLAGS="$ASMFLAGS -Wa,--noexecstack" - fi - AC_SUBST(ASMFLAGS) -]) -m4trace:acinclude.m4:1705: -1- AC_DEFUN([GMP_ASM_LABEL_SUFFIX], [AC_REQUIRE([GMP_ASM_TEXT]) -AC_CACHE_CHECK([for assembler label suffix], - gmp_cv_asm_label_suffix, -[gmp_cv_asm_label_suffix=unknown -for i in "" ":"; do - echo "trying $i" >&AC_FD_CC - GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_text -somelabel$i], - [gmp_cv_asm_label_suffix=$i - rm -f conftest* - break], - [cat conftest.out >&AC_FD_CC]) -done -if test "$gmp_cv_asm_label_suffix" = "unknown"; then - AC_MSG_ERROR([Cannot determine label suffix]) -fi -]) -echo ["define(<LABEL_SUFFIX>, <$gmp_cv_asm_label_suffix>)"] >> $gmp_tmpconfigm4 -]) -m4trace:acinclude.m4:1746: -1- AC_DEFUN([GMP_ASM_UNDERSCORE], [AC_REQUIRE([GMP_PROG_NM]) -AC_CACHE_CHECK([if globals are prefixed by underscore], - gmp_cv_asm_underscore, -[gmp_cv_asm_underscore="unknown" -cat >conftest.c <<EOF -int gurkmacka; -EOF -gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >&AC_FD_CC" -if AC_TRY_EVAL(gmp_compile); then - $NM conftest.$OBJEXT >conftest.out - if grep _gurkmacka conftest.out >/dev/null; then - gmp_cv_asm_underscore=yes - elif grep gurkmacka conftest.out >/dev/null; then - gmp_cv_asm_underscore=no - else - echo "configure: $NM doesn't have gurkmacka:" >&AC_FD_CC - cat conftest.out >&AC_FD_CC - fi -else - echo "configure: failed program was:" >&AC_FD_CC - cat conftest.c >&AC_FD_CC -fi -rm -f conftest* -]) -case $gmp_cv_asm_underscore in - yes) - GMP_DEFINE(GSYM_PREFIX, [_]) ;; - no) - GMP_DEFINE(GSYM_PREFIX, []) ;; - *) - AC_MSG_WARN([+----------------------------------------------------------]) - AC_MSG_WARN([| Cannot determine global symbol prefix.]) - AC_MSG_WARN([| $NM output doesn't contain a global data symbol.]) - AC_MSG_WARN([| Will proceed with no underscore.]) - AC_MSG_WARN([| If this is wrong then you'll get link errors referring]) - AC_MSG_WARN([| to ___gmpn_add_n (note three underscores).]) - AC_MSG_WARN([| In this case do a fresh build with an override,]) - AC_MSG_WARN([| ./configure gmp_cv_asm_underscore=yes]) - AC_MSG_WARN([+----------------------------------------------------------]) - GMP_DEFINE(GSYM_PREFIX, []) - ;; -esac -]) -m4trace:acinclude.m4:1796: -1- AC_DEFUN([GMP_ASM_ALIGN_LOG], [AC_REQUIRE([GMP_ASM_GLOBL]) -AC_REQUIRE([GMP_ASM_BYTE]) -AC_REQUIRE([GMP_ASM_DATA]) -AC_REQUIRE([GMP_ASM_LABEL_SUFFIX]) -AC_REQUIRE([GMP_PROG_NM]) -AC_CACHE_CHECK([if .align assembly directive is logarithmic], - gmp_cv_asm_align_log, -[GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_data - .align 4 - $gmp_cv_asm_globl foo - $gmp_cv_asm_byte 1 - .align 4 -foo$gmp_cv_asm_label_suffix - $gmp_cv_asm_byte 2], - [gmp_tmp_val=[`$NM conftest.$OBJEXT | grep foo | \ - sed -e 's;[[][0-9][]]\(.*\);\1;' -e 's;[^1-9]*\([0-9]*\).*;\1;'`] - if test "$gmp_tmp_val" = "10" || test "$gmp_tmp_val" = "16"; then - gmp_cv_asm_align_log=yes - else - gmp_cv_asm_align_log=no - fi], - [AC_MSG_ERROR([cannot assemble alignment test])])]) - -GMP_DEFINE_RAW(["define(<ALIGN_LOGARITHMIC>,<$gmp_cv_asm_align_log>)"]) -]) -m4trace:acinclude.m4:1855: -1- AC_DEFUN([GMP_ASM_ALIGN_FILL_0x90], [AC_REQUIRE([GMP_ASM_TEXT]) -AC_CACHE_CHECK([if the .align directive accepts an 0x90 fill in .text], - gmp_cv_asm_align_fill_0x90, -[GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_text - .align 4, 0x90 - .byte 0 - .align 4, 0x90], -[if grep "Warning: Fill parameter ignored for executable section" conftest.out >/dev/null; then - echo "Suppressing this warning by omitting 0x90" 1>&AC_FD_CC - gmp_cv_asm_align_fill_0x90=no -else - gmp_cv_asm_align_fill_0x90=yes -fi], -[gmp_cv_asm_align_fill_0x90=no])]) - -GMP_DEFINE_RAW(["define(<ALIGN_FILL_0x90>,<$gmp_cv_asm_align_fill_0x90>)"]) -]) -m4trace:acinclude.m4:1884: -1- AC_DEFUN([GMP_ASM_BYTE], [AC_REQUIRE([GMP_ASM_TEXT]) -AC_REQUIRE([GMP_ASM_LABEL_SUFFIX]) -AC_CACHE_CHECK([for assembler byte directive], - gmp_cv_asm_byte, -[for i in .byte data1; do - echo "trying $i" >&AC_FD_CC - GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_data - $i 0 -], - [gmp_cv_asm_byte=$i - rm -f conftest* - break], - [cat conftest.out >&AC_FD_CC]) -done -if test -z "$gmp_cv_asm_byte"; then - AC_MSG_ERROR([Cannot determine how to emit a data byte]) -fi -]) -]) -m4trace:acinclude.m4:1913: -1- AC_DEFUN([GMP_ASM_TEXT], [AC_CACHE_CHECK([how to switch to text section], - gmp_cv_asm_text, -[for i in ".text" ".code" [".csect .text[PR]"]; do - echo "trying $i" >&AC_FD_CC - GMP_TRY_ASSEMBLE([ $i], - [gmp_cv_asm_text=$i - rm -f conftest* - break]) -done -if test -z "$gmp_cv_asm_text"; then - AC_MSG_ERROR([Cannot determine text section directive]) -fi -]) -echo ["define(<TEXT>, <$gmp_cv_asm_text>)"] >> $gmp_tmpconfigm4 -]) -m4trace:acinclude.m4:1935: -1- AC_DEFUN([GMP_ASM_DATA], [AC_CACHE_CHECK([how to switch to data section], - gmp_cv_asm_data, -[case $host in - *-*-aix*) gmp_cv_asm_data=[".csect .data[RW]"] ;; - *) gmp_cv_asm_data=".data" ;; -esac -]) -echo ["define(<DATA>, <$gmp_cv_asm_data>)"] >> $gmp_tmpconfigm4 -]) -m4trace:acinclude.m4:1963: -1- AC_DEFUN([GMP_ASM_RODATA], [AC_REQUIRE([GMP_ASM_TEXT]) -AC_REQUIRE([GMP_ASM_DATA]) -AC_REQUIRE([GMP_ASM_LABEL_SUFFIX]) -AC_REQUIRE([GMP_ASM_UNDERSCORE]) -AC_CACHE_CHECK([how to switch to read-only data section], - gmp_cv_asm_rodata, -[ -dnl Default to DATA on CPUs with split code/data caching, and TEXT -dnl elsewhere. i386 means generic x86, so use DATA on it. -case $host in -X86_PATTERN | x86_64-*-*) - gmp_cv_asm_rodata="$gmp_cv_asm_data" ;; -*) - gmp_cv_asm_rodata="$gmp_cv_asm_text" ;; -esac - -cat >conftest.c <<EOF -extern const int foo[[]]; /* Suppresses C++'s suppression of foo */ -const int foo[[]] = {1,2,3}; -EOF -echo "Test program:" >&AC_FD_CC -cat conftest.c >&AC_FD_CC -gmp_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c >&AC_FD_CC" -if AC_TRY_EVAL(gmp_compile); then - echo "Compiler output:" >&AC_FD_CC - cat conftest.s >&AC_FD_CC - if test $gmp_cv_asm_underscore = yes; then - tmp_gsym_prefix=_ - else - tmp_gsym_prefix= - fi - # must see our label - if grep "^${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix" conftest.s >/dev/null 2>&AC_FD_CC; then - # take the last directive before our label (hence skipping segments - # getting debugging info etc) - tmp_match=`sed -n ["/^${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix/q - /^[. ]*data/p - /^[. ]*rdata/p - /^[. ]*text/p - /^[. ]*section/p - /^[. ]*csect/p - /^[. ]*CSECT/p"] conftest.s | sed -n '$p'` - echo "Match: $tmp_match" >&AC_FD_CC - if test -n "$tmp_match"; then - gmp_cv_asm_rodata=$tmp_match - fi - else - echo "Couldn't find label: ^${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix" >&AC_FD_CC - fi -fi -rm -f conftest* -]) -echo ["define(<RODATA>, <$gmp_cv_asm_rodata>)"] >> $gmp_tmpconfigm4 -]) -m4trace:acinclude.m4:2034: -1- AC_DEFUN([GMP_ASM_GLOBL], [AC_REQUIRE([GMP_ASM_TEXT]) -AC_CACHE_CHECK([for assembler global directive], - gmp_cv_asm_globl, -[case $host in - hppa*-*-*) gmp_cv_asm_globl=.export ;; - IA64_PATTERN) gmp_cv_asm_globl=.global ;; - *) gmp_cv_asm_globl=.globl ;; -esac -]) -echo ["define(<GLOBL>, <$gmp_cv_asm_globl>)"] >> $gmp_tmpconfigm4 -]) -m4trace:acinclude.m4:2052: -1- AC_DEFUN([GMP_ASM_GLOBL_ATTR], [AC_REQUIRE([GMP_ASM_GLOBL]) -AC_CACHE_CHECK([for assembler global directive attribute], - gmp_cv_asm_globl_attr, -[case $gmp_cv_asm_globl in - .export) gmp_cv_asm_globl_attr=",entry" ;; - *) gmp_cv_asm_globl_attr="" ;; -esac -]) -echo ["define(<GLOBL_ATTR>, <$gmp_cv_asm_globl_attr>)"] >> $gmp_tmpconfigm4 -]) -m4trace:acinclude.m4:2084: -1- AC_DEFUN([GMP_ASM_TYPE], [AC_CACHE_CHECK([for assembler .type directive], - gmp_cv_asm_type, -[gmp_cv_asm_type= -for gmp_tmp_prefix in @ \# %; do - GMP_TRY_ASSEMBLE([ .type sym,${gmp_tmp_prefix}function], - [if grep "\.type pseudo-op used outside of \.def/\.endef ignored" conftest.out >/dev/null; then : ; - else - gmp_cv_asm_type=".type \$][1,${gmp_tmp_prefix}\$][2" - break - fi]) -done -rm -f conftest* -]) -echo ["define(<TYPE>, <$gmp_cv_asm_type>)"] >> $gmp_tmpconfigm4 -]) -m4trace:acinclude.m4:2106: -1- AC_DEFUN([GMP_ASM_SIZE], [AC_CACHE_CHECK([for assembler .size directive], - gmp_cv_asm_size, -[gmp_cv_asm_size= -GMP_TRY_ASSEMBLE([ .size sym,1], - [if grep "\.size pseudo-op used outside of \.def/\.endef ignored" conftest.out >/dev/null; then : ; - else - gmp_cv_asm_size=".size \$][1,\$][2" - fi]) -]) -echo ["define(<SIZE>, <$gmp_cv_asm_size>)"] >> $gmp_tmpconfigm4 -]) -m4trace:acinclude.m4:2162: -1- AC_DEFUN([GMP_ASM_COFF_TYPE], [AC_REQUIRE([GMP_ASM_TEXT]) -AC_REQUIRE([GMP_ASM_GLOBL]) -AC_REQUIRE([GMP_ASM_GLOBL_ATTR]) -AC_REQUIRE([GMP_ASM_LABEL_SUFFIX]) -AC_REQUIRE([GMP_ASM_UNDERSCORE]) -AC_CACHE_CHECK([for assembler COFF type directives], - gmp_cv_asm_x86_coff_type, -[GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_text - $gmp_cv_asm_globl ${tmp_gsym_prefix}foo$gmp_cv_asm_globl_attr - .def ${tmp_gsym_prefix}foo - .scl 2 - .type 32 - .endef -${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix -], - [gmp_cv_asm_x86_coff_type=yes], - [gmp_cv_asm_x86_coff_type=no]) -]) -echo ["define(<HAVE_COFF_TYPE>, <$gmp_cv_asm_x86_coff_type>)"] >> $gmp_tmpconfigm4 -]) -m4trace:acinclude.m4:2219: -1- AC_DEFUN([GMP_ASM_LSYM_PREFIX], [AC_REQUIRE([GMP_ASM_LABEL_SUFFIX]) -AC_REQUIRE([GMP_ASM_TEXT]) -AC_REQUIRE([GMP_PROG_NM]) -AC_CACHE_CHECK([for assembler local label prefix], - gmp_cv_asm_lsym_prefix, -[gmp_tmp_pre_appears=yes -for gmp_tmp_pre in L .L $L $ L$; do - echo "Trying $gmp_tmp_pre" >&AC_FD_CC - GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_text -dummy${gmp_cv_asm_label_suffix} -${gmp_tmp_pre}gurkmacka${gmp_cv_asm_label_suffix}], - [if $NM conftest.$OBJEXT >conftest.nm 2>&AC_FD_CC; then : ; else - cat conftest.nm >&AC_FD_CC - AC_MSG_WARN(["$NM" failure]) - break - fi - cat conftest.nm >&AC_FD_CC - if grep gurkmacka conftest.nm >/dev/null; then : ; else - # no mention of the symbol, this is good - echo "$gmp_tmp_pre label doesn't appear in object file at all (good)" >&AC_FD_CC - gmp_cv_asm_lsym_prefix="$gmp_tmp_pre" - gmp_tmp_pre_appears=no - break - fi - if grep [' [a-zN] .*gurkmacka'] conftest.nm >/dev/null; then - # symbol mentioned as a local, use this if nothing better - echo "$gmp_tmp_pre label is local but still in object file" >&AC_FD_CC - if test -z "$gmp_cv_asm_lsym_prefix"; then - gmp_cv_asm_lsym_prefix="$gmp_tmp_pre" - fi - else - echo "$gmp_tmp_pre label is something unknown" >&AC_FD_CC - fi - ]) -done -rm -f conftest* -if test -z "$gmp_cv_asm_lsym_prefix"; then - gmp_cv_asm_lsym_prefix=L - AC_MSG_WARN([cannot determine local label, using default $gmp_cv_asm_lsym_prefix]) -fi -# for development purposes, note whether we got a purely temporary local label -echo "Local label appears in object files: $gmp_tmp_pre_appears" >&AC_FD_CC -]) -echo ["define(<LSYM_PREFIX>, <${gmp_cv_asm_lsym_prefix}>)"] >> $gmp_tmpconfigm4 -AC_DEFINE_UNQUOTED(LSYM_PREFIX, "$gmp_cv_asm_lsym_prefix", - [Assembler local label prefix]) -]) -m4trace:acinclude.m4:2278: -1- AC_DEFUN([GMP_ASM_W32], [AC_REQUIRE([GMP_ASM_DATA]) -AC_REQUIRE([GMP_ASM_BYTE]) -AC_REQUIRE([GMP_ASM_GLOBL]) -AC_REQUIRE([GMP_ASM_LABEL_SUFFIX]) -AC_REQUIRE([GMP_PROG_NM]) -AC_CACHE_CHECK([how to define a 32-bit word], - gmp_cv_asm_w32, -[case $host in - *-*-hpux*) - # FIXME: HPUX puts first symbol at 0x40000000, breaking our assumption - # that it's at 0x0. We'll have to declare another symbol before the - # .long/.word and look at the distance between the two symbols. The - # only problem is that the sed expression(s) barfs (on Solaris, for - # example) for the symbol with value 0. For now, HPUX uses .word. - gmp_cv_asm_w32=".word" - ;; - *-*-*) - gmp_tmp_val= - for gmp_tmp_op in .long .word data4; do - GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_data - $gmp_cv_asm_globl foo - $gmp_tmp_op 0 -foo$gmp_cv_asm_label_suffix - $gmp_cv_asm_byte 0], - [gmp_tmp_val=[`$NM conftest.$OBJEXT | grep foo | \ - sed -e 's;[[][0-9][]]\(.*\);\1;' -e 's;[^1-9]*\([0-9]*\).*;\1;'`] - if test "$gmp_tmp_val" = 4; then - gmp_cv_asm_w32="$gmp_tmp_op" - break - fi]) - done - rm -f conftest* - ;; -esac -if test -z "$gmp_cv_asm_w32"; then - AC_MSG_ERROR([cannot determine how to define a 32-bit word]) -fi -]) -echo ["define(<W32>, <$gmp_cv_asm_w32>)"] >> $gmp_tmpconfigm4 -]) -m4trace:acinclude.m4:2362: -1- AC_DEFUN([GMP_ASM_X86_GOT_UNDERSCORE], [AC_REQUIRE([GMP_ASM_TEXT]) -AC_REQUIRE([GMP_ASM_GLOBL]) -AC_REQUIRE([GMP_ASM_GLOBL_ATTR]) -AC_REQUIRE([GMP_ASM_LABEL_SUFFIX]) -AC_REQUIRE([GMP_ASM_UNDERSCORE]) -AC_REQUIRE([AC_LIBTOOL_PROG_COMPILER_PIC]) -AC_CACHE_CHECK([if _GLOBAL_OFFSET_TABLE_ is prefixed by underscore], - gmp_cv_asm_x86_got_underscore, -[gmp_cv_asm_x86_got_underscore="not applicable" -if test $gmp_cv_asm_underscore = yes; then - tmp_gsym_prefix=_ -else - tmp_gsym_prefix= -fi -for tmp_underscore in "" "_"; do - cat >conftest.s <<EOF - $gmp_cv_asm_text - $gmp_cv_asm_globl ${tmp_gsym_prefix}main$gmp_cv_asm_globl_attr -${tmp_gsym_prefix}main$gmp_cv_asm_label_suffix - addl $ ${tmp_underscore}_GLOBAL_OFFSET_TABLE_, %ebx -EOF - gmp_compile="$CCAS $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.s >&AC_FD_CC && $CC $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.$OBJEXT >&AC_FD_CC" - if AC_TRY_EVAL(gmp_compile); then - if test "$tmp_underscore" = "_"; then - gmp_cv_asm_x86_got_underscore=yes - else - gmp_cv_asm_x86_got_underscore=no - fi - break - fi -done -rm -f conftest* a.out b.out a.exe a_out.exe -]) -if test "$gmp_cv_asm_x86_got_underscore" = "yes"; then - GMP_DEFINE(GOT_GSYM_PREFIX, [_]) -else - GMP_DEFINE(GOT_GSYM_PREFIX, []) -fi -]) -m4trace:acinclude.m4:2444: -1- AC_DEFUN([GMP_ASM_X86_GOT_EAX_OK], [echo "Testing gas GOT with eax good" >&AC_FD_CC -cat >conftest.awk <<\EOF -[BEGIN { - want[0] = "001" - want[1] = "043" - want[2] = "105" - want[3] = "147" - want[4] = "211" - want[5] = "253" - want[6] = "315" - want[7] = "357" - - want[8] = "005" - want[9] = "002" - want[10] = "000" - want[11] = "000" - want[12] = "000" - - want[13] = "376" - want[14] = "334" - want[15] = "272" - want[16] = "230" - want[17] = "166" - want[18] = "124" - want[19] = "062" - want[20] = "020" - - result = "yes" -} -{ - for (f = 2; f <= NF; f++) - { - for (i = 0; i < 20; i++) - got[i] = got[i+1]; - got[20] = $f; - - found = 1 - for (i = 0; i < 21; i++) - if (got[i] != want[i]) - { - found = 0 - break - } - if (found) - { - result = "no" - exit - } - } -} -END { - print result -} -]EOF -cat >conftest.s <<\EOF -[ .text - .byte 1, 35, 69, 103, 137, 171, 205, 239 - addl $_GLOBAL_OFFSET_TABLE_, %eax - .byte 254, 220, 186, 152, 118, 84, 50, 16 -]EOF -tmp_got_good=yes -gmp_compile="$1 -fPIC -o conftest.o -c conftest.s >&AC_FD_CC 2>&1" -if AC_TRY_EVAL(gmp_compile); then - tmp_got_good=`od -b conftest.o | $AWK -f conftest.awk` -fi -rm -f conftest.* -echo "Result: $tmp_got_good" >&AC_FD_CC -if test "$tmp_got_good" = no; then - ifelse([$3],,:,[$3]) -else - ifelse([$2],,:,[$2]) -fi -]) -m4trace:acinclude.m4:2534: -1- AC_DEFUN([GMP_ASM_X86_MMX], [AC_CACHE_CHECK([if the assembler knows about MMX instructions], - gmp_cv_asm_x86_mmx, -[GMP_TRY_ASSEMBLE( -[ .text - movq %mm0, %mm1], -[gmp_cv_asm_x86_mmx=yes -case $host in -*-*-solaris*) - if (dis conftest.$OBJEXT >conftest.out) 2>/dev/null; then - if grep "0f 6f c1" conftest.out >/dev/null; then - gmp_cv_asm_x86_mmx=movq-bug - fi - else - AC_MSG_WARN(["dis" not available to check for "as" movq bug]) - fi -esac], -[gmp_cv_asm_x86_mmx=no])]) - -case $gmp_cv_asm_x86_mmx in -movq-bug) - AC_MSG_WARN([+----------------------------------------------------------]) - AC_MSG_WARN([| WARNING WARNING WARNING]) - AC_MSG_WARN([| Host CPU has MMX code, but the assembler]) - AC_MSG_WARN([| $CCAS $CFLAGS $CPPFLAGS]) - AC_MSG_WARN([| has the Solaris 2.6 and 2.7 bug where register to register]) - AC_MSG_WARN([| movq operands are reversed.]) - AC_MSG_WARN([| Non-MMX replacements will be used.]) - AC_MSG_WARN([| This will be an inferior build.]) - AC_MSG_WARN([+----------------------------------------------------------]) - ;; -no) - AC_MSG_WARN([+----------------------------------------------------------]) - AC_MSG_WARN([| WARNING WARNING WARNING]) - AC_MSG_WARN([| Host CPU has MMX code, but it can't be assembled by]) - AC_MSG_WARN([| $CCAS $CFLAGS $CPPFLAGS]) - AC_MSG_WARN([| Non-MMX replacements will be used.]) - AC_MSG_WARN([| This will be an inferior build.]) - AC_MSG_WARN([+----------------------------------------------------------]) - ;; -esac -if test "$gmp_cv_asm_x86_mmx" = yes; then - ifelse([$1],,:,[$1]) -else - ifelse([$2],,:,[$2]) -fi -]) -m4trace:acinclude.m4:2586: -1- AC_DEFUN([GMP_ASM_X86_SHLDL_CL], [AC_REQUIRE([GMP_ASM_TEXT]) -AC_CACHE_CHECK([if the assembler takes cl with shldl], - gmp_cv_asm_x86_shldl_cl, -[GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_text - shldl %cl, %eax, %ebx], - gmp_cv_asm_x86_shldl_cl=yes, - gmp_cv_asm_x86_shldl_cl=no) -]) -if test "$gmp_cv_asm_x86_shldl_cl" = "yes"; then - GMP_DEFINE(WANT_SHLDL_CL,1) -else - GMP_DEFINE(WANT_SHLDL_CL,0) -fi -]) -m4trace:acinclude.m4:2613: -1- AC_DEFUN([GMP_ASM_X86_SSE2], [AC_CACHE_CHECK([if the assembler knows about SSE2 instructions], - gmp_cv_asm_x86_sse2, -[GMP_TRY_ASSEMBLE( -[ .text - paddq %mm0, %mm1], - [gmp_cv_asm_x86_sse2=yes], - [gmp_cv_asm_x86_sse2=no]) -]) -case $gmp_cv_asm_x86_sse2 in -yes) - ifelse([$1],,:,[$1]) - ;; -*) - AC_MSG_WARN([+----------------------------------------------------------]) - AC_MSG_WARN([| WARNING WARNING WARNING]) - AC_MSG_WARN([| Host CPU has SSE2 code, but it can't be assembled by]) - AC_MSG_WARN([| $CCAS $CFLAGS $CPPFLAGS]) - AC_MSG_WARN([| Non-SSE2 replacements will be used.]) - AC_MSG_WARN([| This will be an inferior build.]) - AC_MSG_WARN([+----------------------------------------------------------]) - ifelse([$2],,:,[$2]) - ;; -esac -]) -m4trace:acinclude.m4:2650: -1- AC_DEFUN([GMP_ASM_X86_MULX], [AC_CACHE_CHECK([if the assembler knows about the mulx instruction], - gmp_cv_asm_x86_mulx, -[GMP_TRY_ASSEMBLE( -[ .text - mulx %r8, %r9, %r10], - [gmp_cv_asm_x86_mulx=yes], - [gmp_cv_asm_x86_mulx=no]) -]) -case $gmp_cv_asm_x86_mulx in -yes) - ifelse([$1],,:,[$1]) - ;; -*) - AC_MSG_WARN([+----------------------------------------------------------]) - AC_MSG_WARN([| WARNING WARNING WARNING]) - AC_MSG_WARN([| Host CPU has the mulx instruction, but it can't be]) - AC_MSG_WARN([| assembled by]) - AC_MSG_WARN([| $CCAS $CFLAGS $CPPFLAGS]) - AC_MSG_WARN([| Older x86 instructions will be used.]) - AC_MSG_WARN([| This will be an inferior build.]) - AC_MSG_WARN([+----------------------------------------------------------]) - ifelse([$2],,:,[$2]) - ;; -esac -]) -m4trace:acinclude.m4:2688: -1- AC_DEFUN([GMP_ASM_X86_ADX], [AC_CACHE_CHECK([if the assembler knows about the adox instruction], - gmp_cv_asm_x86_adx, -[GMP_TRY_ASSEMBLE( -[ .text - adox %r8, %r9 - adcx %r8, %r9], - [gmp_cv_asm_x86_adx=yes], - [gmp_cv_asm_x86_adx=no]) -]) -case $gmp_cv_asm_x86_adx in -yes) - ifelse([$1],,:,[$1]) - ;; -*) - AC_MSG_WARN([+----------------------------------------------------------]) - AC_MSG_WARN([| WARNING WARNING WARNING]) - AC_MSG_WARN([| Host CPU has the adcx and adox instructions, but they]) - AC_MSG_WARN([| can't be assembled by]) - AC_MSG_WARN([| $CCAS $CFLAGS $CPPFLAGS]) - AC_MSG_WARN([| Older x86 instructions will be used.]) - AC_MSG_WARN([| This will be an inferior build.]) - AC_MSG_WARN([+----------------------------------------------------------]) - ifelse([$2],,:,[$2]) - ;; -esac -]) -m4trace:acinclude.m4:2753: -1- AC_DEFUN([GMP_ASM_X86_MCOUNT], [AC_REQUIRE([AC_ENABLE_SHARED]) -AC_REQUIRE([AC_PROG_LIBTOOL]) -AC_MSG_CHECKING([how to call x86 mcount]) -cat >conftest.c <<EOF -foo(){bar();} -EOF - -if test "$enable_static" = yes; then - gmp_asmout_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c 1>&AC_FD_CC" - if AC_TRY_EVAL(gmp_asmout_compile); then - if grep '\.data' conftest.s >/dev/null; then - mcount_nonpic_reg=`sed -n ['/esp/!s/.*movl.*,\(%[a-z]*\).*$/\1/p'] conftest.s` - else - mcount_nonpic_reg= - fi - mcount_nonpic_call=`grep 'call.*mcount' conftest.s` - if test -z "$mcount_nonpic_call"; then - AC_MSG_ERROR([Cannot find mcount call for non-PIC]) - fi - else - AC_MSG_ERROR([Cannot compile test program for non-PIC]) - fi -fi - -if test "$enable_shared" = yes; then - gmp_asmout_compile="$CC $CFLAGS $CPPFLAGS $lt_prog_compiler_pic -S conftest.c 1>&AC_FD_CC" - if AC_TRY_EVAL(gmp_asmout_compile); then - if grep '\.data' conftest.s >/dev/null; then - case $lt_prog_compiler_pic in - *-DDLL_EXPORT*) - # Windows DLLs have non-PIC style mcount - mcount_pic_reg=`sed -n ['/esp/!s/.*movl.*,\(%[a-z]*\).*$/\1/p'] conftest.s` - ;; - *) - mcount_pic_reg=`sed -n ['s/.*GOTOFF.*,\(%[a-z]*\).*$/\1/p'] conftest.s` - ;; - esac - else - mcount_pic_reg= - fi - mcount_pic_call=`grep 'call.*mcount' conftest.s` - if test -z "$mcount_pic_call"; then - AC_MSG_ERROR([Cannot find mcount call for PIC]) - fi - else - AC_MSG_ERROR([Cannot compile test program for PIC]) - fi -fi - -GMP_DEFINE_RAW(["define(<MCOUNT_NONPIC_REG>, <\`$mcount_nonpic_reg'>)"]) -GMP_DEFINE_RAW(["define(<MCOUNT_NONPIC_CALL>,<\`$mcount_nonpic_call'>)"]) -GMP_DEFINE_RAW(["define(<MCOUNT_PIC_REG>, <\`$mcount_pic_reg'>)"]) -GMP_DEFINE_RAW(["define(<MCOUNT_PIC_CALL>, <\`$mcount_pic_call'>)"]) - -rm -f conftest.* -AC_MSG_RESULT([determined]) -]) -m4trace:acinclude.m4:2826: -1- AC_DEFUN([GMP_ASM_IA64_ALIGN_OK], [AC_CACHE_CHECK([whether assembler .align padding is good], - gmp_cv_asm_ia64_align_ok, -[cat >conftest.awk <<\EOF -[BEGIN { - want[0] = "011" - want[1] = "160" - want[2] = "074" - want[3] = "040" - want[4] = "000" - want[5] = "040" - want[6] = "020" - want[7] = "221" - want[8] = "114" - want[9] = "000" - want[10] = "100" - want[11] = "200" - want[12] = "122" - want[13] = "261" - want[14] = "000" - want[15] = "200" - - want[16] = "000" - want[17] = "004" - want[18] = "000" - want[19] = "000" - want[20] = "000" - want[21] = "000" - want[22] = "002" - want[23] = "000" - want[24] = "000" - want[25] = "000" - want[26] = "000" - want[27] = "001" - want[28] = "000" - want[29] = "000" - want[30] = "000" - want[31] = "014" - - want[32] = "011" - want[33] = "270" - want[34] = "140" - want[35] = "062" - want[36] = "000" - want[37] = "040" - want[38] = "240" - want[39] = "331" - want[40] = "160" - want[41] = "000" - want[42] = "100" - want[43] = "240" - want[44] = "343" - want[45] = "371" - want[46] = "000" - want[47] = "200" - - result = "yes" -} -{ - for (f = 2; f <= NF; f++) - { - for (i = 0; i < 47; i++) - got[i] = got[i+1]; - got[47] = $f; - - found = 1 - for (i = 0; i < 48; i++) - if (got[i] != want[i]) - { - found = 0 - break - } - if (found) - { - result = "no" - exit - } - } -} -END { - print result -} -]EOF -GMP_TRY_ASSEMBLE( -[ .text - .align 32 -{ .mmi; add r14 = r15, r16 - add r17 = r18, r19 - add r20 = r21, r22 ;; } - .align 32 -{ .mmi; add r23 = r24, r25 - add r26 = r27, r28 - add r29 = r30, r31 ;; } -], - [gmp_cv_asm_ia64_align_ok=`od -b conftest.$OBJEXT | $AWK -f conftest.awk`], - [AC_MSG_WARN([oops, cannot compile test program]) - gmp_cv_asm_ia64_align_ok=yes]) -]) -GMP_DEFINE_RAW(["define(<IA64_ALIGN_OK>, <\`$gmp_cv_asm_ia64_align_ok'>)"]) -]) -m4trace:acinclude.m4:2940: -1- AC_DEFUN([GMP_ASM_M68K_INSTRUCTION], [AC_REQUIRE([GMP_ASM_TEXT]) -AC_CACHE_CHECK([assembler instruction and register style], - gmp_cv_asm_m68k_instruction, -[for i in "addl %d0,%d1" "add.l %d0,%d1" "addl d0,d1" "add.l d0,d1"; do - GMP_TRY_ASSEMBLE( - [ $gmp_cv_asm_text - $i], - [gmp_cv_asm_m68k_instruction=$i - rm -f conftest* - break]) -done -if test -z "$gmp_cv_asm_m68k_instruction"; then - AC_MSG_ERROR([cannot determine assembler instruction and register style]) -fi -]) -case $gmp_cv_asm_m68k_instruction in -"addl d0,d1") want_dot_size=no; want_register_percent=no ;; -"addl %d0,%d1") want_dot_size=no; want_register_percent=yes ;; -"add.l d0,d1") want_dot_size=yes; want_register_percent=no ;; -"add.l %d0,%d1") want_dot_size=yes; want_register_percent=yes ;; -*) AC_MSG_ERROR([oops, unrecognised instruction and register style]) ;; -esac -GMP_DEFINE_RAW(["define(<WANT_REGISTER_PERCENT>, <\`$want_register_percent'>)"]) -GMP_DEFINE_RAW(["define(<WANT_DOT_SIZE>, <\`$want_dot_size'>)"]) -]) -m4trace:acinclude.m4:2971: -1- AC_DEFUN([GMP_ASM_M68K_ADDRESSING], [AC_REQUIRE([GMP_ASM_TEXT]) -AC_REQUIRE([GMP_ASM_M68K_INSTRUCTION]) -AC_CACHE_CHECK([assembler addressing style], - gmp_cv_asm_m68k_addressing, -[case $gmp_cv_asm_m68k_instruction in -addl*) movel=movel ;; -add.l*) movel=move.l ;; -*) AC_MSG_ERROR([oops, unrecognised gmp_cv_asm_m68k_instruction]) ;; -esac -case $gmp_cv_asm_m68k_instruction in -*"%d0,%d1") dreg=%d0; areg=%a0 ;; -*"d0,d1") dreg=d0; areg=a0 ;; -*) AC_MSG_ERROR([oops, unrecognised gmp_cv_asm_m68k_instruction]) ;; -esac -GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_text - $movel $dreg, $areg@-], - [gmp_cv_asm_m68k_addressing=mit], -[GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_text - $movel $dreg, -($areg)], - [gmp_cv_asm_m68k_addressing=motorola], -[AC_MSG_ERROR([cannot determine assembler addressing style])])]) -]) -GMP_DEFINE_RAW(["define(<WANT_ADDRESSING>, <\`$gmp_cv_asm_m68k_addressing'>)"]) -]) -m4trace:acinclude.m4:3008: -1- AC_DEFUN([GMP_ASM_M68K_BRANCHES], [AC_REQUIRE([GMP_ASM_TEXT]) -AC_CACHE_CHECK([assembler shortest branches], - gmp_cv_asm_m68k_branches, -[for i in jra jbra bra; do - GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_text -foo$gmp_cv_asm_label_suffix - $i foo], - [gmp_cv_asm_m68k_branches=$i - rm -f conftest* - break]) -done -if test -z "$gmp_cv_asm_m68k_branches"; then - AC_MSG_ERROR([cannot determine assembler branching style]) -fi -]) -GMP_DEFINE_RAW(["define(<WANT_BRANCHES>, <\`$gmp_cv_asm_m68k_branches'>)"]) -]) -m4trace:acinclude.m4:3047: -1- AC_DEFUN([GMP_ASM_POWERPC_PIC_ALWAYS], [AC_REQUIRE([AC_PROG_CC]) -AC_CACHE_CHECK([whether compiler output is PIC by default], - gmp_cv_asm_powerpc_pic, -[gmp_cv_asm_powerpc_pic=yes -cat >conftest.c <<EOF -int foo; -int *bar() { return &foo; } -EOF -echo "Test program:" >&AC_FD_CC -cat conftest.c >&AC_FD_CC -gmp_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c >&AC_FD_CC" -if AC_TRY_EVAL(gmp_compile); then - echo "Compiler output:" >&AC_FD_CC - cat conftest.s >&AC_FD_CC - if grep 'foo@ha' conftest.s >/dev/null 2>&AC_FD_CC; then - gmp_cv_asm_powerpc_pic=no - fi - if grep 'ha16(_foo)' conftest.s >/dev/null 2>&AC_FD_CC; then - gmp_cv_asm_powerpc_pic=no - fi -fi -rm -f conftest* -]) -GMP_DEFINE_RAW(["define(<PIC_ALWAYS>,<$gmp_cv_asm_powerpc_pic>)"]) -]) -m4trace:acinclude.m4:3084: -1- AC_DEFUN([GMP_ASM_POWERPC_R_REGISTERS], [AC_REQUIRE([GMP_ASM_TEXT]) -AC_CACHE_CHECK([if the assembler needs r on registers], - gmp_cv_asm_powerpc_r_registers, -[GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_text - mtctr 6], -[gmp_cv_asm_powerpc_r_registers=no], -[GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_text - mtctr r6], -[gmp_cv_asm_powerpc_r_registers=yes], -[AC_MSG_ERROR([neither "mtctr 6" nor "mtctr r6" works])])])]) - -GMP_DEFINE_RAW(["define(<WANT_R_REGISTERS>,<$gmp_cv_asm_powerpc_r_registers>)"]) -]) -m4trace:acinclude.m4:3109: -1- AC_DEFUN([GMP_ASM_SPARC_REGISTER], [AC_REQUIRE([GMP_ASM_TEXT]) -AC_CACHE_CHECK([if the assembler accepts ".register"], - gmp_cv_asm_sparc_register, -[GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_text - .register %g2,#scratch -], -[gmp_cv_asm_sparc_register=yes], -[gmp_cv_asm_sparc_register=no])]) - -GMP_DEFINE_RAW(["define(<HAVE_REGISTER>,<$gmp_cv_asm_sparc_register>)"]) -]) -m4trace:acinclude.m4:3130: -1- AC_DEFUN([GMP_ASM_SPARC_GOTDATA], [AC_REQUIRE([GMP_ASM_TEXT]) -AC_CACHE_CHECK([if the assembler accepts gotdata relocations], - gmp_cv_asm_sparc_gotdata, -[GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_text - .text - sethi %gdop_hix22(symbol), %g1 - or %g1, %gdop_lox10(symbol), %g1 -], -[gmp_cv_asm_sparc_gotdata=yes], -[gmp_cv_asm_sparc_gotdata=no])]) - -GMP_DEFINE_RAW(["define(<HAVE_GOTDATA>,<$gmp_cv_asm_sparc_gotdata>)"]) -]) -m4trace:acinclude.m4:3154: -1- AC_DEFUN([GMP_ASM_SPARC_SHARED_THUNKS], [AC_REQUIRE([GMP_ASM_TEXT]) -AC_CACHE_CHECK([if the assembler can support shared PIC thunks], - gmp_cv_asm_sparc_shared_thunks, -[GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_text - .section .text.__sparc_get_pc_thunk.l7,"axG",@progbits,__sparc_get_pc_thunk.l7,comdat - .weak __sparc_get_pc_thunk.l7 - .hidden __sparc_get_pc_thunk.l7 - .type __sparc_get_pc_thunk.l7, #function -__sparc_get_pc_thunk.l7: - jmp %o7+8 - add %o7, %l7, %l7 -], -[gmp_cv_asm_sparc_shared_thunks=yes], -[gmp_cv_asm_sparc_shared_thunks=no])]) - -GMP_DEFINE_RAW(["define(<HAVE_SHARED_THUNKS>,<$gmp_cv_asm_sparc_shared_thunks>)"]) -]) -m4trace:acinclude.m4:3178: -1- AC_DEFUN([GMP_C_ATTRIBUTE_CONST], [AC_CACHE_CHECK([whether gcc __attribute__ ((const)) works], - gmp_cv_c_attribute_const, -[AC_TRY_COMPILE([int foo (int x) __attribute__ ((const));], , - gmp_cv_c_attribute_const=yes, gmp_cv_c_attribute_const=no) -]) -if test $gmp_cv_c_attribute_const = yes; then - AC_DEFINE(HAVE_ATTRIBUTE_CONST, 1, - [Define to 1 if the compiler accepts gcc style __attribute__ ((const))]) -fi -]) -m4trace:acinclude.m4:3197: -1- AC_DEFUN([GMP_C_ATTRIBUTE_MALLOC], [AC_CACHE_CHECK([whether gcc __attribute__ ((malloc)) works], - gmp_cv_c_attribute_malloc, -[cat >conftest.c <<EOF -void *foo (int x) __attribute__ ((malloc)); -EOF -gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >conftest.out 2>&1" -if AC_TRY_EVAL(gmp_compile); then - if grep "attribute directive ignored" conftest.out >/dev/null; then - gmp_cv_c_attribute_malloc=no - else - gmp_cv_c_attribute_malloc=yes - fi -else - gmp_cv_c_attribute_malloc=no -fi -cat conftest.out >&AC_FD_CC -rm -f conftest* -]) -if test $gmp_cv_c_attribute_malloc = yes; then - AC_DEFINE(HAVE_ATTRIBUTE_MALLOC, 1, - [Define to 1 if the compiler accepts gcc style __attribute__ ((malloc))]) -fi -]) -m4trace:acinclude.m4:3227: -1- AC_DEFUN([GMP_C_ATTRIBUTE_MODE], [AC_CACHE_CHECK([whether gcc __attribute__ ((mode (XX))) works], - gmp_cv_c_attribute_mode, -[AC_TRY_COMPILE([typedef int SItype __attribute__ ((mode (SI)));], , - gmp_cv_c_attribute_mode=yes, gmp_cv_c_attribute_mode=no) -]) -if test $gmp_cv_c_attribute_mode = yes; then - AC_DEFINE(HAVE_ATTRIBUTE_MODE, 1, - [Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX)))]) -fi -]) -m4trace:acinclude.m4:3243: -1- AC_DEFUN([GMP_C_ATTRIBUTE_NORETURN], [AC_CACHE_CHECK([whether gcc __attribute__ ((noreturn)) works], - gmp_cv_c_attribute_noreturn, -[AC_TRY_COMPILE([void foo (int x) __attribute__ ((noreturn));], , - gmp_cv_c_attribute_noreturn=yes, gmp_cv_c_attribute_noreturn=no) -]) -if test $gmp_cv_c_attribute_noreturn = yes; then - AC_DEFINE(HAVE_ATTRIBUTE_NORETURN, 1, - [Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn))]) -fi -]) -m4trace:acinclude.m4:3258: -1- AC_DEFUN([GMP_C_HIDDEN_ALIAS], [AC_CACHE_CHECK([whether gcc hidden aliases work], - gmp_cv_c_hidden_alias, -[AC_TRY_COMPILE( -[void hid() __attribute__ ((visibility("hidden"))); -void hid() {} -void pub() __attribute__ ((alias("hid")));], -, gmp_cv_c_hidden_alias=yes, gmp_cv_c_hidden_alias=no) -]) -if test $gmp_cv_c_hidden_alias = yes; then - AC_DEFINE(HAVE_HIDDEN_ALIAS, 1, - [Define to 1 if the compiler accepts gcc style __attribute__ ((visibility)) -and __attribute__ ((alias))]) -fi -]) -m4trace:acinclude.m4:3291: -1- AC_DEFUN([GMP_C_DOUBLE_FORMAT], [AC_REQUIRE([AC_PROG_CC]) -AC_REQUIRE([AC_PROG_AWK]) -AC_CACHE_CHECK([format of `double' floating point], - gmp_cv_c_double_format, -[gmp_cv_c_double_format=unknown -cat >conftest.c <<\EOF -[struct foo { - char before[8]; - double x; - char after[8]; -}; -extern struct foo foo; -struct foo foo = { - { '\001', '\043', '\105', '\147', '\211', '\253', '\315', '\357' }, - -123456789.0, - { '\376', '\334', '\272', '\230', '\166', '\124', '\062', '\020' }, -};] -EOF -gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >&AC_FD_CC 2>&1" -if AC_TRY_EVAL(gmp_compile); then -cat >conftest.awk <<\EOF -[ -BEGIN { - found = 0 -} - -{ - for (f = 2; f <= NF; f++) - { - for (i = 0; i < 23; i++) - got[i] = got[i+1]; - got[23] = $f; - - # match the special begin and end sequences - if (got[0] != "001") continue - if (got[1] != "043") continue - if (got[2] != "105") continue - if (got[3] != "147") continue - if (got[4] != "211") continue - if (got[5] != "253") continue - if (got[6] != "315") continue - if (got[7] != "357") continue - if (got[16] != "376") continue - if (got[17] != "334") continue - if (got[18] != "272") continue - if (got[19] != "230") continue - if (got[20] != "166") continue - if (got[21] != "124") continue - if (got[22] != "062") continue - if (got[23] != "020") continue - - saw = " (" got[8] " " got[9] " " got[10] " " got[11] " " got[12] " " got[13] " " got[14] " " got[15] ")" - - if (got[8] == "000" && \ - got[9] == "000" && \ - got[10] == "000" && \ - got[11] == "124" && \ - got[12] == "064" && \ - got[13] == "157" && \ - got[14] == "235" && \ - got[15] == "301") - { - print "IEEE little endian" - found = 1 - exit - } - - # Little endian with the two 4-byte halves swapped, as used by ARM - # when the chip is in little endian mode. - # - if (got[8] == "064" && \ - got[9] == "157" && \ - got[10] == "235" && \ - got[11] == "301" && \ - got[12] == "000" && \ - got[13] == "000" && \ - got[14] == "000" && \ - got[15] == "124") - { - print "IEEE little endian, swapped halves" - found = 1 - exit - } - - # gcc 2.95.4 on one GNU/Linux ARM system was seen generating 000 in - # the last byte, whereas 124 is correct. Not sure where the bug - # actually lies, but a running program didn't seem to get a full - # mantissa worth of working bits. - # - # We match this case explicitly so we can give a nice result message, - # but we deliberately exclude it from the normal IEEE double setups - # since it's too broken. - # - if (got[8] == "064" && \ - got[9] == "157" && \ - got[10] == "235" && \ - got[11] == "301" && \ - got[12] == "000" && \ - got[13] == "000" && \ - got[14] == "000" && \ - got[15] == "000") - { - print "bad ARM software floats" - found = 1 - exit - } - - if (got[8] == "301" && \ - got[9] == "235" && \ - got[10] == "157" && \ - got[11] == "064" && \ - got[12] == "124" && \ - got[13] == "000" && \ - got[14] == "000" && \ - got[15] == "000") - { - print "IEEE big endian" - found = 1 - exit - } - - if (got[8] == "353" && \ - got[9] == "315" && \ - got[10] == "242" && \ - got[11] == "171" && \ - got[12] == "000" && \ - got[13] == "240" && \ - got[14] == "000" && \ - got[15] == "000") - { - print "VAX D" - found = 1 - exit - } - - if (got[8] == "275" && \ - got[9] == "301" && \ - got[10] == "064" && \ - got[11] == "157" && \ - got[12] == "000" && \ - got[13] == "124" && \ - got[14] == "000" && \ - got[15] == "000") - { - print "VAX G" - found = 1 - exit - } - - if (got[8] == "300" && \ - got[9] == "033" && \ - got[10] == "353" && \ - got[11] == "171" && \ - got[12] == "242" && \ - got[13] == "240" && \ - got[14] == "000" && \ - got[15] == "000") - { - print "Cray CFP" - found = 1 - exit - } - } -} - -END { - if (! found) - print "unknown", saw -} -] -EOF - gmp_cv_c_double_format=`od -b conftest.$OBJEXT | $AWK -f conftest.awk` - case $gmp_cv_c_double_format in - unknown*) - echo "cannot match anything, conftest.$OBJEXT contains" >&AC_FD_CC - od -b conftest.$OBJEXT >&AC_FD_CC - ;; - esac -else - AC_MSG_WARN([oops, cannot compile test program]) -fi -rm -f conftest* -]) - -AH_VERBATIM([HAVE_DOUBLE], -[/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -#undef HAVE_DOUBLE_IEEE_BIG_ENDIAN -#undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN -#undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED -#undef HAVE_DOUBLE_VAX_D -#undef HAVE_DOUBLE_VAX_G -#undef HAVE_DOUBLE_CRAY_CFP]) - -case $gmp_cv_c_double_format in - "IEEE big endian") - AC_DEFINE(HAVE_DOUBLE_IEEE_BIG_ENDIAN, 1) - GMP_DEFINE_RAW("define_not_for_expansion(\`HAVE_DOUBLE_IEEE_BIG_ENDIAN')", POST) - ;; - "IEEE little endian") - AC_DEFINE(HAVE_DOUBLE_IEEE_LITTLE_ENDIAN, 1) - GMP_DEFINE_RAW("define_not_for_expansion(\`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN')", POST) - ;; - "IEEE little endian, swapped halves") - AC_DEFINE(HAVE_DOUBLE_IEEE_LITTLE_SWAPPED, 1) ;; - "VAX D") - AC_DEFINE(HAVE_DOUBLE_VAX_D, 1) ;; - "VAX G") - AC_DEFINE(HAVE_DOUBLE_VAX_G, 1) ;; - "Cray CFP") - AC_DEFINE(HAVE_DOUBLE_CRAY_CFP, 1) ;; - "bad ARM software floats") - ;; - unknown*) - AC_MSG_WARN([Could not determine float format.]) - AC_MSG_WARN([Conversions to and from "double" may be slow.]) - ;; - *) - AC_MSG_WARN([oops, unrecognised float format: $gmp_cv_c_double_format]) - ;; -esac -]) -m4trace:acinclude.m4:3560: -1- AC_DEFUN([GMP_FUNC_ALLOCA], [AC_REQUIRE([GMP_HEADER_ALLOCA]) -AC_CACHE_CHECK([for alloca (via gmp-impl.h)], - gmp_cv_func_alloca, -[AC_TRY_LINK( -GMP_INCLUDE_GMP_H -[#include "$srcdir/gmp-impl.h" -], - [char *p = (char *) alloca (1);], - gmp_cv_func_alloca=yes, - gmp_cv_func_alloca=no)]) -if test $gmp_cv_func_alloca = yes; then - AC_DEFINE(HAVE_ALLOCA, 1, [Define to 1 if alloca() works (via gmp-impl.h).]) -fi -]) -m4trace:acinclude.m4:3576: -1- AC_DEFUN([GMP_HEADER_ALLOCA], [# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -AC_CACHE_CHECK([for working alloca.h], - gmp_cv_header_alloca, -[AC_TRY_LINK([#include <alloca.h>], - [char *p = (char *) alloca (2 * sizeof (int));], - gmp_cv_header_alloca=yes, - gmp_cv_header_alloca=no)]) -if test $gmp_cv_header_alloca = yes; then - AC_DEFINE(HAVE_ALLOCA_H, 1, - [Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).]) -fi -]) -m4trace:acinclude.m4:3597: -1- AC_DEFUN([GMP_OPTION_ALLOCA], [AC_REQUIRE([GMP_FUNC_ALLOCA]) -AC_CACHE_CHECK([how to allocate temporary memory], - gmp_cv_option_alloca, -[case $enable_alloca in - yes) - gmp_cv_option_alloca=alloca - ;; - no) - gmp_cv_option_alloca=malloc-reentrant - ;; - reentrant | notreentrant) - case $gmp_cv_func_alloca in - yes) gmp_cv_option_alloca=alloca ;; - *) gmp_cv_option_alloca=malloc-$enable_alloca ;; - esac - ;; - *) - gmp_cv_option_alloca=$enable_alloca - ;; -esac -]) - -AH_VERBATIM([WANT_TMP], -[/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#undef WANT_TMP_ALLOCA -#undef WANT_TMP_REENTRANT -#undef WANT_TMP_NOTREENTRANT -#undef WANT_TMP_DEBUG]) - -case $gmp_cv_option_alloca in - alloca) - if test $gmp_cv_func_alloca = no; then - AC_MSG_ERROR([--enable-alloca=alloca specified, but alloca not available]) - fi - AC_DEFINE(WANT_TMP_ALLOCA) - TAL_OBJECT=tal-reent$U.lo - ;; - malloc-reentrant) - AC_DEFINE(WANT_TMP_REENTRANT) - TAL_OBJECT=tal-reent$U.lo - ;; - malloc-notreentrant) - AC_DEFINE(WANT_TMP_NOTREENTRANT) - TAL_OBJECT=tal-notreent$U.lo - ;; - debug) - AC_DEFINE(WANT_TMP_DEBUG) - TAL_OBJECT=tal-debug$U.lo - ;; - *) - # checks at the start of configure.in should protect us - AC_MSG_ERROR([unrecognised --enable-alloca=$gmp_cv_option_alloca]) - ;; -esac -AC_SUBST(TAL_OBJECT) -]) -m4trace:acinclude.m4:3665: -1- AC_DEFUN([GMP_FUNC_SSCANF_WRITABLE_INPUT], [AC_CACHE_CHECK([whether sscanf needs writable input], - gmp_cv_func_sscanf_writable_input, -[case $host in - *-*-hpux9 | *-*-hpux9.*) - gmp_cv_func_sscanf_writable_input=yes ;; - *) gmp_cv_func_sscanf_writable_input=no ;; -esac -]) -case $gmp_cv_func_sscanf_writable_input in - yes) AC_DEFINE(SSCANF_WRITABLE_INPUT, 1, - [Define to 1 if sscanf requires writable inputs]) ;; - no) ;; - *) AC_MSG_ERROR([unrecognised \$gmp_cv_func_sscanf_writable_input]) ;; -esac -]) -m4trace:acinclude.m4:3703: -1- AC_DEFUN([GMP_FUNC_VSNPRINTF], [AC_CHECK_FUNC(vsnprintf, - [gmp_vsnprintf_exists=yes], - [gmp_vsnprintf_exists=no]) -if test "$gmp_vsnprintf_exists" = no; then - gmp_cv_func_vsnprintf=no -else - AC_CACHE_CHECK([whether vsnprintf works], - gmp_cv_func_vsnprintf, - [gmp_cv_func_vsnprintf=yes - for i in 'return check ("hello world");' 'int n; return check ("%nhello world", &n);'; do - AC_TRY_RUN([ -#include <string.h> /* for strcmp */ -#include <stdio.h> /* for vsnprintf */ - -#include <stdarg.h> - -int -check (const char *fmt, ...) -{ - static char buf[128]; - va_list ap; - int ret; - - va_start (ap, fmt); - - ret = vsnprintf (buf, 4, fmt, ap); - - if (strcmp (buf, "hel") != 0) - return 1; - - /* allowed return values */ - if (ret != -1 && ret != 3 && ret != 11) - return 2; - - return 0; -} - -int -main () -{ -$i -} -], - [:], - [gmp_cv_func_vsnprintf=no; break], - [gmp_cv_func_vsnprintf=probably; break]) - done - ]) - if test "$gmp_cv_func_vsnprintf" = probably; then - AC_MSG_WARN([cannot check for properly working vsnprintf when cross compiling, will assume it's ok]) - fi - if test "$gmp_cv_func_vsnprintf" != no; then - AC_DEFINE(HAVE_VSNPRINTF,1, - [Define to 1 if you have the `vsnprintf' function and it works properly.]) - fi -fi -]) -m4trace:acinclude.m4:3768: -1- AC_DEFUN([GMP_H_EXTERN_INLINE], [AC_REQUIRE([AC_C_INLINE]) -case $ac_cv_c_inline in -no) ;; -*) - AC_TRY_COMPILE( -[#define __GMP_WITHIN_CONFIGURE_INLINE 1 -]GMP_INCLUDE_GMP_H[ -#ifndef __GMP_EXTERN_INLINE -die die die -#endif -],,, - [case $ac_cv_c_inline in - yes) tmp_inline=inline ;; - *) tmp_inline=$ac_cv_c_inline ;; - esac - AC_MSG_WARN([gmp.h doesnt recognise compiler "$tmp_inline", inlines will be unavailable])]) - ;; -esac -]) -m4trace:acinclude.m4:3795: -1- AC_DEFUN([GMP_H_HAVE_FILE], [AC_TRY_COMPILE( -[#include <stdio.h>] -GMP_INCLUDE_GMP_H -[#if ! _GMP_H_HAVE_FILE -die die die -#endif -],,, - [AC_MSG_WARN([gmp.h doesnt recognise <stdio.h>, FILE prototypes will be unavailable])]) -]) -m4trace:acinclude.m4:3815: -1- AC_DEFUN([GMP_PROG_CC_FOR_BUILD], [AC_REQUIRE([AC_PROG_CC]) -if test -n "$CC_FOR_BUILD"; then - GMP_PROG_CC_FOR_BUILD_WORKS($CC_FOR_BUILD,, - [AC_MSG_ERROR([Specified CC_FOR_BUILD doesn't seem to work])]) -elif test -n "$HOST_CC"; then - GMP_PROG_CC_FOR_BUILD_WORKS($HOST_CC, - [CC_FOR_BUILD=$HOST_CC], - [AC_MSG_ERROR([Specified HOST_CC doesn't seem to work])]) -else - for i in "$CC" "$CC $CFLAGS $CPPFLAGS" cc gcc c89 c99; do - GMP_PROG_CC_FOR_BUILD_WORKS($i, - [CC_FOR_BUILD=$i - break]) - done - if test -z "$CC_FOR_BUILD"; then - AC_MSG_ERROR([Cannot find a build system compiler]) - fi -fi - -AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler]) -AC_SUBST(CC_FOR_BUILD) -]) -m4trace:acinclude.m4:3847: -1- AC_DEFUN([GMP_PROG_CC_FOR_BUILD_WORKS], [AC_MSG_CHECKING([build system compiler $1]) -# remove anything that might look like compiler output to our "||" expression -rm -f conftest* a.out b.out a.exe a_out.exe -cat >conftest.c <<EOF -int -main () -{ - return 0; -} -EOF -gmp_compile="$1 conftest.c" -cc_for_build_works=no -if AC_TRY_EVAL(gmp_compile); then - if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&AC_FD_CC 2>&1; then - cc_for_build_works=yes - fi -fi -rm -f conftest* a.out b.out a.exe a_out.exe -AC_MSG_RESULT($cc_for_build_works) -if test "$cc_for_build_works" = yes; then - ifelse([$2],,:,[$2]) -else - ifelse([$3],,:,[$3]) -fi -]) -m4trace:acinclude.m4:3881: -1- AC_DEFUN([GMP_PROG_CPP_FOR_BUILD], [AC_REQUIRE([GMP_PROG_CC_FOR_BUILD]) -AC_MSG_CHECKING([for build system preprocessor]) -if test -z "$CPP_FOR_BUILD"; then - AC_CACHE_VAL(gmp_cv_prog_cpp_for_build, - [cat >conftest.c <<EOF -#define FOO BAR -EOF - for i in "$CC_FOR_BUILD -E" "$CC_FOR_BUILD -E -traditional-cpp" "/lib/cpp"; do - gmp_compile="$i conftest.c" - if AC_TRY_EVAL(gmp_compile) >&AC_FD_CC 2>&1; then - gmp_cv_prog_cpp_for_build=$i - break - fi - done - rm -f conftest* a.out b.out a.exe a_out.exe - if test -z "$gmp_cv_prog_cpp_for_build"; then - AC_MSG_ERROR([Cannot find build system C preprocessor.]) - fi - ]) - CPP_FOR_BUILD=$gmp_cv_prog_cpp_for_build -fi -AC_MSG_RESULT([$CPP_FOR_BUILD]) - -AC_ARG_VAR(CPP_FOR_BUILD,[build system C preprocessor]) -AC_SUBST(CPP_FOR_BUILD) -]) -m4trace:acinclude.m4:3921: -1- AC_DEFUN([GMP_PROG_EXEEXT_FOR_BUILD], [AC_REQUIRE([GMP_PROG_CC_FOR_BUILD]) -AC_CACHE_CHECK([for build system executable suffix], - gmp_cv_prog_exeext_for_build, -[cat >conftest.c <<EOF -int -main () -{ - return 0; -} -EOF -for i in .exe ,ff8 ""; do - gmp_compile="$CC_FOR_BUILD conftest.c -o conftest$i" - if AC_TRY_EVAL(gmp_compile); then - if (./conftest) 2>&AC_FD_CC; then - gmp_cv_prog_exeext_for_build=$i - break - fi - fi -done -rm -f conftest* -if test "${gmp_cv_prog_exeext_for_build+set}" != set; then - AC_MSG_ERROR([Cannot determine executable suffix]) -fi -]) -AC_SUBST(EXEEXT_FOR_BUILD,$gmp_cv_prog_exeext_for_build) -]) -m4trace:acinclude.m4:3957: -1- AC_DEFUN([GMP_C_FOR_BUILD_ANSI], [AC_REQUIRE([GMP_PROG_CC_FOR_BUILD]) -AC_CACHE_CHECK([whether build system compiler is ANSI], - gmp_cv_c_for_build_ansi, -[cat >conftest.c <<EOF -int -main (int argc, char **argv) -{ - return 0; -} -EOF -gmp_compile="$CC_FOR_BUILD conftest.c" -if AC_TRY_EVAL(gmp_compile); then - gmp_cv_c_for_build_ansi=yes -else - gmp_cv_c_for_build_ansi=no -fi -rm -f conftest* a.out b.out a.exe a_out.exe -]) -if test "$gmp_cv_c_for_build_ansi" = yes; then - U_FOR_BUILD= -else - AC_SUBST(U_FOR_BUILD,_) -fi -]) -m4trace:acinclude.m4:3991: -1- AC_DEFUN([GMP_CHECK_LIBM_FOR_BUILD], [AC_REQUIRE([GMP_PROG_CC_FOR_BUILD]) -AC_CACHE_CHECK([for build system compiler math library], - gmp_cv_check_libm_for_build, -[cat >conftest.c <<EOF -#include <math.h> -int -main () -{ - return 0; -} -double d; -double -foo () -{ - return log (d); -} -EOF -gmp_compile="$CC_FOR_BUILD conftest.c -lm" -if AC_TRY_EVAL(gmp_compile); then - gmp_cv_check_libm_for_build=-lm -else - gmp_cv_check_libm_for_build=no -fi -rm -f conftest* a.out b.out a.exe a_out.exe -]) -case $gmp_cv_check_libm_for_build in - yes) AC_SUBST(LIBM_FOR_BUILD,-lm) ;; - no) LIBM_FOR_BUILD= ;; - *) LIBM_FOR_BUILD=$gmp_cv_check_libm_for_build ;; -esac -]) -m4trace:configure.ac:40: -1- m4_pattern_forbid([^_?A[CHUM]_]) -m4trace:configure.ac:40: -1- m4_pattern_forbid([_AC_]) -m4trace:configure.ac:40: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) -m4trace:configure.ac:40: -1- m4_pattern_allow([^AS_FLAGS$]) -m4trace:configure.ac:40: -1- m4_pattern_forbid([^_?m4_]) -m4trace:configure.ac:40: -1- m4_pattern_forbid([^dnl$]) -m4trace:configure.ac:40: -1- m4_pattern_forbid([^_?AS_]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^SHELL$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PATH_SEPARATOR$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_NAME$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_VERSION$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_STRING$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_URL$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^exec_prefix$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^prefix$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^program_transform_name$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^bindir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^sbindir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^libexecdir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^datarootdir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^datadir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^sysconfdir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^sharedstatedir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^localstatedir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^includedir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^oldincludedir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^docdir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^infodir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^htmldir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^dvidir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^pdfdir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^psdir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^libdir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^localedir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^mandir$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_NAME$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_VERSION$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_STRING$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_URL$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^DEFS$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^ECHO_C$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^ECHO_N$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^ECHO_T$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^build_alias$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^host_alias$]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^target_alias$]) -m4trace:configure.ac:42: -1- m4_pattern_forbid([^[ \t]*GMP_]) -m4trace:configure.ac:43: -1- m4_pattern_allow([GMP_LDFLAGS]) -m4trace:configure.ac:44: -1- m4_pattern_allow([GMP_LIMB_BITS]) -m4trace:configure.ac:45: -1- m4_pattern_allow([GMP_MPARAM_H_SUGGEST]) -m4trace:configure.ac:46: -1- m4_pattern_allow([GMP_NAIL_BITS]) -m4trace:configure.ac:47: -1- m4_pattern_allow([GMP_NUMB_BITS]) -m4trace:configure.ac:48: -1- m4_pattern_allow([GMP_NONSTD_ABI]) -m4trace:configure.ac:49: -1- m4_pattern_allow([GMP_CPU_TYPE]) -m4trace:configure.ac:63: -1- GMP_INIT([config.m4]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^build$]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^build_cpu$]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^build_vendor$]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^build_os$]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^host$]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^host_cpu$]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^host_vendor$]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^host_os$]) -m4trace:configure.ac:80: -1- AM_INIT_AUTOMAKE([1.8 gnu no-dependencies]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) -m4trace:configure.ac:80: -1- AM_SET_CURRENT_AUTOMAKE_VERSION -m4trace:configure.ac:80: -1- AM_AUTOMAKE_VERSION([1.15]) -m4trace:configure.ac:80: -1- _AM_AUTOCONF_VERSION([2.69]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^INSTALL_DATA$]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^am__isrc$]) -m4trace:configure.ac:80: -1- _AM_SUBST_NOTMAKE([am__isrc]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^CYGPATH_W$]) -m4trace:configure.ac:80: -1- _AM_SET_OPTIONS([1.8 gnu no-dependencies]) -m4trace:configure.ac:80: -1- _AM_SET_OPTION([1.8]) -m4trace:configure.ac:80: -2- _AM_MANGLE_OPTION([1.8]) -m4trace:configure.ac:80: -1- _AM_SET_OPTION([gnu]) -m4trace:configure.ac:80: -2- _AM_MANGLE_OPTION([gnu]) -m4trace:configure.ac:80: -1- _AM_SET_OPTION([no-dependencies]) -m4trace:configure.ac:80: -2- _AM_MANGLE_OPTION([no-dependencies]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^PACKAGE$]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^VERSION$]) -m4trace:configure.ac:80: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) - AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])]) -m4trace:configure.ac:80: -2- _AM_MANGLE_OPTION([no-define]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^PACKAGE$]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^VERSION$]) -m4trace:configure.ac:80: -1- AM_SANITY_CHECK -m4trace:configure.ac:80: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) -m4trace:configure.ac:80: -1- AM_MISSING_HAS_RUN -m4trace:configure.ac:80: -1- AM_AUX_DIR_EXPAND -m4trace:configure.ac:80: -1- m4_pattern_allow([^ACLOCAL$]) -m4trace:configure.ac:80: -1- AM_MISSING_PROG([AUTOCONF], [autoconf]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AUTOCONF$]) -m4trace:configure.ac:80: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AUTOMAKE$]) -m4trace:configure.ac:80: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AUTOHEADER$]) -m4trace:configure.ac:80: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^MAKEINFO$]) -m4trace:configure.ac:80: -1- AM_PROG_INSTALL_SH -m4trace:configure.ac:80: -1- m4_pattern_allow([^install_sh$]) -m4trace:configure.ac:80: -1- AM_PROG_INSTALL_STRIP -m4trace:configure.ac:80: -1- m4_pattern_allow([^STRIP$]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^MKDIR_P$]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^mkdir_p$]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AWK$]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^SET_MAKE$]) -m4trace:configure.ac:80: -1- AM_SET_LEADING_DOT -m4trace:configure.ac:80: -1- m4_pattern_allow([^am__leading_dot$]) -m4trace:configure.ac:80: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -m4trace:configure.ac:80: -2- _AM_MANGLE_OPTION([tar-ustar]) -m4trace:configure.ac:80: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])]) -m4trace:configure.ac:80: -2- _AM_MANGLE_OPTION([tar-pax]) -m4trace:configure.ac:80: -1- _AM_PROG_TAR([v7]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AMTAR$]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^am__tar$]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^am__untar$]) -m4trace:configure.ac:80: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES([CC])], - [m4_define([AC_PROG_CC], - m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES([CXX])], - [m4_define([AC_PROG_CXX], - m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES([OBJC])], - [m4_define([AC_PROG_OBJC], - m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], - [_AM_DEPENDENCIES([OBJCXX])], - [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl -]) -m4trace:configure.ac:80: -2- _AM_MANGLE_OPTION([no-dependencies]) -m4trace:configure.ac:80: -1- AM_SILENT_RULES -m4trace:configure.ac:80: -1- m4_pattern_allow([^AM_V$]) -m4trace:configure.ac:80: -1- AM_SUBST_NOTMAKE([AM_V]) -m4trace:configure.ac:80: -1- _AM_SUBST_NOTMAKE([AM_V]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AM_DEFAULT_V$]) -m4trace:configure.ac:80: -1- AM_SUBST_NOTMAKE([AM_DEFAULT_V]) -m4trace:configure.ac:80: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AM_BACKSLASH$]) -m4trace:configure.ac:80: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH]) -m4trace:configure.ac:82: -1- AM_MAINTAINER_MODE -m4trace:configure.ac:82: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) -m4trace:configure.ac:82: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$]) -m4trace:configure.ac:82: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$]) -m4trace:configure.ac:82: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE]) -m4trace:configure.ac:82: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE]) -m4trace:configure.ac:82: -1- m4_pattern_allow([^MAINT$]) -m4trace:configure.ac:86: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:86: the top level]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^WANT_ASSERT$]) -m4trace:configure.ac:100: -1- GMP_DEFINE_RAW(["define(<WANT_ASSERT>,$want_assert_01)"]) -m4trace:configure.ac:104: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:104: the top level]) -m4trace:configure.ac:129: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:129: the top level]) -m4trace:configure.ac:138: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:138: the top level]) -m4trace:configure.ac:146: -1- m4_pattern_allow([^WANT_ASSEMBLY$]) -m4trace:configure.ac:152: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:152: the top level]) -m4trace:configure.ac:160: -1- m4_pattern_allow([^WANT_FFT$]) -m4trace:configure.ac:166: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:166: the top level]) -m4trace:configure.ac:174: -1- m4_pattern_allow([^WANT_OLD_FFT_FULL$]) -m4trace:configure.ac:180: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:180: the top level]) -m4trace:configure.ac:195: -1- m4_pattern_allow([^GMP_NAIL_BITS$]) -m4trace:configure.ac:199: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:199: the top level]) -m4trace:configure.ac:209: -1- m4_pattern_allow([^WANT_PROFILING_PROF$]) -m4trace:configure.ac:213: -1- m4_pattern_allow([^WANT_PROFILING_GPROF$]) -m4trace:configure.ac:217: -1- m4_pattern_allow([^WANT_PROFILING_INSTRUMENT$]) -m4trace:configure.ac:222: -1- GMP_DEFINE_RAW(["define(<WANT_PROFILING>,<\`$enable_profiling'>)"]) -m4trace:configure.ac:233: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:233: the top level]) -m4trace:configure.ac:243: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:243: the top level]) -m4trace:configure.ac:253: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:253: the top level]) -m4trace:configure.ac:263: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:263: the top level]) -m4trace:configure.ac:271: -1- m4_pattern_allow([^WANT_FAKE_CPUID$]) -m4trace:configure.ac:287: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_HOST_CPU_$tmp_host')"], [POST]) -m4trace:configure.ac:435: -1- m4_pattern_allow([^ABI$]) -m4trace:configure.ac:456: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_power$]) -m4trace:configure.ac:457: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_powerpc$]) -m4trace:configure.ac:462: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_alpha$]) -m4trace:configure.ac:539: -1- GMP_INCLUDE_MPN([alpha/alpha-defs.m4]) -m4trace:configure.ac:543: -1- GMP_INCLUDE_MPN([alpha/unicos.m4]) -m4trace:configure.ac:548: -1- GMP_INCLUDE_MPN([alpha/default.m4]) -m4trace:configure.ac:570: -1- GMP_INCLUDE_MPN([alpha/default.m4]) -m4trace:configure.ac:612: -1- GMP_INCLUDE_MPN([arm/arm-defs.m4]) -m4trace:configure.ac:822: -1- GMP_INCLUDE_MPN([ia64/ia64-defs.m4]) -m4trace:configure.ac:890: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_m68k$]) -m4trace:configure.ac:891: -1- GMP_INCLUDE_MPN([m68k/m68k-defs.m4]) -m4trace:configure.ac:949: -1- GMP_INCLUDE_MPN([mips32/mips-defs.m4]) -m4trace:configure.ac:999: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_powerpc$]) -m4trace:configure.ac:1224: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_power$]) -m4trace:configure.ac:1269: -1- m4_pattern_allow([^HAVE_HOST_CPU_s390_zarch$]) -m4trace:configure.ac:1278: -1- m4_pattern_allow([^HAVE_HOST_CPU_s390_zarch$]) -m4trace:configure.ac:1287: -1- m4_pattern_allow([^HAVE_HOST_CPU_s390_zarch$]) -m4trace:configure.ac:1296: -1- m4_pattern_allow([^HAVE_HOST_CPU_s390_zarch$]) -m4trace:configure.ac:1305: -1- m4_pattern_allow([^HAVE_HOST_CPU_s390_zarch$]) -m4trace:configure.ac:1339: -1- GMP_INCLUDE_MPN([sparc32/sparc-defs.m4]) -m4trace:configure.ac:1551: -1- GMP_INCLUDE_MPN([vax/elf.m4]) -m4trace:configure.ac:1878: -1- m4_pattern_allow([^HOST_DOS64$]) -m4trace:configure.ac:1890: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: the \"none\" host is obsolete, use --disable-assembly], []) -m4trace:configure.ac:1890: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me: WARNING: the \"none\" host is obsolete, use --disable-assembly], []) -m4trace:configure.ac:1911: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -configure.ac:1911: the top level]) -m4trace:configure.ac:2024: -1- GMP_PROG_CC_IS_GNU([$cc], [ccbase=gcc]) -m4trace:configure.ac:2024: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:944: GMP_PROG_CC_IS_GNU is expanded from... -configure.ac:2024: the top level]) -m4trace:configure.ac:2030: -1- GMP_PROG_CC_IS_XLC([$cc], [ccbase=xlc]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS([$cc $cflags $cppflags], [], [continue]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], []) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [], [ -int main () { return 0; }]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [], [ -int main () { return 0; }], [], [gmp_prog_cc_works="no"], [gmp_prog_cc_works="no[, program does not run]"]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 - (without -maix64), hence detecting an unusable compiler */ -void *g() { return (void *) 0; } -void *f() { return g(); } -]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 - (without -maix64), hence detecting an unusable compiler */ -void *g() { return (void *) 0; } -void *f() { return g(); } - -int main () { return 0; }]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 - (without -maix64), hence detecting an unusable compiler */ -void *g() { return (void *) 0; } -void *f() { return g(); } - -int main () { return 0; }], [], [gmp_prog_cc_works="no, function pointer return"], [gmp_prog_cc_works="no, function pointer return[, program does not run]"]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc - -march=pentiumpro on Solaris 2.8. The native sun assembler - requires a non-standard syntax for cmov which gcc (as of 2.95.2 at - least) doesn't know. */ -int n; -int cmov () { return (n >= 0 ? n : 0); } -]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc - -march=pentiumpro on Solaris 2.8. The native sun assembler - requires a non-standard syntax for cmov which gcc (as of 2.95.2 at - least) doesn't know. */ -int n; -int cmov () { return (n >= 0 ? n : 0); } - -int main () { return 0; }]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc - -march=pentiumpro on Solaris 2.8. The native sun assembler - requires a non-standard syntax for cmov which gcc (as of 2.95.2 at - least) doesn't know. */ -int n; -int cmov () { return (n >= 0 ? n : 0); } - -int main () { return 0; }], [], [gmp_prog_cc_works="no, cmov instruction"], [gmp_prog_cc_works="no, cmov instruction[, program does not run]"]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 - on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 - option causes gcc to incorrectly select the 32-bit libgcc.a, not - the 64-bit one, and consequently it misses out on the __fixunsdfdi - helper (double -> uint64 conversion). */ -double d; -unsigned long gcc303 () { return (unsigned long) d; } -]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 - on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 - option causes gcc to incorrectly select the 32-bit libgcc.a, not - the 64-bit one, and consequently it misses out on the __fixunsdfdi - helper (double -> uint64 conversion). */ -double d; -unsigned long gcc303 () { return (unsigned long) d; } - -int main () { return 0; }]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 - on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 - option causes gcc to incorrectly select the 32-bit libgcc.a, not - the 64-bit one, and consequently it misses out on the __fixunsdfdi - helper (double -> uint64 conversion). */ -double d; -unsigned long gcc303 () { return (unsigned long) d; } - -int main () { return 0; }], [], [gmp_prog_cc_works="no, double -> ulong conversion"], [gmp_prog_cc_works="no, double -> ulong conversion[, program does not run]"]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if - the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 - instruction, and a negation like this comes out using it. */ -double fneg_data; -unsigned long fneg () { return -fneg_data; } -]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if - the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 - instruction, and a negation like this comes out using it. */ -double fneg_data; -unsigned long fneg () { return -fneg_data; } - -int main () { return 0; }]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if - the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 - instruction, and a negation like this comes out using it. */ -double fneg_data; -unsigned long fneg () { return -fneg_data; } - -int main () { return 0; }], [], [gmp_prog_cc_works="no, double negation"], [gmp_prog_cc_works="no, double negation[, program does not run]"]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn - (cvtsd2ss) which will provoke an error if the assembler doesn't recognise - those instructions. Not sure how much of the gmp code will come out - wanting sse2, but it's easiest to reject an option we know is bad. */ -double ftod_data; -float ftod () { return (float) ftod_data; } -]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn - (cvtsd2ss) which will provoke an error if the assembler doesn't recognise - those instructions. Not sure how much of the gmp code will come out - wanting sse2, but it's easiest to reject an option we know is bad. */ -double ftod_data; -float ftod () { return (float) ftod_data; } - -int main () { return 0; }]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn - (cvtsd2ss) which will provoke an error if the assembler doesn't recognise - those instructions. Not sure how much of the gmp code will come out - wanting sse2, but it's easiest to reject an option we know is bad. */ -double ftod_data; -float ftod () { return (float) ftod_data; } - -int main () { return 0; }], [], [gmp_prog_cc_works="no, double -> float conversion"], [gmp_prog_cc_works="no, double -> float conversion[, program does not run]"]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version - "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char - values being spilled into floating point registers. The problem doesn't - show up all the time, but has occurred enough in GMP for us to reject - this compiler+flags. */ -#include <string.h> /* for memcpy */ -struct try_t -{ - char dst[2]; - char size; - long d0, d1, d2, d3, d4, d5, d6; - char overlap; -}; -struct try_t param[6]; -int -param_init () -{ - struct try_t *p; - memcpy (p, ¶m[ 2 ], sizeof (*p)); - memcpy (p, ¶m[ 2 ], sizeof (*p)); - p->size = 2; - memcpy (p, ¶m[ 1 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 2; - memcpy (p, ¶m[ 3 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 8; - memcpy (p, ¶m[ 4 ], sizeof (*p)); - memcpy (p, ¶m[ 4 ], sizeof (*p)); - p->overlap = 8; - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - return 0; -} -]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version - "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char - values being spilled into floating point registers. The problem doesn't - show up all the time, but has occurred enough in GMP for us to reject - this compiler+flags. */ -#include <string.h> /* for memcpy */ -struct try_t -{ - char dst[2]; - char size; - long d0, d1, d2, d3, d4, d5, d6; - char overlap; -}; -struct try_t param[6]; -int -param_init () -{ - struct try_t *p; - memcpy (p, ¶m[ 2 ], sizeof (*p)); - memcpy (p, ¶m[ 2 ], sizeof (*p)); - p->size = 2; - memcpy (p, ¶m[ 1 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 2; - memcpy (p, ¶m[ 3 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 8; - memcpy (p, ¶m[ 4 ], sizeof (*p)); - memcpy (p, ¶m[ 4 ], sizeof (*p)); - p->overlap = 8; - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - return 0; -} - -int main () { return 0; }]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version - "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char - values being spilled into floating point registers. The problem doesn't - show up all the time, but has occurred enough in GMP for us to reject - this compiler+flags. */ -#include <string.h> /* for memcpy */ -struct try_t -{ - char dst[2]; - char size; - long d0, d1, d2, d3, d4, d5, d6; - char overlap; -}; -struct try_t param[6]; -int -param_init () -{ - struct try_t *p; - memcpy (p, ¶m[ 2 ], sizeof (*p)); - memcpy (p, ¶m[ 2 ], sizeof (*p)); - p->size = 2; - memcpy (p, ¶m[ 1 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 2; - memcpy (p, ¶m[ 3 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 8; - memcpy (p, ¶m[ 4 ], sizeof (*p)); - memcpy (p, ¶m[ 4 ], sizeof (*p)); - p->overlap = 8; - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - return 0; -} - -int main () { return 0; }], [], [gmp_prog_cc_works="no, gnupro alpha ev6 char spilling"], [gmp_prog_cc_works="no, gnupro alpha ev6 char spilling[, program does not run]"]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [__builtin_alloca availability], [int k; int foo () { __builtin_alloca (k); }], [GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [alloca array], -[/* The following provokes an internal compiler error from Itanium HP-UX cc - under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ -int k; -int foo () -{ - int i, **a; - a = __builtin_alloca (k); - for (i = 0; i <= k; i++) - a[i] = __builtin_alloca (1 << i); -} -])]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc - under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ -int k; -int foo () -{ - int i, **a; - a = __builtin_alloca (k); - for (i = 0; i <= k; i++) - a[i] = __builtin_alloca (1 << i); -} -]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc - under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ -int k; -int foo () -{ - int i, **a; - a = __builtin_alloca (k); - for (i = 0; i <= k; i++) - a[i] = __builtin_alloca (1 << i); -} - -int main () { return 0; }]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc - under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ -int k; -int foo () -{ - int i, **a; - a = __builtin_alloca (k); - for (i = 0; i <= k; i++) - a[i] = __builtin_alloca (1 << i); -} - -int main () { return 0; }], [], [gmp_prog_cc_works="no, alloca array"], [gmp_prog_cc_works="no, alloca array[, program does not run]"]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on - power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this - results in "Internal error related to the source program domain". - - For reference it seems to be the combination of nabs+fcirz which is bad, - not either alone. This sort of thing occurs in mpz/get_str.c with the - way double chars_per_bit_exactly is applied in MPN_SIZEINBASE. Perhaps - if that code changes to a scaled-integer style then we won't need this - test. */ - -double fp[1]; -int x; -int f () -{ - int a; - a = (x >= 0 ? x : -x); - return a * fp[0]; -} -]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on - power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this - results in "Internal error related to the source program domain". - - For reference it seems to be the combination of nabs+fcirz which is bad, - not either alone. This sort of thing occurs in mpz/get_str.c with the - way double chars_per_bit_exactly is applied in MPN_SIZEINBASE. Perhaps - if that code changes to a scaled-integer style then we won't need this - test. */ - -double fp[1]; -int x; -int f () -{ - int a; - a = (x >= 0 ? x : -x); - return a * fp[0]; -} - -int main () { return 0; }]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on - power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this - results in "Internal error related to the source program domain". - - For reference it seems to be the combination of nabs+fcirz which is bad, - not either alone. This sort of thing occurs in mpz/get_str.c with the - way double chars_per_bit_exactly is applied in MPN_SIZEINBASE. Perhaps - if that code changes to a scaled-integer style then we won't need this - test. */ - -double fp[1]; -int x; -int f () -{ - int a; - a = (x >= 0 ? x : -x); - return a * fp[0]; -} - -int main () { return 0; }], [], [gmp_prog_cc_works="no, abs int -> double conversion"], [gmp_prog_cc_works="no, abs int -> double conversion[, program does not run]"]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. - Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to segfault with e.g., -O2 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -typedef unsigned long long t1;typedef t1*t2; -void g(){} -void h(){} -static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) -{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;} -void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i; -for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}} -#else -int dummy; -#endif -]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. - Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to segfault with e.g., -O2 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -typedef unsigned long long t1;typedef t1*t2; -void g(){} -void h(){} -static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) -{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;} -void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i; -for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}} -#else -int dummy; -#endif - -int main () { return 0; }]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. - Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to segfault with e.g., -O2 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -typedef unsigned long long t1;typedef t1*t2; -void g(){} -void h(){} -static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) -{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;} -void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i; -for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}} -#else -int dummy; -#endif - -int main () { return 0; }], [], [gmp_prog_cc_works="no, long long reliability test 1"], [gmp_prog_cc_works="no, long long reliability test 1[, program does not run]"]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. - Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to get an ICE with -O1 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int g(); -void f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();} -int g(){return 0;} -#else -int dummy; -#endif -]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. - Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to get an ICE with -O1 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int g(); -void f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();} -int g(){return 0;} -#else -int dummy; -#endif - -int main () { return 0; }]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. - Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to get an ICE with -O1 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int g(); -void f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();} -int g(){return 0;} -#else -int dummy; -#endif - -int main () { return 0; }], [], [gmp_prog_cc_works="no, long long reliability test 2"], [gmp_prog_cc_works="no, long long reliability test 2[, program does not run]"]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [freebsd hacked gcc], [/* Provokes an ICE on i386-freebsd with the FreeBSD-hacked gcc, under - -O2 -march=amdfam10. We call helper functions here "open" and "close" in - order for linking to succeed. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int open(int*,int*,int);void*close(int);void g(int*rp,int*up,int un){ -__builtin_expect(un<=0x7f00,1)?__builtin_alloca(un):close(un);if(__builtin_clzl -(up[un])){open(rp,up,un);while(1){if(rp[un-1]!=0)break;un--;}}} -#else -int dummy; -#endif -]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [freebsd hacked gcc], [/* Provokes an ICE on i386-freebsd with the FreeBSD-hacked gcc, under - -O2 -march=amdfam10. We call helper functions here "open" and "close" in - order for linking to succeed. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int open(int*,int*,int);void*close(int);void g(int*rp,int*up,int un){ -__builtin_expect(un<=0x7f00,1)?__builtin_alloca(un):close(un);if(__builtin_clzl -(up[un])){open(rp,up,un);while(1){if(rp[un-1]!=0)break;un--;}}} -#else -int dummy; -#endif - -int main () { return 0; }]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [freebsd hacked gcc], [/* Provokes an ICE on i386-freebsd with the FreeBSD-hacked gcc, under - -O2 -march=amdfam10. We call helper functions here "open" and "close" in - order for linking to succeed. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int open(int*,int*,int);void*close(int);void g(int*rp,int*up,int un){ -__builtin_expect(un<=0x7f00,1)?__builtin_alloca(un):close(un);if(__builtin_clzl -(up[un])){open(rp,up,un);while(1){if(rp[un-1]!=0)break;un--;}}} -#else -int dummy; -#endif - -int main () { return 0; }], [], [gmp_prog_cc_works="no, freebsd hacked gcc"], [gmp_prog_cc_works="no, freebsd hacked gcc[, program does not run]"]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [mpn_lshift_com optimization], [/* The following is mis-compiled by HP ia-64 cc version - cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003] - under "cc +O3", both in +DD32 and +DD64 modes. The mpn_lshift_com gets - inlined and its return value somehow botched to be 0 instead of 1. This - arises in the real mpn_lshift_com in mul_fft.c. A lower optimization - level, like +O2 seems ok. This code needs to be run to show the problem, - but that's fine, the offending cc is a native-only compiler so we don't - have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -unsigned long -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long retval, high_limb, low_limb; - unsigned tnc; - long i; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *up++; - retval = low_limb >> tnc; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *up++; - *rp++ = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - return retval; -} -int -main () -{ - unsigned long cy, rp[2], up[2]; - up[0] = ~ 0L; - up[1] = 0; - cy = lshift_com (rp, up, 2L, 1); - if (cy != 1L) - return 1; - return 0; -} -#else -int -main () -{ - return 0; -} -#endif -]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [mpn_lshift_com optimization], [/* The following is mis-compiled by HP ia-64 cc version - cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003] - under "cc +O3", both in +DD32 and +DD64 modes. The mpn_lshift_com gets - inlined and its return value somehow botched to be 0 instead of 1. This - arises in the real mpn_lshift_com in mul_fft.c. A lower optimization - level, like +O2 seems ok. This code needs to be run to show the problem, - but that's fine, the offending cc is a native-only compiler so we don't - have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -unsigned long -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long retval, high_limb, low_limb; - unsigned tnc; - long i; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *up++; - retval = low_limb >> tnc; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *up++; - *rp++ = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - return retval; -} -int -main () -{ - unsigned long cy, rp[2], up[2]; - up[0] = ~ 0L; - up[1] = 0; - cy = lshift_com (rp, up, 2L, 1); - if (cy != 1L) - return 1; - return 0; -} -#else -int -main () -{ - return 0; -} -#endif -], [], [gmp_prog_cc_works="no, mpn_lshift_com optimization"], [gmp_prog_cc_works="no, mpn_lshift_com optimization[, program does not run]"]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [mpn_lshift_com optimization 2], [/* The following is mis-compiled by Intel ia-64 icc version 1.8 under - "icc -O3", After several calls, the function writes partial garbage to - the result vector. Perhaps relates to the chk.a.nc insn. This code needs - to be run to show the problem, but that's fine, the offending cc is a - native-only compiler so we don't have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -#include <stdlib.h> -void -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long high_limb, low_limb; - unsigned tnc; - long i; - up += n; - rp += n; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *--up; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *--up; - *--rp = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - *--rp = ~high_limb; -} -int -main () -{ - unsigned long *r, *r2; - unsigned long a[88 + 1]; - long i; - for (i = 0; i < 88 + 1; i++) - a[i] = ~0L; - r = malloc (10000 * sizeof (unsigned long)); - r2 = r; - for (i = 0; i < 528; i += 22) - { - lshift_com (r2, a, - i / (8 * sizeof (unsigned long)) + 1, - i % (8 * sizeof (unsigned long))); - r2 += 88 + 1; - } - if (r[2048] != 0 || r[2049] != 0 || r[2050] != 0 || r[2051] != 0 || - r[2052] != 0 || r[2053] != 0 || r[2054] != 0) - abort (); - return 0; -} -#else -int -main () -{ - return 0; -} -#endif -]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [mpn_lshift_com optimization 2], [/* The following is mis-compiled by Intel ia-64 icc version 1.8 under - "icc -O3", After several calls, the function writes partial garbage to - the result vector. Perhaps relates to the chk.a.nc insn. This code needs - to be run to show the problem, but that's fine, the offending cc is a - native-only compiler so we don't have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -#include <stdlib.h> -void -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long high_limb, low_limb; - unsigned tnc; - long i; - up += n; - rp += n; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *--up; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *--up; - *--rp = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - *--rp = ~high_limb; -} -int -main () -{ - unsigned long *r, *r2; - unsigned long a[88 + 1]; - long i; - for (i = 0; i < 88 + 1; i++) - a[i] = ~0L; - r = malloc (10000 * sizeof (unsigned long)); - r2 = r; - for (i = 0; i < 528; i += 22) - { - lshift_com (r2, a, - i / (8 * sizeof (unsigned long)) + 1, - i % (8 * sizeof (unsigned long))); - r2 += 88 + 1; - } - if (r[2048] != 0 || r[2049] != 0 || r[2050] != 0 || r[2051] != 0 || - r[2052] != 0 || r[2053] != 0 || r[2054] != 0) - abort (); - return 0; -} -#else -int -main () -{ - return 0; -} -#endif -], [], [gmp_prog_cc_works="no, mpn_lshift_com optimization 2"], [gmp_prog_cc_works="no, mpn_lshift_com optimization 2[, program does not run]"]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- GMP_PROG_CC_X86_GOT_EAX_EMITTED([$cc $cflags $cppflags], [GMP_ASM_X86_GOT_EAX_OK([$cc $cflags $cppflags],, - [gmp_prog_cc_works="no, bad gas GOT with eax"])]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- GMP_ASM_X86_GOT_EAX_OK([$cc $cflags $cppflags], [], [gmp_prog_cc_works="no, bad gas GOT with eax"]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:2444: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:2444: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:2444: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2081: -1- GMP_PROG_CC_WORKS_LONGLONG([$cc $cflags $cppflags], [], [continue]) -m4trace:configure.ac:2081: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:867: GMP_PROG_CC_WORKS_LONGLONG is expanded from... -configure.ac:2081: the top level]) -m4trace:configure.ac:2081: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:867: GMP_PROG_CC_WORKS_LONGLONG is expanded from... -configure.ac:2081: the top level]) -m4trace:configure.ac:2081: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:867: GMP_PROG_CC_WORKS_LONGLONG is expanded from... -configure.ac:2081: the top level]) -m4trace:configure.ac:2093: -1- GMP_HPC_HPPA_2_0([$cc], [], [testlist_pass=no]) -m4trace:configure.ac:2093: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1041: GMP_HPC_HPPA_2_0 is expanded from... -configure.ac:2093: the top level]) -m4trace:configure.ac:2093: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1041: GMP_HPC_HPPA_2_0 is expanded from... -configure.ac:2093: the top level]) -m4trace:configure.ac:2093: -1- GMP_COMPARE_GE([$gmp_tmp_v1], [10], [$gmp_tmp_v2], [32], [$gmp_tmp_v3], [30]) -m4trace:configure.ac:2093: -1- GMP_COMPARE_GE_INTERNAL([$gmp_tmp_v1], [10], [$gmp_tmp_v2], [32], [$gmp_tmp_v3], [30]) -m4trace:configure.ac:2093: -1- GMP_COMPARE_GE_INTERNAL([$gmp_tmp_v2], [32], [$gmp_tmp_v3], [30]) -m4trace:configure.ac:2093: -1- GMP_COMPARE_GE_INTERNAL([$gmp_tmp_v3], [30]) -m4trace:configure.ac:2094: -1- GMP_GCC_ARM_UMODSI([$cc], [], [testlist_pass=no]) -m4trace:configure.ac:2094: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1082: GMP_GCC_ARM_UMODSI is expanded from... -configure.ac:2094: the top level]) -m4trace:configure.ac:2095: -1- GMP_GCC_MIPS_O32([$cc], [], [testlist_pass=no]) -m4trace:configure.ac:2095: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1107: GMP_GCC_MIPS_O32 is expanded from... -configure.ac:2095: the top level]) -m4trace:configure.ac:2095: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1107: GMP_GCC_MIPS_O32 is expanded from... -configure.ac:2095: the top level]) -m4trace:configure.ac:2096: -1- GMP_HPPA_LEVEL_20([$cc $cflags], [], [testlist_pass=no]) -m4trace:configure.ac:2096: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1412: GMP_HPPA_LEVEL_20 is expanded from... -configure.ac:2096: the top level]) -m4trace:configure.ac:2096: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1412: GMP_HPPA_LEVEL_20 is expanded from... -configure.ac:2096: the top level]) -m4trace:configure.ac:2096: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1412: GMP_HPPA_LEVEL_20 is expanded from... -configure.ac:2096: the top level]) -m4trace:configure.ac:2097: -1- GMP_C_TEST_SIZEOF([$cc $cflags], [$tst], [], [testlist_pass=no]) -m4trace:configure.ac:2097: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:907: GMP_C_TEST_SIZEOF is expanded from... -configure.ac:2097: the top level]) -m4trace:configure.ac:2097: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:907: GMP_C_TEST_SIZEOF is expanded from... -configure.ac:2097: the top level]) -m4trace:configure.ac:2216: -1- GMP_GCC_PENTIUM4_SSE2([$cc $cflags $cppflags], [], [continue]) -m4trace:configure.ac:2217: -1- GMP_OS_X86_XMM([$cc $cflags $cppflags], [], [continue]) -m4trace:configure.ac:2217: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1314: GMP_OS_X86_XMM is expanded from... -configure.ac:2217: the top level]) -m4trace:configure.ac:2222: -1- GMP_GCC_NO_CPP_PRECOMP([$ccbase], [$cc], [$cflags], [cflags="$cflags $flag" - break], [continue]) -m4trace:configure.ac:2222: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1142: GMP_GCC_NO_CPP_PRECOMP is expanded from... -configure.ac:2222: the top level]) -m4trace:configure.ac:2230: -1- GMP_GCC_WA_MCPU([$cc $cflags], [$flag], [], [continue]) -m4trace:configure.ac:2230: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1202: GMP_GCC_WA_MCPU is expanded from... -configure.ac:2230: the top level]) -m4trace:configure.ac:2235: -1- GMP_GCC_WA_OLDAS([$cc $cflags $cppflags], [cflags="$cflags $flag" - break], [continue]) -m4trace:configure.ac:2235: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1254: GMP_GCC_WA_OLDAS is expanded from... -configure.ac:2235: the top level]) -m4trace:configure.ac:2235: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1254: GMP_GCC_WA_OLDAS is expanded from... -configure.ac:2235: the top level]) -m4trace:configure.ac:2235: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1254: GMP_GCC_WA_OLDAS is expanded from... -configure.ac:2235: the top level]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS([$cc $cflags $cppflags $flag], [cflags="$cflags $flag" - break]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], []) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [], [ -int main () { return 0; }]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [], [ -int main () { return 0; }], [], [gmp_prog_cc_works="no"], [gmp_prog_cc_works="no[, program does not run]"]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 - (without -maix64), hence detecting an unusable compiler */ -void *g() { return (void *) 0; } -void *f() { return g(); } -]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 - (without -maix64), hence detecting an unusable compiler */ -void *g() { return (void *) 0; } -void *f() { return g(); } - -int main () { return 0; }]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 - (without -maix64), hence detecting an unusable compiler */ -void *g() { return (void *) 0; } -void *f() { return g(); } - -int main () { return 0; }], [], [gmp_prog_cc_works="no, function pointer return"], [gmp_prog_cc_works="no, function pointer return[, program does not run]"]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc - -march=pentiumpro on Solaris 2.8. The native sun assembler - requires a non-standard syntax for cmov which gcc (as of 2.95.2 at - least) doesn't know. */ -int n; -int cmov () { return (n >= 0 ? n : 0); } -]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc - -march=pentiumpro on Solaris 2.8. The native sun assembler - requires a non-standard syntax for cmov which gcc (as of 2.95.2 at - least) doesn't know. */ -int n; -int cmov () { return (n >= 0 ? n : 0); } - -int main () { return 0; }]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc - -march=pentiumpro on Solaris 2.8. The native sun assembler - requires a non-standard syntax for cmov which gcc (as of 2.95.2 at - least) doesn't know. */ -int n; -int cmov () { return (n >= 0 ? n : 0); } - -int main () { return 0; }], [], [gmp_prog_cc_works="no, cmov instruction"], [gmp_prog_cc_works="no, cmov instruction[, program does not run]"]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 - on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 - option causes gcc to incorrectly select the 32-bit libgcc.a, not - the 64-bit one, and consequently it misses out on the __fixunsdfdi - helper (double -> uint64 conversion). */ -double d; -unsigned long gcc303 () { return (unsigned long) d; } -]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 - on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 - option causes gcc to incorrectly select the 32-bit libgcc.a, not - the 64-bit one, and consequently it misses out on the __fixunsdfdi - helper (double -> uint64 conversion). */ -double d; -unsigned long gcc303 () { return (unsigned long) d; } - -int main () { return 0; }]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 - on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 - option causes gcc to incorrectly select the 32-bit libgcc.a, not - the 64-bit one, and consequently it misses out on the __fixunsdfdi - helper (double -> uint64 conversion). */ -double d; -unsigned long gcc303 () { return (unsigned long) d; } - -int main () { return 0; }], [], [gmp_prog_cc_works="no, double -> ulong conversion"], [gmp_prog_cc_works="no, double -> ulong conversion[, program does not run]"]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if - the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 - instruction, and a negation like this comes out using it. */ -double fneg_data; -unsigned long fneg () { return -fneg_data; } -]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if - the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 - instruction, and a negation like this comes out using it. */ -double fneg_data; -unsigned long fneg () { return -fneg_data; } - -int main () { return 0; }]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if - the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 - instruction, and a negation like this comes out using it. */ -double fneg_data; -unsigned long fneg () { return -fneg_data; } - -int main () { return 0; }], [], [gmp_prog_cc_works="no, double negation"], [gmp_prog_cc_works="no, double negation[, program does not run]"]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn - (cvtsd2ss) which will provoke an error if the assembler doesn't recognise - those instructions. Not sure how much of the gmp code will come out - wanting sse2, but it's easiest to reject an option we know is bad. */ -double ftod_data; -float ftod () { return (float) ftod_data; } -]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn - (cvtsd2ss) which will provoke an error if the assembler doesn't recognise - those instructions. Not sure how much of the gmp code will come out - wanting sse2, but it's easiest to reject an option we know is bad. */ -double ftod_data; -float ftod () { return (float) ftod_data; } - -int main () { return 0; }]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn - (cvtsd2ss) which will provoke an error if the assembler doesn't recognise - those instructions. Not sure how much of the gmp code will come out - wanting sse2, but it's easiest to reject an option we know is bad. */ -double ftod_data; -float ftod () { return (float) ftod_data; } - -int main () { return 0; }], [], [gmp_prog_cc_works="no, double -> float conversion"], [gmp_prog_cc_works="no, double -> float conversion[, program does not run]"]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version - "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char - values being spilled into floating point registers. The problem doesn't - show up all the time, but has occurred enough in GMP for us to reject - this compiler+flags. */ -#include <string.h> /* for memcpy */ -struct try_t -{ - char dst[2]; - char size; - long d0, d1, d2, d3, d4, d5, d6; - char overlap; -}; -struct try_t param[6]; -int -param_init () -{ - struct try_t *p; - memcpy (p, ¶m[ 2 ], sizeof (*p)); - memcpy (p, ¶m[ 2 ], sizeof (*p)); - p->size = 2; - memcpy (p, ¶m[ 1 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 2; - memcpy (p, ¶m[ 3 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 8; - memcpy (p, ¶m[ 4 ], sizeof (*p)); - memcpy (p, ¶m[ 4 ], sizeof (*p)); - p->overlap = 8; - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - return 0; -} -]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version - "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char - values being spilled into floating point registers. The problem doesn't - show up all the time, but has occurred enough in GMP for us to reject - this compiler+flags. */ -#include <string.h> /* for memcpy */ -struct try_t -{ - char dst[2]; - char size; - long d0, d1, d2, d3, d4, d5, d6; - char overlap; -}; -struct try_t param[6]; -int -param_init () -{ - struct try_t *p; - memcpy (p, ¶m[ 2 ], sizeof (*p)); - memcpy (p, ¶m[ 2 ], sizeof (*p)); - p->size = 2; - memcpy (p, ¶m[ 1 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 2; - memcpy (p, ¶m[ 3 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 8; - memcpy (p, ¶m[ 4 ], sizeof (*p)); - memcpy (p, ¶m[ 4 ], sizeof (*p)); - p->overlap = 8; - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - return 0; -} - -int main () { return 0; }]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version - "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char - values being spilled into floating point registers. The problem doesn't - show up all the time, but has occurred enough in GMP for us to reject - this compiler+flags. */ -#include <string.h> /* for memcpy */ -struct try_t -{ - char dst[2]; - char size; - long d0, d1, d2, d3, d4, d5, d6; - char overlap; -}; -struct try_t param[6]; -int -param_init () -{ - struct try_t *p; - memcpy (p, ¶m[ 2 ], sizeof (*p)); - memcpy (p, ¶m[ 2 ], sizeof (*p)); - p->size = 2; - memcpy (p, ¶m[ 1 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 2; - memcpy (p, ¶m[ 3 ], sizeof (*p)); - p->dst[0] = 1; - p->overlap = 8; - memcpy (p, ¶m[ 4 ], sizeof (*p)); - memcpy (p, ¶m[ 4 ], sizeof (*p)); - p->overlap = 8; - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - memcpy (p, ¶m[ 5 ], sizeof (*p)); - return 0; -} - -int main () { return 0; }], [], [gmp_prog_cc_works="no, gnupro alpha ev6 char spilling"], [gmp_prog_cc_works="no, gnupro alpha ev6 char spilling[, program does not run]"]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [__builtin_alloca availability], [int k; int foo () { __builtin_alloca (k); }], [GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [alloca array], -[/* The following provokes an internal compiler error from Itanium HP-UX cc - under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ -int k; -int foo () -{ - int i, **a; - a = __builtin_alloca (k); - for (i = 0; i <= k; i++) - a[i] = __builtin_alloca (1 << i); -} -])]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc - under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ -int k; -int foo () -{ - int i, **a; - a = __builtin_alloca (k); - for (i = 0; i <= k; i++) - a[i] = __builtin_alloca (1 << i); -} -]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc - under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ -int k; -int foo () -{ - int i, **a; - a = __builtin_alloca (k); - for (i = 0; i <= k; i++) - a[i] = __builtin_alloca (1 << i); -} - -int main () { return 0; }]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc - under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ -int k; -int foo () -{ - int i, **a; - a = __builtin_alloca (k); - for (i = 0; i <= k; i++) - a[i] = __builtin_alloca (1 << i); -} - -int main () { return 0; }], [], [gmp_prog_cc_works="no, alloca array"], [gmp_prog_cc_works="no, alloca array[, program does not run]"]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on - power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this - results in "Internal error related to the source program domain". - - For reference it seems to be the combination of nabs+fcirz which is bad, - not either alone. This sort of thing occurs in mpz/get_str.c with the - way double chars_per_bit_exactly is applied in MPN_SIZEINBASE. Perhaps - if that code changes to a scaled-integer style then we won't need this - test. */ - -double fp[1]; -int x; -int f () -{ - int a; - a = (x >= 0 ? x : -x); - return a * fp[0]; -} -]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on - power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this - results in "Internal error related to the source program domain". - - For reference it seems to be the combination of nabs+fcirz which is bad, - not either alone. This sort of thing occurs in mpz/get_str.c with the - way double chars_per_bit_exactly is applied in MPN_SIZEINBASE. Perhaps - if that code changes to a scaled-integer style then we won't need this - test. */ - -double fp[1]; -int x; -int f () -{ - int a; - a = (x >= 0 ? x : -x); - return a * fp[0]; -} - -int main () { return 0; }]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on - power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this - results in "Internal error related to the source program domain". - - For reference it seems to be the combination of nabs+fcirz which is bad, - not either alone. This sort of thing occurs in mpz/get_str.c with the - way double chars_per_bit_exactly is applied in MPN_SIZEINBASE. Perhaps - if that code changes to a scaled-integer style then we won't need this - test. */ - -double fp[1]; -int x; -int f () -{ - int a; - a = (x >= 0 ? x : -x); - return a * fp[0]; -} - -int main () { return 0; }], [], [gmp_prog_cc_works="no, abs int -> double conversion"], [gmp_prog_cc_works="no, abs int -> double conversion[, program does not run]"]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. - Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to segfault with e.g., -O2 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -typedef unsigned long long t1;typedef t1*t2; -void g(){} -void h(){} -static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) -{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;} -void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i; -for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}} -#else -int dummy; -#endif -]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. - Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to segfault with e.g., -O2 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -typedef unsigned long long t1;typedef t1*t2; -void g(){} -void h(){} -static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) -{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;} -void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i; -for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}} -#else -int dummy; -#endif - -int main () { return 0; }]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. - Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to segfault with e.g., -O2 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -typedef unsigned long long t1;typedef t1*t2; -void g(){} -void h(){} -static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) -{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;} -void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i; -for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}} -#else -int dummy; -#endif - -int main () { return 0; }], [], [gmp_prog_cc_works="no, long long reliability test 1"], [gmp_prog_cc_works="no, long long reliability test 1[, program does not run]"]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. - Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to get an ICE with -O1 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int g(); -void f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();} -int g(){return 0;} -#else -int dummy; -#endif -]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. - Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to get an ICE with -O1 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int g(); -void f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();} -int g(){return 0;} -#else -int dummy; -#endif - -int main () { return 0; }]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. - Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and - 1666 to get an ICE with -O1 -mpowerpc64. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int g(); -void f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();} -int g(){return 0;} -#else -int dummy; -#endif - -int main () { return 0; }], [], [gmp_prog_cc_works="no, long long reliability test 2"], [gmp_prog_cc_works="no, long long reliability test 2[, program does not run]"]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [freebsd hacked gcc], [/* Provokes an ICE on i386-freebsd with the FreeBSD-hacked gcc, under - -O2 -march=amdfam10. We call helper functions here "open" and "close" in - order for linking to succeed. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int open(int*,int*,int);void*close(int);void g(int*rp,int*up,int un){ -__builtin_expect(un<=0x7f00,1)?__builtin_alloca(un):close(un);if(__builtin_clzl -(up[un])){open(rp,up,un);while(1){if(rp[un-1]!=0)break;un--;}}} -#else -int dummy; -#endif -]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [freebsd hacked gcc], [/* Provokes an ICE on i386-freebsd with the FreeBSD-hacked gcc, under - -O2 -march=amdfam10. We call helper functions here "open" and "close" in - order for linking to succeed. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int open(int*,int*,int);void*close(int);void g(int*rp,int*up,int un){ -__builtin_expect(un<=0x7f00,1)?__builtin_alloca(un):close(un);if(__builtin_clzl -(up[un])){open(rp,up,un);while(1){if(rp[un-1]!=0)break;un--;}}} -#else -int dummy; -#endif - -int main () { return 0; }]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [freebsd hacked gcc], [/* Provokes an ICE on i386-freebsd with the FreeBSD-hacked gcc, under - -O2 -march=amdfam10. We call helper functions here "open" and "close" in - order for linking to succeed. */ - -#if defined (__GNUC__) && ! defined (__cplusplus) -int open(int*,int*,int);void*close(int);void g(int*rp,int*up,int un){ -__builtin_expect(un<=0x7f00,1)?__builtin_alloca(un):close(un);if(__builtin_clzl -(up[un])){open(rp,up,un);while(1){if(rp[un-1]!=0)break;un--;}}} -#else -int dummy; -#endif - -int main () { return 0; }], [], [gmp_prog_cc_works="no, freebsd hacked gcc"], [gmp_prog_cc_works="no, freebsd hacked gcc[, program does not run]"]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [mpn_lshift_com optimization], [/* The following is mis-compiled by HP ia-64 cc version - cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003] - under "cc +O3", both in +DD32 and +DD64 modes. The mpn_lshift_com gets - inlined and its return value somehow botched to be 0 instead of 1. This - arises in the real mpn_lshift_com in mul_fft.c. A lower optimization - level, like +O2 seems ok. This code needs to be run to show the problem, - but that's fine, the offending cc is a native-only compiler so we don't - have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -unsigned long -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long retval, high_limb, low_limb; - unsigned tnc; - long i; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *up++; - retval = low_limb >> tnc; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *up++; - *rp++ = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - return retval; -} -int -main () -{ - unsigned long cy, rp[2], up[2]; - up[0] = ~ 0L; - up[1] = 0; - cy = lshift_com (rp, up, 2L, 1); - if (cy != 1L) - return 1; - return 0; -} -#else -int -main () -{ - return 0; -} -#endif -]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [mpn_lshift_com optimization], [/* The following is mis-compiled by HP ia-64 cc version - cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003] - under "cc +O3", both in +DD32 and +DD64 modes. The mpn_lshift_com gets - inlined and its return value somehow botched to be 0 instead of 1. This - arises in the real mpn_lshift_com in mul_fft.c. A lower optimization - level, like +O2 seems ok. This code needs to be run to show the problem, - but that's fine, the offending cc is a native-only compiler so we don't - have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -unsigned long -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long retval, high_limb, low_limb; - unsigned tnc; - long i; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *up++; - retval = low_limb >> tnc; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *up++; - *rp++ = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - return retval; -} -int -main () -{ - unsigned long cy, rp[2], up[2]; - up[0] = ~ 0L; - up[1] = 0; - cy = lshift_com (rp, up, 2L, 1); - if (cy != 1L) - return 1; - return 0; -} -#else -int -main () -{ - return 0; -} -#endif -], [], [gmp_prog_cc_works="no, mpn_lshift_com optimization"], [gmp_prog_cc_works="no, mpn_lshift_com optimization[, program does not run]"]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [mpn_lshift_com optimization 2], [/* The following is mis-compiled by Intel ia-64 icc version 1.8 under - "icc -O3", After several calls, the function writes partial garbage to - the result vector. Perhaps relates to the chk.a.nc insn. This code needs - to be run to show the problem, but that's fine, the offending cc is a - native-only compiler so we don't have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -#include <stdlib.h> -void -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long high_limb, low_limb; - unsigned tnc; - long i; - up += n; - rp += n; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *--up; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *--up; - *--rp = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - *--rp = ~high_limb; -} -int -main () -{ - unsigned long *r, *r2; - unsigned long a[88 + 1]; - long i; - for (i = 0; i < 88 + 1; i++) - a[i] = ~0L; - r = malloc (10000 * sizeof (unsigned long)); - r2 = r; - for (i = 0; i < 528; i += 22) - { - lshift_com (r2, a, - i / (8 * sizeof (unsigned long)) + 1, - i % (8 * sizeof (unsigned long))); - r2 += 88 + 1; - } - if (r[2048] != 0 || r[2049] != 0 || r[2050] != 0 || r[2051] != 0 || - r[2052] != 0 || r[2053] != 0 || r[2054] != 0) - abort (); - return 0; -} -#else -int -main () -{ - return 0; -} -#endif -]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [mpn_lshift_com optimization 2], [/* The following is mis-compiled by Intel ia-64 icc version 1.8 under - "icc -O3", After several calls, the function writes partial garbage to - the result vector. Perhaps relates to the chk.a.nc insn. This code needs - to be run to show the problem, but that's fine, the offending cc is a - native-only compiler so we don't have to worry about cross compiling. */ - -#if ! defined (__cplusplus) -#include <stdlib.h> -void -lshift_com (rp, up, n, cnt) - unsigned long *rp; - unsigned long *up; - long n; - unsigned cnt; -{ - unsigned long high_limb, low_limb; - unsigned tnc; - long i; - up += n; - rp += n; - tnc = 8 * sizeof (unsigned long) - cnt; - low_limb = *--up; - high_limb = low_limb << cnt; - for (i = n - 1; i != 0; i--) - { - low_limb = *--up; - *--rp = ~(high_limb | (low_limb >> tnc)); - high_limb = low_limb << cnt; - } - *--rp = ~high_limb; -} -int -main () -{ - unsigned long *r, *r2; - unsigned long a[88 + 1]; - long i; - for (i = 0; i < 88 + 1; i++) - a[i] = ~0L; - r = malloc (10000 * sizeof (unsigned long)); - r2 = r; - for (i = 0; i < 528; i += 22) - { - lshift_com (r2, a, - i / (8 * sizeof (unsigned long)) + 1, - i % (8 * sizeof (unsigned long))); - r2 += 88 + 1; - } - if (r[2048] != 0 || r[2049] != 0 || r[2050] != 0 || r[2051] != 0 || - r[2052] != 0 || r[2053] != 0 || r[2054] != 0) - abort (); - return 0; -} -#else -int -main () -{ - return 0; -} -#endif -], [], [gmp_prog_cc_works="no, mpn_lshift_com optimization 2"], [gmp_prog_cc_works="no, mpn_lshift_com optimization 2[, program does not run]"]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- GMP_PROG_CC_X86_GOT_EAX_EMITTED([$cc $cflags $cppflags $flag], [GMP_ASM_X86_GOT_EAX_OK([$cc $cflags $cppflags $flag],, - [gmp_prog_cc_works="no, bad gas GOT with eax"])]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- GMP_ASM_X86_GOT_EAX_OK([$cc $cflags $cppflags $flag], [], [gmp_prog_cc_works="no, bad gas GOT with eax"]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:2444: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:2444: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:2444: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2257: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_ABI_$ABI_nodots')"], [POST]) -m4trace:configure.ac:2266: -1- m4_pattern_allow([^GMP_LDFLAGS$]) -m4trace:configure.ac:2267: -1- m4_pattern_allow([^LIBGMP_LDFLAGS$]) -m4trace:configure.ac:2268: -1- m4_pattern_allow([^LIBGMPXX_LDFLAGS$]) -m4trace:configure.ac:2286: -1- m4_pattern_allow([^HAVE_SPEED_CYCLECOUNTER$]) -m4trace:configure.ac:2289: -1- m4_pattern_allow([^SPEED_CYCLECOUNTER_OBJ$]) -m4trace:configure.ac:2303: -1- m4_pattern_allow([^HAVE_CALLING_CONVENTIONS$]) -m4trace:configure.ac:2306: -1- m4_pattern_allow([^CALLING_CONVENTIONS_OBJS$]) -m4trace:configure.ac:2328: -1- m4_pattern_allow([^DEFN_LONG_LONG_LIMB$]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^CFLAGS$]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^ac_ct_CC$]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^EXEEXT$]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^OBJEXT$]) -m4trace:configure.ac:2332: -1- _AM_PROG_CC_C_O -m4trace:configure.ac:2332: -1- AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) -m4trace:configure.ac:2334: -1- m4_pattern_allow([^CPP$]) -m4trace:configure.ac:2334: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:2334: -1- m4_pattern_allow([^CPP$]) -m4trace:configure.ac:2338: -1- GMP_PROG_CC_FOR_BUILD -m4trace:configure.ac:2338: -1- GMP_PROG_CC_FOR_BUILD_WORKS([$CC_FOR_BUILD], [], [AC_MSG_ERROR([Specified CC_FOR_BUILD doesn't seem to work])]) -m4trace:configure.ac:2338: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:3847: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... -acinclude.m4:3815: GMP_PROG_CC_FOR_BUILD is expanded from... -configure.ac:2338: the top level]) -m4trace:configure.ac:2338: -1- GMP_PROG_CC_FOR_BUILD_WORKS([$HOST_CC], [CC_FOR_BUILD=$HOST_CC], [AC_MSG_ERROR([Specified HOST_CC doesn't seem to work])]) -m4trace:configure.ac:2338: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:3847: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... -acinclude.m4:3815: GMP_PROG_CC_FOR_BUILD is expanded from... -configure.ac:2338: the top level]) -m4trace:configure.ac:2338: -1- GMP_PROG_CC_FOR_BUILD_WORKS([$i], [CC_FOR_BUILD=$i - break]) -m4trace:configure.ac:2338: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:3847: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... -acinclude.m4:3815: GMP_PROG_CC_FOR_BUILD is expanded from... -configure.ac:2338: the top level]) -m4trace:configure.ac:2338: -1- m4_pattern_allow([^CC_FOR_BUILD$]) -m4trace:configure.ac:2338: -1- m4_pattern_allow([^CC_FOR_BUILD$]) -m4trace:configure.ac:2339: -1- GMP_PROG_CPP_FOR_BUILD -m4trace:configure.ac:2339: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -acinclude.m4:3881: GMP_PROG_CPP_FOR_BUILD is expanded from... -configure.ac:2339: the top level]) -m4trace:configure.ac:2339: -1- m4_pattern_allow([^CPP_FOR_BUILD$]) -m4trace:configure.ac:2339: -1- m4_pattern_allow([^CPP_FOR_BUILD$]) -m4trace:configure.ac:2340: -1- GMP_PROG_EXEEXT_FOR_BUILD -m4trace:configure.ac:2340: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3921: GMP_PROG_EXEEXT_FOR_BUILD is expanded from... -configure.ac:2340: the top level]) -m4trace:configure.ac:2340: -1- m4_pattern_allow([^EXEEXT_FOR_BUILD$]) -m4trace:configure.ac:2341: -1- GMP_C_FOR_BUILD_ANSI -m4trace:configure.ac:2341: -1- m4_pattern_allow([^U_FOR_BUILD$]) -m4trace:configure.ac:2342: -1- GMP_CHECK_LIBM_FOR_BUILD -m4trace:configure.ac:2342: -1- m4_pattern_allow([^LIBM_FOR_BUILD$]) -m4trace:configure.ac:2350: -1- m4_pattern_allow([^CCAS$]) -m4trace:configure.ac:2357: -1- m4_pattern_allow([^CXX$]) -m4trace:configure.ac:2357: -1- m4_pattern_allow([^CXXFLAGS$]) -m4trace:configure.ac:2357: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.ac:2357: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:2357: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:2357: -1- m4_pattern_allow([^CXX$]) -m4trace:configure.ac:2357: -1- m4_pattern_allow([^ac_ct_CXX$]) -m4trace:configure.ac:2359: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -configure.ac:2359: the top level]) -m4trace:configure.ac:2385: -1- GMP_PROG_CXX_WORKS([$CXX $CPPFLAGS $CXXFLAGS], [want_cxx=yes - break]) -m4trace:configure.ac:2385: -1- GMP_PROG_CXX_WORKS_PART([$CXX $CPPFLAGS $CXXFLAGS], []) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- GMP_PROG_CXX_WORKS_PART([$CXX $CPPFLAGS $CXXFLAGS], [namespace], [namespace foo { } -using namespace foo; -]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- GMP_PROG_CXX_WORKS_PART([$CXX $CPPFLAGS $CXXFLAGS], [std iostream], [/* This test rejects g++ 2.7.2 which doesn't have <iostream>, only a - pre-standard iostream.h. */ -#include <iostream> - -/* This test rejects OSF 5.1 Compaq C++ in its default pre-standard iostream - mode, since that mode puts cout in the global namespace, not "std". */ -void someoutput (void) { std::cout << 123; } -]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2396: -1- AM_CONDITIONAL([WANT_CXX], [test $want_cxx = yes]) -m4trace:configure.ac:2396: -1- m4_pattern_allow([^WANT_CXX_TRUE$]) -m4trace:configure.ac:2396: -1- m4_pattern_allow([^WANT_CXX_FALSE$]) -m4trace:configure.ac:2396: -1- _AM_SUBST_NOTMAKE([WANT_CXX_TRUE]) -m4trace:configure.ac:2396: -1- _AM_SUBST_NOTMAKE([WANT_CXX_FALSE]) -m4trace:configure.ac:2404: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.ac:2404: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:2404: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.ac:2411: -1- GMP_CRAY_OPTIONS([add_path="cray/ieee"], [add_path="cray/cfp"; extra_functions="mulwwc90"], [add_path="cray/cfp"; extra_functions="mulwwj90"]) -m4trace:configure.ac:2411: -1- AC_PROG_EGREP -m4trace:configure.ac:2411: -1- m4_pattern_allow([^GREP$]) -m4trace:configure.ac:2411: -1- m4_pattern_allow([^EGREP$]) -m4trace:configure.ac:2455: -1- GMP_ASM_X86_MMX([], [GMP_STRIP_PATH(*mmx*)]) -m4trace:configure.ac:2455: -1- GMP_TRY_ASSEMBLE([ .text - movq %mm0, %mm1], [gmp_cv_asm_x86_mmx=yes -case $host in -*-*-solaris*) - if (dis conftest.$OBJEXT >conftest.out) 2>/dev/null; then - if grep "0f 6f c1" conftest.out >/dev/null; then - gmp_cv_asm_x86_mmx=movq-bug - fi - else - AC_MSG_WARN(["dis" not available to check for "as" movq bug]) - fi -esac], [gmp_cv_asm_x86_mmx=no]) -m4trace:configure.ac:2455: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2534: GMP_ASM_X86_MMX is expanded from... -configure.ac:2455: the top level]) -m4trace:configure.ac:2455: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2534: GMP_ASM_X86_MMX is expanded from... -configure.ac:2455: the top level]) -m4trace:configure.ac:2455: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2534: GMP_ASM_X86_MMX is expanded from... -configure.ac:2455: the top level]) -m4trace:configure.ac:2455: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2534: GMP_ASM_X86_MMX is expanded from... -configure.ac:2455: the top level]) -m4trace:configure.ac:2458: -1- GMP_ASM_X86_SSE2([], [GMP_STRIP_PATH(sse2)]) -m4trace:configure.ac:2458: -1- GMP_TRY_ASSEMBLE([ .text - paddq %mm0, %mm1], [gmp_cv_asm_x86_sse2=yes], [gmp_cv_asm_x86_sse2=no]) -m4trace:configure.ac:2458: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2613: GMP_ASM_X86_SSE2 is expanded from... -configure.ac:2458: the top level]) -m4trace:configure.ac:2458: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2613: GMP_ASM_X86_SSE2 is expanded from... -configure.ac:2458: the top level]) -m4trace:configure.ac:2458: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2613: GMP_ASM_X86_SSE2 is expanded from... -configure.ac:2458: the top level]) -m4trace:configure.ac:2458: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2613: GMP_ASM_X86_SSE2 is expanded from... -configure.ac:2458: the top level]) -m4trace:configure.ac:2462: -1- GMP_ASM_X86_MULX([], [GMP_STRIP_PATH(mulx)]) -m4trace:configure.ac:2462: -1- GMP_TRY_ASSEMBLE([ .text - mulx %r8, %r9, %r10], [gmp_cv_asm_x86_mulx=yes], [gmp_cv_asm_x86_mulx=no]) -m4trace:configure.ac:2462: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2650: GMP_ASM_X86_MULX is expanded from... -configure.ac:2462: the top level]) -m4trace:configure.ac:2462: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2650: GMP_ASM_X86_MULX is expanded from... -configure.ac:2462: the top level]) -m4trace:configure.ac:2462: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2650: GMP_ASM_X86_MULX is expanded from... -configure.ac:2462: the top level]) -m4trace:configure.ac:2462: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2650: GMP_ASM_X86_MULX is expanded from... -configure.ac:2462: the top level]) -m4trace:configure.ac:2465: -1- GMP_ASM_X86_ADX([], [GMP_STRIP_PATH(adx)]) -m4trace:configure.ac:2465: -1- GMP_TRY_ASSEMBLE([ .text - adox %r8, %r9 - adcx %r8, %r9], [gmp_cv_asm_x86_adx=yes], [gmp_cv_asm_x86_adx=no]) -m4trace:configure.ac:2465: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2688: GMP_ASM_X86_ADX is expanded from... -configure.ac:2465: the top level]) -m4trace:configure.ac:2465: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2688: GMP_ASM_X86_ADX is expanded from... -configure.ac:2465: the top level]) -m4trace:configure.ac:2465: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2688: GMP_ASM_X86_ADX is expanded from... -configure.ac:2465: the top level]) -m4trace:configure.ac:2465: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2688: GMP_ASM_X86_ADX is expanded from... -configure.ac:2465: the top level]) -m4trace:configure.ac:2481: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -configure.ac:2481: the top level]) -m4trace:configure.ac:2503: -1- CL_AS_NOEXECSTACK -m4trace:configure.ac:2503: -1- m4_pattern_allow([^ASMFLAGS$]) -m4trace:configure.ac:2505: -1- GMP_PROG_AR -m4trace:configure.ac:2505: -1- m4_pattern_allow([^AR$]) -m4trace:configure.ac:2506: -1- GMP_PROG_NM -m4trace:configure.ac:2506: -1- AC_PROG_NM -m4trace:configure.ac:2506: -1- _m4_warn([obsolete], [The macro `AC_PROG_NM' is obsolete. -You should run autoupdate.], [/usr/share/aclocal/libtool.m4:3768: AC_PROG_NM is expanded from... -acinclude.m4:422: GMP_PROG_NM is expanded from... -configure.ac:2506: the top level]) -m4trace:configure.ac:2506: -1- LT_PATH_NM -m4trace:configure.ac:2506: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.ac:2506: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) -m4trace:configure.ac:2506: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.ac:2506: -1- m4_pattern_allow([^NM$]) -m4trace:configure.ac:2506: -1- AC_PROG_NM -m4trace:configure.ac:2506: -1- _m4_warn([obsolete], [The macro `AC_PROG_NM' is obsolete. -You should run autoupdate.], [/usr/share/aclocal/libtool.m4:3768: AC_PROG_NM is expanded from... -acinclude.m4:422: GMP_PROG_NM is expanded from... -configure.ac:2506: the top level]) -m4trace:configure.ac:2506: -1- LT_PATH_NM -m4trace:configure.ac:2506: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.ac:2506: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) -m4trace:configure.ac:2506: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.ac:2506: -1- m4_pattern_allow([^NM$]) -m4trace:configure.ac:2527: -1- AC_LIBTOOL_WIN32_DLL -m4trace:configure.ac:2527: -1- _m4_warn([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete. -You should run autoupdate.], [/usr/share/aclocal/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from... -configure.ac:2527: the top level]) -m4trace:configure.ac:2527: -1- m4_pattern_allow([^AS$]) -m4trace:configure.ac:2527: -1- m4_pattern_allow([^DLLTOOL$]) -m4trace:configure.ac:2527: -1- m4_pattern_allow([^OBJDUMP$]) -m4trace:configure.ac:2527: -1- _m4_warn([obsolete], [AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you -put the 'win32-dll' option into LT_INIT's first parameter.], [/usr/share/aclocal/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from... -configure.ac:2527: the top level]) -m4trace:configure.ac:2529: -1- m4_pattern_allow([^LIBGMP_DLL$]) -m4trace:configure.ac:2617: -1- AC_PROG_LIBTOOL -m4trace:configure.ac:2617: -1- _m4_warn([obsolete], [The macro `AC_PROG_LIBTOOL' is obsolete. -You should run autoupdate.], [/usr/share/aclocal/libtool.m4:99: AC_PROG_LIBTOOL is expanded from... -configure.ac:2617: the top level]) -m4trace:configure.ac:2617: -1- LT_INIT -m4trace:configure.ac:2617: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$]) -m4trace:configure.ac:2617: -1- LTOPTIONS_VERSION -m4trace:configure.ac:2617: -1- LTSUGAR_VERSION -m4trace:configure.ac:2617: -1- LTVERSION_VERSION -m4trace:configure.ac:2617: -1- LTOBSOLETE_VERSION -m4trace:configure.ac:2617: -1- _LT_PROG_LTMAIN -m4trace:configure.ac:2617: -1- m4_pattern_allow([^LIBTOOL$]) -m4trace:configure.ac:2617: -1- _LT_PREPARE_SED_QUOTE_VARS -m4trace:configure.ac:2617: -1- _LT_PROG_ECHO_BACKSLASH -m4trace:configure.ac:2617: -1- LT_PATH_LD -m4trace:configure.ac:2617: -1- m4_pattern_allow([^SED$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^FGREP$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^GREP$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^LD$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^LN_S$]) -m4trace:configure.ac:2617: -1- LT_CMD_MAX_LEN -m4trace:configure.ac:2617: -1- m4_pattern_allow([^OBJDUMP$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^OBJDUMP$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^DLLTOOL$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^DLLTOOL$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^AR$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^ac_ct_AR$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^STRIP$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^RANLIB$]) -m4trace:configure.ac:2617: -1- _LT_WITH_SYSROOT -m4trace:configure.ac:2617: -1- m4_pattern_allow([LT_OBJDIR]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^LT_OBJDIR$]) -m4trace:configure.ac:2617: -1- _LT_CC_BASENAME([$compiler]) -m4trace:configure.ac:2617: -1- _LT_PATH_TOOL_PREFIX([${ac_tool_prefix}file], [/usr/bin$PATH_SEPARATOR$PATH]) -m4trace:configure.ac:2617: -1- _LT_PATH_TOOL_PREFIX([file], [/usr/bin$PATH_SEPARATOR$PATH]) -m4trace:configure.ac:2617: -1- LT_SUPPORTED_TAG([CC]) -m4trace:configure.ac:2617: -1- _LT_COMPILER_BOILERPLATE -m4trace:configure.ac:2617: -1- _LT_LINKER_BOILERPLATE -m4trace:configure.ac:2617: -1- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, )="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, ) -fno-rtti -fno-exceptions"]) -m4trace:configure.ac:2617: -1- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, ) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, )], [$_LT_TAGVAR(lt_prog_compiler_pic, )@&t@m4_if([],[],[ -DPIC],[m4_if([],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, ) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, )=" $_LT_TAGVAR(lt_prog_compiler_pic, )" ;; - esac], [_LT_TAGVAR(lt_prog_compiler_pic, )= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, )=no]) -m4trace:configure.ac:2617: -1- _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works], [$lt_tmp_static_flag], [], [_LT_TAGVAR(lt_prog_compiler_static, )=]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^MANIFEST_TOOL$]) -m4trace:configure.ac:2617: -1- _LT_DLL_DEF_P([$export_symbols]) -m4trace:configure.ac:2617: -1- _LT_DLL_DEF_P([$export_symbols]) -m4trace:configure.ac:2617: -1- _LT_REQUIRED_DARWIN_CHECKS -m4trace:configure.ac:2617: -1- m4_pattern_allow([^DSYMUTIL$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^NMEDIT$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^LIPO$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^OTOOL$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^OTOOL64$]) -m4trace:configure.ac:2617: -1- _LT_LINKER_OPTION([if $CC understands -b], [lt_cv_prog_compiler__b], [-b], [_LT_TAGVAR(archive_cmds, )='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, )='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags']) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^LT_SYS_LIBRARY_PATH$]) -m4trace:configure.ac:2617: -1- LT_SYS_DLOPEN_SELF -m4trace:configure.ac:2617: -1- m4_pattern_allow([^STDC_HEADERS$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^HAVE_DLFCN_H$]) -m4trace:configure.ac:2617: -1- LT_LANG([CXX]) -m4trace:configure.ac:2617: -1- LT_SUPPORTED_TAG([CXX]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.ac:2617: -1- _LT_COMPILER_BOILERPLATE -m4trace:configure.ac:2617: -1- _LT_LINKER_BOILERPLATE -m4trace:configure.ac:2617: -1- _LT_CC_BASENAME([$compiler]) -m4trace:configure.ac:2617: -1- LT_PATH_LD -m4trace:configure.ac:2617: -1- m4_pattern_allow([^LD$]) -m4trace:configure.ac:2617: -1- _LT_DLL_DEF_P([$export_symbols]) -m4trace:configure.ac:2617: -1- _LT_DLL_DEF_P([$export_symbols]) -m4trace:configure.ac:2617: -1- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, CXX) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, CXX)], [$_LT_TAGVAR(lt_prog_compiler_pic, CXX)@&t@m4_if([CXX],[],[ -DPIC],[m4_if([CXX],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, CXX) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, CXX)=" $_LT_TAGVAR(lt_prog_compiler_pic, CXX)" ;; - esac], [_LT_TAGVAR(lt_prog_compiler_pic, CXX)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, CXX)=no]) -m4trace:configure.ac:2617: -1- _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works_CXX], [$lt_tmp_static_flag], [], [_LT_TAGVAR(lt_prog_compiler_static, CXX)=]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^LT_SYS_LIBRARY_PATH$]) -m4trace:configure.ac:2631: -1- AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes]) -m4trace:configure.ac:2631: -1- m4_pattern_allow([^ENABLE_STATIC_TRUE$]) -m4trace:configure.ac:2631: -1- m4_pattern_allow([^ENABLE_STATIC_FALSE$]) -m4trace:configure.ac:2631: -1- _AM_SUBST_NOTMAKE([ENABLE_STATIC_TRUE]) -m4trace:configure.ac:2631: -1- _AM_SUBST_NOTMAKE([ENABLE_STATIC_FALSE]) -m4trace:configure.ac:2637: -1- m4_pattern_allow([^STDC_HEADERS$]) -m4trace:configure.ac:2638: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) -m4trace:configure.ac:2668: -1- m4_pattern_allow([^HAVE_SYS_RESOURCE_H$]) -m4trace:configure.ac:2681: -1- m4_pattern_allow([^HAVE_SYS_SYSCTL_H$]) -m4trace:configure.ac:2687: -1- m4_pattern_allow([^HAVE_MACHINE_HAL_SYSINFO_H$]) -m4trace:configure.ac:2703: -1- m4_pattern_allow([^HAVE_DECL_FGETC$]) -m4trace:configure.ac:2703: -1- m4_pattern_allow([^HAVE_DECL_FSCANF$]) -m4trace:configure.ac:2703: -1- m4_pattern_allow([^HAVE_DECL_OPTARG$]) -m4trace:configure.ac:2703: -1- m4_pattern_allow([^HAVE_DECL_UNGETC$]) -m4trace:configure.ac:2703: -1- m4_pattern_allow([^HAVE_DECL_VFPRINTF$]) -m4trace:configure.ac:2704: -1- m4_pattern_allow([^HAVE_DECL_SYS_ERRLIST$]) -m4trace:configure.ac:2704: -1- m4_pattern_allow([^HAVE_DECL_SYS_NERR$]) -m4trace:configure.ac:2708: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. -You should run autoupdate.], [../../lib/autoconf/types.m4:746: AC_TYPE_SIGNAL is expanded from... -configure.ac:2708: the top level]) -m4trace:configure.ac:2708: -1- m4_pattern_allow([^RETSIGTYPE$]) -m4trace:configure.ac:2720: -1- m4_pattern_allow([^HAVE_INTMAX_T$]) -m4trace:configure.ac:2720: -1- m4_pattern_allow([^HAVE_LONG_DOUBLE$]) -m4trace:configure.ac:2720: -1- m4_pattern_allow([^HAVE_LONG_LONG$]) -m4trace:configure.ac:2720: -1- m4_pattern_allow([^HAVE_PTRDIFF_T$]) -m4trace:configure.ac:2720: -1- m4_pattern_allow([^HAVE_QUAD_T$]) -m4trace:configure.ac:2720: -1- m4_pattern_allow([^HAVE_UINT_LEAST32_T$]) -m4trace:configure.ac:2720: -1- m4_pattern_allow([^HAVE_INTPTR_T$]) -m4trace:configure.ac:2726: -1- m4_pattern_allow([^volatile$]) -m4trace:configure.ac:2728: -1- m4_pattern_allow([^restrict$]) -m4trace:configure.ac:2728: -1- m4_pattern_allow([^restrict$]) -m4trace:configure.ac:2731: -1- GMP_C_ATTRIBUTE_CONST -m4trace:configure.ac:2731: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3178: GMP_C_ATTRIBUTE_CONST is expanded from... -configure.ac:2731: the top level]) -m4trace:configure.ac:2731: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_CONST$]) -m4trace:configure.ac:2732: -1- GMP_C_ATTRIBUTE_MALLOC -m4trace:configure.ac:2732: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3197: GMP_C_ATTRIBUTE_MALLOC is expanded from... -configure.ac:2732: the top level]) -m4trace:configure.ac:2732: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_MALLOC$]) -m4trace:configure.ac:2733: -1- GMP_C_ATTRIBUTE_MODE -m4trace:configure.ac:2733: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3227: GMP_C_ATTRIBUTE_MODE is expanded from... -configure.ac:2733: the top level]) -m4trace:configure.ac:2733: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_MODE$]) -m4trace:configure.ac:2734: -1- GMP_C_ATTRIBUTE_NORETURN -m4trace:configure.ac:2734: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3243: GMP_C_ATTRIBUTE_NORETURN is expanded from... -configure.ac:2734: the top level]) -m4trace:configure.ac:2734: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_NORETURN$]) -m4trace:configure.ac:2735: -1- GMP_C_HIDDEN_ALIAS -m4trace:configure.ac:2735: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3258: GMP_C_HIDDEN_ALIAS is expanded from... -configure.ac:2735: the top level]) -m4trace:configure.ac:2735: -1- m4_pattern_allow([^HAVE_HIDDEN_ALIAS$]) -m4trace:configure.ac:2737: -1- GMP_H_EXTERN_INLINE -m4trace:configure.ac:2737: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... -acinclude.m4:3768: GMP_H_EXTERN_INLINE is expanded from... -configure.ac:2737: the top level]) -m4trace:configure.ac:2740: -1- AC_CHECK_LIBM -m4trace:configure.ac:2740: -1- _m4_warn([obsolete], [The macro `AC_CHECK_LIBM' is obsolete. -You should run autoupdate.], [/usr/share/aclocal/libtool.m4:3872: AC_CHECK_LIBM is expanded from... -configure.ac:2740: the top level]) -m4trace:configure.ac:2740: -1- LT_LIB_M -m4trace:configure.ac:2740: -1- m4_pattern_allow([^LIBM$]) -m4trace:configure.ac:2741: -1- m4_pattern_allow([^LIBM$]) -m4trace:configure.ac:2743: -1- GMP_FUNC_ALLOCA -m4trace:configure.ac:2743: -1- GMP_HEADER_ALLOCA -m4trace:configure.ac:2743: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3576: GMP_HEADER_ALLOCA is expanded from... -acinclude.m4:3560: GMP_FUNC_ALLOCA is expanded from... -configure.ac:2743: the top level]) -m4trace:configure.ac:2743: -1- m4_pattern_allow([^HAVE_ALLOCA_H$]) -m4trace:configure.ac:2743: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3560: GMP_FUNC_ALLOCA is expanded from... -configure.ac:2743: the top level]) -m4trace:configure.ac:2743: -1- m4_pattern_allow([^HAVE_ALLOCA$]) -m4trace:configure.ac:2744: -1- GMP_OPTION_ALLOCA -m4trace:configure.ac:2744: -1- m4_pattern_allow([^WANT_TMP_ALLOCA$]) -m4trace:configure.ac:2744: -1- m4_pattern_allow([^WANT_TMP_REENTRANT$]) -m4trace:configure.ac:2744: -1- m4_pattern_allow([^WANT_TMP_NOTREENTRANT$]) -m4trace:configure.ac:2744: -1- m4_pattern_allow([^WANT_TMP_DEBUG$]) -m4trace:configure.ac:2744: -1- m4_pattern_allow([^TAL_OBJECT$]) -m4trace:configure.ac:2746: -1- GMP_H_HAVE_FILE -m4trace:configure.ac:2746: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... -acinclude.m4:3795: GMP_H_HAVE_FILE is expanded from... -configure.ac:2746: the top level]) -m4trace:configure.ac:2748: -1- m4_pattern_allow([^HAVE_LIMB_BIG_ENDIAN$]) -m4trace:configure.ac:2748: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_LIMB_BIG_ENDIAN')"], [POST]) -m4trace:configure.ac:2748: -1- m4_pattern_allow([^HAVE_LIMB_LITTLE_ENDIAN$]) -m4trace:configure.ac:2748: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_LIMB_LITTLE_ENDIAN')"], [POST]) -m4trace:configure.ac:2748: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$]) -m4trace:configure.ac:2761: -1- GMP_C_DOUBLE_FORMAT -m4trace:configure.ac:2761: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3291: GMP_C_DOUBLE_FORMAT is expanded from... -configure.ac:2761: the top level]) -m4trace:configure.ac:2761: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3291: GMP_C_DOUBLE_FORMAT is expanded from... -configure.ac:2761: the top level]) -m4trace:configure.ac:2761: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3291: GMP_C_DOUBLE_FORMAT is expanded from... -configure.ac:2761: the top level]) -m4trace:configure.ac:2761: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_BIG_ENDIAN$]) -m4trace:configure.ac:2761: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_DOUBLE_IEEE_BIG_ENDIAN')"], [POST]) -m4trace:configure.ac:2761: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_LITTLE_ENDIAN$]) -m4trace:configure.ac:2761: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN')"], [POST]) -m4trace:configure.ac:2761: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_LITTLE_SWAPPED$]) -m4trace:configure.ac:2761: -1- m4_pattern_allow([^HAVE_DOUBLE_VAX_D$]) -m4trace:configure.ac:2761: -1- m4_pattern_allow([^HAVE_DOUBLE_VAX_G$]) -m4trace:configure.ac:2761: -1- m4_pattern_allow([^HAVE_DOUBLE_CRAY_CFP$]) -m4trace:configure.ac:2801: -1- m4_pattern_allow([^HAVE_CLOCK_GETTIME$]) -m4trace:configure.ac:2806: -1- m4_pattern_allow([^TUNE_LIBS$]) -m4trace:configure.ac:2808: -1- GMP_FUNC_VSNPRINTF -m4trace:configure.ac:2808: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2764: AC_TRY_RUN is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3703: GMP_FUNC_VSNPRINTF is expanded from... -configure.ac:2808: the top level]) -m4trace:configure.ac:2808: -1- m4_pattern_allow([^HAVE_VSNPRINTF$]) -m4trace:configure.ac:2809: -1- GMP_FUNC_SSCANF_WRITABLE_INPUT -m4trace:configure.ac:2809: -1- m4_pattern_allow([^SSCANF_WRITABLE_INPUT$]) -m4trace:configure.ac:2814: -1- m4_pattern_allow([^HAVE_PSP_ITICKSPERCLKTICK$]) -m4trace:configure.ac:2829: -1- m4_pattern_allow([^HAVE_SSTREAM$]) -m4trace:configure.ac:2830: -1- m4_pattern_allow([^HAVE_STD__LOCALE$]) -m4trace:configure.ac:3034: -1- m4_pattern_allow([^WANT_FAT_BINARY$]) -m4trace:configure.ac:3035: -1- GMP_DEFINE([WANT_FAT_BINARY], [yes]) -m4trace:configure.ac:3530: -1- GMP_PROG_M4 -m4trace:configure.ac:3530: -1- m4_pattern_allow([^M4$]) -m4trace:configure.ac:3530: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:308: GMP_PROG_M4 is expanded from... -configure.ac:3530: the top level]) -m4trace:configure.ac:3530: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:308: GMP_PROG_M4 is expanded from... -configure.ac:3530: the top level]) -m4trace:configure.ac:3530: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:308: GMP_PROG_M4 is expanded from... -configure.ac:3530: the top level]) -m4trace:configure.ac:3530: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:308: GMP_PROG_M4 is expanded from... -configure.ac:3530: the top level]) -m4trace:configure.ac:3530: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:308: GMP_PROG_M4 is expanded from... -configure.ac:3530: the top level]) -m4trace:configure.ac:3530: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:308: GMP_PROG_M4 is expanded from... -configure.ac:3530: the top level]) -m4trace:configure.ac:3530: -1- m4_pattern_allow([^M4$]) -m4trace:configure.ac:3531: -1- GMP_M4_M4WRAP_SPURIOUS -m4trace:configure.ac:3531: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:378: GMP_M4_M4WRAP_SPURIOUS is expanded from... -configure.ac:3531: the top level]) -m4trace:configure.ac:3531: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:378: GMP_M4_M4WRAP_SPURIOUS is expanded from... -configure.ac:3531: the top level]) -m4trace:configure.ac:3531: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:378: GMP_M4_M4WRAP_SPURIOUS is expanded from... -configure.ac:3531: the top level]) -m4trace:configure.ac:3531: -1- GMP_DEFINE_RAW(["define(<M4WRAP_SPURIOUS>,<$gmp_cv_m4_m4wrap_spurious>)"]) -m4trace:configure.ac:3545: -1- GMP_ASM_TEXT -m4trace:configure.ac:3545: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1913: GMP_ASM_TEXT is expanded from... -configure.ac:3545: the top level]) -m4trace:configure.ac:3545: -1- GMP_TRY_ASSEMBLE([ $i], [gmp_cv_asm_text=$i - rm -f conftest* - break]) -m4trace:configure.ac:3545: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1913: GMP_ASM_TEXT is expanded from... -configure.ac:3545: the top level]) -m4trace:configure.ac:3545: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1913: GMP_ASM_TEXT is expanded from... -configure.ac:3545: the top level]) -m4trace:configure.ac:3545: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1913: GMP_ASM_TEXT is expanded from... -configure.ac:3545: the top level]) -m4trace:configure.ac:3545: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1913: GMP_ASM_TEXT is expanded from... -configure.ac:3545: the top level]) -m4trace:configure.ac:3546: -1- GMP_ASM_DATA -m4trace:configure.ac:3547: -1- GMP_ASM_LABEL_SUFFIX -m4trace:configure.ac:3547: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1705: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.ac:3547: the top level]) -m4trace:configure.ac:3547: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text -somelabel$i], [gmp_cv_asm_label_suffix=$i - rm -f conftest* - break], [cat conftest.out >&AC_FD_CC]) -m4trace:configure.ac:3547: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1705: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.ac:3547: the top level]) -m4trace:configure.ac:3547: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1705: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.ac:3547: the top level]) -m4trace:configure.ac:3547: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1705: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.ac:3547: the top level]) -m4trace:configure.ac:3547: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1705: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.ac:3547: the top level]) -m4trace:configure.ac:3547: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1705: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.ac:3547: the top level]) -m4trace:configure.ac:3548: -1- GMP_ASM_GLOBL -m4trace:configure.ac:3549: -1- GMP_ASM_GLOBL_ATTR -m4trace:configure.ac:3550: -1- GMP_ASM_UNDERSCORE -m4trace:configure.ac:3550: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1746: GMP_ASM_UNDERSCORE is expanded from... -configure.ac:3550: the top level]) -m4trace:configure.ac:3550: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1746: GMP_ASM_UNDERSCORE is expanded from... -configure.ac:3550: the top level]) -m4trace:configure.ac:3550: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1746: GMP_ASM_UNDERSCORE is expanded from... -configure.ac:3550: the top level]) -m4trace:configure.ac:3550: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1746: GMP_ASM_UNDERSCORE is expanded from... -configure.ac:3550: the top level]) -m4trace:configure.ac:3550: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1746: GMP_ASM_UNDERSCORE is expanded from... -configure.ac:3550: the top level]) -m4trace:configure.ac:3550: -1- GMP_DEFINE([GSYM_PREFIX], [_]) -m4trace:configure.ac:3550: -1- GMP_DEFINE([GSYM_PREFIX], []) -m4trace:configure.ac:3550: -1- GMP_DEFINE([GSYM_PREFIX], []) -m4trace:configure.ac:3551: -1- GMP_ASM_RODATA -m4trace:configure.ac:3551: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1963: GMP_ASM_RODATA is expanded from... -configure.ac:3551: the top level]) -m4trace:configure.ac:3551: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1963: GMP_ASM_RODATA is expanded from... -configure.ac:3551: the top level]) -m4trace:configure.ac:3551: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1963: GMP_ASM_RODATA is expanded from... -configure.ac:3551: the top level]) -m4trace:configure.ac:3551: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1963: GMP_ASM_RODATA is expanded from... -configure.ac:3551: the top level]) -m4trace:configure.ac:3551: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1963: GMP_ASM_RODATA is expanded from... -configure.ac:3551: the top level]) -m4trace:configure.ac:3551: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1963: GMP_ASM_RODATA is expanded from... -configure.ac:3551: the top level]) -m4trace:configure.ac:3551: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1963: GMP_ASM_RODATA is expanded from... -configure.ac:3551: the top level]) -m4trace:configure.ac:3551: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1963: GMP_ASM_RODATA is expanded from... -configure.ac:3551: the top level]) -m4trace:configure.ac:3552: -1- GMP_ASM_TYPE -m4trace:configure.ac:3552: -1- GMP_TRY_ASSEMBLE([ .type sym,${gmp_tmp_prefix}function], [if grep "\.type pseudo-op used outside of \.def/\.endef ignored" conftest.out >/dev/null; then : ; - else - gmp_cv_asm_type=".type \$1,${gmp_tmp_prefix}\$2" - break - fi]) -m4trace:configure.ac:3552: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2084: GMP_ASM_TYPE is expanded from... -configure.ac:3552: the top level]) -m4trace:configure.ac:3552: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2084: GMP_ASM_TYPE is expanded from... -configure.ac:3552: the top level]) -m4trace:configure.ac:3552: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2084: GMP_ASM_TYPE is expanded from... -configure.ac:3552: the top level]) -m4trace:configure.ac:3552: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2084: GMP_ASM_TYPE is expanded from... -configure.ac:3552: the top level]) -m4trace:configure.ac:3553: -1- GMP_ASM_SIZE -m4trace:configure.ac:3553: -1- GMP_TRY_ASSEMBLE([ .size sym,1], [if grep "\.size pseudo-op used outside of \.def/\.endef ignored" conftest.out >/dev/null; then : ; - else - gmp_cv_asm_size=".size \$1,\$2" - fi]) -m4trace:configure.ac:3553: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2106: GMP_ASM_SIZE is expanded from... -configure.ac:3553: the top level]) -m4trace:configure.ac:3553: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2106: GMP_ASM_SIZE is expanded from... -configure.ac:3553: the top level]) -m4trace:configure.ac:3553: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2106: GMP_ASM_SIZE is expanded from... -configure.ac:3553: the top level]) -m4trace:configure.ac:3553: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2106: GMP_ASM_SIZE is expanded from... -configure.ac:3553: the top level]) -m4trace:configure.ac:3554: -1- GMP_ASM_LSYM_PREFIX -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text -dummy${gmp_cv_asm_label_suffix} -${gmp_tmp_pre}gurkmacka${gmp_cv_asm_label_suffix}], [if $NM conftest.$OBJEXT >conftest.nm 2>&AC_FD_CC; then : ; else - cat conftest.nm >&AC_FD_CC - AC_MSG_WARN(["$NM" failure]) - break - fi - cat conftest.nm >&AC_FD_CC - if grep gurkmacka conftest.nm >/dev/null; then : ; else - # no mention of the symbol, this is good - echo "$gmp_tmp_pre label doesn't appear in object file at all (good)" >&AC_FD_CC - gmp_cv_asm_lsym_prefix="$gmp_tmp_pre" - gmp_tmp_pre_appears=no - break - fi - if grep [' [a-zN] .*gurkmacka'] conftest.nm >/dev/null; then - # symbol mentioned as a local, use this if nothing better - echo "$gmp_tmp_pre label is local but still in object file" >&AC_FD_CC - if test -z "$gmp_cv_asm_lsym_prefix"; then - gmp_cv_asm_lsym_prefix="$gmp_tmp_pre" - fi - else - echo "$gmp_tmp_pre label is something unknown" >&AC_FD_CC - fi - ]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- m4_pattern_allow([^LSYM_PREFIX$]) -m4trace:configure.ac:3555: -1- GMP_ASM_W32 -m4trace:configure.ac:3555: -1- GMP_ASM_BYTE -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1884: GMP_ASM_BYTE is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_data - $i 0 -], [gmp_cv_asm_byte=$i - rm -f conftest* - break], [cat conftest.out >&AC_FD_CC]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1884: GMP_ASM_BYTE is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1884: GMP_ASM_BYTE is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1884: GMP_ASM_BYTE is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1884: GMP_ASM_BYTE is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1884: GMP_ASM_BYTE is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_data - $gmp_cv_asm_globl foo - $gmp_tmp_op 0 -foo$gmp_cv_asm_label_suffix - $gmp_cv_asm_byte 0], [gmp_tmp_val=[`$NM conftest.$OBJEXT | grep foo | \ - sed -e 's;[[][0-9][]]\(.*\);\1;' -e 's;[^1-9]*\([0-9]*\).*;\1;'`] - if test "$gmp_tmp_val" = 4; then - gmp_cv_asm_w32="$gmp_tmp_op" - break - fi]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3556: -1- GMP_ASM_ALIGN_LOG -m4trace:configure.ac:3556: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_data - .align 4 - $gmp_cv_asm_globl foo - $gmp_cv_asm_byte 1 - .align 4 -foo$gmp_cv_asm_label_suffix - $gmp_cv_asm_byte 2], [gmp_tmp_val=[`$NM conftest.$OBJEXT | grep foo | \ - sed -e 's;[[][0-9][]]\(.*\);\1;' -e 's;[^1-9]*\([0-9]*\).*;\1;'`] - if test "$gmp_tmp_val" = "10" || test "$gmp_tmp_val" = "16"; then - gmp_cv_asm_align_log=yes - else - gmp_cv_asm_align_log=no - fi], [AC_MSG_ERROR([cannot assemble alignment test])]) -m4trace:configure.ac:3556: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1796: GMP_ASM_ALIGN_LOG is expanded from... -configure.ac:3556: the top level]) -m4trace:configure.ac:3556: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1796: GMP_ASM_ALIGN_LOG is expanded from... -configure.ac:3556: the top level]) -m4trace:configure.ac:3556: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1796: GMP_ASM_ALIGN_LOG is expanded from... -configure.ac:3556: the top level]) -m4trace:configure.ac:3556: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1796: GMP_ASM_ALIGN_LOG is expanded from... -configure.ac:3556: the top level]) -m4trace:configure.ac:3556: -1- GMP_DEFINE_RAW(["define(<ALIGN_LOGARITHMIC>,<$gmp_cv_asm_align_log>)"]) -m4trace:configure.ac:3561: -1- GMP_INCLUDE_MPN([pa32/pa-defs.m4]) -m4trace:configure.ac:3564: -1- GMP_ASM_IA64_ALIGN_OK -m4trace:configure.ac:3564: -1- GMP_TRY_ASSEMBLE([ .text - .align 32 -{ .mmi; add r14 = r15, r16 - add r17 = r18, r19 - add r20 = r21, r22 ;; } - .align 32 -{ .mmi; add r23 = r24, r25 - add r26 = r27, r28 - add r29 = r30, r31 ;; } -], [gmp_cv_asm_ia64_align_ok=`od -b conftest.$OBJEXT | $AWK -f conftest.awk`], [AC_MSG_WARN([oops, cannot compile test program]) - gmp_cv_asm_ia64_align_ok=yes]) -m4trace:configure.ac:3564: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2826: GMP_ASM_IA64_ALIGN_OK is expanded from... -configure.ac:3564: the top level]) -m4trace:configure.ac:3564: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2826: GMP_ASM_IA64_ALIGN_OK is expanded from... -configure.ac:3564: the top level]) -m4trace:configure.ac:3564: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2826: GMP_ASM_IA64_ALIGN_OK is expanded from... -configure.ac:3564: the top level]) -m4trace:configure.ac:3564: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2826: GMP_ASM_IA64_ALIGN_OK is expanded from... -configure.ac:3564: the top level]) -m4trace:configure.ac:3564: -1- GMP_DEFINE_RAW(["define(<IA64_ALIGN_OK>, <\`$gmp_cv_asm_ia64_align_ok'>)"]) -m4trace:configure.ac:3567: -1- GMP_ASM_M68K_INSTRUCTION -m4trace:configure.ac:3567: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text - $i], [gmp_cv_asm_m68k_instruction=$i - rm -f conftest* - break]) -m4trace:configure.ac:3567: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2940: GMP_ASM_M68K_INSTRUCTION is expanded from... -configure.ac:3567: the top level]) -m4trace:configure.ac:3567: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2940: GMP_ASM_M68K_INSTRUCTION is expanded from... -configure.ac:3567: the top level]) -m4trace:configure.ac:3567: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2940: GMP_ASM_M68K_INSTRUCTION is expanded from... -configure.ac:3567: the top level]) -m4trace:configure.ac:3567: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2940: GMP_ASM_M68K_INSTRUCTION is expanded from... -configure.ac:3567: the top level]) -m4trace:configure.ac:3567: -1- GMP_DEFINE_RAW(["define(<WANT_REGISTER_PERCENT>, <\`$want_register_percent'>)"]) -m4trace:configure.ac:3567: -1- GMP_DEFINE_RAW(["define(<WANT_DOT_SIZE>, <\`$want_dot_size'>)"]) -m4trace:configure.ac:3568: -1- GMP_ASM_M68K_ADDRESSING -m4trace:configure.ac:3568: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text - $movel $dreg, $areg@-], [gmp_cv_asm_m68k_addressing=mit], [GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_text - $movel $dreg, -($areg)], - [gmp_cv_asm_m68k_addressing=motorola], -[AC_MSG_ERROR([cannot determine assembler addressing style])])]) -m4trace:configure.ac:3568: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2971: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.ac:3568: the top level]) -m4trace:configure.ac:3568: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2971: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.ac:3568: the top level]) -m4trace:configure.ac:3568: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2971: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.ac:3568: the top level]) -m4trace:configure.ac:3568: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2971: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.ac:3568: the top level]) -m4trace:configure.ac:3568: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text - $movel $dreg, -($areg)], [gmp_cv_asm_m68k_addressing=motorola], [AC_MSG_ERROR([cannot determine assembler addressing style])]) -m4trace:configure.ac:3568: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2971: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.ac:3568: the top level]) -m4trace:configure.ac:3568: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2971: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.ac:3568: the top level]) -m4trace:configure.ac:3568: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2971: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.ac:3568: the top level]) -m4trace:configure.ac:3568: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2971: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.ac:3568: the top level]) -m4trace:configure.ac:3568: -1- GMP_DEFINE_RAW(["define(<WANT_ADDRESSING>, <\`$gmp_cv_asm_m68k_addressing'>)"]) -m4trace:configure.ac:3569: -1- GMP_ASM_M68K_BRANCHES -m4trace:configure.ac:3569: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text -foo$gmp_cv_asm_label_suffix - $i foo], [gmp_cv_asm_m68k_branches=$i - rm -f conftest* - break]) -m4trace:configure.ac:3569: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3008: GMP_ASM_M68K_BRANCHES is expanded from... -configure.ac:3569: the top level]) -m4trace:configure.ac:3569: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3008: GMP_ASM_M68K_BRANCHES is expanded from... -configure.ac:3569: the top level]) -m4trace:configure.ac:3569: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3008: GMP_ASM_M68K_BRANCHES is expanded from... -configure.ac:3569: the top level]) -m4trace:configure.ac:3569: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3008: GMP_ASM_M68K_BRANCHES is expanded from... -configure.ac:3569: the top level]) -m4trace:configure.ac:3569: -1- GMP_DEFINE_RAW(["define(<WANT_BRANCHES>, <\`$gmp_cv_asm_m68k_branches'>)"]) -m4trace:configure.ac:3572: -1- GMP_ASM_POWERPC_PIC_ALWAYS -m4trace:configure.ac:3572: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3047: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.ac:3572: the top level]) -m4trace:configure.ac:3572: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3047: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.ac:3572: the top level]) -m4trace:configure.ac:3572: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3047: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.ac:3572: the top level]) -m4trace:configure.ac:3572: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3047: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.ac:3572: the top level]) -m4trace:configure.ac:3572: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3047: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.ac:3572: the top level]) -m4trace:configure.ac:3572: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3047: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.ac:3572: the top level]) -m4trace:configure.ac:3572: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3047: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.ac:3572: the top level]) -m4trace:configure.ac:3572: -1- GMP_DEFINE_RAW(["define(<PIC_ALWAYS>,<$gmp_cv_asm_powerpc_pic>)"]) -m4trace:configure.ac:3573: -1- GMP_ASM_POWERPC_R_REGISTERS -m4trace:configure.ac:3573: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text - mtctr 6], [gmp_cv_asm_powerpc_r_registers=no], [GMP_TRY_ASSEMBLE( -[ $gmp_cv_asm_text - mtctr r6], -[gmp_cv_asm_powerpc_r_registers=yes], -[AC_MSG_ERROR([neither "mtctr 6" nor "mtctr r6" works])])]) -m4trace:configure.ac:3573: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3084: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.ac:3573: the top level]) -m4trace:configure.ac:3573: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3084: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.ac:3573: the top level]) -m4trace:configure.ac:3573: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3084: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.ac:3573: the top level]) -m4trace:configure.ac:3573: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3084: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.ac:3573: the top level]) -m4trace:configure.ac:3573: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text - mtctr r6], [gmp_cv_asm_powerpc_r_registers=yes], [AC_MSG_ERROR([neither "mtctr 6" nor "mtctr r6" works])]) -m4trace:configure.ac:3573: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3084: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.ac:3573: the top level]) -m4trace:configure.ac:3573: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3084: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.ac:3573: the top level]) -m4trace:configure.ac:3573: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3084: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.ac:3573: the top level]) -m4trace:configure.ac:3573: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3084: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.ac:3573: the top level]) -m4trace:configure.ac:3573: -1- GMP_DEFINE_RAW(["define(<WANT_R_REGISTERS>,<$gmp_cv_asm_powerpc_r_registers>)"]) -m4trace:configure.ac:3574: -1- GMP_INCLUDE_MPN([powerpc32/powerpc-defs.m4]) -m4trace:configure.ac:3577: -1- GMP_DEFINE_RAW(["define(<ELFv2_ABI>)"]) -m4trace:configure.ac:3586: -1- GMP_INCLUDE_MPN([powerpc64/aix.m4]) -m4trace:configure.ac:3587: -1- GMP_INCLUDE_MPN([powerpc32/aix.m4]) -m4trace:configure.ac:3592: -1- GMP_INCLUDE_MPN([powerpc64/elf.m4]) -m4trace:configure.ac:3593: -1- GMP_INCLUDE_MPN([powerpc32/elf.m4]) -m4trace:configure.ac:3598: -1- GMP_INCLUDE_MPN([powerpc64/darwin.m4]) -m4trace:configure.ac:3599: -1- GMP_INCLUDE_MPN([powerpc32/darwin.m4]) -m4trace:configure.ac:3604: -1- GMP_INCLUDE_MPN([powerpc32/eabi.m4]) -m4trace:configure.ac:3609: -1- GMP_INCLUDE_MPN([powerpc32/aix.m4]) -m4trace:configure.ac:3614: -1- GMP_ASM_SPARC_REGISTER -m4trace:configure.ac:3614: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text - .register %g2,#scratch -], [gmp_cv_asm_sparc_register=yes], [gmp_cv_asm_sparc_register=no]) -m4trace:configure.ac:3614: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3109: GMP_ASM_SPARC_REGISTER is expanded from... -configure.ac:3614: the top level]) -m4trace:configure.ac:3614: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3109: GMP_ASM_SPARC_REGISTER is expanded from... -configure.ac:3614: the top level]) -m4trace:configure.ac:3614: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3109: GMP_ASM_SPARC_REGISTER is expanded from... -configure.ac:3614: the top level]) -m4trace:configure.ac:3614: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3109: GMP_ASM_SPARC_REGISTER is expanded from... -configure.ac:3614: the top level]) -m4trace:configure.ac:3614: -1- GMP_DEFINE_RAW(["define(<HAVE_REGISTER>,<$gmp_cv_asm_sparc_register>)"]) -m4trace:configure.ac:3617: -1- GMP_ASM_SPARC_GOTDATA -m4trace:configure.ac:3617: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text - .text - sethi %gdop_hix22(symbol), %g1 - or %g1, %gdop_lox10(symbol), %g1 -], [gmp_cv_asm_sparc_gotdata=yes], [gmp_cv_asm_sparc_gotdata=no]) -m4trace:configure.ac:3617: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3130: GMP_ASM_SPARC_GOTDATA is expanded from... -configure.ac:3617: the top level]) -m4trace:configure.ac:3617: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3130: GMP_ASM_SPARC_GOTDATA is expanded from... -configure.ac:3617: the top level]) -m4trace:configure.ac:3617: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3130: GMP_ASM_SPARC_GOTDATA is expanded from... -configure.ac:3617: the top level]) -m4trace:configure.ac:3617: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3130: GMP_ASM_SPARC_GOTDATA is expanded from... -configure.ac:3617: the top level]) -m4trace:configure.ac:3617: -1- GMP_DEFINE_RAW(["define(<HAVE_GOTDATA>,<$gmp_cv_asm_sparc_gotdata>)"]) -m4trace:configure.ac:3618: -1- GMP_ASM_SPARC_SHARED_THUNKS -m4trace:configure.ac:3618: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text - .section .text.__sparc_get_pc_thunk.l7,"axG",@progbits,__sparc_get_pc_thunk.l7,comdat - .weak __sparc_get_pc_thunk.l7 - .hidden __sparc_get_pc_thunk.l7 - .type __sparc_get_pc_thunk.l7, #function -__sparc_get_pc_thunk.l7: - jmp %o7+8 - add %o7, %l7, %l7 -], [gmp_cv_asm_sparc_shared_thunks=yes], [gmp_cv_asm_sparc_shared_thunks=no]) -m4trace:configure.ac:3618: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3154: GMP_ASM_SPARC_SHARED_THUNKS is expanded from... -configure.ac:3618: the top level]) -m4trace:configure.ac:3618: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3154: GMP_ASM_SPARC_SHARED_THUNKS is expanded from... -configure.ac:3618: the top level]) -m4trace:configure.ac:3618: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3154: GMP_ASM_SPARC_SHARED_THUNKS is expanded from... -configure.ac:3618: the top level]) -m4trace:configure.ac:3618: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3154: GMP_ASM_SPARC_SHARED_THUNKS is expanded from... -configure.ac:3618: the top level]) -m4trace:configure.ac:3618: -1- GMP_DEFINE_RAW(["define(<HAVE_SHARED_THUNKS>,<$gmp_cv_asm_sparc_shared_thunks>)"]) -m4trace:configure.ac:3621: -1- GMP_ASM_ALIGN_FILL_0x90 -m4trace:configure.ac:3621: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text - .align 4, 0x90 - .byte 0 - .align 4, 0x90], [if grep "Warning: Fill parameter ignored for executable section" conftest.out >/dev/null; then - echo "Suppressing this warning by omitting 0x90" 1>&AC_FD_CC - gmp_cv_asm_align_fill_0x90=no -else - gmp_cv_asm_align_fill_0x90=yes -fi], [gmp_cv_asm_align_fill_0x90=no]) -m4trace:configure.ac:3621: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1855: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.ac:3621: the top level]) -m4trace:configure.ac:3621: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1855: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.ac:3621: the top level]) -m4trace:configure.ac:3621: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1855: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.ac:3621: the top level]) -m4trace:configure.ac:3621: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1855: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.ac:3621: the top level]) -m4trace:configure.ac:3621: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1855: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.ac:3621: the top level]) -m4trace:configure.ac:3621: -1- GMP_DEFINE_RAW(["define(<ALIGN_FILL_0x90>,<$gmp_cv_asm_align_fill_0x90>)"]) -m4trace:configure.ac:3624: -1- GMP_INCLUDE_MPN([x86/x86-defs.m4]) -m4trace:configure.ac:3625: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_x86$]) -m4trace:configure.ac:3626: -1- GMP_ASM_COFF_TYPE -m4trace:configure.ac:3626: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text - $gmp_cv_asm_globl ${tmp_gsym_prefix}foo$gmp_cv_asm_globl_attr - .def ${tmp_gsym_prefix}foo - .scl 2 - .type 32 - .endef -${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix -], [gmp_cv_asm_x86_coff_type=yes], [gmp_cv_asm_x86_coff_type=no]) -m4trace:configure.ac:3626: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2162: GMP_ASM_COFF_TYPE is expanded from... -configure.ac:3626: the top level]) -m4trace:configure.ac:3626: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2162: GMP_ASM_COFF_TYPE is expanded from... -configure.ac:3626: the top level]) -m4trace:configure.ac:3626: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2162: GMP_ASM_COFF_TYPE is expanded from... -configure.ac:3626: the top level]) -m4trace:configure.ac:3626: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2162: GMP_ASM_COFF_TYPE is expanded from... -configure.ac:3626: the top level]) -m4trace:configure.ac:3627: -1- GMP_ASM_X86_GOT_UNDERSCORE -m4trace:configure.ac:3627: -1- AC_LIBTOOL_PROG_COMPILER_PIC -m4trace:configure.ac:3627: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2362: GMP_ASM_X86_GOT_UNDERSCORE is expanded from... -configure.ac:3627: the top level]) -m4trace:configure.ac:3627: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2362: GMP_ASM_X86_GOT_UNDERSCORE is expanded from... -configure.ac:3627: the top level]) -m4trace:configure.ac:3627: -1- GMP_DEFINE([GOT_GSYM_PREFIX], [_]) -m4trace:configure.ac:3627: -1- GMP_DEFINE([GOT_GSYM_PREFIX], []) -m4trace:configure.ac:3628: -1- GMP_ASM_X86_SHLDL_CL -m4trace:configure.ac:3628: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text - shldl %cl, %eax, %ebx], [gmp_cv_asm_x86_shldl_cl=yes], [gmp_cv_asm_x86_shldl_cl=no]) -m4trace:configure.ac:3628: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2586: GMP_ASM_X86_SHLDL_CL is expanded from... -configure.ac:3628: the top level]) -m4trace:configure.ac:3628: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2586: GMP_ASM_X86_SHLDL_CL is expanded from... -configure.ac:3628: the top level]) -m4trace:configure.ac:3628: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2586: GMP_ASM_X86_SHLDL_CL is expanded from... -configure.ac:3628: the top level]) -m4trace:configure.ac:3628: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2586: GMP_ASM_X86_SHLDL_CL is expanded from... -configure.ac:3628: the top level]) -m4trace:configure.ac:3628: -1- GMP_DEFINE([WANT_SHLDL_CL], [1]) -m4trace:configure.ac:3628: -1- GMP_DEFINE([WANT_SHLDL_CL], [0]) -m4trace:configure.ac:3630: -1- GMP_ASM_X86_MCOUNT -m4trace:configure.ac:3630: -1- AC_ENABLE_SHARED -m4trace:configure.ac:3630: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:2753: GMP_ASM_X86_MCOUNT is expanded from... -configure.ac:3630: the top level]) -m4trace:configure.ac:3630: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:2753: GMP_ASM_X86_MCOUNT is expanded from... -configure.ac:3630: the top level]) -m4trace:configure.ac:3630: -1- GMP_DEFINE_RAW(["define(<MCOUNT_NONPIC_REG>, <\`$mcount_nonpic_reg'>)"]) -m4trace:configure.ac:3630: -1- GMP_DEFINE_RAW(["define(<MCOUNT_NONPIC_CALL>,<\`$mcount_nonpic_call'>)"]) -m4trace:configure.ac:3630: -1- GMP_DEFINE_RAW(["define(<MCOUNT_PIC_REG>, <\`$mcount_pic_reg'>)"]) -m4trace:configure.ac:3630: -1- GMP_DEFINE_RAW(["define(<MCOUNT_PIC_CALL>, <\`$mcount_pic_call'>)"]) -m4trace:configure.ac:3634: -1- GMP_INCLUDE_MPN([x86/darwin.m4]) -m4trace:configure.ac:3638: -1- GMP_INCLUDE_MPN([x86_64/x86_64-defs.m4]) -m4trace:configure.ac:3639: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_x86_64$]) -m4trace:configure.ac:3642: -1- GMP_INCLUDE_MPN([x86_64/darwin.m4]) -m4trace:configure.ac:3644: -1- GMP_INCLUDE_MPN([x86_64/dos64.m4]) -m4trace:configure.ac:3646: -1- GMP_DEFINE_RAW(["define(<OPENBSD>,1)"]) -m4trace:configure.ac:3684: -1- m4_pattern_allow([^GMP_MPARAM_H_SUGGEST$]) -m4trace:configure.ac:3696: -1- GMP_DEFINE_RAW(["define(<$i>,<$value>)"]) -m4trace:configure.ac:3709: -1- m4_pattern_allow([^SIZEOF_VOID_P$]) -m4trace:configure.ac:3710: -1- m4_pattern_allow([^SIZEOF_UNSIGNED_SHORT$]) -m4trace:configure.ac:3711: -1- m4_pattern_allow([^SIZEOF_UNSIGNED$]) -m4trace:configure.ac:3712: -1- m4_pattern_allow([^SIZEOF_UNSIGNED_LONG$]) -m4trace:configure.ac:3713: -1- m4_pattern_allow([^SIZEOF_MP_LIMB_T$]) -m4trace:configure.ac:3717: -1- m4_pattern_allow([^GMP_LIMB_BITS$]) -m4trace:configure.ac:3718: -1- GMP_DEFINE_RAW(["define(<SIZEOF_UNSIGNED>,<$ac_cv_sizeof_unsigned>)"]) -m4trace:configure.ac:3740: -1- GMP_DEFINE_RAW(["define(<GMP_LIMB_BITS>,$GMP_LIMB_BITS)"]) -m4trace:configure.ac:3741: -1- GMP_DEFINE_RAW(["define(<GMP_NAIL_BITS>,$GMP_NAIL_BITS)"]) -m4trace:configure.ac:3742: -1- GMP_DEFINE_RAW(["define(<GMP_NUMB_BITS>,eval(GMP_LIMB_BITS-GMP_NAIL_BITS))"]) -m4trace:configure.ac:3745: -1- m4_pattern_allow([^mpn_objects$]) -m4trace:configure.ac:3746: -1- m4_pattern_allow([^mpn_objs_in_libgmp$]) -m4trace:configure.ac:3747: -1- m4_pattern_allow([^gmp_srclinks$]) -m4trace:configure.ac:3758: -1- m4_pattern_allow([^TUNE_SQR_TOOM2_MAX$]) -m4trace:configure.ac:3768: -1- m4_pattern_allow([^TUNE_SQR_TOOM2_MAX$]) -m4trace:configure.ac:3776: -1- m4_pattern_allow([^TUNE_SQR_OBJ$]) -m4trace:configure.ac:3782: -1- GMP_SUBST_CHECK_FUNCS([clock], [cputime], [getrusage], [gettimeofday], [sigaction], [sigaltstack], [sigstack]) -m4trace:configure.ac:3782: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_clock], [HAVE_CLOCK_01]) -m4trace:configure.ac:3782: -1- m4_pattern_allow([^HAVE_CLOCK_01$]) -m4trace:configure.ac:3782: -1- GMP_SUBST_CHECK_FUNCS([cputime], [getrusage], [gettimeofday], [sigaction], [sigaltstack], [sigstack]) -m4trace:configure.ac:3782: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_cputime], [HAVE_CPUTIME_01]) -m4trace:configure.ac:3782: -1- m4_pattern_allow([^HAVE_CPUTIME_01$]) -m4trace:configure.ac:3782: -1- GMP_SUBST_CHECK_FUNCS([getrusage], [gettimeofday], [sigaction], [sigaltstack], [sigstack]) -m4trace:configure.ac:3782: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_getrusage], [HAVE_GETRUSAGE_01]) -m4trace:configure.ac:3782: -1- m4_pattern_allow([^HAVE_GETRUSAGE_01$]) -m4trace:configure.ac:3782: -1- GMP_SUBST_CHECK_FUNCS([gettimeofday], [sigaction], [sigaltstack], [sigstack]) -m4trace:configure.ac:3782: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_gettimeofday], [HAVE_GETTIMEOFDAY_01]) -m4trace:configure.ac:3782: -1- m4_pattern_allow([^HAVE_GETTIMEOFDAY_01$]) -m4trace:configure.ac:3782: -1- GMP_SUBST_CHECK_FUNCS([sigaction], [sigaltstack], [sigstack]) -m4trace:configure.ac:3782: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_sigaction], [HAVE_SIGACTION_01]) -m4trace:configure.ac:3782: -1- m4_pattern_allow([^HAVE_SIGACTION_01$]) -m4trace:configure.ac:3782: -1- GMP_SUBST_CHECK_FUNCS([sigaltstack], [sigstack]) -m4trace:configure.ac:3782: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_sigaltstack], [HAVE_SIGALTSTACK_01]) -m4trace:configure.ac:3782: -1- m4_pattern_allow([^HAVE_SIGALTSTACK_01$]) -m4trace:configure.ac:3782: -1- GMP_SUBST_CHECK_FUNCS([sigstack]) -m4trace:configure.ac:3782: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_sigstack], [HAVE_SIGSTACK_01]) -m4trace:configure.ac:3782: -1- m4_pattern_allow([^HAVE_SIGSTACK_01$]) -m4trace:configure.ac:3782: -1- GMP_SUBST_CHECK_FUNCS([]) -m4trace:configure.ac:3783: -1- GMP_SUBST_CHECK_HEADERS([sys/resource.h]) -m4trace:configure.ac:3783: -1- _GMP_SUBST_CHECK_HEADERS([ac_cv_header_sys_resource_h], [HAVE_SYS_RESOURCE_H_01]) -m4trace:configure.ac:3783: -1- m4_pattern_allow([^HAVE_SYS_RESOURCE_H_01$]) -m4trace:configure.ac:3783: -1- GMP_SUBST_CHECK_HEADERS([]) -m4trace:configure.ac:3784: -1- m4_pattern_allow([^HAVE_STACK_T$]) -m4trace:configure.ac:3786: -1- m4_pattern_allow([^HAVE_STACK_T_01$]) -m4trace:configure.ac:3813: -1- m4_pattern_allow([^LIBCURSES$]) -m4trace:configure.ac:3825: -1- m4_pattern_allow([^WITH_READLINE_01$]) -m4trace:configure.ac:3826: -1- m4_pattern_allow([^LIBREADLINE$]) -m4trace:configure.ac:3830: -1- m4_pattern_allow([^YACC$]) -m4trace:configure.ac:3830: -1- m4_pattern_allow([^YACC$]) -m4trace:configure.ac:3830: -1- m4_pattern_allow([^YFLAGS$]) -m4trace:configure.ac:3831: -1- AM_PROG_LEX -m4trace:configure.ac:3831: -1- m4_pattern_allow([^LEX$]) -m4trace:configure.ac:3831: -1- m4_pattern_allow([^LEX_OUTPUT_ROOT$]) -m4trace:configure.ac:3831: -1- m4_pattern_allow([^LEXLIB$]) -m4trace:configure.ac:3831: -1- m4_pattern_allow([^YYTEXT_POINTER$]) -m4trace:configure.ac:3840: -1- m4_pattern_allow([^RANLIB$]) -m4trace:configure.ac:3844: -1- GMP_FINISH -m4trace:configure.ac:3850: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. -You should run autoupdate.], []) -m4trace:configure.ac:3850: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:3850: -1- m4_pattern_allow([^LTLIBOBJS$]) -m4trace:configure.ac:3850: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) -m4trace:configure.ac:3850: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) -m4trace:configure.ac:3850: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) -m4trace:configure.ac:3850: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) -m4trace:configure.ac:3850: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) -m4trace:configure.ac:3850: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"]) -m4trace:configure.ac:3850: -1- _LT_PROG_LTMAIN diff --git a/src/plugins/e-acsl/contrib/libgmp/autom4te.cache/traces.1 b/src/plugins/e-acsl/contrib/libgmp/autom4te.cache/traces.1 deleted file mode 100644 index 2f232d2b155..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/autom4te.cache/traces.1 +++ /dev/null @@ -1,3733 +0,0 @@ -m4trace:aclocal.m4:9934: -1- m4_include([acinclude.m4]) -m4trace:configure.ac:36: -1- AH_OUTPUT([00001], [/* - -Copyright 1996-2015 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. -*/]) -m4trace:configure.ac:40: -1- AC_INIT([GNU MP], [6.1.0], [gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html], [gmp]) -m4trace:configure.ac:40: -1- m4_pattern_forbid([^_?A[CHUM]_]) -m4trace:configure.ac:40: -1- m4_pattern_forbid([_AC_]) -m4trace:configure.ac:40: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) -m4trace:configure.ac:40: -1- m4_pattern_allow([^AS_FLAGS$]) -m4trace:configure.ac:40: -1- m4_pattern_forbid([^_?m4_]) -m4trace:configure.ac:40: -1- m4_pattern_forbid([^dnl$]) -m4trace:configure.ac:40: -1- m4_pattern_forbid([^_?AS_]) -m4trace:configure.ac:40: -1- AC_SUBST([SHELL]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([SHELL]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^SHELL$]) -m4trace:configure.ac:40: -1- AC_SUBST([PATH_SEPARATOR]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([PATH_SEPARATOR]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PATH_SEPARATOR$]) -m4trace:configure.ac:40: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([PACKAGE_NAME]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_NAME$]) -m4trace:configure.ac:40: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([PACKAGE_TARNAME]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) -m4trace:configure.ac:40: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([PACKAGE_VERSION]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_VERSION$]) -m4trace:configure.ac:40: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([PACKAGE_STRING]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_STRING$]) -m4trace:configure.ac:40: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) -m4trace:configure.ac:40: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([PACKAGE_URL]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_URL$]) -m4trace:configure.ac:40: -1- AC_SUBST([exec_prefix], [NONE]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([exec_prefix]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^exec_prefix$]) -m4trace:configure.ac:40: -1- AC_SUBST([prefix], [NONE]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([prefix]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^prefix$]) -m4trace:configure.ac:40: -1- AC_SUBST([program_transform_name], [s,x,x,]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([program_transform_name]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^program_transform_name$]) -m4trace:configure.ac:40: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([bindir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^bindir$]) -m4trace:configure.ac:40: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([sbindir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^sbindir$]) -m4trace:configure.ac:40: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([libexecdir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^libexecdir$]) -m4trace:configure.ac:40: -1- AC_SUBST([datarootdir], ['${prefix}/share']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([datarootdir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^datarootdir$]) -m4trace:configure.ac:40: -1- AC_SUBST([datadir], ['${datarootdir}']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([datadir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^datadir$]) -m4trace:configure.ac:40: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([sysconfdir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^sysconfdir$]) -m4trace:configure.ac:40: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([sharedstatedir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^sharedstatedir$]) -m4trace:configure.ac:40: -1- AC_SUBST([localstatedir], ['${prefix}/var']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([localstatedir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^localstatedir$]) -m4trace:configure.ac:40: -1- AC_SUBST([includedir], ['${prefix}/include']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([includedir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^includedir$]) -m4trace:configure.ac:40: -1- AC_SUBST([oldincludedir], ['/usr/include']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([oldincludedir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^oldincludedir$]) -m4trace:configure.ac:40: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], - ['${datarootdir}/doc/${PACKAGE_TARNAME}'], - ['${datarootdir}/doc/${PACKAGE}'])]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([docdir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^docdir$]) -m4trace:configure.ac:40: -1- AC_SUBST([infodir], ['${datarootdir}/info']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([infodir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^infodir$]) -m4trace:configure.ac:40: -1- AC_SUBST([htmldir], ['${docdir}']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([htmldir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^htmldir$]) -m4trace:configure.ac:40: -1- AC_SUBST([dvidir], ['${docdir}']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([dvidir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^dvidir$]) -m4trace:configure.ac:40: -1- AC_SUBST([pdfdir], ['${docdir}']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([pdfdir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^pdfdir$]) -m4trace:configure.ac:40: -1- AC_SUBST([psdir], ['${docdir}']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([psdir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^psdir$]) -m4trace:configure.ac:40: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([libdir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^libdir$]) -m4trace:configure.ac:40: -1- AC_SUBST([localedir], ['${datarootdir}/locale']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([localedir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^localedir$]) -m4trace:configure.ac:40: -1- AC_SUBST([mandir], ['${datarootdir}/man']) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([mandir]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^mandir$]) -m4trace:configure.ac:40: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_NAME$]) -m4trace:configure.ac:40: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ -@%:@undef PACKAGE_NAME]) -m4trace:configure.ac:40: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) -m4trace:configure.ac:40: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ -@%:@undef PACKAGE_TARNAME]) -m4trace:configure.ac:40: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_VERSION$]) -m4trace:configure.ac:40: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ -@%:@undef PACKAGE_VERSION]) -m4trace:configure.ac:40: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_STRING$]) -m4trace:configure.ac:40: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ -@%:@undef PACKAGE_STRING]) -m4trace:configure.ac:40: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) -m4trace:configure.ac:40: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ -@%:@undef PACKAGE_BUGREPORT]) -m4trace:configure.ac:40: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^PACKAGE_URL$]) -m4trace:configure.ac:40: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */ -@%:@undef PACKAGE_URL]) -m4trace:configure.ac:40: -1- AC_SUBST([DEFS]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([DEFS]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^DEFS$]) -m4trace:configure.ac:40: -1- AC_SUBST([ECHO_C]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([ECHO_C]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^ECHO_C$]) -m4trace:configure.ac:40: -1- AC_SUBST([ECHO_N]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([ECHO_N]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^ECHO_N$]) -m4trace:configure.ac:40: -1- AC_SUBST([ECHO_T]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([ECHO_T]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^ECHO_T$]) -m4trace:configure.ac:40: -1- AC_SUBST([LIBS]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([LIBS]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:40: -1- AC_SUBST([build_alias]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([build_alias]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^build_alias$]) -m4trace:configure.ac:40: -1- AC_SUBST([host_alias]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([host_alias]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^host_alias$]) -m4trace:configure.ac:40: -1- AC_SUBST([target_alias]) -m4trace:configure.ac:40: -1- AC_SUBST_TRACE([target_alias]) -m4trace:configure.ac:40: -1- m4_pattern_allow([^target_alias$]) -m4trace:configure.ac:42: -1- m4_pattern_forbid([^[ \t]*GMP_]) -m4trace:configure.ac:43: -1- m4_pattern_allow([GMP_LDFLAGS]) -m4trace:configure.ac:44: -1- m4_pattern_allow([GMP_LIMB_BITS]) -m4trace:configure.ac:45: -1- m4_pattern_allow([GMP_MPARAM_H_SUGGEST]) -m4trace:configure.ac:46: -1- m4_pattern_allow([GMP_NAIL_BITS]) -m4trace:configure.ac:47: -1- m4_pattern_allow([GMP_NUMB_BITS]) -m4trace:configure.ac:48: -1- m4_pattern_allow([GMP_NONSTD_ABI]) -m4trace:configure.ac:49: -1- m4_pattern_allow([GMP_CPU_TYPE]) -m4trace:configure.ac:65: -1- AC_CANONICAL_HOST -m4trace:configure.ac:65: -1- AC_CANONICAL_BUILD -m4trace:configure.ac:65: -1- AC_REQUIRE_AUX_FILE([config.sub]) -m4trace:configure.ac:65: -1- AC_REQUIRE_AUX_FILE([config.guess]) -m4trace:configure.ac:65: -1- AC_SUBST([build], [$ac_cv_build]) -m4trace:configure.ac:65: -1- AC_SUBST_TRACE([build]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^build$]) -m4trace:configure.ac:65: -1- AC_SUBST([build_cpu], [$[1]]) -m4trace:configure.ac:65: -1- AC_SUBST_TRACE([build_cpu]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^build_cpu$]) -m4trace:configure.ac:65: -1- AC_SUBST([build_vendor], [$[2]]) -m4trace:configure.ac:65: -1- AC_SUBST_TRACE([build_vendor]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^build_vendor$]) -m4trace:configure.ac:65: -1- AC_SUBST([build_os]) -m4trace:configure.ac:65: -1- AC_SUBST_TRACE([build_os]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^build_os$]) -m4trace:configure.ac:65: -1- AC_SUBST([host], [$ac_cv_host]) -m4trace:configure.ac:65: -1- AC_SUBST_TRACE([host]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^host$]) -m4trace:configure.ac:65: -1- AC_SUBST([host_cpu], [$[1]]) -m4trace:configure.ac:65: -1- AC_SUBST_TRACE([host_cpu]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^host_cpu$]) -m4trace:configure.ac:65: -1- AC_SUBST([host_vendor], [$[2]]) -m4trace:configure.ac:65: -1- AC_SUBST_TRACE([host_vendor]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^host_vendor$]) -m4trace:configure.ac:65: -1- AC_SUBST([host_os]) -m4trace:configure.ac:65: -1- AC_SUBST_TRACE([host_os]) -m4trace:configure.ac:65: -1- m4_pattern_allow([^host_os$]) -m4trace:configure.ac:80: -1- AM_INIT_AUTOMAKE([1.8 gnu no-dependencies]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) -m4trace:configure.ac:80: -1- AM_AUTOMAKE_VERSION([1.15]) -m4trace:configure.ac:80: -1- AC_REQUIRE_AUX_FILE([install-sh]) -m4trace:configure.ac:80: -1- AC_SUBST([INSTALL_PROGRAM]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) -m4trace:configure.ac:80: -1- AC_SUBST([INSTALL_SCRIPT]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([INSTALL_SCRIPT]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) -m4trace:configure.ac:80: -1- AC_SUBST([INSTALL_DATA]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([INSTALL_DATA]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^INSTALL_DATA$]) -m4trace:configure.ac:80: -1- AC_SUBST([am__isrc], [' -I$(srcdir)']) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([am__isrc]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^am__isrc$]) -m4trace:configure.ac:80: -1- _AM_SUBST_NOTMAKE([am__isrc]) -m4trace:configure.ac:80: -1- AC_SUBST([CYGPATH_W]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([CYGPATH_W]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^CYGPATH_W$]) -m4trace:configure.ac:80: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME']) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([PACKAGE]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^PACKAGE$]) -m4trace:configure.ac:80: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION']) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([VERSION]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^VERSION$]) -m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^PACKAGE$]) -m4trace:configure.ac:80: -1- AH_OUTPUT([PACKAGE], [/* Name of package */ -@%:@undef PACKAGE]) -m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^VERSION$]) -m4trace:configure.ac:80: -1- AH_OUTPUT([VERSION], [/* Version number of package */ -@%:@undef VERSION]) -m4trace:configure.ac:80: -1- AC_REQUIRE_AUX_FILE([missing]) -m4trace:configure.ac:80: -1- AC_SUBST([ACLOCAL]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([ACLOCAL]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^ACLOCAL$]) -m4trace:configure.ac:80: -1- AC_SUBST([AUTOCONF]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([AUTOCONF]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AUTOCONF$]) -m4trace:configure.ac:80: -1- AC_SUBST([AUTOMAKE]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([AUTOMAKE]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AUTOMAKE$]) -m4trace:configure.ac:80: -1- AC_SUBST([AUTOHEADER]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([AUTOHEADER]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AUTOHEADER$]) -m4trace:configure.ac:80: -1- AC_SUBST([MAKEINFO]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([MAKEINFO]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^MAKEINFO$]) -m4trace:configure.ac:80: -1- AC_SUBST([install_sh]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([install_sh]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^install_sh$]) -m4trace:configure.ac:80: -1- AC_SUBST([STRIP]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([STRIP]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^STRIP$]) -m4trace:configure.ac:80: -1- AC_SUBST([INSTALL_STRIP_PROGRAM]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) -m4trace:configure.ac:80: -1- AC_REQUIRE_AUX_FILE([install-sh]) -m4trace:configure.ac:80: -1- AC_SUBST([MKDIR_P]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([MKDIR_P]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^MKDIR_P$]) -m4trace:configure.ac:80: -1- AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([mkdir_p]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^mkdir_p$]) -m4trace:configure.ac:80: -1- AC_SUBST([AWK]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([AWK]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AWK$]) -m4trace:configure.ac:80: -1- AC_SUBST([SET_MAKE]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([SET_MAKE]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^SET_MAKE$]) -m4trace:configure.ac:80: -1- AC_SUBST([am__leading_dot]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([am__leading_dot]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^am__leading_dot$]) -m4trace:configure.ac:80: -1- AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([AMTAR]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AMTAR$]) -m4trace:configure.ac:80: -1- AC_SUBST([am__tar]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([am__tar]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^am__tar$]) -m4trace:configure.ac:80: -1- AC_SUBST([am__untar]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([am__untar]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^am__untar$]) -m4trace:configure.ac:80: -1- AM_SILENT_RULES -m4trace:configure.ac:80: -1- AC_SUBST([AM_V]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([AM_V]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AM_V$]) -m4trace:configure.ac:80: -1- _AM_SUBST_NOTMAKE([AM_V]) -m4trace:configure.ac:80: -1- AC_SUBST([AM_DEFAULT_V]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([AM_DEFAULT_V]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AM_DEFAULT_V$]) -m4trace:configure.ac:80: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V]) -m4trace:configure.ac:80: -1- AC_SUBST([AM_DEFAULT_VERBOSITY]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([AM_DEFAULT_VERBOSITY]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$]) -m4trace:configure.ac:80: -1- AC_SUBST([AM_BACKSLASH]) -m4trace:configure.ac:80: -1- AC_SUBST_TRACE([AM_BACKSLASH]) -m4trace:configure.ac:80: -1- m4_pattern_allow([^AM_BACKSLASH$]) -m4trace:configure.ac:80: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH]) -m4trace:configure.ac:81: -1- AC_CONFIG_HEADERS([config.h:config.in]) -m4trace:configure.ac:82: -1- AM_MAINTAINER_MODE -m4trace:configure.ac:82: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) -m4trace:configure.ac:82: -1- AC_SUBST([MAINTAINER_MODE_TRUE]) -m4trace:configure.ac:82: -1- AC_SUBST_TRACE([MAINTAINER_MODE_TRUE]) -m4trace:configure.ac:82: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$]) -m4trace:configure.ac:82: -1- AC_SUBST([MAINTAINER_MODE_FALSE]) -m4trace:configure.ac:82: -1- AC_SUBST_TRACE([MAINTAINER_MODE_FALSE]) -m4trace:configure.ac:82: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$]) -m4trace:configure.ac:82: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE]) -m4trace:configure.ac:82: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE]) -m4trace:configure.ac:82: -1- AC_SUBST([MAINT]) -m4trace:configure.ac:82: -1- AC_SUBST_TRACE([MAINT]) -m4trace:configure.ac:82: -1- m4_pattern_allow([^MAINT$]) -m4trace:configure.ac:86: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:86: the top level]) -m4trace:configure.ac:94: -1- AC_DEFINE_TRACE_LITERAL([WANT_ASSERT]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^WANT_ASSERT$]) -m4trace:configure.ac:94: -1- AH_OUTPUT([WANT_ASSERT], [/* Define to 1 to enable ASSERT checking, per --enable-assert */ -@%:@undef WANT_ASSERT]) -m4trace:configure.ac:104: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:104: the top level]) -m4trace:configure.ac:129: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:129: the top level]) -m4trace:configure.ac:138: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:138: the top level]) -m4trace:configure.ac:146: -1- AC_DEFINE_TRACE_LITERAL([WANT_ASSEMBLY]) -m4trace:configure.ac:146: -1- m4_pattern_allow([^WANT_ASSEMBLY$]) -m4trace:configure.ac:146: -1- AH_OUTPUT([WANT_ASSEMBLY], [/* Defined to 1 as per --enable-assembly */ -@%:@undef WANT_ASSEMBLY]) -m4trace:configure.ac:152: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:152: the top level]) -m4trace:configure.ac:160: -1- AC_DEFINE_TRACE_LITERAL([WANT_FFT]) -m4trace:configure.ac:160: -1- m4_pattern_allow([^WANT_FFT$]) -m4trace:configure.ac:160: -1- AH_OUTPUT([WANT_FFT], [/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -@%:@undef WANT_FFT]) -m4trace:configure.ac:166: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:166: the top level]) -m4trace:configure.ac:174: -1- AC_DEFINE_TRACE_LITERAL([WANT_OLD_FFT_FULL]) -m4trace:configure.ac:174: -1- m4_pattern_allow([^WANT_OLD_FFT_FULL$]) -m4trace:configure.ac:174: -1- AH_OUTPUT([WANT_OLD_FFT_FULL], [/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -@%:@undef WANT_OLD_FFT_FULL]) -m4trace:configure.ac:180: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:180: the top level]) -m4trace:configure.ac:195: -1- AC_SUBST([GMP_NAIL_BITS]) -m4trace:configure.ac:195: -1- AC_SUBST_TRACE([GMP_NAIL_BITS]) -m4trace:configure.ac:195: -1- m4_pattern_allow([^GMP_NAIL_BITS$]) -m4trace:configure.ac:199: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:199: the top level]) -m4trace:configure.ac:209: -1- AC_DEFINE_TRACE_LITERAL([WANT_PROFILING_PROF]) -m4trace:configure.ac:209: -1- m4_pattern_allow([^WANT_PROFILING_PROF$]) -m4trace:configure.ac:209: -1- AH_OUTPUT([WANT_PROFILING_PROF], [/* Define to 1 if --enable-profiling=prof */ -@%:@undef WANT_PROFILING_PROF]) -m4trace:configure.ac:213: -1- AC_DEFINE_TRACE_LITERAL([WANT_PROFILING_GPROF]) -m4trace:configure.ac:213: -1- m4_pattern_allow([^WANT_PROFILING_GPROF$]) -m4trace:configure.ac:213: -1- AH_OUTPUT([WANT_PROFILING_GPROF], [/* Define to 1 if --enable-profiling=gprof */ -@%:@undef WANT_PROFILING_GPROF]) -m4trace:configure.ac:217: -1- AC_DEFINE_TRACE_LITERAL([WANT_PROFILING_INSTRUMENT]) -m4trace:configure.ac:217: -1- m4_pattern_allow([^WANT_PROFILING_INSTRUMENT$]) -m4trace:configure.ac:217: -1- AH_OUTPUT([WANT_PROFILING_INSTRUMENT], [/* Define to 1 if --enable-profiling=instrument */ -@%:@undef WANT_PROFILING_INSTRUMENT]) -m4trace:configure.ac:233: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:233: the top level]) -m4trace:configure.ac:243: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:243: the top level]) -m4trace:configure.ac:253: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:253: the top level]) -m4trace:configure.ac:263: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:263: the top level]) -m4trace:configure.ac:271: -1- AC_DEFINE_TRACE_LITERAL([WANT_FAKE_CPUID]) -m4trace:configure.ac:271: -1- m4_pattern_allow([^WANT_FAKE_CPUID$]) -m4trace:configure.ac:271: -1- AH_OUTPUT([WANT_FAKE_CPUID], [/* Define to 1 to enable GMP_CPU_TYPE faking cpuid, per --enable-fake-cpuid */ -@%:@undef WANT_FAKE_CPUID]) -m4trace:configure.ac:295: -1- AH_OUTPUT([HAVE_HOST_CPU_1], [/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -#undef HAVE_HOST_CPU_FAMILY_alpha -#undef HAVE_HOST_CPU_FAMILY_m68k -#undef HAVE_HOST_CPU_FAMILY_power -#undef HAVE_HOST_CPU_FAMILY_powerpc -#undef HAVE_HOST_CPU_FAMILY_x86 -#undef HAVE_HOST_CPU_FAMILY_x86_64 - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -#undef HAVE_HOST_CPU_alphaev67 -#undef HAVE_HOST_CPU_alphaev68 -#undef HAVE_HOST_CPU_alphaev7 -#undef HAVE_HOST_CPU_m68020 -#undef HAVE_HOST_CPU_m68030 -#undef HAVE_HOST_CPU_m68040 -#undef HAVE_HOST_CPU_m68060 -#undef HAVE_HOST_CPU_m68360 -#undef HAVE_HOST_CPU_powerpc604 -#undef HAVE_HOST_CPU_powerpc604e -#undef HAVE_HOST_CPU_powerpc750 -#undef HAVE_HOST_CPU_powerpc7400 -#undef HAVE_HOST_CPU_supersparc -#undef HAVE_HOST_CPU_i386 -#undef HAVE_HOST_CPU_i586 -#undef HAVE_HOST_CPU_i686 -#undef HAVE_HOST_CPU_pentium -#undef HAVE_HOST_CPU_pentiummmx -#undef HAVE_HOST_CPU_pentiumpro -#undef HAVE_HOST_CPU_pentium2 -#undef HAVE_HOST_CPU_pentium3 -#undef HAVE_HOST_CPU_s390_z900 -#undef HAVE_HOST_CPU_s390_z990 -#undef HAVE_HOST_CPU_s390_z9 -#undef HAVE_HOST_CPU_s390_z10 -#undef HAVE_HOST_CPU_s390_z196 - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -#undef HAVE_HOST_CPU_s390_zarch]) -m4trace:configure.ac:435: -1- AC_SUBST([ABI]) -m4trace:configure.ac:435: -1- AC_SUBST_TRACE([ABI]) -m4trace:configure.ac:435: -1- m4_pattern_allow([^ABI$]) -m4trace:configure.ac:456: -1- AC_SUBST([HAVE_HOST_CPU_FAMILY_power], [0]) -m4trace:configure.ac:456: -1- AC_SUBST_TRACE([HAVE_HOST_CPU_FAMILY_power]) -m4trace:configure.ac:456: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_power$]) -m4trace:configure.ac:457: -1- AC_SUBST([HAVE_HOST_CPU_FAMILY_powerpc], [0]) -m4trace:configure.ac:457: -1- AC_SUBST_TRACE([HAVE_HOST_CPU_FAMILY_powerpc]) -m4trace:configure.ac:457: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_powerpc$]) -m4trace:configure.ac:462: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_alpha]) -m4trace:configure.ac:462: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_alpha$]) -m4trace:configure.ac:890: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_m68k]) -m4trace:configure.ac:890: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_m68k$]) -m4trace:configure.ac:999: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_powerpc]) -m4trace:configure.ac:999: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_powerpc$]) -m4trace:configure.ac:1224: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_power]) -m4trace:configure.ac:1224: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_power$]) -m4trace:configure.ac:1269: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_s390_zarch]) -m4trace:configure.ac:1269: -1- m4_pattern_allow([^HAVE_HOST_CPU_s390_zarch$]) -m4trace:configure.ac:1278: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_s390_zarch]) -m4trace:configure.ac:1278: -1- m4_pattern_allow([^HAVE_HOST_CPU_s390_zarch$]) -m4trace:configure.ac:1287: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_s390_zarch]) -m4trace:configure.ac:1287: -1- m4_pattern_allow([^HAVE_HOST_CPU_s390_zarch$]) -m4trace:configure.ac:1296: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_s390_zarch]) -m4trace:configure.ac:1296: -1- m4_pattern_allow([^HAVE_HOST_CPU_s390_zarch$]) -m4trace:configure.ac:1305: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_s390_zarch]) -m4trace:configure.ac:1305: -1- m4_pattern_allow([^HAVE_HOST_CPU_s390_zarch$]) -m4trace:configure.ac:1878: -1- AC_DEFINE_TRACE_LITERAL([HOST_DOS64]) -m4trace:configure.ac:1878: -1- m4_pattern_allow([^HOST_DOS64$]) -m4trace:configure.ac:1878: -1- AH_OUTPUT([HOST_DOS64], [/* Define to 1 for Windos/64 */ -@%:@undef HOST_DOS64]) -m4trace:configure.ac:1890: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: the \"none\" host is obsolete, use --disable-assembly], []) -m4trace:configure.ac:1890: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me: WARNING: the \"none\" host is obsolete, use --disable-assembly], []) -m4trace:configure.ac:1911: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -configure.ac:1911: the top level]) -m4trace:configure.ac:2024: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:944: GMP_PROG_CC_IS_GNU is expanded from... -configure.ac:2024: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:2444: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:2444: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2074: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:2444: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2074: the top level]) -m4trace:configure.ac:2081: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:867: GMP_PROG_CC_WORKS_LONGLONG is expanded from... -configure.ac:2081: the top level]) -m4trace:configure.ac:2081: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:867: GMP_PROG_CC_WORKS_LONGLONG is expanded from... -configure.ac:2081: the top level]) -m4trace:configure.ac:2081: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:867: GMP_PROG_CC_WORKS_LONGLONG is expanded from... -configure.ac:2081: the top level]) -m4trace:configure.ac:2093: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1041: GMP_HPC_HPPA_2_0 is expanded from... -configure.ac:2093: the top level]) -m4trace:configure.ac:2093: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1041: GMP_HPC_HPPA_2_0 is expanded from... -configure.ac:2093: the top level]) -m4trace:configure.ac:2094: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1082: GMP_GCC_ARM_UMODSI is expanded from... -configure.ac:2094: the top level]) -m4trace:configure.ac:2095: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1107: GMP_GCC_MIPS_O32 is expanded from... -configure.ac:2095: the top level]) -m4trace:configure.ac:2095: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1107: GMP_GCC_MIPS_O32 is expanded from... -configure.ac:2095: the top level]) -m4trace:configure.ac:2096: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1412: GMP_HPPA_LEVEL_20 is expanded from... -configure.ac:2096: the top level]) -m4trace:configure.ac:2096: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1412: GMP_HPPA_LEVEL_20 is expanded from... -configure.ac:2096: the top level]) -m4trace:configure.ac:2096: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1412: GMP_HPPA_LEVEL_20 is expanded from... -configure.ac:2096: the top level]) -m4trace:configure.ac:2097: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:907: GMP_C_TEST_SIZEOF is expanded from... -configure.ac:2097: the top level]) -m4trace:configure.ac:2097: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:907: GMP_C_TEST_SIZEOF is expanded from... -configure.ac:2097: the top level]) -m4trace:configure.ac:2217: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1314: GMP_OS_X86_XMM is expanded from... -configure.ac:2217: the top level]) -m4trace:configure.ac:2222: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1142: GMP_GCC_NO_CPP_PRECOMP is expanded from... -configure.ac:2222: the top level]) -m4trace:configure.ac:2230: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1202: GMP_GCC_WA_MCPU is expanded from... -configure.ac:2230: the top level]) -m4trace:configure.ac:2235: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1254: GMP_GCC_WA_OLDAS is expanded from... -configure.ac:2235: the top level]) -m4trace:configure.ac:2235: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1254: GMP_GCC_WA_OLDAS is expanded from... -configure.ac:2235: the top level]) -m4trace:configure.ac:2235: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1254: GMP_GCC_WA_OLDAS is expanded from... -configure.ac:2235: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:801: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:820: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:810: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:2444: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:2444: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2242: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:2444: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:1011: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:479: GMP_PROG_CC_WORKS is expanded from... -configure.ac:2242: the top level]) -m4trace:configure.ac:2266: -1- AC_SUBST([GMP_LDFLAGS]) -m4trace:configure.ac:2266: -1- AC_SUBST_TRACE([GMP_LDFLAGS]) -m4trace:configure.ac:2266: -1- m4_pattern_allow([^GMP_LDFLAGS$]) -m4trace:configure.ac:2267: -1- AC_SUBST([LIBGMP_LDFLAGS]) -m4trace:configure.ac:2267: -1- AC_SUBST_TRACE([LIBGMP_LDFLAGS]) -m4trace:configure.ac:2267: -1- m4_pattern_allow([^LIBGMP_LDFLAGS$]) -m4trace:configure.ac:2268: -1- AC_SUBST([LIBGMPXX_LDFLAGS]) -m4trace:configure.ac:2268: -1- AC_SUBST_TRACE([LIBGMPXX_LDFLAGS]) -m4trace:configure.ac:2268: -1- m4_pattern_allow([^LIBGMPXX_LDFLAGS$]) -m4trace:configure.ac:2286: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SPEED_CYCLECOUNTER]) -m4trace:configure.ac:2286: -1- m4_pattern_allow([^HAVE_SPEED_CYCLECOUNTER$]) -m4trace:configure.ac:2286: -1- AH_OUTPUT([HAVE_SPEED_CYCLECOUNTER], [/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -@%:@undef HAVE_SPEED_CYCLECOUNTER]) -m4trace:configure.ac:2289: -1- AC_SUBST([SPEED_CYCLECOUNTER_OBJ]) -m4trace:configure.ac:2289: -1- AC_SUBST_TRACE([SPEED_CYCLECOUNTER_OBJ]) -m4trace:configure.ac:2289: -1- m4_pattern_allow([^SPEED_CYCLECOUNTER_OBJ$]) -m4trace:configure.ac:2303: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CALLING_CONVENTIONS]) -m4trace:configure.ac:2303: -1- m4_pattern_allow([^HAVE_CALLING_CONVENTIONS$]) -m4trace:configure.ac:2303: -1- AH_OUTPUT([HAVE_CALLING_CONVENTIONS], [/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -@%:@undef HAVE_CALLING_CONVENTIONS]) -m4trace:configure.ac:2306: -1- AC_SUBST([CALLING_CONVENTIONS_OBJS]) -m4trace:configure.ac:2306: -1- AC_SUBST_TRACE([CALLING_CONVENTIONS_OBJS]) -m4trace:configure.ac:2306: -1- m4_pattern_allow([^CALLING_CONVENTIONS_OBJS$]) -m4trace:configure.ac:2328: -1- AC_SUBST([DEFN_LONG_LONG_LIMB]) -m4trace:configure.ac:2328: -1- AC_SUBST_TRACE([DEFN_LONG_LONG_LIMB]) -m4trace:configure.ac:2328: -1- m4_pattern_allow([^DEFN_LONG_LONG_LIMB$]) -m4trace:configure.ac:2332: -1- AC_SUBST([CC]) -m4trace:configure.ac:2332: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:2332: -1- AC_SUBST([CFLAGS]) -m4trace:configure.ac:2332: -1- AC_SUBST_TRACE([CFLAGS]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^CFLAGS$]) -m4trace:configure.ac:2332: -1- AC_SUBST([LDFLAGS]) -m4trace:configure.ac:2332: -1- AC_SUBST_TRACE([LDFLAGS]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.ac:2332: -1- AC_SUBST([LIBS]) -m4trace:configure.ac:2332: -1- AC_SUBST_TRACE([LIBS]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:2332: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.ac:2332: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:2332: -1- AC_SUBST([CC]) -m4trace:configure.ac:2332: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:2332: -1- AC_SUBST([CC]) -m4trace:configure.ac:2332: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:2332: -1- AC_SUBST([CC]) -m4trace:configure.ac:2332: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:2332: -1- AC_SUBST([CC]) -m4trace:configure.ac:2332: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:2332: -1- AC_SUBST([ac_ct_CC]) -m4trace:configure.ac:2332: -1- AC_SUBST_TRACE([ac_ct_CC]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^ac_ct_CC$]) -m4trace:configure.ac:2332: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) -m4trace:configure.ac:2332: -1- AC_SUBST_TRACE([EXEEXT]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^EXEEXT$]) -m4trace:configure.ac:2332: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) -m4trace:configure.ac:2332: -1- AC_SUBST_TRACE([OBJEXT]) -m4trace:configure.ac:2332: -1- m4_pattern_allow([^OBJEXT$]) -m4trace:configure.ac:2332: -1- AC_REQUIRE_AUX_FILE([compile]) -m4trace:configure.ac:2334: -1- AC_SUBST([CPP]) -m4trace:configure.ac:2334: -1- AC_SUBST_TRACE([CPP]) -m4trace:configure.ac:2334: -1- m4_pattern_allow([^CPP$]) -m4trace:configure.ac:2334: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.ac:2334: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.ac:2334: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:2334: -1- AC_SUBST([CPP]) -m4trace:configure.ac:2334: -1- AC_SUBST_TRACE([CPP]) -m4trace:configure.ac:2334: -1- m4_pattern_allow([^CPP$]) -m4trace:configure.ac:2338: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:3847: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... -acinclude.m4:3815: GMP_PROG_CC_FOR_BUILD is expanded from... -configure.ac:2338: the top level]) -m4trace:configure.ac:2338: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:3847: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... -acinclude.m4:3815: GMP_PROG_CC_FOR_BUILD is expanded from... -configure.ac:2338: the top level]) -m4trace:configure.ac:2338: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:3847: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... -acinclude.m4:3815: GMP_PROG_CC_FOR_BUILD is expanded from... -configure.ac:2338: the top level]) -m4trace:configure.ac:2338: -1- AC_SUBST([CC_FOR_BUILD]) -m4trace:configure.ac:2338: -1- AC_SUBST_TRACE([CC_FOR_BUILD]) -m4trace:configure.ac:2338: -1- m4_pattern_allow([^CC_FOR_BUILD$]) -m4trace:configure.ac:2338: -1- AC_SUBST([CC_FOR_BUILD]) -m4trace:configure.ac:2338: -1- AC_SUBST_TRACE([CC_FOR_BUILD]) -m4trace:configure.ac:2338: -1- m4_pattern_allow([^CC_FOR_BUILD$]) -m4trace:configure.ac:2339: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -acinclude.m4:3881: GMP_PROG_CPP_FOR_BUILD is expanded from... -configure.ac:2339: the top level]) -m4trace:configure.ac:2339: -1- AC_SUBST([CPP_FOR_BUILD]) -m4trace:configure.ac:2339: -1- AC_SUBST_TRACE([CPP_FOR_BUILD]) -m4trace:configure.ac:2339: -1- m4_pattern_allow([^CPP_FOR_BUILD$]) -m4trace:configure.ac:2339: -1- AC_SUBST([CPP_FOR_BUILD]) -m4trace:configure.ac:2339: -1- AC_SUBST_TRACE([CPP_FOR_BUILD]) -m4trace:configure.ac:2339: -1- m4_pattern_allow([^CPP_FOR_BUILD$]) -m4trace:configure.ac:2340: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3921: GMP_PROG_EXEEXT_FOR_BUILD is expanded from... -configure.ac:2340: the top level]) -m4trace:configure.ac:2340: -1- AC_SUBST([EXEEXT_FOR_BUILD], [$gmp_cv_prog_exeext_for_build]) -m4trace:configure.ac:2340: -1- AC_SUBST_TRACE([EXEEXT_FOR_BUILD]) -m4trace:configure.ac:2340: -1- m4_pattern_allow([^EXEEXT_FOR_BUILD$]) -m4trace:configure.ac:2341: -1- AC_SUBST([U_FOR_BUILD], [_]) -m4trace:configure.ac:2341: -1- AC_SUBST_TRACE([U_FOR_BUILD]) -m4trace:configure.ac:2341: -1- m4_pattern_allow([^U_FOR_BUILD$]) -m4trace:configure.ac:2342: -1- AC_SUBST([LIBM_FOR_BUILD], [-lm]) -m4trace:configure.ac:2342: -1- AC_SUBST_TRACE([LIBM_FOR_BUILD]) -m4trace:configure.ac:2342: -1- m4_pattern_allow([^LIBM_FOR_BUILD$]) -m4trace:configure.ac:2350: -1- AC_SUBST([CCAS]) -m4trace:configure.ac:2350: -1- AC_SUBST_TRACE([CCAS]) -m4trace:configure.ac:2350: -1- m4_pattern_allow([^CCAS$]) -m4trace:configure.ac:2357: -1- AC_SUBST([CXX]) -m4trace:configure.ac:2357: -1- AC_SUBST_TRACE([CXX]) -m4trace:configure.ac:2357: -1- m4_pattern_allow([^CXX$]) -m4trace:configure.ac:2357: -1- AC_SUBST([CXXFLAGS]) -m4trace:configure.ac:2357: -1- AC_SUBST_TRACE([CXXFLAGS]) -m4trace:configure.ac:2357: -1- m4_pattern_allow([^CXXFLAGS$]) -m4trace:configure.ac:2357: -1- AC_SUBST([LDFLAGS]) -m4trace:configure.ac:2357: -1- AC_SUBST_TRACE([LDFLAGS]) -m4trace:configure.ac:2357: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.ac:2357: -1- AC_SUBST([LIBS]) -m4trace:configure.ac:2357: -1- AC_SUBST_TRACE([LIBS]) -m4trace:configure.ac:2357: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:2357: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.ac:2357: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.ac:2357: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:2357: -1- AC_SUBST([CXX]) -m4trace:configure.ac:2357: -1- AC_SUBST_TRACE([CXX]) -m4trace:configure.ac:2357: -1- m4_pattern_allow([^CXX$]) -m4trace:configure.ac:2357: -1- AC_SUBST([ac_ct_CXX]) -m4trace:configure.ac:2357: -1- AC_SUBST_TRACE([ac_ct_CXX]) -m4trace:configure.ac:2357: -1- m4_pattern_allow([^ac_ct_CXX$]) -m4trace:configure.ac:2359: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -configure.ac:2359: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2385: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1488: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1452: GMP_PROG_CXX_WORKS is expanded from... -configure.ac:2385: the top level]) -m4trace:configure.ac:2396: -1- AM_CONDITIONAL([WANT_CXX], [test $want_cxx = yes]) -m4trace:configure.ac:2396: -1- AC_SUBST([WANT_CXX_TRUE]) -m4trace:configure.ac:2396: -1- AC_SUBST_TRACE([WANT_CXX_TRUE]) -m4trace:configure.ac:2396: -1- m4_pattern_allow([^WANT_CXX_TRUE$]) -m4trace:configure.ac:2396: -1- AC_SUBST([WANT_CXX_FALSE]) -m4trace:configure.ac:2396: -1- AC_SUBST_TRACE([WANT_CXX_FALSE]) -m4trace:configure.ac:2396: -1- m4_pattern_allow([^WANT_CXX_FALSE$]) -m4trace:configure.ac:2396: -1- _AM_SUBST_NOTMAKE([WANT_CXX_TRUE]) -m4trace:configure.ac:2396: -1- _AM_SUBST_NOTMAKE([WANT_CXX_FALSE]) -m4trace:configure.ac:2404: -1- AC_SUBST([CXXCPP]) -m4trace:configure.ac:2404: -1- AC_SUBST_TRACE([CXXCPP]) -m4trace:configure.ac:2404: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.ac:2404: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.ac:2404: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.ac:2404: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:2404: -1- AC_SUBST([CXXCPP]) -m4trace:configure.ac:2404: -1- AC_SUBST_TRACE([CXXCPP]) -m4trace:configure.ac:2404: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.ac:2411: -1- AC_SUBST([GREP]) -m4trace:configure.ac:2411: -1- AC_SUBST_TRACE([GREP]) -m4trace:configure.ac:2411: -1- m4_pattern_allow([^GREP$]) -m4trace:configure.ac:2411: -1- AC_SUBST([EGREP]) -m4trace:configure.ac:2411: -1- AC_SUBST_TRACE([EGREP]) -m4trace:configure.ac:2411: -1- m4_pattern_allow([^EGREP$]) -m4trace:configure.ac:2455: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2534: GMP_ASM_X86_MMX is expanded from... -configure.ac:2455: the top level]) -m4trace:configure.ac:2455: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2534: GMP_ASM_X86_MMX is expanded from... -configure.ac:2455: the top level]) -m4trace:configure.ac:2455: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2534: GMP_ASM_X86_MMX is expanded from... -configure.ac:2455: the top level]) -m4trace:configure.ac:2455: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2534: GMP_ASM_X86_MMX is expanded from... -configure.ac:2455: the top level]) -m4trace:configure.ac:2458: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2613: GMP_ASM_X86_SSE2 is expanded from... -configure.ac:2458: the top level]) -m4trace:configure.ac:2458: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2613: GMP_ASM_X86_SSE2 is expanded from... -configure.ac:2458: the top level]) -m4trace:configure.ac:2458: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2613: GMP_ASM_X86_SSE2 is expanded from... -configure.ac:2458: the top level]) -m4trace:configure.ac:2458: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2613: GMP_ASM_X86_SSE2 is expanded from... -configure.ac:2458: the top level]) -m4trace:configure.ac:2462: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2650: GMP_ASM_X86_MULX is expanded from... -configure.ac:2462: the top level]) -m4trace:configure.ac:2462: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2650: GMP_ASM_X86_MULX is expanded from... -configure.ac:2462: the top level]) -m4trace:configure.ac:2462: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2650: GMP_ASM_X86_MULX is expanded from... -configure.ac:2462: the top level]) -m4trace:configure.ac:2462: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2650: GMP_ASM_X86_MULX is expanded from... -configure.ac:2462: the top level]) -m4trace:configure.ac:2465: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2688: GMP_ASM_X86_ADX is expanded from... -configure.ac:2465: the top level]) -m4trace:configure.ac:2465: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2688: GMP_ASM_X86_ADX is expanded from... -configure.ac:2465: the top level]) -m4trace:configure.ac:2465: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2688: GMP_ASM_X86_ADX is expanded from... -configure.ac:2465: the top level]) -m4trace:configure.ac:2465: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2688: GMP_ASM_X86_ADX is expanded from... -configure.ac:2465: the top level]) -m4trace:configure.ac:2481: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -configure.ac:2481: the top level]) -m4trace:configure.ac:2503: -1- AC_SUBST([ASMFLAGS]) -m4trace:configure.ac:2503: -1- AC_SUBST_TRACE([ASMFLAGS]) -m4trace:configure.ac:2503: -1- m4_pattern_allow([^ASMFLAGS$]) -m4trace:configure.ac:2505: -1- AC_SUBST([AR]) -m4trace:configure.ac:2505: -1- AC_SUBST_TRACE([AR]) -m4trace:configure.ac:2505: -1- m4_pattern_allow([^AR$]) -m4trace:configure.ac:2506: -1- _m4_warn([obsolete], [The macro `AC_PROG_NM' is obsolete. -You should run autoupdate.], [aclocal.m4:3782: AC_PROG_NM is expanded from... -acinclude.m4:422: GMP_PROG_NM is expanded from... -configure.ac:2506: the top level]) -m4trace:configure.ac:2506: -1- AC_SUBST([DUMPBIN]) -m4trace:configure.ac:2506: -1- AC_SUBST_TRACE([DUMPBIN]) -m4trace:configure.ac:2506: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.ac:2506: -1- AC_SUBST([ac_ct_DUMPBIN]) -m4trace:configure.ac:2506: -1- AC_SUBST_TRACE([ac_ct_DUMPBIN]) -m4trace:configure.ac:2506: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) -m4trace:configure.ac:2506: -1- AC_SUBST([DUMPBIN]) -m4trace:configure.ac:2506: -1- AC_SUBST_TRACE([DUMPBIN]) -m4trace:configure.ac:2506: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.ac:2506: -1- AC_SUBST([NM]) -m4trace:configure.ac:2506: -1- AC_SUBST_TRACE([NM]) -m4trace:configure.ac:2506: -1- m4_pattern_allow([^NM$]) -m4trace:configure.ac:2506: -1- _m4_warn([obsolete], [The macro `AC_PROG_NM' is obsolete. -You should run autoupdate.], [aclocal.m4:3782: AC_PROG_NM is expanded from... -acinclude.m4:422: GMP_PROG_NM is expanded from... -configure.ac:2506: the top level]) -m4trace:configure.ac:2506: -1- AC_SUBST([DUMPBIN]) -m4trace:configure.ac:2506: -1- AC_SUBST_TRACE([DUMPBIN]) -m4trace:configure.ac:2506: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.ac:2506: -1- AC_SUBST([ac_ct_DUMPBIN]) -m4trace:configure.ac:2506: -1- AC_SUBST_TRACE([ac_ct_DUMPBIN]) -m4trace:configure.ac:2506: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) -m4trace:configure.ac:2506: -1- AC_SUBST([DUMPBIN]) -m4trace:configure.ac:2506: -1- AC_SUBST_TRACE([DUMPBIN]) -m4trace:configure.ac:2506: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.ac:2506: -1- AC_SUBST([NM]) -m4trace:configure.ac:2506: -1- AC_SUBST_TRACE([NM]) -m4trace:configure.ac:2506: -1- m4_pattern_allow([^NM$]) -m4trace:configure.ac:2527: -1- _m4_warn([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete. -You should run autoupdate.], [aclocal.m4:8528: AC_LIBTOOL_WIN32_DLL is expanded from... -configure.ac:2527: the top level]) -m4trace:configure.ac:2527: -1- AC_SUBST([AS]) -m4trace:configure.ac:2527: -1- AC_SUBST_TRACE([AS]) -m4trace:configure.ac:2527: -1- m4_pattern_allow([^AS$]) -m4trace:configure.ac:2527: -1- AC_SUBST([DLLTOOL]) -m4trace:configure.ac:2527: -1- AC_SUBST_TRACE([DLLTOOL]) -m4trace:configure.ac:2527: -1- m4_pattern_allow([^DLLTOOL$]) -m4trace:configure.ac:2527: -1- AC_SUBST([OBJDUMP]) -m4trace:configure.ac:2527: -1- AC_SUBST_TRACE([OBJDUMP]) -m4trace:configure.ac:2527: -1- m4_pattern_allow([^OBJDUMP$]) -m4trace:configure.ac:2527: -1- _m4_warn([obsolete], [AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you -put the 'win32-dll' option into LT_INIT's first parameter.], [aclocal.m4:8528: AC_LIBTOOL_WIN32_DLL is expanded from... -configure.ac:2527: the top level]) -m4trace:configure.ac:2529: -1- AC_SUBST([LIBGMP_DLL], [0]) -m4trace:configure.ac:2529: -1- AC_SUBST_TRACE([LIBGMP_DLL]) -m4trace:configure.ac:2529: -1- m4_pattern_allow([^LIBGMP_DLL$]) -m4trace:configure.ac:2617: -1- AC_PROG_LIBTOOL -m4trace:configure.ac:2617: -1- _m4_warn([obsolete], [The macro `AC_PROG_LIBTOOL' is obsolete. -You should run autoupdate.], [aclocal.m4:121: AC_PROG_LIBTOOL is expanded from... -configure.ac:2617: the top level]) -m4trace:configure.ac:2617: -1- LT_INIT -m4trace:configure.ac:2617: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$]) -m4trace:configure.ac:2617: -1- AC_REQUIRE_AUX_FILE([ltmain.sh]) -m4trace:configure.ac:2617: -1- AC_SUBST([LIBTOOL]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([LIBTOOL]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^LIBTOOL$]) -m4trace:configure.ac:2617: -1- AC_SUBST([SED]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([SED]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^SED$]) -m4trace:configure.ac:2617: -1- AC_SUBST([FGREP]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([FGREP]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^FGREP$]) -m4trace:configure.ac:2617: -1- AC_SUBST([GREP]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([GREP]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^GREP$]) -m4trace:configure.ac:2617: -1- AC_SUBST([LD]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([LD]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^LD$]) -m4trace:configure.ac:2617: -1- AC_SUBST([LN_S], [$as_ln_s]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([LN_S]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^LN_S$]) -m4trace:configure.ac:2617: -1- AC_SUBST([OBJDUMP]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([OBJDUMP]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^OBJDUMP$]) -m4trace:configure.ac:2617: -1- AC_SUBST([OBJDUMP]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([OBJDUMP]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^OBJDUMP$]) -m4trace:configure.ac:2617: -1- AC_SUBST([DLLTOOL]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([DLLTOOL]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^DLLTOOL$]) -m4trace:configure.ac:2617: -1- AC_SUBST([DLLTOOL]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([DLLTOOL]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^DLLTOOL$]) -m4trace:configure.ac:2617: -1- AC_SUBST([AR]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([AR]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^AR$]) -m4trace:configure.ac:2617: -1- AC_SUBST([ac_ct_AR]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([ac_ct_AR]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^ac_ct_AR$]) -m4trace:configure.ac:2617: -1- AC_SUBST([STRIP]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([STRIP]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^STRIP$]) -m4trace:configure.ac:2617: -1- AC_SUBST([RANLIB]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([RANLIB]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^RANLIB$]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([LT_OBJDIR]) -m4trace:configure.ac:2617: -1- AC_DEFINE_TRACE_LITERAL([LT_OBJDIR]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^LT_OBJDIR$]) -m4trace:configure.ac:2617: -1- AH_OUTPUT([LT_OBJDIR], [/* Define to the sub-directory where libtool stores uninstalled libraries. */ -@%:@undef LT_OBJDIR]) -m4trace:configure.ac:2617: -1- LT_SUPPORTED_TAG([CC]) -m4trace:configure.ac:2617: -1- AC_SUBST([MANIFEST_TOOL]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([MANIFEST_TOOL]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^MANIFEST_TOOL$]) -m4trace:configure.ac:2617: -1- AC_SUBST([DSYMUTIL]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([DSYMUTIL]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^DSYMUTIL$]) -m4trace:configure.ac:2617: -1- AC_SUBST([NMEDIT]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([NMEDIT]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^NMEDIT$]) -m4trace:configure.ac:2617: -1- AC_SUBST([LIPO]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([LIPO]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^LIPO$]) -m4trace:configure.ac:2617: -1- AC_SUBST([OTOOL]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([OTOOL]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^OTOOL$]) -m4trace:configure.ac:2617: -1- AC_SUBST([OTOOL64]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([OTOOL64]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^OTOOL64$]) -m4trace:configure.ac:2617: -1- AC_SUBST([LT_SYS_LIBRARY_PATH]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([LT_SYS_LIBRARY_PATH]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^LT_SYS_LIBRARY_PATH$]) -m4trace:configure.ac:2617: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the <dlfcn.h> header file. */ -@%:@undef HAVE_DLFCN_H]) -m4trace:configure.ac:2617: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^STDC_HEADERS$]) -m4trace:configure.ac:2617: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ -@%:@undef STDC_HEADERS]) -m4trace:configure.ac:2617: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */ -@%:@undef HAVE_SYS_TYPES_H]) -m4trace:configure.ac:2617: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */ -@%:@undef HAVE_SYS_STAT_H]) -m4trace:configure.ac:2617: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */ -@%:@undef HAVE_STDLIB_H]) -m4trace:configure.ac:2617: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */ -@%:@undef HAVE_STRING_H]) -m4trace:configure.ac:2617: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */ -@%:@undef HAVE_MEMORY_H]) -m4trace:configure.ac:2617: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */ -@%:@undef HAVE_STRINGS_H]) -m4trace:configure.ac:2617: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */ -@%:@undef HAVE_INTTYPES_H]) -m4trace:configure.ac:2617: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */ -@%:@undef HAVE_STDINT_H]) -m4trace:configure.ac:2617: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */ -@%:@undef HAVE_UNISTD_H]) -m4trace:configure.ac:2617: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DLFCN_H]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^HAVE_DLFCN_H$]) -m4trace:configure.ac:2617: -1- LT_SUPPORTED_TAG([CXX]) -m4trace:configure.ac:2617: -1- AC_SUBST([CXXCPP]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([CXXCPP]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.ac:2617: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:2617: -1- AC_SUBST([CXXCPP]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([CXXCPP]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.ac:2617: -1- AC_SUBST([LD]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([LD]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^LD$]) -m4trace:configure.ac:2617: -1- AC_SUBST([LT_SYS_LIBRARY_PATH]) -m4trace:configure.ac:2617: -1- AC_SUBST_TRACE([LT_SYS_LIBRARY_PATH]) -m4trace:configure.ac:2617: -1- m4_pattern_allow([^LT_SYS_LIBRARY_PATH$]) -m4trace:configure.ac:2631: -1- AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes]) -m4trace:configure.ac:2631: -1- AC_SUBST([ENABLE_STATIC_TRUE]) -m4trace:configure.ac:2631: -1- AC_SUBST_TRACE([ENABLE_STATIC_TRUE]) -m4trace:configure.ac:2631: -1- m4_pattern_allow([^ENABLE_STATIC_TRUE$]) -m4trace:configure.ac:2631: -1- AC_SUBST([ENABLE_STATIC_FALSE]) -m4trace:configure.ac:2631: -1- AC_SUBST_TRACE([ENABLE_STATIC_FALSE]) -m4trace:configure.ac:2631: -1- m4_pattern_allow([^ENABLE_STATIC_FALSE$]) -m4trace:configure.ac:2631: -1- _AM_SUBST_NOTMAKE([ENABLE_STATIC_TRUE]) -m4trace:configure.ac:2631: -1- _AM_SUBST_NOTMAKE([ENABLE_STATIC_FALSE]) -m4trace:configure.ac:2637: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) -m4trace:configure.ac:2637: -1- m4_pattern_allow([^STDC_HEADERS$]) -m4trace:configure.ac:2637: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ -@%:@undef STDC_HEADERS]) -m4trace:configure.ac:2638: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME]) -m4trace:configure.ac:2638: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) -m4trace:configure.ac:2638: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ -@%:@undef TIME_WITH_SYS_TIME]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the <fcntl.h> header file. */ -@%:@undef HAVE_FCNTL_H]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_FLOAT_H], [/* Define to 1 if you have the <float.h> header file. */ -@%:@undef HAVE_FLOAT_H]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_INVENT_H], [/* Define to 1 if you have the <invent.h> header file. */ -@%:@undef HAVE_INVENT_H]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_LANGINFO_H], [/* Define to 1 if you have the <langinfo.h> header file. */ -@%:@undef HAVE_LANGINFO_H]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_LOCALE_H], [/* Define to 1 if you have the <locale.h> header file. */ -@%:@undef HAVE_LOCALE_H]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_NL_TYPES_H], [/* Define to 1 if you have the <nl_types.h> header file. */ -@%:@undef HAVE_NL_TYPES_H]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_SYS_ATTRIBUTES_H], [/* Define to 1 if you have the <sys/attributes.h> header file. */ -@%:@undef HAVE_SYS_ATTRIBUTES_H]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_SYS_IOGRAPH_H], [/* Define to 1 if you have the <sys/iograph.h> header file. */ -@%:@undef HAVE_SYS_IOGRAPH_H]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_SYS_MMAN_H], [/* Define to 1 if you have the <sys/mman.h> header file. */ -@%:@undef HAVE_SYS_MMAN_H]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the <sys/param.h> header file. */ -@%:@undef HAVE_SYS_PARAM_H]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_SYS_PROCESSOR_H], [/* Define to 1 if you have the <sys/processor.h> header file. */ -@%:@undef HAVE_SYS_PROCESSOR_H]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_SYS_PSTAT_H], [/* Define to 1 if you have the <sys/pstat.h> header file. */ -@%:@undef HAVE_SYS_PSTAT_H]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_SYS_SYSINFO_H], [/* Define to 1 if you have the <sys/sysinfo.h> header file. */ -@%:@undef HAVE_SYS_SYSINFO_H]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_SYS_SYSSGI_H], [/* Define to 1 if you have the <sys/syssgi.h> header file. */ -@%:@undef HAVE_SYS_SYSSGI_H]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_SYS_SYSTEMCFG_H], [/* Define to 1 if you have the <sys/systemcfg.h> header file. */ -@%:@undef HAVE_SYS_SYSTEMCFG_H]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the <sys/time.h> header file. */ -@%:@undef HAVE_SYS_TIME_H]) -m4trace:configure.ac:2665: -1- AH_OUTPUT([HAVE_SYS_TIMES_H], [/* Define to 1 if you have the <sys/times.h> header file. */ -@%:@undef HAVE_SYS_TIMES_H]) -m4trace:configure.ac:2668: -1- AH_OUTPUT([HAVE_SYS_RESOURCE_H], [/* Define to 1 if you have the <sys/resource.h> header file. */ -@%:@undef HAVE_SYS_RESOURCE_H]) -m4trace:configure.ac:2668: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_RESOURCE_H]) -m4trace:configure.ac:2668: -1- m4_pattern_allow([^HAVE_SYS_RESOURCE_H$]) -m4trace:configure.ac:2681: -1- AH_OUTPUT([HAVE_SYS_SYSCTL_H], [/* Define to 1 if you have the <sys/sysctl.h> header file. */ -@%:@undef HAVE_SYS_SYSCTL_H]) -m4trace:configure.ac:2681: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_SYSCTL_H]) -m4trace:configure.ac:2681: -1- m4_pattern_allow([^HAVE_SYS_SYSCTL_H$]) -m4trace:configure.ac:2687: -1- AH_OUTPUT([HAVE_MACHINE_HAL_SYSINFO_H], [/* Define to 1 if you have the <machine/hal_sysinfo.h> header file. */ -@%:@undef HAVE_MACHINE_HAL_SYSINFO_H]) -m4trace:configure.ac:2687: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MACHINE_HAL_SYSINFO_H]) -m4trace:configure.ac:2687: -1- m4_pattern_allow([^HAVE_MACHINE_HAL_SYSINFO_H$]) -m4trace:configure.ac:2703: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_FGETC]) -m4trace:configure.ac:2703: -1- m4_pattern_allow([^HAVE_DECL_FGETC$]) -m4trace:configure.ac:2703: -1- AH_OUTPUT([HAVE_DECL_FGETC], [/* Define to 1 if you have the declaration of `fgetc\', and to 0 if you don\'t. - */ -@%:@undef HAVE_DECL_FGETC]) -m4trace:configure.ac:2703: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_FSCANF]) -m4trace:configure.ac:2703: -1- m4_pattern_allow([^HAVE_DECL_FSCANF$]) -m4trace:configure.ac:2703: -1- AH_OUTPUT([HAVE_DECL_FSCANF], [/* Define to 1 if you have the declaration of `fscanf\', and to 0 if you don\'t. - */ -@%:@undef HAVE_DECL_FSCANF]) -m4trace:configure.ac:2703: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_OPTARG]) -m4trace:configure.ac:2703: -1- m4_pattern_allow([^HAVE_DECL_OPTARG$]) -m4trace:configure.ac:2703: -1- AH_OUTPUT([HAVE_DECL_OPTARG], [/* Define to 1 if you have the declaration of `optarg\', and to 0 if you don\'t. - */ -@%:@undef HAVE_DECL_OPTARG]) -m4trace:configure.ac:2703: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_UNGETC]) -m4trace:configure.ac:2703: -1- m4_pattern_allow([^HAVE_DECL_UNGETC$]) -m4trace:configure.ac:2703: -1- AH_OUTPUT([HAVE_DECL_UNGETC], [/* Define to 1 if you have the declaration of `ungetc\', and to 0 if you don\'t. - */ -@%:@undef HAVE_DECL_UNGETC]) -m4trace:configure.ac:2703: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_VFPRINTF]) -m4trace:configure.ac:2703: -1- m4_pattern_allow([^HAVE_DECL_VFPRINTF$]) -m4trace:configure.ac:2703: -1- AH_OUTPUT([HAVE_DECL_VFPRINTF], [/* Define to 1 if you have the declaration of `vfprintf\', and to 0 if you - don\'t. */ -@%:@undef HAVE_DECL_VFPRINTF]) -m4trace:configure.ac:2704: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_SYS_ERRLIST]) -m4trace:configure.ac:2704: -1- m4_pattern_allow([^HAVE_DECL_SYS_ERRLIST$]) -m4trace:configure.ac:2704: -1- AH_OUTPUT([HAVE_DECL_SYS_ERRLIST], [/* Define to 1 if you have the declaration of `sys_errlist\', and to 0 if you - don\'t. */ -@%:@undef HAVE_DECL_SYS_ERRLIST]) -m4trace:configure.ac:2704: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_SYS_NERR]) -m4trace:configure.ac:2704: -1- m4_pattern_allow([^HAVE_DECL_SYS_NERR$]) -m4trace:configure.ac:2704: -1- AH_OUTPUT([HAVE_DECL_SYS_NERR], [/* Define to 1 if you have the declaration of `sys_nerr\', and to 0 if you - don\'t. */ -@%:@undef HAVE_DECL_SYS_NERR]) -m4trace:configure.ac:2708: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. -You should run autoupdate.], [../../lib/autoconf/types.m4:746: AC_TYPE_SIGNAL is expanded from... -configure.ac:2708: the top level]) -m4trace:configure.ac:2708: -1- AC_DEFINE_TRACE_LITERAL([RETSIGTYPE]) -m4trace:configure.ac:2708: -1- m4_pattern_allow([^RETSIGTYPE$]) -m4trace:configure.ac:2708: -1- AH_OUTPUT([RETSIGTYPE], [/* Define as the return type of signal handlers (`int\' or `void\'). */ -@%:@undef RETSIGTYPE]) -m4trace:configure.ac:2720: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INTMAX_T]) -m4trace:configure.ac:2720: -1- m4_pattern_allow([^HAVE_INTMAX_T$]) -m4trace:configure.ac:2720: -1- AH_OUTPUT([HAVE_INTMAX_T], [/* Define to 1 if the system has the type `intmax_t\'. */ -@%:@undef HAVE_INTMAX_T]) -m4trace:configure.ac:2720: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LONG_DOUBLE]) -m4trace:configure.ac:2720: -1- m4_pattern_allow([^HAVE_LONG_DOUBLE$]) -m4trace:configure.ac:2720: -1- AH_OUTPUT([HAVE_LONG_DOUBLE], [/* Define to 1 if the system has the type `long double\'. */ -@%:@undef HAVE_LONG_DOUBLE]) -m4trace:configure.ac:2720: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LONG_LONG]) -m4trace:configure.ac:2720: -1- m4_pattern_allow([^HAVE_LONG_LONG$]) -m4trace:configure.ac:2720: -1- AH_OUTPUT([HAVE_LONG_LONG], [/* Define to 1 if the system has the type `long long\'. */ -@%:@undef HAVE_LONG_LONG]) -m4trace:configure.ac:2720: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PTRDIFF_T]) -m4trace:configure.ac:2720: -1- m4_pattern_allow([^HAVE_PTRDIFF_T$]) -m4trace:configure.ac:2720: -1- AH_OUTPUT([HAVE_PTRDIFF_T], [/* Define to 1 if the system has the type `ptrdiff_t\'. */ -@%:@undef HAVE_PTRDIFF_T]) -m4trace:configure.ac:2720: -1- AC_DEFINE_TRACE_LITERAL([HAVE_QUAD_T]) -m4trace:configure.ac:2720: -1- m4_pattern_allow([^HAVE_QUAD_T$]) -m4trace:configure.ac:2720: -1- AH_OUTPUT([HAVE_QUAD_T], [/* Define to 1 if the system has the type `quad_t\'. */ -@%:@undef HAVE_QUAD_T]) -m4trace:configure.ac:2720: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UINT_LEAST32_T]) -m4trace:configure.ac:2720: -1- m4_pattern_allow([^HAVE_UINT_LEAST32_T$]) -m4trace:configure.ac:2720: -1- AH_OUTPUT([HAVE_UINT_LEAST32_T], [/* Define to 1 if the system has the type `uint_least32_t\'. */ -@%:@undef HAVE_UINT_LEAST32_T]) -m4trace:configure.ac:2720: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INTPTR_T]) -m4trace:configure.ac:2720: -1- m4_pattern_allow([^HAVE_INTPTR_T$]) -m4trace:configure.ac:2720: -1- AH_OUTPUT([HAVE_INTPTR_T], [/* Define to 1 if the system has the type `intptr_t\'. */ -@%:@undef HAVE_INTPTR_T]) -m4trace:configure.ac:2726: -1- AC_DEFINE_TRACE_LITERAL([volatile]) -m4trace:configure.ac:2726: -1- m4_pattern_allow([^volatile$]) -m4trace:configure.ac:2726: -1- AH_OUTPUT([volatile], [/* Define to empty if the keyword `volatile\' does not work. Warning: valid - code using `volatile\' can become incorrect without. Disable with care. */ -@%:@undef volatile]) -m4trace:configure.ac:2728: -1- AH_OUTPUT([restrict], [/* Define to the equivalent of the C99 \'restrict\' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#undef restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif]) -m4trace:configure.ac:2728: -1- AC_DEFINE_TRACE_LITERAL([restrict]) -m4trace:configure.ac:2728: -1- m4_pattern_allow([^restrict$]) -m4trace:configure.ac:2728: -1- AC_DEFINE_TRACE_LITERAL([restrict]) -m4trace:configure.ac:2728: -1- m4_pattern_allow([^restrict$]) -m4trace:configure.ac:2731: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3178: GMP_C_ATTRIBUTE_CONST is expanded from... -configure.ac:2731: the top level]) -m4trace:configure.ac:2731: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ATTRIBUTE_CONST]) -m4trace:configure.ac:2731: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_CONST$]) -m4trace:configure.ac:2731: -1- AH_OUTPUT([HAVE_ATTRIBUTE_CONST], [/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -@%:@undef HAVE_ATTRIBUTE_CONST]) -m4trace:configure.ac:2732: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3197: GMP_C_ATTRIBUTE_MALLOC is expanded from... -configure.ac:2732: the top level]) -m4trace:configure.ac:2732: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ATTRIBUTE_MALLOC]) -m4trace:configure.ac:2732: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_MALLOC$]) -m4trace:configure.ac:2732: -1- AH_OUTPUT([HAVE_ATTRIBUTE_MALLOC], [/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -@%:@undef HAVE_ATTRIBUTE_MALLOC]) -m4trace:configure.ac:2733: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3227: GMP_C_ATTRIBUTE_MODE is expanded from... -configure.ac:2733: the top level]) -m4trace:configure.ac:2733: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ATTRIBUTE_MODE]) -m4trace:configure.ac:2733: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_MODE$]) -m4trace:configure.ac:2733: -1- AH_OUTPUT([HAVE_ATTRIBUTE_MODE], [/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -@%:@undef HAVE_ATTRIBUTE_MODE]) -m4trace:configure.ac:2734: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3243: GMP_C_ATTRIBUTE_NORETURN is expanded from... -configure.ac:2734: the top level]) -m4trace:configure.ac:2734: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ATTRIBUTE_NORETURN]) -m4trace:configure.ac:2734: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_NORETURN$]) -m4trace:configure.ac:2734: -1- AH_OUTPUT([HAVE_ATTRIBUTE_NORETURN], [/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -@%:@undef HAVE_ATTRIBUTE_NORETURN]) -m4trace:configure.ac:2735: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3258: GMP_C_HIDDEN_ALIAS is expanded from... -configure.ac:2735: the top level]) -m4trace:configure.ac:2735: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HIDDEN_ALIAS]) -m4trace:configure.ac:2735: -1- m4_pattern_allow([^HAVE_HIDDEN_ALIAS$]) -m4trace:configure.ac:2735: -1- AH_OUTPUT([HAVE_HIDDEN_ALIAS], [/* Define to 1 if the compiler accepts gcc style __attribute__ ((visibility)) - and __attribute__ ((alias)) */ -@%:@undef HAVE_HIDDEN_ALIAS]) -m4trace:configure.ac:2737: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler - calls it, or to nothing if \'inline\' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif]) -m4trace:configure.ac:2737: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... -acinclude.m4:3768: GMP_H_EXTERN_INLINE is expanded from... -configure.ac:2737: the top level]) -m4trace:configure.ac:2740: -1- _m4_warn([obsolete], [The macro `AC_CHECK_LIBM' is obsolete. -You should run autoupdate.], [aclocal.m4:3886: AC_CHECK_LIBM is expanded from... -configure.ac:2740: the top level]) -m4trace:configure.ac:2740: -1- AC_SUBST([LIBM]) -m4trace:configure.ac:2740: -1- AC_SUBST_TRACE([LIBM]) -m4trace:configure.ac:2740: -1- m4_pattern_allow([^LIBM$]) -m4trace:configure.ac:2741: -1- AC_SUBST([LIBM]) -m4trace:configure.ac:2741: -1- AC_SUBST_TRACE([LIBM]) -m4trace:configure.ac:2741: -1- m4_pattern_allow([^LIBM$]) -m4trace:configure.ac:2743: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3576: GMP_HEADER_ALLOCA is expanded from... -acinclude.m4:3560: GMP_FUNC_ALLOCA is expanded from... -configure.ac:2743: the top level]) -m4trace:configure.ac:2743: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA_H]) -m4trace:configure.ac:2743: -1- m4_pattern_allow([^HAVE_ALLOCA_H$]) -m4trace:configure.ac:2743: -1- AH_OUTPUT([HAVE_ALLOCA_H], [/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). - */ -@%:@undef HAVE_ALLOCA_H]) -m4trace:configure.ac:2743: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3560: GMP_FUNC_ALLOCA is expanded from... -configure.ac:2743: the top level]) -m4trace:configure.ac:2743: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA]) -m4trace:configure.ac:2743: -1- m4_pattern_allow([^HAVE_ALLOCA$]) -m4trace:configure.ac:2743: -1- AH_OUTPUT([HAVE_ALLOCA], [/* Define to 1 if alloca() works (via gmp-impl.h). */ -@%:@undef HAVE_ALLOCA]) -m4trace:configure.ac:2744: -1- AH_OUTPUT([WANT_TMP], [/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#undef WANT_TMP_ALLOCA -#undef WANT_TMP_REENTRANT -#undef WANT_TMP_NOTREENTRANT -#undef WANT_TMP_DEBUG]) -m4trace:configure.ac:2744: -1- AC_DEFINE_TRACE_LITERAL([WANT_TMP_ALLOCA]) -m4trace:configure.ac:2744: -1- m4_pattern_allow([^WANT_TMP_ALLOCA$]) -m4trace:configure.ac:2744: -1- AC_DEFINE_TRACE_LITERAL([WANT_TMP_REENTRANT]) -m4trace:configure.ac:2744: -1- m4_pattern_allow([^WANT_TMP_REENTRANT$]) -m4trace:configure.ac:2744: -1- AC_DEFINE_TRACE_LITERAL([WANT_TMP_NOTREENTRANT]) -m4trace:configure.ac:2744: -1- m4_pattern_allow([^WANT_TMP_NOTREENTRANT$]) -m4trace:configure.ac:2744: -1- AC_DEFINE_TRACE_LITERAL([WANT_TMP_DEBUG]) -m4trace:configure.ac:2744: -1- m4_pattern_allow([^WANT_TMP_DEBUG$]) -m4trace:configure.ac:2744: -1- AC_SUBST([TAL_OBJECT]) -m4trace:configure.ac:2744: -1- AC_SUBST_TRACE([TAL_OBJECT]) -m4trace:configure.ac:2744: -1- m4_pattern_allow([^TAL_OBJECT$]) -m4trace:configure.ac:2746: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... -acinclude.m4:3795: GMP_H_HAVE_FILE is expanded from... -configure.ac:2746: the top level]) -m4trace:configure.ac:2748: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif]) -m4trace:configure.ac:2748: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIMB_BIG_ENDIAN]) -m4trace:configure.ac:2748: -1- m4_pattern_allow([^HAVE_LIMB_BIG_ENDIAN$]) -m4trace:configure.ac:2748: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIMB_LITTLE_ENDIAN]) -m4trace:configure.ac:2748: -1- m4_pattern_allow([^HAVE_LIMB_LITTLE_ENDIAN$]) -m4trace:configure.ac:2748: -1- AC_DEFINE_TRACE_LITERAL([AC_APPLE_UNIVERSAL_BUILD]) -m4trace:configure.ac:2748: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$]) -m4trace:configure.ac:2748: -1- AH_OUTPUT([AC_APPLE_UNIVERSAL_BUILD], [/* Define if building universal (internal helper macro) */ -@%:@undef AC_APPLE_UNIVERSAL_BUILD]) -m4trace:configure.ac:2754: -1- AH_OUTPUT([HAVE_LIMB], [/* Define one of these to 1 for the endianness of `mp_limb_t\'. - If the endianness is not a simple big or little, or you don\'t know what - it is, then leave both undefined. */ -#undef HAVE_LIMB_BIG_ENDIAN -#undef HAVE_LIMB_LITTLE_ENDIAN]) -m4trace:configure.ac:2761: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3291: GMP_C_DOUBLE_FORMAT is expanded from... -configure.ac:2761: the top level]) -m4trace:configure.ac:2761: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3291: GMP_C_DOUBLE_FORMAT is expanded from... -configure.ac:2761: the top level]) -m4trace:configure.ac:2761: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3291: GMP_C_DOUBLE_FORMAT is expanded from... -configure.ac:2761: the top level]) -m4trace:configure.ac:2761: -1- AH_OUTPUT([HAVE_DOUBLE], [/* Define one of the following to 1 for the format of a `double\'. - If your format is not among these choices, or you don\'t know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -#undef HAVE_DOUBLE_IEEE_BIG_ENDIAN -#undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN -#undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED -#undef HAVE_DOUBLE_VAX_D -#undef HAVE_DOUBLE_VAX_G -#undef HAVE_DOUBLE_CRAY_CFP]) -m4trace:configure.ac:2761: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_IEEE_BIG_ENDIAN]) -m4trace:configure.ac:2761: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_BIG_ENDIAN$]) -m4trace:configure.ac:2761: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_IEEE_LITTLE_ENDIAN]) -m4trace:configure.ac:2761: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_LITTLE_ENDIAN$]) -m4trace:configure.ac:2761: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_IEEE_LITTLE_SWAPPED]) -m4trace:configure.ac:2761: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_LITTLE_SWAPPED$]) -m4trace:configure.ac:2761: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_VAX_D]) -m4trace:configure.ac:2761: -1- m4_pattern_allow([^HAVE_DOUBLE_VAX_D$]) -m4trace:configure.ac:2761: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_VAX_G]) -m4trace:configure.ac:2761: -1- m4_pattern_allow([^HAVE_DOUBLE_VAX_G$]) -m4trace:configure.ac:2761: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_CRAY_CFP]) -m4trace:configure.ac:2761: -1- m4_pattern_allow([^HAVE_DOUBLE_CRAY_CFP$]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_ALARM], [/* Define to 1 if you have the `alarm\' function. */ -@%:@undef HAVE_ALARM]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_ATTR_GET], [/* Define to 1 if you have the `attr_get\' function. */ -@%:@undef HAVE_ATTR_GET]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_CLOCK], [/* Define to 1 if you have the `clock\' function. */ -@%:@undef HAVE_CLOCK]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_CPUTIME], [/* Define to 1 if you have the `cputime\' function. */ -@%:@undef HAVE_CPUTIME]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_GETPAGESIZE], [/* Define to 1 if you have the `getpagesize\' function. */ -@%:@undef HAVE_GETPAGESIZE]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_GETRUSAGE], [/* Define to 1 if you have the `getrusage\' function. */ -@%:@undef HAVE_GETRUSAGE]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_GETTIMEOFDAY], [/* Define to 1 if you have the `gettimeofday\' function. */ -@%:@undef HAVE_GETTIMEOFDAY]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_GETSYSINFO], [/* Define to 1 if you have the `getsysinfo\' function. */ -@%:@undef HAVE_GETSYSINFO]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_LOCALECONV], [/* Define to 1 if you have the `localeconv\' function. */ -@%:@undef HAVE_LOCALECONV]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ -@%:@undef HAVE_MEMSET]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_MMAP], [/* Define to 1 if you have the `mmap\' function. */ -@%:@undef HAVE_MMAP]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_MPROTECT], [/* Define to 1 if you have the `mprotect\' function. */ -@%:@undef HAVE_MPROTECT]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_NL_LANGINFO], [/* Define to 1 if you have the `nl_langinfo\' function. */ -@%:@undef HAVE_NL_LANGINFO]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_OBSTACK_VPRINTF], [/* Define to 1 if you have the `obstack_vprintf\' function. */ -@%:@undef HAVE_OBSTACK_VPRINTF]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_POPEN], [/* Define to 1 if you have the `popen\' function. */ -@%:@undef HAVE_POPEN]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_PROCESSOR_INFO], [/* Define to 1 if you have the `processor_info\' function. */ -@%:@undef HAVE_PROCESSOR_INFO]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_PSTAT_GETPROCESSOR], [/* Define to 1 if you have the `pstat_getprocessor\' function. */ -@%:@undef HAVE_PSTAT_GETPROCESSOR]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_RAISE], [/* Define to 1 if you have the `raise\' function. */ -@%:@undef HAVE_RAISE]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_READ_REAL_TIME], [/* Define to 1 if you have the `read_real_time\' function. */ -@%:@undef HAVE_READ_REAL_TIME]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_SIGACTION], [/* Define to 1 if you have the `sigaction\' function. */ -@%:@undef HAVE_SIGACTION]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_SIGALTSTACK], [/* Define to 1 if you have the `sigaltstack\' function. */ -@%:@undef HAVE_SIGALTSTACK]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_SIGSTACK], [/* Define to 1 if you have the `sigstack\' function. */ -@%:@undef HAVE_SIGSTACK]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_SYSSGI], [/* Define to 1 if you have the `syssgi\' function. */ -@%:@undef HAVE_SYSSGI]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_STRCHR], [/* Define to 1 if you have the `strchr\' function. */ -@%:@undef HAVE_STRCHR]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */ -@%:@undef HAVE_STRERROR]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_STRNLEN], [/* Define to 1 if you have the `strnlen\' function. */ -@%:@undef HAVE_STRNLEN]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_STRTOL], [/* Define to 1 if you have the `strtol\' function. */ -@%:@undef HAVE_STRTOL]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_STRTOUL], [/* Define to 1 if you have the `strtoul\' function. */ -@%:@undef HAVE_STRTOUL]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_SYSCONF], [/* Define to 1 if you have the `sysconf\' function. */ -@%:@undef HAVE_SYSCONF]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_SYSCTL], [/* Define to 1 if you have the `sysctl\' function. */ -@%:@undef HAVE_SYSCTL]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_SYSCTLBYNAME], [/* Define to 1 if you have the `sysctlbyname\' function. */ -@%:@undef HAVE_SYSCTLBYNAME]) -m4trace:configure.ac:2793: -1- AH_OUTPUT([HAVE_TIMES], [/* Define to 1 if you have the `times\' function. */ -@%:@undef HAVE_TIMES]) -m4trace:configure.ac:2801: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CLOCK_GETTIME]) -m4trace:configure.ac:2801: -1- m4_pattern_allow([^HAVE_CLOCK_GETTIME$]) -m4trace:configure.ac:2801: -1- AH_OUTPUT([HAVE_CLOCK_GETTIME], [/* Define to 1 if you have the `clock_gettime\' function */ -@%:@undef HAVE_CLOCK_GETTIME]) -m4trace:configure.ac:2806: -1- AC_SUBST([TUNE_LIBS]) -m4trace:configure.ac:2806: -1- AC_SUBST_TRACE([TUNE_LIBS]) -m4trace:configure.ac:2806: -1- m4_pattern_allow([^TUNE_LIBS$]) -m4trace:configure.ac:2808: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2764: AC_TRY_RUN is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3703: GMP_FUNC_VSNPRINTF is expanded from... -configure.ac:2808: the top level]) -m4trace:configure.ac:2808: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VSNPRINTF]) -m4trace:configure.ac:2808: -1- m4_pattern_allow([^HAVE_VSNPRINTF$]) -m4trace:configure.ac:2808: -1- AH_OUTPUT([HAVE_VSNPRINTF], [/* Define to 1 if you have the `vsnprintf\' function and it works properly. */ -@%:@undef HAVE_VSNPRINTF]) -m4trace:configure.ac:2809: -1- AC_DEFINE_TRACE_LITERAL([SSCANF_WRITABLE_INPUT]) -m4trace:configure.ac:2809: -1- m4_pattern_allow([^SSCANF_WRITABLE_INPUT$]) -m4trace:configure.ac:2809: -1- AH_OUTPUT([SSCANF_WRITABLE_INPUT], [/* Define to 1 if sscanf requires writable inputs */ -@%:@undef SSCANF_WRITABLE_INPUT]) -m4trace:configure.ac:2814: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PSP_ITICKSPERCLKTICK]) -m4trace:configure.ac:2814: -1- m4_pattern_allow([^HAVE_PSP_ITICKSPERCLKTICK$]) -m4trace:configure.ac:2814: -1- AH_OUTPUT([HAVE_PSP_ITICKSPERCLKTICK], [/* Define to 1 if <sys/pstat.h> `struct pst_processor\' exists and contains - `psp_iticksperclktick\'. */ -@%:@undef HAVE_PSP_ITICKSPERCLKTICK]) -m4trace:configure.ac:2829: -1- AH_OUTPUT([HAVE_SSTREAM], [/* Define to 1 if you have the <sstream> header file. */ -@%:@undef HAVE_SSTREAM]) -m4trace:configure.ac:2829: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSTREAM]) -m4trace:configure.ac:2829: -1- m4_pattern_allow([^HAVE_SSTREAM$]) -m4trace:configure.ac:2830: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STD__LOCALE]) -m4trace:configure.ac:2830: -1- m4_pattern_allow([^HAVE_STD__LOCALE$]) -m4trace:configure.ac:2830: -1- AH_OUTPUT([HAVE_STD__LOCALE], [/* Define to 1 if the system has the type `std::locale\'. */ -@%:@undef HAVE_STD__LOCALE]) -m4trace:configure.ac:3034: -1- AC_DEFINE_TRACE_LITERAL([WANT_FAT_BINARY]) -m4trace:configure.ac:3034: -1- m4_pattern_allow([^WANT_FAT_BINARY$]) -m4trace:configure.ac:3034: -1- AH_OUTPUT([WANT_FAT_BINARY], [/* Define to 1 when building a fat binary. */ -@%:@undef WANT_FAT_BINARY]) -m4trace:configure.ac:3359: -1- AC_CONFIG_LINKS([mpn/$tmp_fn.$tmp_ext:mpn/$tmp_dir/$tmp_base.$tmp_ext]) -m4trace:configure.ac:3407: -1- AH_OUTPUT([HAVE_NATIVE], [/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#undef HAVE_NATIVE_mpn_add_n -#undef HAVE_NATIVE_mpn_add_n_sub_n -#undef HAVE_NATIVE_mpn_add_nc -#undef HAVE_NATIVE_mpn_addaddmul_1msb0 -#undef HAVE_NATIVE_mpn_addlsh1_n -#undef HAVE_NATIVE_mpn_addlsh2_n -#undef HAVE_NATIVE_mpn_addlsh_n -#undef HAVE_NATIVE_mpn_addlsh1_nc -#undef HAVE_NATIVE_mpn_addlsh2_nc -#undef HAVE_NATIVE_mpn_addlsh_nc -#undef HAVE_NATIVE_mpn_addlsh1_n_ip1 -#undef HAVE_NATIVE_mpn_addlsh2_n_ip1 -#undef HAVE_NATIVE_mpn_addlsh_n_ip1 -#undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 -#undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 -#undef HAVE_NATIVE_mpn_addlsh_nc_ip1 -#undef HAVE_NATIVE_mpn_addlsh1_n_ip2 -#undef HAVE_NATIVE_mpn_addlsh2_n_ip2 -#undef HAVE_NATIVE_mpn_addlsh_n_ip2 -#undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 -#undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 -#undef HAVE_NATIVE_mpn_addlsh_nc_ip2 -#undef HAVE_NATIVE_mpn_addmul_1c -#undef HAVE_NATIVE_mpn_addmul_2 -#undef HAVE_NATIVE_mpn_addmul_3 -#undef HAVE_NATIVE_mpn_addmul_4 -#undef HAVE_NATIVE_mpn_addmul_5 -#undef HAVE_NATIVE_mpn_addmul_6 -#undef HAVE_NATIVE_mpn_addmul_7 -#undef HAVE_NATIVE_mpn_addmul_8 -#undef HAVE_NATIVE_mpn_addmul_2s -#undef HAVE_NATIVE_mpn_and_n -#undef HAVE_NATIVE_mpn_andn_n -#undef HAVE_NATIVE_mpn_bdiv_dbm1c -#undef HAVE_NATIVE_mpn_bdiv_q_1 -#undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 -#undef HAVE_NATIVE_mpn_cnd_add_n -#undef HAVE_NATIVE_mpn_cnd_sub_n -#undef HAVE_NATIVE_mpn_com -#undef HAVE_NATIVE_mpn_copyd -#undef HAVE_NATIVE_mpn_copyi -#undef HAVE_NATIVE_mpn_div_qr_1n_pi1 -#undef HAVE_NATIVE_mpn_div_qr_2 -#undef HAVE_NATIVE_mpn_divexact_1 -#undef HAVE_NATIVE_mpn_divexact_by3c -#undef HAVE_NATIVE_mpn_divrem_1 -#undef HAVE_NATIVE_mpn_divrem_1c -#undef HAVE_NATIVE_mpn_divrem_2 -#undef HAVE_NATIVE_mpn_gcd_1 -#undef HAVE_NATIVE_mpn_hamdist -#undef HAVE_NATIVE_mpn_invert_limb -#undef HAVE_NATIVE_mpn_ior_n -#undef HAVE_NATIVE_mpn_iorn_n -#undef HAVE_NATIVE_mpn_lshift -#undef HAVE_NATIVE_mpn_lshiftc -#undef HAVE_NATIVE_mpn_lshsub_n -#undef HAVE_NATIVE_mpn_mod_1 -#undef HAVE_NATIVE_mpn_mod_1_1p -#undef HAVE_NATIVE_mpn_mod_1c -#undef HAVE_NATIVE_mpn_mod_1s_2p -#undef HAVE_NATIVE_mpn_mod_1s_4p -#undef HAVE_NATIVE_mpn_mod_34lsub1 -#undef HAVE_NATIVE_mpn_modexact_1_odd -#undef HAVE_NATIVE_mpn_modexact_1c_odd -#undef HAVE_NATIVE_mpn_mul_1 -#undef HAVE_NATIVE_mpn_mul_1c -#undef HAVE_NATIVE_mpn_mul_2 -#undef HAVE_NATIVE_mpn_mul_3 -#undef HAVE_NATIVE_mpn_mul_4 -#undef HAVE_NATIVE_mpn_mul_5 -#undef HAVE_NATIVE_mpn_mul_6 -#undef HAVE_NATIVE_mpn_mul_basecase -#undef HAVE_NATIVE_mpn_mullo_basecase -#undef HAVE_NATIVE_mpn_nand_n -#undef HAVE_NATIVE_mpn_nior_n -#undef HAVE_NATIVE_mpn_popcount -#undef HAVE_NATIVE_mpn_preinv_divrem_1 -#undef HAVE_NATIVE_mpn_preinv_mod_1 -#undef HAVE_NATIVE_mpn_redc_1 -#undef HAVE_NATIVE_mpn_redc_2 -#undef HAVE_NATIVE_mpn_rsblsh1_n -#undef HAVE_NATIVE_mpn_rsblsh2_n -#undef HAVE_NATIVE_mpn_rsblsh_n -#undef HAVE_NATIVE_mpn_rsblsh1_nc -#undef HAVE_NATIVE_mpn_rsblsh2_nc -#undef HAVE_NATIVE_mpn_rsblsh_nc -#undef HAVE_NATIVE_mpn_rsh1add_n -#undef HAVE_NATIVE_mpn_rsh1add_nc -#undef HAVE_NATIVE_mpn_rsh1sub_n -#undef HAVE_NATIVE_mpn_rsh1sub_nc -#undef HAVE_NATIVE_mpn_rshift -#undef HAVE_NATIVE_mpn_sqr_basecase -#undef HAVE_NATIVE_mpn_sqr_diagonal -#undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 -#undef HAVE_NATIVE_mpn_sub_n -#undef HAVE_NATIVE_mpn_sub_nc -#undef HAVE_NATIVE_mpn_sublsh1_n -#undef HAVE_NATIVE_mpn_sublsh2_n -#undef HAVE_NATIVE_mpn_sublsh_n -#undef HAVE_NATIVE_mpn_sublsh1_nc -#undef HAVE_NATIVE_mpn_sublsh2_nc -#undef HAVE_NATIVE_mpn_sublsh_nc -#undef HAVE_NATIVE_mpn_sublsh1_n_ip1 -#undef HAVE_NATIVE_mpn_sublsh2_n_ip1 -#undef HAVE_NATIVE_mpn_sublsh_n_ip1 -#undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 -#undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 -#undef HAVE_NATIVE_mpn_sublsh_nc_ip1 -#undef HAVE_NATIVE_mpn_submul_1c -#undef HAVE_NATIVE_mpn_tabselect -#undef HAVE_NATIVE_mpn_udiv_qrnnd -#undef HAVE_NATIVE_mpn_udiv_qrnnd_r -#undef HAVE_NATIVE_mpn_umul_ppmm -#undef HAVE_NATIVE_mpn_umul_ppmm_r -#undef HAVE_NATIVE_mpn_xor_n -#undef HAVE_NATIVE_mpn_xnor_n]) -m4trace:configure.ac:3530: -1- AC_SUBST([M4]) -m4trace:configure.ac:3530: -1- AC_SUBST_TRACE([M4]) -m4trace:configure.ac:3530: -1- m4_pattern_allow([^M4$]) -m4trace:configure.ac:3530: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:308: GMP_PROG_M4 is expanded from... -configure.ac:3530: the top level]) -m4trace:configure.ac:3530: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:308: GMP_PROG_M4 is expanded from... -configure.ac:3530: the top level]) -m4trace:configure.ac:3530: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:308: GMP_PROG_M4 is expanded from... -configure.ac:3530: the top level]) -m4trace:configure.ac:3530: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:308: GMP_PROG_M4 is expanded from... -configure.ac:3530: the top level]) -m4trace:configure.ac:3530: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:308: GMP_PROG_M4 is expanded from... -configure.ac:3530: the top level]) -m4trace:configure.ac:3530: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:308: GMP_PROG_M4 is expanded from... -configure.ac:3530: the top level]) -m4trace:configure.ac:3530: -1- AC_SUBST([M4]) -m4trace:configure.ac:3530: -1- AC_SUBST_TRACE([M4]) -m4trace:configure.ac:3530: -1- m4_pattern_allow([^M4$]) -m4trace:configure.ac:3531: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:378: GMP_M4_M4WRAP_SPURIOUS is expanded from... -configure.ac:3531: the top level]) -m4trace:configure.ac:3531: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:378: GMP_M4_M4WRAP_SPURIOUS is expanded from... -configure.ac:3531: the top level]) -m4trace:configure.ac:3531: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:378: GMP_M4_M4WRAP_SPURIOUS is expanded from... -configure.ac:3531: the top level]) -m4trace:configure.ac:3545: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1913: GMP_ASM_TEXT is expanded from... -configure.ac:3545: the top level]) -m4trace:configure.ac:3545: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1913: GMP_ASM_TEXT is expanded from... -configure.ac:3545: the top level]) -m4trace:configure.ac:3545: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1913: GMP_ASM_TEXT is expanded from... -configure.ac:3545: the top level]) -m4trace:configure.ac:3545: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1913: GMP_ASM_TEXT is expanded from... -configure.ac:3545: the top level]) -m4trace:configure.ac:3545: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1913: GMP_ASM_TEXT is expanded from... -configure.ac:3545: the top level]) -m4trace:configure.ac:3547: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1705: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.ac:3547: the top level]) -m4trace:configure.ac:3547: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1705: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.ac:3547: the top level]) -m4trace:configure.ac:3547: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1705: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.ac:3547: the top level]) -m4trace:configure.ac:3547: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1705: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.ac:3547: the top level]) -m4trace:configure.ac:3547: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1705: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.ac:3547: the top level]) -m4trace:configure.ac:3547: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1705: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.ac:3547: the top level]) -m4trace:configure.ac:3550: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1746: GMP_ASM_UNDERSCORE is expanded from... -configure.ac:3550: the top level]) -m4trace:configure.ac:3550: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1746: GMP_ASM_UNDERSCORE is expanded from... -configure.ac:3550: the top level]) -m4trace:configure.ac:3550: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1746: GMP_ASM_UNDERSCORE is expanded from... -configure.ac:3550: the top level]) -m4trace:configure.ac:3550: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1746: GMP_ASM_UNDERSCORE is expanded from... -configure.ac:3550: the top level]) -m4trace:configure.ac:3550: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1746: GMP_ASM_UNDERSCORE is expanded from... -configure.ac:3550: the top level]) -m4trace:configure.ac:3551: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1963: GMP_ASM_RODATA is expanded from... -configure.ac:3551: the top level]) -m4trace:configure.ac:3551: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1963: GMP_ASM_RODATA is expanded from... -configure.ac:3551: the top level]) -m4trace:configure.ac:3551: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1963: GMP_ASM_RODATA is expanded from... -configure.ac:3551: the top level]) -m4trace:configure.ac:3551: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1963: GMP_ASM_RODATA is expanded from... -configure.ac:3551: the top level]) -m4trace:configure.ac:3551: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1963: GMP_ASM_RODATA is expanded from... -configure.ac:3551: the top level]) -m4trace:configure.ac:3551: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1963: GMP_ASM_RODATA is expanded from... -configure.ac:3551: the top level]) -m4trace:configure.ac:3551: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1963: GMP_ASM_RODATA is expanded from... -configure.ac:3551: the top level]) -m4trace:configure.ac:3551: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1963: GMP_ASM_RODATA is expanded from... -configure.ac:3551: the top level]) -m4trace:configure.ac:3552: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2084: GMP_ASM_TYPE is expanded from... -configure.ac:3552: the top level]) -m4trace:configure.ac:3552: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2084: GMP_ASM_TYPE is expanded from... -configure.ac:3552: the top level]) -m4trace:configure.ac:3552: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2084: GMP_ASM_TYPE is expanded from... -configure.ac:3552: the top level]) -m4trace:configure.ac:3552: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2084: GMP_ASM_TYPE is expanded from... -configure.ac:3552: the top level]) -m4trace:configure.ac:3553: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2106: GMP_ASM_SIZE is expanded from... -configure.ac:3553: the top level]) -m4trace:configure.ac:3553: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2106: GMP_ASM_SIZE is expanded from... -configure.ac:3553: the top level]) -m4trace:configure.ac:3553: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2106: GMP_ASM_SIZE is expanded from... -configure.ac:3553: the top level]) -m4trace:configure.ac:3553: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2106: GMP_ASM_SIZE is expanded from... -configure.ac:3553: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2219: GMP_ASM_LSYM_PREFIX is expanded from... -configure.ac:3554: the top level]) -m4trace:configure.ac:3554: -1- AC_DEFINE_TRACE_LITERAL([LSYM_PREFIX]) -m4trace:configure.ac:3554: -1- m4_pattern_allow([^LSYM_PREFIX$]) -m4trace:configure.ac:3554: -1- AH_OUTPUT([LSYM_PREFIX], [/* Assembler local label prefix */ -@%:@undef LSYM_PREFIX]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1884: GMP_ASM_BYTE is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1884: GMP_ASM_BYTE is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1884: GMP_ASM_BYTE is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1884: GMP_ASM_BYTE is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1884: GMP_ASM_BYTE is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1884: GMP_ASM_BYTE is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3555: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2278: GMP_ASM_W32 is expanded from... -configure.ac:3555: the top level]) -m4trace:configure.ac:3556: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1796: GMP_ASM_ALIGN_LOG is expanded from... -configure.ac:3556: the top level]) -m4trace:configure.ac:3556: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1796: GMP_ASM_ALIGN_LOG is expanded from... -configure.ac:3556: the top level]) -m4trace:configure.ac:3556: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1796: GMP_ASM_ALIGN_LOG is expanded from... -configure.ac:3556: the top level]) -m4trace:configure.ac:3556: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1796: GMP_ASM_ALIGN_LOG is expanded from... -configure.ac:3556: the top level]) -m4trace:configure.ac:3564: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2826: GMP_ASM_IA64_ALIGN_OK is expanded from... -configure.ac:3564: the top level]) -m4trace:configure.ac:3564: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2826: GMP_ASM_IA64_ALIGN_OK is expanded from... -configure.ac:3564: the top level]) -m4trace:configure.ac:3564: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2826: GMP_ASM_IA64_ALIGN_OK is expanded from... -configure.ac:3564: the top level]) -m4trace:configure.ac:3564: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2826: GMP_ASM_IA64_ALIGN_OK is expanded from... -configure.ac:3564: the top level]) -m4trace:configure.ac:3567: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2940: GMP_ASM_M68K_INSTRUCTION is expanded from... -configure.ac:3567: the top level]) -m4trace:configure.ac:3567: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2940: GMP_ASM_M68K_INSTRUCTION is expanded from... -configure.ac:3567: the top level]) -m4trace:configure.ac:3567: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2940: GMP_ASM_M68K_INSTRUCTION is expanded from... -configure.ac:3567: the top level]) -m4trace:configure.ac:3567: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2940: GMP_ASM_M68K_INSTRUCTION is expanded from... -configure.ac:3567: the top level]) -m4trace:configure.ac:3568: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2971: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.ac:3568: the top level]) -m4trace:configure.ac:3568: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2971: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.ac:3568: the top level]) -m4trace:configure.ac:3568: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2971: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.ac:3568: the top level]) -m4trace:configure.ac:3568: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2971: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.ac:3568: the top level]) -m4trace:configure.ac:3568: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2971: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.ac:3568: the top level]) -m4trace:configure.ac:3568: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2971: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.ac:3568: the top level]) -m4trace:configure.ac:3568: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2971: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.ac:3568: the top level]) -m4trace:configure.ac:3568: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2971: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.ac:3568: the top level]) -m4trace:configure.ac:3569: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3008: GMP_ASM_M68K_BRANCHES is expanded from... -configure.ac:3569: the top level]) -m4trace:configure.ac:3569: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3008: GMP_ASM_M68K_BRANCHES is expanded from... -configure.ac:3569: the top level]) -m4trace:configure.ac:3569: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3008: GMP_ASM_M68K_BRANCHES is expanded from... -configure.ac:3569: the top level]) -m4trace:configure.ac:3569: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3008: GMP_ASM_M68K_BRANCHES is expanded from... -configure.ac:3569: the top level]) -m4trace:configure.ac:3572: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3047: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.ac:3572: the top level]) -m4trace:configure.ac:3572: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3047: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.ac:3572: the top level]) -m4trace:configure.ac:3572: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3047: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.ac:3572: the top level]) -m4trace:configure.ac:3572: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3047: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.ac:3572: the top level]) -m4trace:configure.ac:3572: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3047: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.ac:3572: the top level]) -m4trace:configure.ac:3572: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3047: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.ac:3572: the top level]) -m4trace:configure.ac:3572: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3047: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.ac:3572: the top level]) -m4trace:configure.ac:3573: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3084: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.ac:3573: the top level]) -m4trace:configure.ac:3573: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3084: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.ac:3573: the top level]) -m4trace:configure.ac:3573: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3084: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.ac:3573: the top level]) -m4trace:configure.ac:3573: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3084: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.ac:3573: the top level]) -m4trace:configure.ac:3573: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3084: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.ac:3573: the top level]) -m4trace:configure.ac:3573: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3084: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.ac:3573: the top level]) -m4trace:configure.ac:3573: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3084: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.ac:3573: the top level]) -m4trace:configure.ac:3573: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3084: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.ac:3573: the top level]) -m4trace:configure.ac:3614: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3109: GMP_ASM_SPARC_REGISTER is expanded from... -configure.ac:3614: the top level]) -m4trace:configure.ac:3614: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3109: GMP_ASM_SPARC_REGISTER is expanded from... -configure.ac:3614: the top level]) -m4trace:configure.ac:3614: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3109: GMP_ASM_SPARC_REGISTER is expanded from... -configure.ac:3614: the top level]) -m4trace:configure.ac:3614: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3109: GMP_ASM_SPARC_REGISTER is expanded from... -configure.ac:3614: the top level]) -m4trace:configure.ac:3617: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3130: GMP_ASM_SPARC_GOTDATA is expanded from... -configure.ac:3617: the top level]) -m4trace:configure.ac:3617: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3130: GMP_ASM_SPARC_GOTDATA is expanded from... -configure.ac:3617: the top level]) -m4trace:configure.ac:3617: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3130: GMP_ASM_SPARC_GOTDATA is expanded from... -configure.ac:3617: the top level]) -m4trace:configure.ac:3617: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3130: GMP_ASM_SPARC_GOTDATA is expanded from... -configure.ac:3617: the top level]) -m4trace:configure.ac:3618: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3154: GMP_ASM_SPARC_SHARED_THUNKS is expanded from... -configure.ac:3618: the top level]) -m4trace:configure.ac:3618: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3154: GMP_ASM_SPARC_SHARED_THUNKS is expanded from... -configure.ac:3618: the top level]) -m4trace:configure.ac:3618: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3154: GMP_ASM_SPARC_SHARED_THUNKS is expanded from... -configure.ac:3618: the top level]) -m4trace:configure.ac:3618: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:3154: GMP_ASM_SPARC_SHARED_THUNKS is expanded from... -configure.ac:3618: the top level]) -m4trace:configure.ac:3621: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1855: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.ac:3621: the top level]) -m4trace:configure.ac:3621: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1855: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.ac:3621: the top level]) -m4trace:configure.ac:3621: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1855: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.ac:3621: the top level]) -m4trace:configure.ac:3621: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1855: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.ac:3621: the top level]) -m4trace:configure.ac:3621: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:1855: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.ac:3621: the top level]) -m4trace:configure.ac:3625: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_x86]) -m4trace:configure.ac:3625: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_x86$]) -m4trace:configure.ac:3626: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2162: GMP_ASM_COFF_TYPE is expanded from... -configure.ac:3626: the top level]) -m4trace:configure.ac:3626: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2162: GMP_ASM_COFF_TYPE is expanded from... -configure.ac:3626: the top level]) -m4trace:configure.ac:3626: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2162: GMP_ASM_COFF_TYPE is expanded from... -configure.ac:3626: the top level]) -m4trace:configure.ac:3626: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2162: GMP_ASM_COFF_TYPE is expanded from... -configure.ac:3626: the top level]) -m4trace:configure.ac:3627: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2362: GMP_ASM_X86_GOT_UNDERSCORE is expanded from... -configure.ac:3627: the top level]) -m4trace:configure.ac:3627: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2362: GMP_ASM_X86_GOT_UNDERSCORE is expanded from... -configure.ac:3627: the top level]) -m4trace:configure.ac:3628: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2586: GMP_ASM_X86_SHLDL_CL is expanded from... -configure.ac:3628: the top level]) -m4trace:configure.ac:3628: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2586: GMP_ASM_X86_SHLDL_CL is expanded from... -configure.ac:3628: the top level]) -m4trace:configure.ac:3628: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2586: GMP_ASM_X86_SHLDL_CL is expanded from... -configure.ac:3628: the top level]) -m4trace:configure.ac:3628: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:1647: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... -../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... -acinclude.m4:2586: GMP_ASM_X86_SHLDL_CL is expanded from... -configure.ac:3628: the top level]) -m4trace:configure.ac:3630: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:2753: GMP_ASM_X86_MCOUNT is expanded from... -configure.ac:3630: the top level]) -m4trace:configure.ac:3630: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:383: AC_FD_CC is expanded from... -acinclude.m4:2753: GMP_ASM_X86_MCOUNT is expanded from... -configure.ac:3630: the top level]) -m4trace:configure.ac:3639: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_x86_64]) -m4trace:configure.ac:3639: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_x86_64$]) -m4trace:configure.ac:3666: -1- AC_CONFIG_LINKS([gmp-mparam.h:mpn/$gmp_mparam_dir/gmp-mparam.h]) -m4trace:configure.ac:3684: -1- AC_DEFINE_TRACE_LITERAL([GMP_MPARAM_H_SUGGEST]) -m4trace:configure.ac:3684: -1- m4_pattern_allow([^GMP_MPARAM_H_SUGGEST$]) -m4trace:configure.ac:3684: -1- AH_OUTPUT([GMP_MPARAM_H_SUGGEST], [/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -@%:@undef GMP_MPARAM_H_SUGGEST]) -m4trace:configure.ac:3709: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_VOID_P]) -m4trace:configure.ac:3709: -1- m4_pattern_allow([^SIZEOF_VOID_P$]) -m4trace:configure.ac:3709: -1- AH_OUTPUT([SIZEOF_VOID_P], [/* The size of `void *\', as computed by sizeof. */ -@%:@undef SIZEOF_VOID_P]) -m4trace:configure.ac:3710: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_UNSIGNED_SHORT]) -m4trace:configure.ac:3710: -1- m4_pattern_allow([^SIZEOF_UNSIGNED_SHORT$]) -m4trace:configure.ac:3710: -1- AH_OUTPUT([SIZEOF_UNSIGNED_SHORT], [/* The size of `unsigned short\', as computed by sizeof. */ -@%:@undef SIZEOF_UNSIGNED_SHORT]) -m4trace:configure.ac:3711: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_UNSIGNED]) -m4trace:configure.ac:3711: -1- m4_pattern_allow([^SIZEOF_UNSIGNED$]) -m4trace:configure.ac:3711: -1- AH_OUTPUT([SIZEOF_UNSIGNED], [/* The size of `unsigned\', as computed by sizeof. */ -@%:@undef SIZEOF_UNSIGNED]) -m4trace:configure.ac:3712: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_UNSIGNED_LONG]) -m4trace:configure.ac:3712: -1- m4_pattern_allow([^SIZEOF_UNSIGNED_LONG$]) -m4trace:configure.ac:3712: -1- AH_OUTPUT([SIZEOF_UNSIGNED_LONG], [/* The size of `unsigned long\', as computed by sizeof. */ -@%:@undef SIZEOF_UNSIGNED_LONG]) -m4trace:configure.ac:3713: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_MP_LIMB_T]) -m4trace:configure.ac:3713: -1- m4_pattern_allow([^SIZEOF_MP_LIMB_T$]) -m4trace:configure.ac:3713: -1- AH_OUTPUT([SIZEOF_MP_LIMB_T], [/* The size of `mp_limb_t\', as computed by sizeof. */ -@%:@undef SIZEOF_MP_LIMB_T]) -m4trace:configure.ac:3717: -1- AC_SUBST([GMP_LIMB_BITS], [`expr 8 \* $ac_cv_sizeof_mp_limb_t`]) -m4trace:configure.ac:3717: -1- AC_SUBST_TRACE([GMP_LIMB_BITS]) -m4trace:configure.ac:3717: -1- m4_pattern_allow([^GMP_LIMB_BITS$]) -m4trace:configure.ac:3745: -1- AC_SUBST([mpn_objects]) -m4trace:configure.ac:3745: -1- AC_SUBST_TRACE([mpn_objects]) -m4trace:configure.ac:3745: -1- m4_pattern_allow([^mpn_objects$]) -m4trace:configure.ac:3746: -1- AC_SUBST([mpn_objs_in_libgmp]) -m4trace:configure.ac:3746: -1- AC_SUBST_TRACE([mpn_objs_in_libgmp]) -m4trace:configure.ac:3746: -1- m4_pattern_allow([^mpn_objs_in_libgmp$]) -m4trace:configure.ac:3747: -1- AC_SUBST([gmp_srclinks]) -m4trace:configure.ac:3747: -1- AC_SUBST_TRACE([gmp_srclinks]) -m4trace:configure.ac:3747: -1- m4_pattern_allow([^gmp_srclinks$]) -m4trace:configure.ac:3758: -1- AC_DEFINE_TRACE_LITERAL([TUNE_SQR_TOOM2_MAX]) -m4trace:configure.ac:3758: -1- m4_pattern_allow([^TUNE_SQR_TOOM2_MAX$]) -m4trace:configure.ac:3758: -1- AH_OUTPUT([TUNE_SQR_TOOM2_MAX], [/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -@%:@undef TUNE_SQR_TOOM2_MAX]) -m4trace:configure.ac:3768: -1- AC_DEFINE_TRACE_LITERAL([TUNE_SQR_TOOM2_MAX]) -m4trace:configure.ac:3768: -1- m4_pattern_allow([^TUNE_SQR_TOOM2_MAX$]) -m4trace:configure.ac:3776: -1- AC_SUBST([TUNE_SQR_OBJ]) -m4trace:configure.ac:3776: -1- AC_SUBST_TRACE([TUNE_SQR_OBJ]) -m4trace:configure.ac:3776: -1- m4_pattern_allow([^TUNE_SQR_OBJ$]) -m4trace:configure.ac:3781: -1- AC_CONFIG_FILES([demos/pexpr-config.h:demos/pexpr-config-h.in]) -m4trace:configure.ac:3782: -1- AC_SUBST([HAVE_CLOCK_01], [1]) -m4trace:configure.ac:3782: -1- AC_SUBST_TRACE([HAVE_CLOCK_01]) -m4trace:configure.ac:3782: -1- m4_pattern_allow([^HAVE_CLOCK_01$]) -m4trace:configure.ac:3782: -1- AC_SUBST([HAVE_CPUTIME_01], [1]) -m4trace:configure.ac:3782: -1- AC_SUBST_TRACE([HAVE_CPUTIME_01]) -m4trace:configure.ac:3782: -1- m4_pattern_allow([^HAVE_CPUTIME_01$]) -m4trace:configure.ac:3782: -1- AC_SUBST([HAVE_GETRUSAGE_01], [1]) -m4trace:configure.ac:3782: -1- AC_SUBST_TRACE([HAVE_GETRUSAGE_01]) -m4trace:configure.ac:3782: -1- m4_pattern_allow([^HAVE_GETRUSAGE_01$]) -m4trace:configure.ac:3782: -1- AC_SUBST([HAVE_GETTIMEOFDAY_01], [1]) -m4trace:configure.ac:3782: -1- AC_SUBST_TRACE([HAVE_GETTIMEOFDAY_01]) -m4trace:configure.ac:3782: -1- m4_pattern_allow([^HAVE_GETTIMEOFDAY_01$]) -m4trace:configure.ac:3782: -1- AC_SUBST([HAVE_SIGACTION_01], [1]) -m4trace:configure.ac:3782: -1- AC_SUBST_TRACE([HAVE_SIGACTION_01]) -m4trace:configure.ac:3782: -1- m4_pattern_allow([^HAVE_SIGACTION_01$]) -m4trace:configure.ac:3782: -1- AC_SUBST([HAVE_SIGALTSTACK_01], [1]) -m4trace:configure.ac:3782: -1- AC_SUBST_TRACE([HAVE_SIGALTSTACK_01]) -m4trace:configure.ac:3782: -1- m4_pattern_allow([^HAVE_SIGALTSTACK_01$]) -m4trace:configure.ac:3782: -1- AC_SUBST([HAVE_SIGSTACK_01], [1]) -m4trace:configure.ac:3782: -1- AC_SUBST_TRACE([HAVE_SIGSTACK_01]) -m4trace:configure.ac:3782: -1- m4_pattern_allow([^HAVE_SIGSTACK_01$]) -m4trace:configure.ac:3783: -1- AC_SUBST([HAVE_SYS_RESOURCE_H_01], [1]) -m4trace:configure.ac:3783: -1- AC_SUBST_TRACE([HAVE_SYS_RESOURCE_H_01]) -m4trace:configure.ac:3783: -1- m4_pattern_allow([^HAVE_SYS_RESOURCE_H_01$]) -m4trace:configure.ac:3784: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STACK_T]) -m4trace:configure.ac:3784: -1- m4_pattern_allow([^HAVE_STACK_T$]) -m4trace:configure.ac:3784: -1- AH_OUTPUT([HAVE_STACK_T], [/* Define to 1 if the system has the type `stack_t\'. */ -@%:@undef HAVE_STACK_T]) -m4trace:configure.ac:3786: -1- AC_SUBST([HAVE_STACK_T_01]) -m4trace:configure.ac:3786: -1- AC_SUBST_TRACE([HAVE_STACK_T_01]) -m4trace:configure.ac:3786: -1- m4_pattern_allow([^HAVE_STACK_T_01$]) -m4trace:configure.ac:3807: -1- AC_CONFIG_FILES([demos/calc/calc-config.h:demos/calc/calc-config-h.in]) -m4trace:configure.ac:3813: -1- AC_SUBST([LIBCURSES]) -m4trace:configure.ac:3813: -1- AC_SUBST_TRACE([LIBCURSES]) -m4trace:configure.ac:3813: -1- m4_pattern_allow([^LIBCURSES$]) -m4trace:configure.ac:3825: -1- AC_SUBST([WITH_READLINE_01], [1]) -m4trace:configure.ac:3825: -1- AC_SUBST_TRACE([WITH_READLINE_01]) -m4trace:configure.ac:3825: -1- m4_pattern_allow([^WITH_READLINE_01$]) -m4trace:configure.ac:3826: -1- AC_SUBST([LIBREADLINE], [-lreadline]) -m4trace:configure.ac:3826: -1- AC_SUBST_TRACE([LIBREADLINE]) -m4trace:configure.ac:3826: -1- m4_pattern_allow([^LIBREADLINE$]) -m4trace:configure.ac:3830: -1- AC_SUBST([YACC]) -m4trace:configure.ac:3830: -1- AC_SUBST_TRACE([YACC]) -m4trace:configure.ac:3830: -1- m4_pattern_allow([^YACC$]) -m4trace:configure.ac:3830: -1- AC_SUBST([YACC]) -m4trace:configure.ac:3830: -1- AC_SUBST_TRACE([YACC]) -m4trace:configure.ac:3830: -1- m4_pattern_allow([^YACC$]) -m4trace:configure.ac:3830: -1- AC_SUBST([YFLAGS]) -m4trace:configure.ac:3830: -1- AC_SUBST_TRACE([YFLAGS]) -m4trace:configure.ac:3830: -1- m4_pattern_allow([^YFLAGS$]) -m4trace:configure.ac:3831: -1- AC_SUBST([LEX]) -m4trace:configure.ac:3831: -1- AC_SUBST_TRACE([LEX]) -m4trace:configure.ac:3831: -1- m4_pattern_allow([^LEX$]) -m4trace:configure.ac:3831: -1- AC_SUBST([LEX_OUTPUT_ROOT], [$ac_cv_prog_lex_root]) -m4trace:configure.ac:3831: -1- AC_SUBST_TRACE([LEX_OUTPUT_ROOT]) -m4trace:configure.ac:3831: -1- m4_pattern_allow([^LEX_OUTPUT_ROOT$]) -m4trace:configure.ac:3831: -1- AC_SUBST([LEXLIB]) -m4trace:configure.ac:3831: -1- AC_SUBST_TRACE([LEXLIB]) -m4trace:configure.ac:3831: -1- m4_pattern_allow([^LEXLIB$]) -m4trace:configure.ac:3831: -1- AC_DEFINE_TRACE_LITERAL([YYTEXT_POINTER]) -m4trace:configure.ac:3831: -1- m4_pattern_allow([^YYTEXT_POINTER$]) -m4trace:configure.ac:3831: -1- AH_OUTPUT([YYTEXT_POINTER], [/* Define to 1 if `lex\' declares `yytext\' as a `char *\' by default, not a - `char@<:@@:>@\'. */ -@%:@undef YYTEXT_POINTER]) -m4trace:configure.ac:3840: -1- AC_SUBST([RANLIB]) -m4trace:configure.ac:3840: -1- AC_SUBST_TRACE([RANLIB]) -m4trace:configure.ac:3840: -1- m4_pattern_allow([^RANLIB$]) -m4trace:configure.ac:3850: -1- AC_CONFIG_FILES([Makefile \ - mpf/Makefile mpn/Makefile mpq/Makefile \ - mpz/Makefile printf/Makefile scanf/Makefile rand/Makefile cxx/Makefile \ - tests/Makefile tests/devel/Makefile \ - tests/mpf/Makefile tests/mpn/Makefile tests/mpq/Makefile \ - tests/mpz/Makefile tests/rand/Makefile tests/misc/Makefile \ - tests/cxx/Makefile \ - doc/Makefile tune/Makefile \ - demos/Makefile demos/calc/Makefile demos/expr/Makefile \ - gmp.h:gmp-h.in]) -m4trace:configure.ac:3850: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. -You should run autoupdate.], []) -m4trace:configure.ac:3850: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) -m4trace:configure.ac:3850: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) -m4trace:configure.ac:3850: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:3850: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) -m4trace:configure.ac:3850: -1- AC_SUBST_TRACE([LTLIBOBJS]) -m4trace:configure.ac:3850: -1- m4_pattern_allow([^LTLIBOBJS$]) -m4trace:configure.ac:3850: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) -m4trace:configure.ac:3850: -1- AC_SUBST([am__EXEEXT_TRUE]) -m4trace:configure.ac:3850: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE]) -m4trace:configure.ac:3850: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) -m4trace:configure.ac:3850: -1- AC_SUBST([am__EXEEXT_FALSE]) -m4trace:configure.ac:3850: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE]) -m4trace:configure.ac:3850: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) -m4trace:configure.ac:3850: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) -m4trace:configure.ac:3850: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) -m4trace:configure.ac:3850: -1- AC_SUBST_TRACE([top_builddir]) -m4trace:configure.ac:3850: -1- AC_SUBST_TRACE([top_build_prefix]) -m4trace:configure.ac:3850: -1- AC_SUBST_TRACE([srcdir]) -m4trace:configure.ac:3850: -1- AC_SUBST_TRACE([abs_srcdir]) -m4trace:configure.ac:3850: -1- AC_SUBST_TRACE([top_srcdir]) -m4trace:configure.ac:3850: -1- AC_SUBST_TRACE([abs_top_srcdir]) -m4trace:configure.ac:3850: -1- AC_SUBST_TRACE([builddir]) -m4trace:configure.ac:3850: -1- AC_SUBST_TRACE([abs_builddir]) -m4trace:configure.ac:3850: -1- AC_SUBST_TRACE([abs_top_builddir]) -m4trace:configure.ac:3850: -1- AC_SUBST_TRACE([INSTALL]) -m4trace:configure.ac:3850: -1- AC_SUBST_TRACE([MKDIR_P]) -m4trace:configure.ac:3850: -1- AC_REQUIRE_AUX_FILE([ltmain.sh]) diff --git a/src/plugins/e-acsl/contrib/libgmp/configure b/src/plugins/e-acsl/contrib/libgmp/configure index 18a8bfa4094..1ece306f39f 100755 --- a/src/plugins/e-acsl/contrib/libgmp/configure +++ b/src/plugins/e-acsl/contrib/libgmp/configure @@ -669,23 +669,6 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS -LEXLIB -LEX_OUTPUT_ROOT -LEX -YFLAGS -YACC -LIBREADLINE -WITH_READLINE_01 -LIBCURSES -HAVE_STACK_T_01 -HAVE_SYS_RESOURCE_H_01 -HAVE_SIGSTACK_01 -HAVE_SIGALTSTACK_01 -HAVE_SIGACTION_01 -HAVE_GETTIMEOFDAY_01 -HAVE_GETRUSAGE_01 -HAVE_CPUTIME_01 -HAVE_CLOCK_01 TUNE_SQR_OBJ gmp_srclinks mpn_objs_in_libgmp @@ -871,9 +854,7 @@ CXXFLAGS CCC CXXCPP LT_SYS_LIBRARY_PATH -M4 -YACC -YFLAGS' +M4' # Initialize some variables set by options. @@ -1549,12 +1530,6 @@ Some influential environment variables: LT_SYS_LIBRARY_PATH User-defined run-time library search path. M4 m4 macro processor - YACC The `Yet Another Compiler Compiler' implementation to use. - Defaults to the first program found out of: `bison -y', `byacc', - `yacc'. - YFLAGS The list of arguments that will be passed by default to $YACC. - This script will default YFLAGS to the empty string to avoid a - default value of `-d' given by some make applications. Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -25711,7 +25686,6 @@ fi - # Don't demand an m4 unless it's actually needed. if test $found_asm = yes; then @@ -27561,555 +27535,6 @@ EOF esac - -# Configs for demos/pexpr.c. -# -ac_config_files="$ac_config_files demos/pexpr-config.h:demos/pexpr-config-h.in" - -case $ac_cv_func_clock in -yes) HAVE_CLOCK_01=1 - ;; -no) HAVE_CLOCK_01=0 ;; -esac - -case $ac_cv_func_cputime in -yes) HAVE_CPUTIME_01=1 - ;; -no) HAVE_CPUTIME_01=0 ;; -esac - -case $ac_cv_func_getrusage in -yes) HAVE_GETRUSAGE_01=1 - ;; -no) HAVE_GETRUSAGE_01=0 ;; -esac - -case $ac_cv_func_gettimeofday in -yes) HAVE_GETTIMEOFDAY_01=1 - ;; -no) HAVE_GETTIMEOFDAY_01=0 ;; -esac - -case $ac_cv_func_sigaction in -yes) HAVE_SIGACTION_01=1 - ;; -no) HAVE_SIGACTION_01=0 ;; -esac - -case $ac_cv_func_sigaltstack in -yes) HAVE_SIGALTSTACK_01=1 - ;; -no) HAVE_SIGALTSTACK_01=0 ;; -esac - -case $ac_cv_func_sigstack in -yes) HAVE_SIGSTACK_01=1 - ;; -no) HAVE_SIGSTACK_01=0 ;; -esac - - -case $ac_cv_header_sys_resource_h in -yes) HAVE_SYS_RESOURCE_H_01=1 - ;; -no) HAVE_SYS_RESOURCE_H_01=0 ;; -esac - - -ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include <signal.h> -" -if test "x$ac_cv_type_stack_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STACK_T 1 -_ACEOF - -HAVE_STACK_T_01=1 -else - HAVE_STACK_T_01=0 -fi - - - -# Configs for demos/calc directory -# -# AC_SUBST+AC_CONFIG_FILES is used for calc-config.h, rather than AC_DEFINE+ -# AC_CONFIG_HEADERS, since with the latter automake (1.8) will then put the -# directory (ie. demos/calc) into $(DEFAULT_INCLUDES) for every Makefile.in, -# which would look very strange. -# -# -lcurses is required by libreadline. On a typical SVR4 style system this -# normally doesn't have to be given explicitly, since libreadline.so will -# have a NEEDED record for it. But if someone for some reason is using only -# a static libreadline.a then we must give -lcurses. Readline (as of -# version 4.3) doesn't use libtool, so we can't rely on a .la to cover -# necessary dependencies. -# -# On a couple of systems we've seen libreadline available, but the headers -# not in the default include path, so check for readline/readline.h. We've -# also seen readline/history.h missing, not sure if that's just a broken -# install or a very old version, but check that too. -# -ac_config_files="$ac_config_files demos/calc/calc-config.h:demos/calc/calc-config-h.in" - -LIBCURSES= -if test $with_readline != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lncurses" >&5 -$as_echo_n "checking for tputs in -lncurses... " >&6; } -if ${ac_cv_lib_ncurses_tputs+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lncurses $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tputs (); -int -main () -{ -return tputs (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ncurses_tputs=yes -else - ac_cv_lib_ncurses_tputs=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tputs" >&5 -$as_echo "$ac_cv_lib_ncurses_tputs" >&6; } -if test "x$ac_cv_lib_ncurses_tputs" = xyes; then : - LIBCURSES=-lncurses -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lcurses" >&5 -$as_echo_n "checking for tputs in -lcurses... " >&6; } -if ${ac_cv_lib_curses_tputs+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcurses $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tputs (); -int -main () -{ -return tputs (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_curses_tputs=yes -else - ac_cv_lib_curses_tputs=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tputs" >&5 -$as_echo "$ac_cv_lib_curses_tputs" >&6; } -if test "x$ac_cv_lib_curses_tputs" = xyes; then : - LIBCURSES=-lcurses -fi - -fi - -fi - -use_readline=$with_readline -if test $with_readline = detect; then - use_readline=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 -$as_echo_n "checking for readline in -lreadline... " >&6; } -if ${ac_cv_lib_readline_readline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lreadline $LIBCURSES $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char readline (); -int -main () -{ -return readline (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_readline_readline=yes -else - ac_cv_lib_readline_readline=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 -$as_echo "$ac_cv_lib_readline_readline" >&6; } -if test "x$ac_cv_lib_readline_readline" = xyes; then : - ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_readline_h" = xyes; then : - ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_history_h" = xyes; then : - use_readline=yes -fi - - -fi - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking readline detected" >&5 -$as_echo_n "checking readline detected... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_readline" >&5 -$as_echo "$use_readline" >&6; } -fi -if test $use_readline = yes; then - WITH_READLINE_01=1 - - LIBREADLINE=-lreadline - -else - WITH_READLINE_01=0 -fi -for ac_prog in 'bison -y' byacc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_YACC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_YACC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -YACC=$ac_cv_prog_YACC -if test -n "$YACC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 -$as_echo "$YACC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$YACC" && break -done -test -n "$YACC" || YACC="yacc" - -for ac_prog in flex lex -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LEX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LEX"; then - ac_cv_prog_LEX="$LEX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LEX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LEX=$ac_cv_prog_LEX -if test -n "$LEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 -$as_echo "$LEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$LEX" && break -done -test -n "$LEX" || LEX=":" - -if test "x$LEX" != "x:"; then - cat >conftest.l <<_ACEOF -%% -a { ECHO; } -b { REJECT; } -c { yymore (); } -d { yyless (1); } -e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ - yyless ((input () != 0)); } -f { unput (yytext[0]); } -. { BEGIN INITIAL; } -%% -#ifdef YYTEXT_POINTER -extern char *yytext; -#endif -int -main (void) -{ - return ! yylex () + ! yywrap (); -} -_ACEOF -{ { ac_try="$LEX conftest.l" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$LEX conftest.l") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 -$as_echo_n "checking lex output file root... " >&6; } -if ${ac_cv_prog_lex_root+:} false; then : - $as_echo_n "(cached) " >&6 -else - -if test -f lex.yy.c; then - ac_cv_prog_lex_root=lex.yy -elif test -f lexyy.c; then - ac_cv_prog_lex_root=lexyy -else - as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 -$as_echo "$ac_cv_prog_lex_root" >&6; } -LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root - -if test -z "${LEXLIB+set}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 -$as_echo_n "checking lex library... " >&6; } -if ${ac_cv_lib_lex+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ac_save_LIBS=$LIBS - ac_cv_lib_lex='none needed' - for ac_lib in '' -lfl -ll; do - LIBS="$ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lex=$ac_lib -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - test "$ac_cv_lib_lex" != 'none needed' && break - done - LIBS=$ac_save_LIBS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 -$as_echo "$ac_cv_lib_lex" >&6; } - test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 -$as_echo_n "checking whether yytext is a pointer... " >&6; } -if ${ac_cv_prog_lex_yytext_pointer+:} false; then : - $as_echo_n "(cached) " >&6 -else - # POSIX says lex can declare yytext either as a pointer or an array; the -# default is implementation-dependent. Figure out which it is, since -# not all implementations provide the %pointer and %array declarations. -ac_cv_prog_lex_yytext_pointer=no -ac_save_LIBS=$LIBS -LIBS="$LEXLIB $ac_save_LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #define YYTEXT_POINTER 1 -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_prog_lex_yytext_pointer=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_save_LIBS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 -$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } -if test $ac_cv_prog_lex_yytext_pointer = yes; then - -$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h - -fi -rm -f conftest.l $LEX_OUTPUT_ROOT.c - -fi -if test "$LEX" = :; then - LEX=${am_missing_run}flex -fi - -# Configs for demos/expr directory -# -# Libtool already runs an AC_CHECK_TOOL for ranlib, but we give -# AC_PROG_RANLIB anyway since automake is supposed to complain if it's not -# called. (Automake 1.8.4 doesn't, at least not when the only library is in -# an EXTRA_LIBRARIES.) -# -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - - - # Create config.m4. echo "creating $gmp_configm4" @@ -28139,7 +27564,7 @@ echo "define(\`__CONFIG_M4_INCLUDED__')" >> $gmp_configm4 # FIXME: Upcoming version of autoconf/automake may not like broken lines. # Right now automake isn't accepting the new AC_CONFIG_FILES scheme. -ac_config_files="$ac_config_files Makefile mpf/Makefile mpn/Makefile mpq/Makefile mpz/Makefile printf/Makefile scanf/Makefile rand/Makefile cxx/Makefile tests/Makefile tests/devel/Makefile tests/mpf/Makefile tests/mpn/Makefile tests/mpq/Makefile tests/mpz/Makefile tests/rand/Makefile tests/misc/Makefile tests/cxx/Makefile doc/Makefile tune/Makefile demos/Makefile demos/calc/Makefile demos/expr/Makefile gmp.h:gmp-h.in" +ac_config_files="$ac_config_files Makefile mpf/Makefile mpn/Makefile mpq/Makefile mpz/Makefile printf/Makefile scanf/Makefile rand/Makefile cxx/Makefile doc/Makefile tune/Makefile gmp.h:gmp-h.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -29263,8 +28688,6 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "mpn/$tmp_fn.$tmp_ext") CONFIG_LINKS="$CONFIG_LINKS mpn/$tmp_fn.$tmp_ext:mpn/$tmp_dir/$tmp_base.$tmp_ext" ;; "gmp-mparam.h") CONFIG_LINKS="$CONFIG_LINKS gmp-mparam.h:mpn/$gmp_mparam_dir/gmp-mparam.h" ;; - "demos/pexpr-config.h") CONFIG_FILES="$CONFIG_FILES demos/pexpr-config.h:demos/pexpr-config-h.in" ;; - "demos/calc/calc-config.h") CONFIG_FILES="$CONFIG_FILES demos/calc/calc-config.h:demos/calc/calc-config-h.in" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "mpf/Makefile") CONFIG_FILES="$CONFIG_FILES mpf/Makefile" ;; "mpn/Makefile") CONFIG_FILES="$CONFIG_FILES mpn/Makefile" ;; @@ -29274,20 +28697,8 @@ do "scanf/Makefile") CONFIG_FILES="$CONFIG_FILES scanf/Makefile" ;; "rand/Makefile") CONFIG_FILES="$CONFIG_FILES rand/Makefile" ;; "cxx/Makefile") CONFIG_FILES="$CONFIG_FILES cxx/Makefile" ;; - "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - "tests/devel/Makefile") CONFIG_FILES="$CONFIG_FILES tests/devel/Makefile" ;; - "tests/mpf/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mpf/Makefile" ;; - "tests/mpn/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mpn/Makefile" ;; - "tests/mpq/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mpq/Makefile" ;; - "tests/mpz/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mpz/Makefile" ;; - "tests/rand/Makefile") CONFIG_FILES="$CONFIG_FILES tests/rand/Makefile" ;; - "tests/misc/Makefile") CONFIG_FILES="$CONFIG_FILES tests/misc/Makefile" ;; - "tests/cxx/Makefile") CONFIG_FILES="$CONFIG_FILES tests/cxx/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "tune/Makefile") CONFIG_FILES="$CONFIG_FILES tune/Makefile" ;; - "demos/Makefile") CONFIG_FILES="$CONFIG_FILES demos/Makefile" ;; - "demos/calc/Makefile") CONFIG_FILES="$CONFIG_FILES demos/calc/Makefile" ;; - "demos/expr/Makefile") CONFIG_FILES="$CONFIG_FILES demos/expr/Makefile" ;; "gmp.h") CONFIG_FILES="$CONFIG_FILES gmp.h:gmp-h.in" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; diff --git a/src/plugins/e-acsl/contrib/libgmp/configure.ac b/src/plugins/e-acsl/contrib/libgmp/configure.ac index d3e9057350d..dbbbc0ab599 100644 --- a/src/plugins/e-acsl/contrib/libgmp/configure.ac +++ b/src/plugins/e-acsl/contrib/libgmp/configure.ac @@ -3524,7 +3524,6 @@ AH_VERBATIM([HAVE_NATIVE], #undef HAVE_NATIVE_mpn_xor_n #undef HAVE_NATIVE_mpn_xnor_n]) - # Don't demand an m4 unless it's actually needed. if test $found_asm = yes; then GMP_PROG_M4 @@ -3775,71 +3774,6 @@ EOF esac AC_SUBST(TUNE_SQR_OBJ) - -# Configs for demos/pexpr.c. -# -AC_CONFIG_FILES(demos/pexpr-config.h:demos/pexpr-config-h.in) -GMP_SUBST_CHECK_FUNCS(clock, cputime, getrusage, gettimeofday, sigaction, sigaltstack, sigstack) -GMP_SUBST_CHECK_HEADERS(sys/resource.h) -AC_CHECK_TYPES([stack_t], HAVE_STACK_T_01=1, HAVE_STACK_T_01=0, - [#include <signal.h>]) -AC_SUBST(HAVE_STACK_T_01) - -# Configs for demos/calc directory -# -# AC_SUBST+AC_CONFIG_FILES is used for calc-config.h, rather than AC_DEFINE+ -# AC_CONFIG_HEADERS, since with the latter automake (1.8) will then put the -# directory (ie. demos/calc) into $(DEFAULT_INCLUDES) for every Makefile.in, -# which would look very strange. -# -# -lcurses is required by libreadline. On a typical SVR4 style system this -# normally doesn't have to be given explicitly, since libreadline.so will -# have a NEEDED record for it. But if someone for some reason is using only -# a static libreadline.a then we must give -lcurses. Readline (as of -# version 4.3) doesn't use libtool, so we can't rely on a .la to cover -# necessary dependencies. -# -# On a couple of systems we've seen libreadline available, but the headers -# not in the default include path, so check for readline/readline.h. We've -# also seen readline/history.h missing, not sure if that's just a broken -# install or a very old version, but check that too. -# -AC_CONFIG_FILES(demos/calc/calc-config.h:demos/calc/calc-config-h.in) -LIBCURSES= -if test $with_readline != no; then - AC_CHECK_LIB(ncurses, tputs, [LIBCURSES=-lncurses], - [AC_CHECK_LIB(curses, tputs, [LIBCURSES=-lcurses])]) -fi -AC_SUBST(LIBCURSES) -use_readline=$with_readline -if test $with_readline = detect; then - use_readline=no - AC_CHECK_LIB(readline, readline, - [AC_CHECK_HEADER(readline/readline.h, - [AC_CHECK_HEADER(readline/history.h, use_readline=yes)])], - , $LIBCURSES) - AC_MSG_CHECKING(readline detected) - AC_MSG_RESULT($use_readline) -fi -if test $use_readline = yes; then - AC_SUBST(WITH_READLINE_01, 1) - AC_SUBST(LIBREADLINE, -lreadline) -else - WITH_READLINE_01=0 -fi -AC_PROG_YACC -AM_PROG_LEX - -# Configs for demos/expr directory -# -# Libtool already runs an AC_CHECK_TOOL for ranlib, but we give -# AC_PROG_RANLIB anyway since automake is supposed to complain if it's not -# called. (Automake 1.8.4 doesn't, at least not when the only library is in -# an EXTRA_LIBRARIES.) -# -AC_PROG_RANLIB - - # Create config.m4. GMP_FINISH @@ -3850,12 +3784,7 @@ GMP_FINISH AC_OUTPUT(Makefile \ mpf/Makefile mpn/Makefile mpq/Makefile \ mpz/Makefile printf/Makefile scanf/Makefile rand/Makefile cxx/Makefile \ - tests/Makefile tests/devel/Makefile \ - tests/mpf/Makefile tests/mpn/Makefile tests/mpq/Makefile \ - tests/mpz/Makefile tests/rand/Makefile tests/misc/Makefile \ - tests/cxx/Makefile \ doc/Makefile tune/Makefile \ - demos/Makefile demos/calc/Makefile demos/expr/Makefile \ gmp.h:gmp-h.in) AC_MSG_NOTICE([summary of build options: diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/Makefile.am b/src/plugins/e-acsl/contrib/libgmp/demos/Makefile.am deleted file mode 100644 index 64010a6d4b3..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ -## Process this file with automake to generate Makefile.in - -# Copyright 2000-2002, 2012 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. - - -SUBDIRS = calc expr -EXTRA_DIST = perl primes.h - -AM_CPPFLAGS = -I$(top_srcdir) -LDADD = $(top_builddir)/libgmp.la - -qcn_LDADD = $(LDADD) $(LIBM) -primes_LDADD = $(LDADD) $(LIBM) - -# None of these programs are built by default, but "make <whatever>" will -# build them once libgmp.la is built. -# -EXTRA_PROGRAMS = factorize isprime pexpr primes qcn - -CLEANFILES = $(EXTRA_PROGRAMS) - -allprogs: $(EXTRA_PROGRAMS) - cd calc; $(MAKE) $(AM_MAKEFLAGS) allprogs - cd expr; $(MAKE) $(AM_MAKEFLAGS) allprogs diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/Makefile.in b/src/plugins/e-acsl/contrib/libgmp/demos/Makefile.in deleted file mode 100644 index 276c96e0588..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/Makefile.in +++ /dev/null @@ -1,785 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright 2000-2002, 2012 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -EXTRA_PROGRAMS = factorize$(EXEEXT) isprime$(EXEEXT) pexpr$(EXEEXT) \ - primes$(EXEEXT) qcn$(EXEEXT) -subdir = demos -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = pexpr-config.h -CONFIG_CLEAN_VPATH_FILES = -factorize_SOURCES = factorize.c -factorize_OBJECTS = factorize.$(OBJEXT) -factorize_LDADD = $(LDADD) -factorize_DEPENDENCIES = $(top_builddir)/libgmp.la -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -isprime_SOURCES = isprime.c -isprime_OBJECTS = isprime.$(OBJEXT) -isprime_LDADD = $(LDADD) -isprime_DEPENDENCIES = $(top_builddir)/libgmp.la -pexpr_SOURCES = pexpr.c -pexpr_OBJECTS = pexpr.$(OBJEXT) -pexpr_LDADD = $(LDADD) -pexpr_DEPENDENCIES = $(top_builddir)/libgmp.la -primes_SOURCES = primes.c -primes_OBJECTS = primes.$(OBJEXT) -am__DEPENDENCIES_1 = -primes_DEPENDENCIES = $(LDADD) $(am__DEPENDENCIES_1) -qcn_SOURCES = qcn.c -qcn_OBJECTS = qcn.$(OBJEXT) -qcn_DEPENDENCIES = $(LDADD) $(am__DEPENDENCIES_1) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = factorize.c isprime.c pexpr.c primes.c qcn.c -DIST_SOURCES = factorize.c isprime.c pexpr.c primes.c qcn.c -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-recursive dvi-recursive html-recursive info-recursive \ - install-data-recursive install-dvi-recursive \ - install-exec-recursive install-html-recursive \ - install-info-recursive install-pdf-recursive \ - install-ps-recursive install-recursive installcheck-recursive \ - installdirs-recursive pdf-recursive ps-recursive \ - tags-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/pexpr-config-h.in -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ABI = @ABI@ -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -ASMFLAGS = @ASMFLAGS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ -CC = @CC@ -CCAS = @CCAS@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CPP_FOR_BUILD = @CPP_FOR_BUILD@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@ -DEFS = @DEFS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -FGREP = @FGREP@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIMB_BITS = @GMP_LIMB_BITS@ -GMP_NAIL_BITS = @GMP_NAIL_BITS@ -GREP = @GREP@ -HAVE_CLOCK_01 = @HAVE_CLOCK_01@ -HAVE_CPUTIME_01 = @HAVE_CPUTIME_01@ -HAVE_GETRUSAGE_01 = @HAVE_GETRUSAGE_01@ -HAVE_GETTIMEOFDAY_01 = @HAVE_GETTIMEOFDAY_01@ -HAVE_HOST_CPU_FAMILY_power = @HAVE_HOST_CPU_FAMILY_power@ -HAVE_HOST_CPU_FAMILY_powerpc = @HAVE_HOST_CPU_FAMILY_powerpc@ -HAVE_SIGACTION_01 = @HAVE_SIGACTION_01@ -HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@ -HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@ -HAVE_STACK_T_01 = @HAVE_STACK_T_01@ -HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBCURSES = @LIBCURSES@ -LIBGMPXX_LDFLAGS = @LIBGMPXX_LDFLAGS@ -LIBGMP_DLL = @LIBGMP_DLL@ -LIBGMP_LDFLAGS = @LIBGMP_LDFLAGS@ -LIBM = @LIBM@ -LIBM_FOR_BUILD = @LIBM_FOR_BUILD@ -LIBOBJS = @LIBOBJS@ -LIBREADLINE = @LIBREADLINE@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -M4 = @M4@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@ -STRIP = @STRIP@ -TAL_OBJECT = @TAL_OBJECT@ -TUNE_LIBS = @TUNE_LIBS@ -TUNE_SQR_OBJ = @TUNE_SQR_OBJ@ -U_FOR_BUILD = @U_FOR_BUILD@ -VERSION = @VERSION@ -WITH_READLINE_01 = @WITH_READLINE_01@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gmp_srclinks = @gmp_srclinks@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -mpn_objects = @mpn_objects@ -mpn_objs_in_libgmp = @mpn_objs_in_libgmp@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = calc expr -EXTRA_DIST = perl primes.h -AM_CPPFLAGS = -I$(top_srcdir) -LDADD = $(top_builddir)/libgmp.la -qcn_LDADD = $(LDADD) $(LIBM) -primes_LDADD = $(LDADD) $(LIBM) -CLEANFILES = $(EXTRA_PROGRAMS) -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps demos/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu --ignore-deps demos/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -pexpr-config.h: $(top_builddir)/config.status $(srcdir)/pexpr-config-h.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - -factorize$(EXEEXT): $(factorize_OBJECTS) $(factorize_DEPENDENCIES) $(EXTRA_factorize_DEPENDENCIES) - @rm -f factorize$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(factorize_OBJECTS) $(factorize_LDADD) $(LIBS) - -isprime$(EXEEXT): $(isprime_OBJECTS) $(isprime_DEPENDENCIES) $(EXTRA_isprime_DEPENDENCIES) - @rm -f isprime$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(isprime_OBJECTS) $(isprime_LDADD) $(LIBS) - -pexpr$(EXEEXT): $(pexpr_OBJECTS) $(pexpr_DEPENDENCIES) $(EXTRA_pexpr_DEPENDENCIES) - @rm -f pexpr$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pexpr_OBJECTS) $(pexpr_LDADD) $(LIBS) - -primes$(EXEEXT): $(primes_OBJECTS) $(primes_DEPENDENCIES) $(EXTRA_primes_DEPENDENCIES) - @rm -f primes$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(primes_OBJECTS) $(primes_LDADD) $(LIBS) - -qcn$(EXEEXT): $(qcn_OBJECTS) $(qcn_DEPENDENCIES) $(EXTRA_qcn_DEPENDENCIES) - @rm -f qcn$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(qcn_OBJECTS) $(qcn_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(AM_V_CC)$(COMPILE) -c -o $@ $< - -.c.obj: - $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run 'make' without going through this Makefile. -# To change the values of 'make' variables: instead of editing Makefiles, -# (1) if the variable is set in 'config.status', edit 'config.status' -# (which will cause the Makefiles to be regenerated when you run 'make'); -# (2) otherwise, pass the desired values on the 'make' command line. -$(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-recursive - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) install-am install-strip - -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ - check-am clean clean-generic clean-libtool cscopelist-am ctags \ - ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -allprogs: $(EXTRA_PROGRAMS) - cd calc; $(MAKE) $(AM_MAKEFLAGS) allprogs - cd expr; $(MAKE) $(AM_MAKEFLAGS) allprogs - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/calc/Makefile.am b/src/plugins/e-acsl/contrib/libgmp/demos/calc/Makefile.am deleted file mode 100644 index 1cb533512cd..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/calc/Makefile.am +++ /dev/null @@ -1,47 +0,0 @@ -## Process this file with automake to generate Makefile.in - -# Copyright 2000-2004 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. - - -AM_CPPFLAGS = -I$(top_srcdir) - -# $(LEXLIB) is not actually needed for flex (which means the distributed -# calclex.c), but it's included here for the benefit of anyone rebuilding -# with some other lex. -# -LDADD = $(top_builddir)/libgmp.la $(LIBREADLINE) $(LIBCURSES) $(LEXLIB) - -EXTRA_PROGRAMS = calc -AM_YFLAGS = -d -calc_SOURCES = calc.y calclex.l calcread.c calc-common.h -BUILT_SOURCES = calc.h - -CLEANFILES = $(EXTRA_PROGRAMS) - -allprogs: $(EXTRA_PROGRAMS) diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/calc/Makefile.in b/src/plugins/e-acsl/contrib/libgmp/demos/calc/Makefile.in deleted file mode 100644 index 5feb9a825ec..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/calc/Makefile.in +++ /dev/null @@ -1,677 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright 2000-2004 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -EXTRA_PROGRAMS = calc$(EXEEXT) -subdir = demos/calc -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = calc-config.h -CONFIG_CLEAN_VPATH_FILES = -am_calc_OBJECTS = calc.$(OBJEXT) calclex.$(OBJEXT) calcread.$(OBJEXT) -calc_OBJECTS = $(am_calc_OBJECTS) -calc_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -calc_DEPENDENCIES = $(top_builddir)/libgmp.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -@MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ || -LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) -LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) -AM_V_LEX = $(am__v_LEX_@AM_V@) -am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) -am__v_LEX_0 = @echo " LEX " $@; -am__v_LEX_1 = -YLWRAP = $(top_srcdir)/ylwrap -@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || -am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ - -e s/c++$$/h++/ -e s/c$$/h/ -YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) -LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) -AM_V_YACC = $(am__v_YACC_@AM_V@) -am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) -am__v_YACC_0 = @echo " YACC " $@; -am__v_YACC_1 = -SOURCES = $(calc_SOURCES) -DIST_SOURCES = $(calc_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/calc-config-h.in \ - $(top_srcdir)/ylwrap README calc.c calc.h calclex.c -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ABI = @ABI@ -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -ASMFLAGS = @ASMFLAGS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ -CC = @CC@ -CCAS = @CCAS@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CPP_FOR_BUILD = @CPP_FOR_BUILD@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@ -DEFS = @DEFS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -FGREP = @FGREP@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIMB_BITS = @GMP_LIMB_BITS@ -GMP_NAIL_BITS = @GMP_NAIL_BITS@ -GREP = @GREP@ -HAVE_CLOCK_01 = @HAVE_CLOCK_01@ -HAVE_CPUTIME_01 = @HAVE_CPUTIME_01@ -HAVE_GETRUSAGE_01 = @HAVE_GETRUSAGE_01@ -HAVE_GETTIMEOFDAY_01 = @HAVE_GETTIMEOFDAY_01@ -HAVE_HOST_CPU_FAMILY_power = @HAVE_HOST_CPU_FAMILY_power@ -HAVE_HOST_CPU_FAMILY_powerpc = @HAVE_HOST_CPU_FAMILY_powerpc@ -HAVE_SIGACTION_01 = @HAVE_SIGACTION_01@ -HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@ -HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@ -HAVE_STACK_T_01 = @HAVE_STACK_T_01@ -HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBCURSES = @LIBCURSES@ -LIBGMPXX_LDFLAGS = @LIBGMPXX_LDFLAGS@ -LIBGMP_DLL = @LIBGMP_DLL@ -LIBGMP_LDFLAGS = @LIBGMP_LDFLAGS@ -LIBM = @LIBM@ -LIBM_FOR_BUILD = @LIBM_FOR_BUILD@ -LIBOBJS = @LIBOBJS@ -LIBREADLINE = @LIBREADLINE@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -M4 = @M4@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@ -STRIP = @STRIP@ -TAL_OBJECT = @TAL_OBJECT@ -TUNE_LIBS = @TUNE_LIBS@ -TUNE_SQR_OBJ = @TUNE_SQR_OBJ@ -U_FOR_BUILD = @U_FOR_BUILD@ -VERSION = @VERSION@ -WITH_READLINE_01 = @WITH_READLINE_01@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gmp_srclinks = @gmp_srclinks@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -mpn_objects = @mpn_objects@ -mpn_objs_in_libgmp = @mpn_objs_in_libgmp@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -I$(top_srcdir) - -# $(LEXLIB) is not actually needed for flex (which means the distributed -# calclex.c), but it's included here for the benefit of anyone rebuilding -# with some other lex. -# -LDADD = $(top_builddir)/libgmp.la $(LIBREADLINE) $(LIBCURSES) $(LEXLIB) -AM_YFLAGS = -d -calc_SOURCES = calc.y calclex.l calcread.c calc-common.h -BUILT_SOURCES = calc.h -CLEANFILES = $(EXTRA_PROGRAMS) -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .l .lo .o .obj .y -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps demos/calc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu --ignore-deps demos/calc/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -calc-config.h: $(top_builddir)/config.status $(srcdir)/calc-config-h.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -calc.h: calc.c - @if test ! -f $@; then rm -f calc.c; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) calc.c; else :; fi - -calc$(EXEEXT): $(calc_OBJECTS) $(calc_DEPENDENCIES) $(EXTRA_calc_DEPENDENCIES) - @rm -f calc$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(calc_OBJECTS) $(calc_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(AM_V_CC)$(COMPILE) -c -o $@ $< - -.c.obj: - $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< - -.l.c: - $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) - -.y.c: - $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile -installdirs: -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -rm -f calc.c - -rm -f calc.h - -rm -f calclex.c - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: all check install install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ - clean-libtool cscopelist-am ctags ctags-am distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -allprogs: $(EXTRA_PROGRAMS) - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/calc/README b/src/plugins/e-acsl/contrib/libgmp/demos/calc/README deleted file mode 100644 index 660394ecbc4..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/calc/README +++ /dev/null @@ -1,65 +0,0 @@ -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program. If not, see https://www.gnu.org/licenses/. - - - - - DEMONSTRATION CALCULATOR PROGRAM - - -This is a simple program, meant only to show one way to use GMP with yacc -and lex to make a calculator. Usage and comments on the implementation can -be found in calc.y. - -Within a GMP build tree, the generated Makefile can be used to build the -program, - - make calc - -(or on a DOS system, "make calc.exe"). - -Elsewhere, once GMP has been installed, the program can be compiled with for -instance - - gcc calc.c calclex.c -lgmp -o calc - -Or if GNU readline is used then - - gcc calc.c calclex.c calcread.c -lgmp -lreadline -o calc - -(again, on a DOS system "-o calc.exe"). - -Readline support can be enabled or disabled in calc-config.h. That file is -created by the GMP ./configure based on the --with-readline option. The -default is --with-readline=detect, which means to use readline if available. -"yes" can be used to force it to be used, or "no" to not use it. - -The supplied calc.c was generated by GNU bison, but a standard yacc should -work too. - -The supplied calclex.c was generated by GNU flex, but a standard lex should -work too. The readline support may or may not work with a standard lex (see -comments with input() in calcread.c). Note also that a standard lex will -require its library "-ll" on the compile command line. "./configure" sets -this up in the GMP build tree Makefile. - - - ----------------- -Local variables: -mode: text -fill-column: 76 -End: diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/calc/calc-common.h b/src/plugins/e-acsl/contrib/libgmp/demos/calc/calc-common.h deleted file mode 100644 index 7a9187826fc..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/calc/calc-common.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Prototypes etc for calc program. - -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program. If not, see https://www.gnu.org/licenses/. */ - -#include <stddef.h> /* for size_t */ -#ifndef NO_CALC_H -#include "calc.h" -#endif -#include "calc-config.h" - -struct calc_keywords_t { - char *name; - int value; -}; - -extern int calc_option_readline; -extern int calc_more_input; -extern const struct calc_keywords_t calc_keywords[]; - -int calc_input (char *buf, size_t max_size); -void calc_init_readline (void); diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/calc/calc-config-h.in b/src/plugins/e-acsl/contrib/libgmp/demos/calc/calc-config-h.in deleted file mode 100644 index 42cdd440c25..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/calc/calc-config-h.in +++ /dev/null @@ -1,21 +0,0 @@ -/* Templates for calc program configuration. -*- mode:c -*- - -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program. If not, see https://www.gnu.org/licenses/. */ - - -/* Define if GNU readline should be used. */ -#define WITH_READLINE @WITH_READLINE_01@ diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/calc/calc.c b/src/plugins/e-acsl/contrib/libgmp/demos/calc/calc.c deleted file mode 100644 index 0c36eb803dc..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/calc/calc.c +++ /dev/null @@ -1,2254 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.7.12-4996. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.7.12-4996" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - - - - -/* Copy the first part of user declarations. */ -/* Line 371 of yacc.c */ -#line 1 "../../../gmp/demos/calc/calc.y" - -/* A simple integer desk calculator using yacc and gmp. - -Copyright 2000-2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program. If not, see https://www.gnu.org/licenses/. */ - - -/* This is a simple program, meant only to show one way to use GMP for this - sort of thing. There's few features, and error checking is minimal. - Standard input is read, calc_help() below shows the inputs accepted. - - Expressions are evaluated as they're read. If user defined functions - were wanted it'd be necessary to build a parse tree like pexpr.c does, or - a list of operations for a stack based evaluator. That would also make - it possible to detect and optimize evaluations "mod m" like pexpr.c does. - - A stack is used for intermediate values in the expression evaluation, - separate from the yacc parser stack. This is simple, makes error - recovery easy, minimizes the junk around mpz calls in the rules, and - saves initializing or clearing "mpz_t"s during a calculation. A - disadvantage though is that variables must be copied to the stack to be - worked on. A more sophisticated calculator or language system might be - able to avoid that when executing a compiled or semi-compiled form. - - Avoiding repeated initializing and clearing of "mpz_t"s is important. In - this program the time spent parsing is obviously much greater than any - possible saving from this, but a proper calculator or language should - take some trouble over it. Don't be surprised if an init/clear takes 3 - or more times as long as a 10 limb addition, depending on the system (see - the mpz_init_realloc_clear example in tune/README). */ - - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "gmp.h" -#define NO_CALC_H /* because it conflicts with normal calc.c stuff */ -#include "calc-common.h" - - -#define numberof(x) (sizeof (x) / sizeof ((x)[0])) - - -void -calc_help (void) -{ - printf ("Examples:\n"); - printf (" 2+3*4 expressions are evaluated\n"); - printf (" x=5^6 variables a to z can be set and used\n"); - printf ("Operators:\n"); - printf (" + - * arithmetic\n"); - printf (" / %% division and remainder (rounding towards negative infinity)\n"); - printf (" ^ exponentiation\n"); - printf (" ! factorial\n"); - printf (" << >> left and right shifts\n"); - printf (" <= >= > \\ comparisons, giving 1 if true, 0 if false\n"); - printf (" == != < /\n"); - printf (" && || logical and/or, giving 1 if true, 0 if false\n"); - printf ("Functions:\n"); - printf (" abs(n) absolute value\n"); - printf (" bin(n,m) binomial coefficient\n"); - printf (" fib(n) fibonacci number\n"); - printf (" gcd(a,b,..) greatest common divisor\n"); - printf (" kron(a,b) kronecker symbol\n"); - printf (" lcm(a,b,..) least common multiple\n"); - printf (" lucnum(n) lucas number\n"); - printf (" nextprime(n) next prime after n\n"); - printf (" powm(b,e,m) modulo powering, b^e%%m\n"); - printf (" root(n,r) r-th root\n"); - printf (" sqrt(n) square root\n"); - printf ("Other:\n"); - printf (" hex \\ set hex or decimal for input and output\n"); - printf (" decimal / (\"0x\" can be used for hex too)\n"); - printf (" quit exit program (EOF works too)\n"); - printf (" ; statements are separated with a ; or newline\n"); - printf (" \\ continue expressions with \\ before newline\n"); - printf (" # xxx comments are # though to newline\n"); - printf ("Hex numbers must be entered in upper case, to distinguish them from the\n"); - printf ("variables a to f (like in bc).\n"); -} - - -int ibase = 0; -int obase = 10; - - -/* The stack is a fixed size, which means there's a limit on the nesting - allowed in expressions. A more sophisticated program could let it grow - dynamically. */ - -mpz_t stack[100]; -mpz_ptr sp = stack[0]; - -#define CHECK_OVERFLOW() \ - if (sp >= stack[numberof(stack)]) /* FIXME */ \ - { \ - fprintf (stderr, \ - "Value stack overflow, too much nesting in expression\n"); \ - YYERROR; \ - } - -#define CHECK_EMPTY() \ - if (sp != stack[0]) \ - { \ - fprintf (stderr, "Oops, expected the value stack to be empty\n"); \ - sp = stack[0]; \ - } - - -mpz_t variable[26]; - -#define CHECK_VARIABLE(var) \ - if ((var) < 0 || (var) >= numberof (variable)) \ - { \ - fprintf (stderr, "Oops, bad variable somehow: %d\n", var); \ - YYERROR; \ - } - - -#define CHECK_UI(name,z) \ - if (! mpz_fits_ulong_p (z)) \ - { \ - fprintf (stderr, "%s too big\n", name); \ - YYERROR; \ - } - - -/* Line 371 of yacc.c */ -#line 209 "calc.c" - -# ifndef YY_NULL -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr -# else -# define YY_NULL 0 -# endif -# endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "y.tab.h". */ -#ifndef YY_YY_CALC_H_INCLUDED -# define YY_YY_CALC_H_INCLUDED -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - EOS = 258, - BAD = 259, - HELP = 260, - HEX = 261, - DECIMAL = 262, - QUIT = 263, - ABS = 264, - BIN = 265, - FIB = 266, - GCD = 267, - KRON = 268, - LCM = 269, - LUCNUM = 270, - NEXTPRIME = 271, - POWM = 272, - ROOT = 273, - SQRT = 274, - NUMBER = 275, - VARIABLE = 276, - LOR = 277, - LAND = 278, - GE = 279, - LE = 280, - NE = 281, - EQ = 282, - RSHIFT = 283, - LSHIFT = 284, - UMINUS = 285 - }; -#endif -/* Tokens. */ -#define EOS 258 -#define BAD 259 -#define HELP 260 -#define HEX 261 -#define DECIMAL 262 -#define QUIT 263 -#define ABS 264 -#define BIN 265 -#define FIB 266 -#define GCD 267 -#define KRON 268 -#define LCM 269 -#define LUCNUM 270 -#define NEXTPRIME 271 -#define POWM 272 -#define ROOT 273 -#define SQRT 274 -#define NUMBER 275 -#define VARIABLE 276 -#define LOR 277 -#define LAND 278 -#define GE 279 -#define LE 280 -#define NE 281 -#define EQ 282 -#define RSHIFT 283 -#define LSHIFT 284 -#define UMINUS 285 - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ -/* Line 387 of yacc.c */ -#line 142 "../../../gmp/demos/calc/calc.y" - - char *str; - int var; - - -/* Line 387 of yacc.c */ -#line 318 "calc.c" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - -extern YYSTYPE yylval; - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - -#endif /* !YY_YY_CALC_H_INCLUDED */ - -/* Copy the second part of user declarations. */ - -/* Line 390 of yacc.c */ -#line 346 "calc.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -#ifndef __attribute__ -/* This feature is available in gcc versions 2.5 and later. */ -# if (! defined __GNUC__ || __GNUC__ < 2 \ - || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) -# define __attribute__(Spec) /* empty */ -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) -#else -# define YYUSE(E) /* empty */ -#endif - - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(N) (N) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; -#endif -{ - return yyi; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 41 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 552 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 44 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 7 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 49 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 118 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 285 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 39, 2, 2, 2, 36, 2, 2, - 41, 42, 34, 32, 43, 33, 2, 35, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 24, 40, 25, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 38, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 26, - 27, 28, 29, 30, 31, 37 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = -{ - 0, 0, 3, 5, 8, 11, 15, 18, 19, 21, - 25, 27, 29, 31, 33, 37, 41, 45, 49, 53, - 57, 61, 65, 69, 72, 75, 79, 83, 87, 91, - 95, 99, 103, 107, 112, 119, 124, 129, 136, 141, - 146, 151, 160, 167, 172, 174, 176, 178, 182, 184 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 45, 0, -1, 47, -1, 46, 47, -1, 47, 3, - -1, 46, 47, 3, -1, 1, 3, -1, -1, 48, - -1, 21, 40, 48, -1, 5, -1, 6, -1, 7, - -1, 8, -1, 41, 48, 42, -1, 48, 32, 48, - -1, 48, 33, 48, -1, 48, 34, 48, -1, 48, - 35, 48, -1, 48, 36, 48, -1, 48, 38, 48, - -1, 48, 31, 48, -1, 48, 30, 48, -1, 48, - 39, -1, 33, 48, -1, 48, 24, 48, -1, 48, - 27, 48, -1, 48, 29, 48, -1, 48, 28, 48, - -1, 48, 26, 48, -1, 48, 25, 48, -1, 48, - 23, 48, -1, 48, 22, 48, -1, 9, 41, 48, - 42, -1, 10, 41, 48, 43, 48, 42, -1, 11, - 41, 48, 42, -1, 12, 41, 49, 42, -1, 13, - 41, 48, 43, 48, 42, -1, 14, 41, 50, 42, - -1, 15, 41, 48, 42, -1, 16, 41, 48, 42, - -1, 17, 41, 48, 43, 48, 43, 48, 42, -1, - 18, 41, 48, 43, 48, 42, -1, 19, 41, 48, - 42, -1, 21, -1, 20, -1, 48, -1, 49, 43, - 48, -1, 48, -1, 50, 43, 48, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 167, 167, 168, 171, 172, 173, 175, 177, 182, - 188, 189, 190, 191, 197, 198, 199, 200, 201, 202, - 203, 205, 207, 209, 211, 213, 214, 215, 216, 217, - 218, 220, 221, 223, 224, 226, 228, 229, 231, 232, - 234, 235, 236, 238, 240, 246, 257, 258, 261, 262 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || 0 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "EOS", "BAD", "HELP", "HEX", "DECIMAL", - "QUIT", "ABS", "BIN", "FIB", "GCD", "KRON", "LCM", "LUCNUM", "NEXTPRIME", - "POWM", "ROOT", "SQRT", "NUMBER", "VARIABLE", "LOR", "LAND", "'<'", - "'>'", "GE", "LE", "NE", "EQ", "RSHIFT", "LSHIFT", "'+'", "'-'", "'*'", - "'/'", "'%'", "UMINUS", "'^'", "'!'", "'='", "'('", "')'", "','", - "$accept", "top", "statements", "statement", "e", "gcdlist", "lcmlist", YY_NULL -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 60, 62, 279, 280, 281, 282, - 283, 284, 43, 45, 42, 47, 37, 285, 94, 33, - 61, 40, 41, 44 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 44, 45, 45, 46, 46, 46, 47, 47, 47, - 47, 47, 47, 47, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 49, 49, 50, 50 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 2, 2, 3, 2, 0, 1, 3, - 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 4, 6, 4, 4, 6, 4, 4, - 4, 8, 6, 4, 1, 1, 1, 3, 1, 3 -}; - -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 0, 10, 11, 12, 13, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 45, 44, 0, - 0, 0, 7, 2, 8, 6, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 44, 24, - 0, 1, 3, 4, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 23, 0, 0, 0, 46, 0, 0, 48, 0, 0, - 0, 0, 0, 0, 9, 14, 5, 32, 31, 25, - 30, 29, 26, 28, 27, 22, 21, 15, 16, 17, - 18, 19, 20, 33, 0, 35, 36, 0, 0, 38, - 0, 39, 40, 0, 0, 43, 0, 47, 0, 49, - 0, 0, 34, 37, 0, 42, 0, 41 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 21, 22, 23, 24, 65, 68 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -39 -static const yytype_int16 yypact[] = -{ - 41, 3, -39, -39, -39, -39, 2, 4, 27, 32, - 35, 36, 39, 42, 45, 46, 47, -39, -18, 124, - 124, 89, 91, 87, 464, -39, 124, 124, 124, 124, - 124, 124, 124, 124, 124, 124, 124, 124, -39, -36, - 254, -39, 88, -39, 124, 124, 124, 124, 124, 124, - 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, - -39, 275, 144, 296, 464, -38, 166, 464, 29, 317, - 338, 188, 210, 359, 464, -39, -39, 481, 497, 513, - 513, 513, 513, 513, 513, 31, 31, -15, -15, -36, - -36, -36, -36, -39, 124, -39, -39, 124, 124, -39, - 124, -39, -39, 124, 124, -39, 380, 464, 401, 464, - 232, 422, -39, -39, 124, -39, 443, -39 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = -{ - -39, -39, -39, 70, -19, -39, -39 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -8 -static const yytype_int8 yytable[] = -{ - 39, 40, 59, 60, 96, 97, 25, 61, 62, 63, - 64, 66, 67, 69, 70, 71, 72, 73, 74, 56, - 57, 58, 37, 59, 60, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, -7, 1, 26, -7, 27, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 54, 55, 56, 57, 58, 28, 59, - 60, 99, 100, 29, 19, 106, 30, 31, 107, 108, - 32, 109, 20, 33, 110, 111, 34, 35, 36, 41, - 43, 76, 42, 0, 0, 116, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, - 0, 0, 20, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 38, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, - 0, 0, 0, 0, 0, 20, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 0, 59, 60, 0, 0, 0, 94, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 0, 59, 60, 0, 0, 0, 98, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 0, 59, 60, 0, 0, - 0, 103, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 0, 59, 60, - 0, 0, 0, 104, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, - 59, 60, 0, 0, 0, 114, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 0, 59, 60, 0, 0, 75, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 0, 59, 60, 0, 0, 93, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 0, 59, 60, 0, 0, 95, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 0, 59, 60, 0, 0, 101, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 0, 59, 60, 0, 0, - 102, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 0, 59, 60, 0, - 0, 105, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 0, 59, 60, - 0, 0, 112, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 0, 59, - 60, 0, 0, 113, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, - 59, 60, 0, 0, 115, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 0, 59, 60, 0, 0, 117, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 0, 59, 60, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 0, 59, - 60, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 0, 59, 60, -8, -8, -8, - -8, -8, -8, 52, 53, 54, 55, 56, 57, 58, - 0, 59, 60 -}; - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-39))) - -#define yytable_value_is_error(Yytable_value) \ - (!!((Yytable_value) == (-8))) - -static const yytype_int8 yycheck[] = -{ - 19, 20, 38, 39, 42, 43, 3, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 34, - 35, 36, 40, 38, 39, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 0, 1, 41, 3, 41, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 32, 33, 34, 35, 36, 41, 38, - 39, 42, 43, 41, 33, 94, 41, 41, 97, 98, - 41, 100, 41, 41, 103, 104, 41, 41, 41, 0, - 3, 3, 22, -1, -1, 114, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, - -1, -1, 41, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, - -1, -1, -1, -1, -1, 41, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, -1, 38, 39, -1, -1, -1, 43, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, -1, 38, 39, -1, -1, -1, 43, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, -1, 38, 39, -1, -1, - -1, 43, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, -1, 38, 39, - -1, -1, -1, 43, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, -1, - 38, 39, -1, -1, -1, 43, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, -1, 38, 39, -1, -1, 42, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, -1, 38, 39, -1, -1, 42, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, -1, 38, 39, -1, -1, 42, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, -1, 38, 39, -1, -1, 42, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, -1, 38, 39, -1, -1, - 42, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, -1, 38, 39, -1, - -1, 42, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, -1, 38, 39, - -1, -1, 42, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, -1, 38, - 39, -1, -1, 42, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, -1, - 38, 39, -1, -1, 42, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - -1, 38, 39, -1, -1, 42, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, -1, 38, 39, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, -1, 38, - 39, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, -1, 38, 39, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - -1, 38, 39 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 1, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 33, - 41, 45, 46, 47, 48, 3, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 40, 21, 48, - 48, 0, 47, 3, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, - 39, 48, 48, 48, 48, 49, 48, 48, 50, 48, - 48, 48, 48, 48, 48, 42, 3, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 42, 43, 42, 42, 43, 43, 42, - 43, 42, 42, 43, 43, 42, 48, 48, 48, 48, - 48, 48, 42, 42, 43, 42, 48, 42 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - YYUSE (yytype); -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULL; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - YYUSE (yyvaluep); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - YYUSE (yytype); -} - - - - -/* The lookahead symbol. */ -int yychar; - - -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - -/* Number of syntax errors so far. */ -int yynerrs; - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void) -#else -int -yyparse () - -#endif -#endif -{ - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 6: -/* Line 1787 of yacc.c */ -#line 173 "../../../gmp/demos/calc/calc.y" - { sp = stack[0]; yyerrok; } - break; - - case 8: -/* Line 1787 of yacc.c */ -#line 177 "../../../gmp/demos/calc/calc.y" - { - mpz_out_str (stdout, obase, sp); putchar ('\n'); - sp--; - CHECK_EMPTY (); - } - break; - - case 9: -/* Line 1787 of yacc.c */ -#line 182 "../../../gmp/demos/calc/calc.y" - { - CHECK_VARIABLE ((yyvsp[(1) - (3)].var)); - mpz_swap (variable[(yyvsp[(1) - (3)].var)], sp); - sp--; - CHECK_EMPTY (); - } - break; - - case 10: -/* Line 1787 of yacc.c */ -#line 188 "../../../gmp/demos/calc/calc.y" - { calc_help (); } - break; - - case 11: -/* Line 1787 of yacc.c */ -#line 189 "../../../gmp/demos/calc/calc.y" - { ibase = 16; obase = -16; } - break; - - case 12: -/* Line 1787 of yacc.c */ -#line 190 "../../../gmp/demos/calc/calc.y" - { ibase = 0; obase = 10; } - break; - - case 13: -/* Line 1787 of yacc.c */ -#line 191 "../../../gmp/demos/calc/calc.y" - { exit (0); } - break; - - case 15: -/* Line 1787 of yacc.c */ -#line 198 "../../../gmp/demos/calc/calc.y" - { sp--; mpz_add (sp, sp, sp+1); } - break; - - case 16: -/* Line 1787 of yacc.c */ -#line 199 "../../../gmp/demos/calc/calc.y" - { sp--; mpz_sub (sp, sp, sp+1); } - break; - - case 17: -/* Line 1787 of yacc.c */ -#line 200 "../../../gmp/demos/calc/calc.y" - { sp--; mpz_mul (sp, sp, sp+1); } - break; - - case 18: -/* Line 1787 of yacc.c */ -#line 201 "../../../gmp/demos/calc/calc.y" - { sp--; mpz_fdiv_q (sp, sp, sp+1); } - break; - - case 19: -/* Line 1787 of yacc.c */ -#line 202 "../../../gmp/demos/calc/calc.y" - { sp--; mpz_fdiv_r (sp, sp, sp+1); } - break; - - case 20: -/* Line 1787 of yacc.c */ -#line 203 "../../../gmp/demos/calc/calc.y" - { CHECK_UI ("Exponent", sp); - sp--; mpz_pow_ui (sp, sp, mpz_get_ui (sp+1)); } - break; - - case 21: -/* Line 1787 of yacc.c */ -#line 205 "../../../gmp/demos/calc/calc.y" - { CHECK_UI ("Shift count", sp); - sp--; mpz_mul_2exp (sp, sp, mpz_get_ui (sp+1)); } - break; - - case 22: -/* Line 1787 of yacc.c */ -#line 207 "../../../gmp/demos/calc/calc.y" - { CHECK_UI ("Shift count", sp); - sp--; mpz_fdiv_q_2exp (sp, sp, mpz_get_ui (sp+1)); } - break; - - case 23: -/* Line 1787 of yacc.c */ -#line 209 "../../../gmp/demos/calc/calc.y" - { CHECK_UI ("Factorial", sp); - mpz_fac_ui (sp, mpz_get_ui (sp)); } - break; - - case 24: -/* Line 1787 of yacc.c */ -#line 211 "../../../gmp/demos/calc/calc.y" - { mpz_neg (sp, sp); } - break; - - case 25: -/* Line 1787 of yacc.c */ -#line 213 "../../../gmp/demos/calc/calc.y" - { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) < 0); } - break; - - case 26: -/* Line 1787 of yacc.c */ -#line 214 "../../../gmp/demos/calc/calc.y" - { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) <= 0); } - break; - - case 27: -/* Line 1787 of yacc.c */ -#line 215 "../../../gmp/demos/calc/calc.y" - { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) == 0); } - break; - - case 28: -/* Line 1787 of yacc.c */ -#line 216 "../../../gmp/demos/calc/calc.y" - { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) != 0); } - break; - - case 29: -/* Line 1787 of yacc.c */ -#line 217 "../../../gmp/demos/calc/calc.y" - { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) >= 0); } - break; - - case 30: -/* Line 1787 of yacc.c */ -#line 218 "../../../gmp/demos/calc/calc.y" - { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) > 0); } - break; - - case 31: -/* Line 1787 of yacc.c */ -#line 220 "../../../gmp/demos/calc/calc.y" - { sp--; mpz_set_ui (sp, mpz_sgn (sp) && mpz_sgn (sp+1)); } - break; - - case 32: -/* Line 1787 of yacc.c */ -#line 221 "../../../gmp/demos/calc/calc.y" - { sp--; mpz_set_ui (sp, mpz_sgn (sp) || mpz_sgn (sp+1)); } - break; - - case 33: -/* Line 1787 of yacc.c */ -#line 223 "../../../gmp/demos/calc/calc.y" - { mpz_abs (sp, sp); } - break; - - case 34: -/* Line 1787 of yacc.c */ -#line 224 "../../../gmp/demos/calc/calc.y" - { sp--; CHECK_UI ("Binomial base", sp+1); - mpz_bin_ui (sp, sp, mpz_get_ui (sp+1)); } - break; - - case 35: -/* Line 1787 of yacc.c */ -#line 226 "../../../gmp/demos/calc/calc.y" - { CHECK_UI ("Fibonacci", sp); - mpz_fib_ui (sp, mpz_get_ui (sp)); } - break; - - case 37: -/* Line 1787 of yacc.c */ -#line 229 "../../../gmp/demos/calc/calc.y" - { sp--; mpz_set_si (sp, - mpz_kronecker (sp, sp+1)); } - break; - - case 39: -/* Line 1787 of yacc.c */ -#line 232 "../../../gmp/demos/calc/calc.y" - { CHECK_UI ("Lucas number", sp); - mpz_lucnum_ui (sp, mpz_get_ui (sp)); } - break; - - case 40: -/* Line 1787 of yacc.c */ -#line 234 "../../../gmp/demos/calc/calc.y" - { mpz_nextprime (sp, sp); } - break; - - case 41: -/* Line 1787 of yacc.c */ -#line 235 "../../../gmp/demos/calc/calc.y" - { sp -= 2; mpz_powm (sp, sp, sp+1, sp+2); } - break; - - case 42: -/* Line 1787 of yacc.c */ -#line 236 "../../../gmp/demos/calc/calc.y" - { sp--; CHECK_UI ("Nth-root", sp+1); - mpz_root (sp, sp, mpz_get_ui (sp+1)); } - break; - - case 43: -/* Line 1787 of yacc.c */ -#line 238 "../../../gmp/demos/calc/calc.y" - { mpz_sqrt (sp, sp); } - break; - - case 44: -/* Line 1787 of yacc.c */ -#line 240 "../../../gmp/demos/calc/calc.y" - { - sp++; - CHECK_OVERFLOW (); - CHECK_VARIABLE ((yyvsp[(1) - (1)].var)); - mpz_set (sp, variable[(yyvsp[(1) - (1)].var)]); - } - break; - - case 45: -/* Line 1787 of yacc.c */ -#line 246 "../../../gmp/demos/calc/calc.y" - { - sp++; - CHECK_OVERFLOW (); - if (mpz_set_str (sp, (yyvsp[(1) - (1)].str), ibase) != 0) - { - fprintf (stderr, "Invalid number: %s\n", (yyvsp[(1) - (1)].str)); - YYERROR; - } - } - break; - - case 47: -/* Line 1787 of yacc.c */ -#line 258 "../../../gmp/demos/calc/calc.y" - { sp--; mpz_gcd (sp, sp, sp+1); } - break; - - case 49: -/* Line 1787 of yacc.c */ -#line 262 "../../../gmp/demos/calc/calc.y" - { sp--; mpz_lcm (sp, sp, sp+1); } - break; - - -/* Line 1787 of yacc.c */ -#line 1968 "calc.c" - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - } - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - -/* Line 2050 of yacc.c */ -#line 264 "../../../gmp/demos/calc/calc.y" - - -yyerror (char *s) -{ - fprintf (stderr, "%s\n", s); -} - -int calc_option_readline = -1; - -int -main (int argc, char *argv[]) -{ - int i; - - for (i = 1; i < argc; i++) - { - if (strcmp (argv[i], "--readline") == 0) - calc_option_readline = 1; - else if (strcmp (argv[i], "--noreadline") == 0) - calc_option_readline = 0; - else if (strcmp (argv[i], "--help") == 0) - { - printf ("Usage: calc [--option]...\n"); - printf (" --readline use readline\n"); - printf (" --noreadline don't use readline\n"); - printf (" --help this message\n"); - printf ("Readline is only available when compiled in,\n"); - printf ("and in that case it's the default on a tty.\n"); - exit (0); - } - else - { - fprintf (stderr, "Unrecognised option: %s\n", argv[i]); - exit (1); - } - } - -#if WITH_READLINE - calc_init_readline (); -#else - if (calc_option_readline == 1) - { - fprintf (stderr, "Readline support not available\n"); - exit (1); - } -#endif - - for (i = 0; i < numberof (variable); i++) - mpz_init (variable[i]); - - for (i = 0; i < numberof (stack); i++) - mpz_init (stack[i]); - - return yyparse (); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/calc/calc.h b/src/plugins/e-acsl/contrib/libgmp/demos/calc/calc.h deleted file mode 100644 index 41fd57d0941..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/calc/calc.h +++ /dev/null @@ -1,145 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.7.12-4996. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -#ifndef YY_YY_CALC_H_INCLUDED -# define YY_YY_CALC_H_INCLUDED -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - EOS = 258, - BAD = 259, - HELP = 260, - HEX = 261, - DECIMAL = 262, - QUIT = 263, - ABS = 264, - BIN = 265, - FIB = 266, - GCD = 267, - KRON = 268, - LCM = 269, - LUCNUM = 270, - NEXTPRIME = 271, - POWM = 272, - ROOT = 273, - SQRT = 274, - NUMBER = 275, - VARIABLE = 276, - LOR = 277, - LAND = 278, - GE = 279, - LE = 280, - NE = 281, - EQ = 282, - RSHIFT = 283, - LSHIFT = 284, - UMINUS = 285 - }; -#endif -/* Tokens. */ -#define EOS 258 -#define BAD 259 -#define HELP 260 -#define HEX 261 -#define DECIMAL 262 -#define QUIT 263 -#define ABS 264 -#define BIN 265 -#define FIB 266 -#define GCD 267 -#define KRON 268 -#define LCM 269 -#define LUCNUM 270 -#define NEXTPRIME 271 -#define POWM 272 -#define ROOT 273 -#define SQRT 274 -#define NUMBER 275 -#define VARIABLE 276 -#define LOR 277 -#define LAND 278 -#define GE 279 -#define LE 280 -#define NE 281 -#define EQ 282 -#define RSHIFT 283 -#define LSHIFT 284 -#define UMINUS 285 - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ -/* Line 2053 of yacc.c */ -#line 142 "../../../gmp/demos/calc/calc.y" - - char *str; - int var; - - -/* Line 2053 of yacc.c */ -#line 123 "calc.h" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - -extern YYSTYPE yylval; - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - -#endif /* !YY_YY_CALC_H_INCLUDED */ diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/calc/calc.y b/src/plugins/e-acsl/contrib/libgmp/demos/calc/calc.y deleted file mode 100644 index 0fa1206f79a..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/calc/calc.y +++ /dev/null @@ -1,318 +0,0 @@ -%{ -/* A simple integer desk calculator using yacc and gmp. - -Copyright 2000-2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program. If not, see https://www.gnu.org/licenses/. */ - - -/* This is a simple program, meant only to show one way to use GMP for this - sort of thing. There's few features, and error checking is minimal. - Standard input is read, calc_help() below shows the inputs accepted. - - Expressions are evaluated as they're read. If user defined functions - were wanted it'd be necessary to build a parse tree like pexpr.c does, or - a list of operations for a stack based evaluator. That would also make - it possible to detect and optimize evaluations "mod m" like pexpr.c does. - - A stack is used for intermediate values in the expression evaluation, - separate from the yacc parser stack. This is simple, makes error - recovery easy, minimizes the junk around mpz calls in the rules, and - saves initializing or clearing "mpz_t"s during a calculation. A - disadvantage though is that variables must be copied to the stack to be - worked on. A more sophisticated calculator or language system might be - able to avoid that when executing a compiled or semi-compiled form. - - Avoiding repeated initializing and clearing of "mpz_t"s is important. In - this program the time spent parsing is obviously much greater than any - possible saving from this, but a proper calculator or language should - take some trouble over it. Don't be surprised if an init/clear takes 3 - or more times as long as a 10 limb addition, depending on the system (see - the mpz_init_realloc_clear example in tune/README). */ - - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "gmp.h" -#define NO_CALC_H /* because it conflicts with normal calc.c stuff */ -#include "calc-common.h" - - -#define numberof(x) (sizeof (x) / sizeof ((x)[0])) - - -void -calc_help (void) -{ - printf ("Examples:\n"); - printf (" 2+3*4 expressions are evaluated\n"); - printf (" x=5^6 variables a to z can be set and used\n"); - printf ("Operators:\n"); - printf (" + - * arithmetic\n"); - printf (" / %% division and remainder (rounding towards negative infinity)\n"); - printf (" ^ exponentiation\n"); - printf (" ! factorial\n"); - printf (" << >> left and right shifts\n"); - printf (" <= >= > \\ comparisons, giving 1 if true, 0 if false\n"); - printf (" == != < /\n"); - printf (" && || logical and/or, giving 1 if true, 0 if false\n"); - printf ("Functions:\n"); - printf (" abs(n) absolute value\n"); - printf (" bin(n,m) binomial coefficient\n"); - printf (" fib(n) fibonacci number\n"); - printf (" gcd(a,b,..) greatest common divisor\n"); - printf (" kron(a,b) kronecker symbol\n"); - printf (" lcm(a,b,..) least common multiple\n"); - printf (" lucnum(n) lucas number\n"); - printf (" nextprime(n) next prime after n\n"); - printf (" powm(b,e,m) modulo powering, b^e%%m\n"); - printf (" root(n,r) r-th root\n"); - printf (" sqrt(n) square root\n"); - printf ("Other:\n"); - printf (" hex \\ set hex or decimal for input and output\n"); - printf (" decimal / (\"0x\" can be used for hex too)\n"); - printf (" quit exit program (EOF works too)\n"); - printf (" ; statements are separated with a ; or newline\n"); - printf (" \\ continue expressions with \\ before newline\n"); - printf (" # xxx comments are # though to newline\n"); - printf ("Hex numbers must be entered in upper case, to distinguish them from the\n"); - printf ("variables a to f (like in bc).\n"); -} - - -int ibase = 0; -int obase = 10; - - -/* The stack is a fixed size, which means there's a limit on the nesting - allowed in expressions. A more sophisticated program could let it grow - dynamically. */ - -mpz_t stack[100]; -mpz_ptr sp = stack[0]; - -#define CHECK_OVERFLOW() \ - if (sp >= stack[numberof(stack)]) /* FIXME */ \ - { \ - fprintf (stderr, \ - "Value stack overflow, too much nesting in expression\n"); \ - YYERROR; \ - } - -#define CHECK_EMPTY() \ - if (sp != stack[0]) \ - { \ - fprintf (stderr, "Oops, expected the value stack to be empty\n"); \ - sp = stack[0]; \ - } - - -mpz_t variable[26]; - -#define CHECK_VARIABLE(var) \ - if ((var) < 0 || (var) >= numberof (variable)) \ - { \ - fprintf (stderr, "Oops, bad variable somehow: %d\n", var); \ - YYERROR; \ - } - - -#define CHECK_UI(name,z) \ - if (! mpz_fits_ulong_p (z)) \ - { \ - fprintf (stderr, "%s too big\n", name); \ - YYERROR; \ - } - -%} - -%union { - char *str; - int var; -} - -%token EOS BAD -%token HELP HEX DECIMAL QUIT -%token ABS BIN FIB GCD KRON LCM LUCNUM NEXTPRIME POWM ROOT SQRT -%token <str> NUMBER -%token <var> VARIABLE - -/* operators, increasing precedence */ -%left LOR -%left LAND -%nonassoc '<' '>' EQ NE LE GE -%left LSHIFT RSHIFT -%left '+' '-' -%left '*' '/' '%' -%nonassoc UMINUS -%right '^' -%nonassoc '!' - -%% - -top: - statement - | statements statement; - -statements: - statement EOS - | statements statement EOS - | error EOS { sp = stack[0]; yyerrok; }; - -statement: - /* empty */ - | e { - mpz_out_str (stdout, obase, sp); putchar ('\n'); - sp--; - CHECK_EMPTY (); - } - | VARIABLE '=' e { - CHECK_VARIABLE ($1); - mpz_swap (variable[$1], sp); - sp--; - CHECK_EMPTY (); - } - | HELP { calc_help (); } - | HEX { ibase = 16; obase = -16; } - | DECIMAL { ibase = 0; obase = 10; } - | QUIT { exit (0); }; - -/* "e" leaves it's value on the top of the mpz stack. A rule like "e '+' e" - will have done a reduction for the first "e" first and the second "e" - second, so the code receives the values in that order on the stack. */ -e: - '(' e ')' /* value on stack */ - | e '+' e { sp--; mpz_add (sp, sp, sp+1); } - | e '-' e { sp--; mpz_sub (sp, sp, sp+1); } - | e '*' e { sp--; mpz_mul (sp, sp, sp+1); } - | e '/' e { sp--; mpz_fdiv_q (sp, sp, sp+1); } - | e '%' e { sp--; mpz_fdiv_r (sp, sp, sp+1); } - | e '^' e { CHECK_UI ("Exponent", sp); - sp--; mpz_pow_ui (sp, sp, mpz_get_ui (sp+1)); } - | e LSHIFT e { CHECK_UI ("Shift count", sp); - sp--; mpz_mul_2exp (sp, sp, mpz_get_ui (sp+1)); } - | e RSHIFT e { CHECK_UI ("Shift count", sp); - sp--; mpz_fdiv_q_2exp (sp, sp, mpz_get_ui (sp+1)); } - | e '!' { CHECK_UI ("Factorial", sp); - mpz_fac_ui (sp, mpz_get_ui (sp)); } - | '-' e %prec UMINUS { mpz_neg (sp, sp); } - - | e '<' e { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) < 0); } - | e LE e { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) <= 0); } - | e EQ e { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) == 0); } - | e NE e { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) != 0); } - | e GE e { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) >= 0); } - | e '>' e { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) > 0); } - - | e LAND e { sp--; mpz_set_ui (sp, mpz_sgn (sp) && mpz_sgn (sp+1)); } - | e LOR e { sp--; mpz_set_ui (sp, mpz_sgn (sp) || mpz_sgn (sp+1)); } - - | ABS '(' e ')' { mpz_abs (sp, sp); } - | BIN '(' e ',' e ')' { sp--; CHECK_UI ("Binomial base", sp+1); - mpz_bin_ui (sp, sp, mpz_get_ui (sp+1)); } - | FIB '(' e ')' { CHECK_UI ("Fibonacci", sp); - mpz_fib_ui (sp, mpz_get_ui (sp)); } - | GCD '(' gcdlist ')' /* value on stack */ - | KRON '(' e ',' e ')' { sp--; mpz_set_si (sp, - mpz_kronecker (sp, sp+1)); } - | LCM '(' lcmlist ')' /* value on stack */ - | LUCNUM '(' e ')' { CHECK_UI ("Lucas number", sp); - mpz_lucnum_ui (sp, mpz_get_ui (sp)); } - | NEXTPRIME '(' e ')' { mpz_nextprime (sp, sp); } - | POWM '(' e ',' e ',' e ')' { sp -= 2; mpz_powm (sp, sp, sp+1, sp+2); } - | ROOT '(' e ',' e ')' { sp--; CHECK_UI ("Nth-root", sp+1); - mpz_root (sp, sp, mpz_get_ui (sp+1)); } - | SQRT '(' e ')' { mpz_sqrt (sp, sp); } - - | VARIABLE { - sp++; - CHECK_OVERFLOW (); - CHECK_VARIABLE ($1); - mpz_set (sp, variable[$1]); - } - | NUMBER { - sp++; - CHECK_OVERFLOW (); - if (mpz_set_str (sp, $1, ibase) != 0) - { - fprintf (stderr, "Invalid number: %s\n", $1); - YYERROR; - } - }; - -gcdlist: - e /* value on stack */ - | gcdlist ',' e { sp--; mpz_gcd (sp, sp, sp+1); }; - -lcmlist: - e /* value on stack */ - | lcmlist ',' e { sp--; mpz_lcm (sp, sp, sp+1); }; - -%% - -yyerror (char *s) -{ - fprintf (stderr, "%s\n", s); -} - -int calc_option_readline = -1; - -int -main (int argc, char *argv[]) -{ - int i; - - for (i = 1; i < argc; i++) - { - if (strcmp (argv[i], "--readline") == 0) - calc_option_readline = 1; - else if (strcmp (argv[i], "--noreadline") == 0) - calc_option_readline = 0; - else if (strcmp (argv[i], "--help") == 0) - { - printf ("Usage: calc [--option]...\n"); - printf (" --readline use readline\n"); - printf (" --noreadline don't use readline\n"); - printf (" --help this message\n"); - printf ("Readline is only available when compiled in,\n"); - printf ("and in that case it's the default on a tty.\n"); - exit (0); - } - else - { - fprintf (stderr, "Unrecognised option: %s\n", argv[i]); - exit (1); - } - } - -#if WITH_READLINE - calc_init_readline (); -#else - if (calc_option_readline == 1) - { - fprintf (stderr, "Readline support not available\n"); - exit (1); - } -#endif - - for (i = 0; i < numberof (variable); i++) - mpz_init (variable[i]); - - for (i = 0; i < numberof (stack); i++) - mpz_init (stack[i]); - - return yyparse (); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/calc/calclex.c b/src/plugins/e-acsl/contrib/libgmp/demos/calc/calclex.c deleted file mode 100644 index e3919a3155f..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/calc/calclex.c +++ /dev/null @@ -1,1715 +0,0 @@ -/* A lexical scanner generated by flex */ - -/* Scanner skeleton version: - * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ - * $FreeBSD: releng/9.3/usr.bin/lex/flex.skl 214272 2010-10-24 15:31:41Z uqs $ - */ - -#if defined(__FreeBSD__) -#include <sys/cdefs.h> -#else -#define __unused -#define __dead2 -#endif - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 - -#include <stdio.h> - - -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif -#endif - - -#ifdef __cplusplus - -#include <stdlib.h> -#include <unistd.h> - -/* Use prototypes in function declarations. */ -#define YY_USE_PROTOS - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -#if __STDC__ - -#define YY_USE_PROTOS -#define YY_USE_CONST - -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ - -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include <io.h> -#include <stdlib.h> -#define YY_USE_CONST -#define YY_USE_PROTOS -#endif - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - - -#ifdef YY_USE_PROTOS -#define YY_PROTO(proto) proto -#else -#define YY_PROTO(proto) () -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#define YY_BUF_SIZE 16384 - -typedef struct yy_buffer_state *YY_BUFFER_STATE; - -extern int yyleng; -extern FILE *yyin, *yyout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * yyless( 5 ); - * else - * do_something_else(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the yyless() call. - */ - -/* Return all but the first 'n' matched characters back to the input stream. */ - -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yytext_ptr ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ -typedef unsigned int yy_size_t; - - -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - }; - -static YY_BUFFER_STATE yy_current_buffer = 0; - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - */ -#define YY_CURRENT_BUFFER yy_current_buffer - - -/* yy_hold_char holds the character lost when yytext is formed. */ -static char yy_hold_char; - -static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - -int yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void yyrestart YY_PROTO(( FILE *input_file )); - -void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); -void yy_load_buffer_state YY_PROTO(( void )); -YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); -void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); -void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); -void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); -#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) - -YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); -YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); -YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); - -static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) __unused; -static void yy_flex_free YY_PROTO(( void * )); - -#define yy_new_buffer yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) - -typedef unsigned char YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; -typedef int yy_state_type; -extern char *yytext; -#define yytext_ptr yytext - -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )) __dead2; - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 19 -#define YY_END_OF_BUFFER 20 -static yyconst short int yy_accept[39] = - { 0, - 0, 0, 20, 18, 1, 2, 7, 6, 7, 18, - 16, 16, 2, 7, 7, 7, 16, 17, 18, 18, - 11, 6, 5, 6, 14, 16, 0, 12, 8, 10, - 9, 13, 16, 17, 3, 15, 4, 0 - } ; - -static yyconst int yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 1, 5, 1, 6, 7, 1, 6, - 6, 6, 6, 6, 6, 1, 6, 8, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 1, 10, 11, - 12, 13, 1, 1, 14, 14, 14, 14, 14, 14, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 16, 15, 15, - 1, 17, 1, 6, 1, 1, 15, 15, 15, 15, - - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, - 15, 15, 1, 18, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst int yy_meta[19] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, - 1, 1, 1, 2, 3, 2, 1, 1 - } ; - -static yyconst short int yy_base[43] = - { 0, - 0, 0, 39, 49, 49, 49, 26, 16, 49, 30, - 20, 19, 49, 9, 22, 10, 9, 0, 29, 13, - 49, 23, 49, 24, 49, 0, 0, 49, 49, 49, - 49, 49, 13, 0, 49, 49, 49, 49, 41, 28, - 43, 45 - } ; - -static yyconst short int yy_def[43] = - { 0, - 38, 1, 38, 38, 38, 38, 38, 39, 38, 38, - 40, 40, 38, 38, 38, 38, 41, 42, 38, 38, - 38, 39, 38, 39, 38, 12, 12, 38, 38, 38, - 38, 38, 41, 42, 38, 38, 38, 0, 38, 38, - 38, 38 - } ; - -static yyconst short int yy_nxt[68] = - { 0, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 18, 19, 20, 23, 28, - 29, 31, 32, 34, 34, 23, 37, 34, 34, 26, - 36, 35, 24, 30, 38, 27, 25, 21, 38, 24, - 24, 22, 22, 22, 33, 33, 34, 34, 3, 38, - 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38 - } ; - -static yyconst short int yy_chk[68] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 8, 14, - 14, 16, 16, 17, 17, 22, 24, 33, 33, 40, - 20, 19, 8, 15, 12, 11, 10, 7, 3, 22, - 24, 39, 39, 39, 41, 41, 42, 42, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38 - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *yytext; -#line 1 "../../../gmp/demos/calc/calclex.l" -#define INITIAL 0 -/* Lexical analyzer for calc program. - -Copyright 2000-2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program. If not, see https://www.gnu.org/licenses/. */ -#line 20 "../../../gmp/demos/calc/calclex.l" -#include <string.h> -#include "calc-common.h" - - -#if WITH_READLINE -/* Let GNU flex use readline. See the calcread.c redefined input() for a - way that might work for a standard lex too. */ -#define YY_INPUT(buf,result,max_size) \ - result = calc_input (buf, max_size); -#endif - - -/* Non-zero when reading the second or subsequent line of an expression, - used to give a different prompt when using readline. */ -int calc_more_input = 0; - - -const struct calc_keywords_t calc_keywords[] = { - { "abs", ABS }, - { "bin", BIN }, - { "decimal", DECIMAL }, - { "fib", FIB }, - { "hex", HEX }, - { "help", HELP }, - { "gcd", GCD }, - { "kron", KRON }, - { "lcm", LCM }, - { "lucnum", LUCNUM }, - { "nextprime", NEXTPRIME }, - { "powm", POWM }, - { "quit", QUIT }, - { "root", ROOT }, - { "sqrt", SQRT }, - { NULL } -}; -#line 448 "calclex.c" - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); -#else -extern int yywrap YY_PROTO(( void )); -#endif -#endif - -#ifndef YY_NO_UNPUT -static void yyunput YY_PROTO(( int c, char *buf_ptr )); -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen YY_PROTO(( yyconst char * )); -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput YY_PROTO(( void )); -#else -static int input YY_PROTO(( void )); -#endif -#endif - -#if YY_STACK_USED -static int yy_start_stack_ptr = 0; -static int yy_start_stack_depth = 0; -static int *yy_start_stack = 0; -#ifndef YY_NO_PUSH_STATE -static void yy_push_state YY_PROTO(( int new_state )); -#endif -#ifndef YY_NO_POP_STATE -static void yy_pop_state YY_PROTO(( void )); -#endif -#ifndef YY_NO_TOP_STATE -static int yy_top_state YY_PROTO(( void )); -#endif - -#else -#define YY_NO_PUSH_STATE 1 -#define YY_NO_POP_STATE 1 -#define YY_NO_TOP_STATE 1 -#endif - -#ifdef YY_MALLOC_DECL -YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include <stdlib.h> -#endif -#else -/* Just try to get by without declaring the routines. This will fail - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) - * or sizeof(void*) != sizeof(int). - */ -#endif -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ - -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( yy_current_buffer->yy_is_interactive ) \ - { \ - int c = '*', n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL int yylex YY_PROTO(( void )) -#endif - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -YY_DECL - { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - -#line 57 "../../../gmp/demos/calc/calclex.l" - - -#line 602 "calclex.c" - - if ( yy_init ) - { - yy_init = 0; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yy_start ) - yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_load_buffer_state(); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yy_start; -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 39 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 49 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - -do_action: /* This label is used only to access EOF actions. */ - - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 59 "../../../gmp/demos/calc/calclex.l" -{ /* white space is skipped */ } - YY_BREAK -case 2: -YY_RULE_SETUP -#line 61 "../../../gmp/demos/calc/calclex.l" -{ /* semicolon or newline separates statements */ - calc_more_input = 0; - return EOS; } - YY_BREAK -case 3: -YY_RULE_SETUP -#line 64 "../../../gmp/demos/calc/calclex.l" -{ /* escaped newlines are skipped */ } - YY_BREAK -case 4: -YY_RULE_SETUP -#line 67 "../../../gmp/demos/calc/calclex.l" -{ - /* comment through to escaped newline is skipped */ } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 69 "../../../gmp/demos/calc/calclex.l" -{ /* comment through to newline is a separator */ - calc_more_input = 0; - return EOS; } - YY_BREAK -case 6: -YY_RULE_SETUP -#line 72 "../../../gmp/demos/calc/calclex.l" -{ /* comment through to EOF skipped */ } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 75 "../../../gmp/demos/calc/calclex.l" -{ return yytext[0]; } - YY_BREAK -case 8: -YY_RULE_SETUP -#line 76 "../../../gmp/demos/calc/calclex.l" -{ return LE; } - YY_BREAK -case 9: -YY_RULE_SETUP -#line 77 "../../../gmp/demos/calc/calclex.l" -{ return GE; } - YY_BREAK -case 10: -YY_RULE_SETUP -#line 78 "../../../gmp/demos/calc/calclex.l" -{ return EQ; } - YY_BREAK -case 11: -YY_RULE_SETUP -#line 79 "../../../gmp/demos/calc/calclex.l" -{ return NE; } - YY_BREAK -case 12: -YY_RULE_SETUP -#line 80 "../../../gmp/demos/calc/calclex.l" -{ return LSHIFT; } - YY_BREAK -case 13: -YY_RULE_SETUP -#line 81 "../../../gmp/demos/calc/calclex.l" -{ return RSHIFT; } - YY_BREAK -case 14: -YY_RULE_SETUP -#line 82 "../../../gmp/demos/calc/calclex.l" -{ return LAND; } - YY_BREAK -case 15: -YY_RULE_SETUP -#line 83 "../../../gmp/demos/calc/calclex.l" -{ return LOR; } - YY_BREAK -case 16: -YY_RULE_SETUP -#line 85 "../../../gmp/demos/calc/calclex.l" -{ - yylval.str = yytext; - return NUMBER; } - YY_BREAK -case 17: -YY_RULE_SETUP -#line 89 "../../../gmp/demos/calc/calclex.l" -{ - int i; - - for (i = 0; calc_keywords[i].name != NULL; i++) - if (strcmp (yytext, calc_keywords[i].name) == 0) - return calc_keywords[i].value; - - if (yytext[0] >= 'a' && yytext[0] <= 'z' && yytext[1] == '\0') - { - yylval.var = yytext[0] - 'a'; - return VARIABLE; - } - - return BAD; -} - YY_BREAK -case 18: -YY_RULE_SETUP -#line 105 "../../../gmp/demos/calc/calclex.l" -{ return BAD; } - YY_BREAK -case 19: -YY_RULE_SETUP -#line 107 "../../../gmp/demos/calc/calclex.l" -ECHO; - YY_BREAK -#line 801 "calclex.c" -case YY_STATE_EOF(INITIAL): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between yy_current_buffer and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - yy_did_buffer_switch_on_eof = 0; - - if ( yywrap() ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = - yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of yylex */ - - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ - -#ifdef YY_USE_PROTOS -static int yy_get_next_buffer(void) -#else -static int yy_get_next_buffer() -#endif - { - char *dest = yy_current_buffer->yy_ch_buf; - char *source = yytext_ptr; - int number_to_move, i; - int ret_val; - - if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( yy_current_buffer->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - yy_current_buffer->yy_n_chars = yy_n_chars = 0; - - else - { - int num_to_read = - yy_current_buffer->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ -#ifdef YY_USES_REJECT - YY_FATAL_ERROR( -"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); -#else - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = yy_current_buffer; - - int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = yy_current_buffer->yy_buf_size - - number_to_move - 1; -#endif - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); - - yy_current_buffer->yy_n_chars = yy_n_chars; - } - - if ( yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - yy_n_chars += number_to_move; - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; - - return ret_val; - } - - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - -#ifdef YY_USE_PROTOS -static yy_state_type yy_get_previous_state(void) -#else -static yy_state_type yy_get_previous_state() -#endif - { - yy_state_type yy_current_state; - char *yy_cp; - - yy_current_state = yy_start; - - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 39 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; - } - - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - -#ifdef YY_USE_PROTOS -static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) -#else -static yy_state_type yy_try_NUL_trans( yy_current_state ) -yy_state_type yy_current_state; -#endif - { - int yy_is_jam; - char *yy_cp = yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 39 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 38); - - return yy_is_jam ? 0 : yy_current_state; - } - - -#ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -char *yy_bp; -#endif - { - char *yy_cp = yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - int number_to_move = yy_n_chars + 2; - char *dest = &yy_current_buffer->yy_ch_buf[ - yy_current_buffer->yy_buf_size + 2]; - char *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; - - while ( source > yy_current_buffer->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - yy_current_buffer->yy_n_chars = - yy_n_chars = yy_current_buffer->yy_buf_size; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - - yytext_ptr = yy_bp; - yy_hold_char = *yy_cp; - yy_c_buf_p = yy_cp; - } -#endif /* ifndef YY_NO_UNPUT */ - - -#ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput() -#else -#ifdef YY_USE_PROTOS -static int input(void) -#else -static int input() -#endif -#endif - { - int c; - - *yy_c_buf_p = yy_hold_char; - - if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - /* This was really a NUL. */ - *yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yy_c_buf_p - yytext_ptr; - ++yy_c_buf_p; - - switch ( yy_get_next_buffer() ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin ); - - /* fall through */ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap() ) - return EOF; - - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ - *yy_c_buf_p = '\0'; /* preserve yytext */ - yy_hold_char = *++yy_c_buf_p; - - - return c; - } -#endif /* ifndef YY_NO_INPUT */ - - -#ifdef YY_USE_PROTOS -void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif - { - if ( ! yy_current_buffer ) - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_init_buffer( yy_current_buffer, input_file ); - yy_load_buffer_state(); - } - - -#ifdef YY_USE_PROTOS -void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) -#else -void yy_switch_to_buffer( new_buffer ) -YY_BUFFER_STATE new_buffer; -#endif - { - if ( yy_current_buffer == new_buffer ) - return; - - if ( yy_current_buffer ) - { - /* Flush out information for old buffer. */ - *yy_c_buf_p = yy_hold_char; - yy_current_buffer->yy_buf_pos = yy_c_buf_p; - yy_current_buffer->yy_n_chars = yy_n_chars; - } - - yy_current_buffer = new_buffer; - yy_load_buffer_state(); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yy_did_buffer_switch_on_eof = 1; - } - - -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } - - -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) -#else -YY_BUFFER_STATE yy_create_buffer( file, size ) -FILE *file; -int size; -#endif - { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer( b, file ); - - return b; - } - - -#ifdef YY_USE_PROTOS -void yy_delete_buffer( YY_BUFFER_STATE b ) -#else -void yy_delete_buffer( b ) -YY_BUFFER_STATE b; -#endif - { - if ( ! b ) - return; - - if ( b == yy_current_buffer ) - yy_current_buffer = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yy_flex_free( (void *) b->yy_ch_buf ); - - yy_flex_free( (void *) b ); - } - - -#ifndef YY_ALWAYS_INTERACTIVE -#ifndef YY_NEVER_INTERACTIVE -extern int isatty YY_PROTO(( int )); -#endif -#endif - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif - - - { - yy_flush_buffer( b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - -#if YY_ALWAYS_INTERACTIVE - b->yy_is_interactive = 1; -#else -#if YY_NEVER_INTERACTIVE - b->yy_is_interactive = 0; -#else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; -#endif -#endif - } - - -#ifdef YY_USE_PROTOS -void yy_flush_buffer( YY_BUFFER_STATE b ) -#else -void yy_flush_buffer( b ) -YY_BUFFER_STATE b; -#endif - - { - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == yy_current_buffer ) - yy_load_buffer_state(); - } - - -#ifndef YY_NO_SCAN_BUFFER -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) -#else -YY_BUFFER_STATE yy_scan_buffer( base, size ) -char *base; -yy_size_t size; -#endif - { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b ); - - return b; - } -#endif - - -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) -#else -YY_BUFFER_STATE yy_scan_string( yy_str ) -yyconst char *yy_str; -#endif - { - int len; - for ( len = 0; yy_str[len]; ++len ) - ; - - return yy_scan_bytes( yy_str, len ); - } -#endif - - -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -yyconst char *bytes; -int len; -#endif - { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; - buf = (char *) yy_flex_alloc( n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; - - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; - } -#endif - - -#ifndef YY_NO_PUSH_STATE -#ifdef YY_USE_PROTOS -static void yy_push_state( int new_state ) -#else -static void yy_push_state( new_state ) -int new_state; -#endif - { - if ( yy_start_stack_ptr >= yy_start_stack_depth ) - { - yy_size_t new_size; - - yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yy_start_stack_depth * sizeof( int ); - - if ( ! yy_start_stack ) - yy_start_stack = (int *) yy_flex_alloc( new_size ); - - else - yy_start_stack = (int *) yy_flex_realloc( - (void *) yy_start_stack, new_size ); - - if ( ! yy_start_stack ) - YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); - } - - yy_start_stack[yy_start_stack_ptr++] = YY_START; - - BEGIN(new_state); - } -#endif - - -#ifndef YY_NO_POP_STATE -#ifdef YY_USE_PROTOS -static void yy_pop_state(void) -#else -static void yy_pop_state() -#endif - { - if ( --yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN(yy_start_stack[yy_start_stack_ptr]); - } -#endif - - -#ifndef YY_NO_TOP_STATE -#ifdef YY_USE_PROTOS -static int yy_top_state(void) -#else -static int yy_top_state() -#endif - { - return yy_start_stack[yy_start_stack_ptr - 1]; - } -#endif - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -#ifdef YY_USE_PROTOS -static void yy_fatal_error( yyconst char msg[] ) -#else -static void yy_fatal_error( msg ) -char msg[]; -#endif - { - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); - } - - - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ - } \ - while ( 0 ) - - -/* Internal utility routines. */ - -#ifndef yytext_ptr -#ifdef YY_USE_PROTOS -static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -yyconst char *s2; -int n; -#endif - { - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; - } -#endif - -#ifdef YY_NEED_STRLEN -#ifdef YY_USE_PROTOS -static int yy_flex_strlen( yyconst char *s ) -#else -static int yy_flex_strlen( s ) -yyconst char *s; -#endif - { - int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; - } -#endif - - -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; -#endif - { - return (void *) malloc( size ); - } - -#ifdef YY_USE_PROTOS -static void *yy_flex_realloc( void *ptr, yy_size_t size ) -#else -static void *yy_flex_realloc( ptr, size ) -void *ptr; -yy_size_t size; -#endif - { - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); - } - -#ifdef YY_USE_PROTOS -static void yy_flex_free( void *ptr ) -#else -static void yy_flex_free( ptr ) -void *ptr; -#endif - { - free( ptr ); - } - -#if YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif -#line 107 "../../../gmp/demos/calc/calclex.l" - - -int -yywrap () -{ - return 1; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/calc/calclex.l b/src/plugins/e-acsl/contrib/libgmp/demos/calc/calclex.l deleted file mode 100644 index 44df848fadc..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/calc/calclex.l +++ /dev/null @@ -1,113 +0,0 @@ -/* Lexical analyzer for calc program. - -Copyright 2000-2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program. If not, see https://www.gnu.org/licenses/. */ - -%{ -#include <string.h> -#include "calc-common.h" - - -#if WITH_READLINE -/* Let GNU flex use readline. See the calcread.c redefined input() for a - way that might work for a standard lex too. */ -#define YY_INPUT(buf,result,max_size) \ - result = calc_input (buf, max_size); -#endif - - -/* Non-zero when reading the second or subsequent line of an expression, - used to give a different prompt when using readline. */ -int calc_more_input = 0; - - -const struct calc_keywords_t calc_keywords[] = { - { "abs", ABS }, - { "bin", BIN }, - { "decimal", DECIMAL }, - { "fib", FIB }, - { "hex", HEX }, - { "help", HELP }, - { "gcd", GCD }, - { "kron", KRON }, - { "lcm", LCM }, - { "lucnum", LUCNUM }, - { "nextprime", NEXTPRIME }, - { "powm", POWM }, - { "quit", QUIT }, - { "root", ROOT }, - { "sqrt", SQRT }, - { NULL } -}; -%} - -%% - -[ \t\f] { /* white space is skipped */ } - -[;\n] { /* semicolon or newline separates statements */ - calc_more_input = 0; - return EOS; } -\\\n { /* escaped newlines are skipped */ } - - -#(([^\\\n]*)\\)+\n { - /* comment through to escaped newline is skipped */ } -#[^\n]*\n { /* comment through to newline is a separator */ - calc_more_input = 0; - return EOS; } -#[^\n]* { /* comment through to EOF skipped */ } - - -[-+*/%()<>^!=,] { return yytext[0]; } -"<=" { return LE; } -">=" { return GE; } -"==" { return EQ; } -"!=" { return NE; } -"<<" { return LSHIFT; } -">>" { return RSHIFT; } -"&&" { return LAND; } -"||" { return LOR; } - -(0[xX])?[0-9A-F]+ { - yylval.str = yytext; - return NUMBER; } - -[a-zA-Z][a-zA-Z0-9]* { - int i; - - for (i = 0; calc_keywords[i].name != NULL; i++) - if (strcmp (yytext, calc_keywords[i].name) == 0) - return calc_keywords[i].value; - - if (yytext[0] >= 'a' && yytext[0] <= 'z' && yytext[1] == '\0') - { - yylval.var = yytext[0] - 'a'; - return VARIABLE; - } - - return BAD; -} - -. { return BAD; } - -%% - -int -yywrap () -{ - return 1; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/calc/calcread.c b/src/plugins/e-acsl/contrib/libgmp/demos/calc/calcread.c deleted file mode 100644 index 40433686c18..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/calc/calcread.c +++ /dev/null @@ -1,146 +0,0 @@ -/* Readline support for calc program. - -Copyright 2000, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program. If not, see https://www.gnu.org/licenses/. */ - -#include "calc-common.h" - -#if WITH_READLINE -#include <stdio.h> /* for FILE for old versions of readline/readline.h */ -#include <stdlib.h> /* for free */ -#include <string.h> /* for strdup */ -#include <unistd.h> /* for isatty */ -#include <readline/readline.h> -#include <readline/history.h> - -#include "gmp.h" - - -/* change this to "#define TRACE(x) x" for a few diagnostics */ -#define TRACE(x) - - -#define MIN(x,y) ((x) < (y) ? (x) : (y)) - -char * -calc_completion_entry (const char *text, int state) -{ - static int index, len; - char *name; - - if (!state) - { - index = 0; - len = strlen (text); - } - TRACE (printf ("calc_completion_entry %s %d, index=%d len=%d\n", - text, state, index, len)); - while ((name = calc_keywords[index].name) != NULL) - { - index++; - if (memcmp (name, text, len) == 0) - return (strdup (name)); - } - return NULL; -} - -void -calc_init_readline (void) -{ - /* By default use readline when the input is a tty. It's a bit contrary - to the GNU interface conventions to make the behaviour depend on where - the input is coming from, but this is pretty convenient. */ - if (calc_option_readline == -1) - { - calc_option_readline = isatty (fileno (stdin)); - TRACE (printf ("calc_option_readline %d\n", calc_option_readline)); - } - - if (calc_option_readline) - { - printf ("GNU MP demo calculator program, gmp version %s\n", gmp_version); - printf ("Type \"help\" for help.\n"); - rl_readline_name = "gmp-calc"; - rl_completion_entry_function = calc_completion_entry; - } -} - - -/* This function is supposed to return YY_NULL to indicate EOF, but that - constant is only in calclex.c and we don't want to clutter calclex.l with - this readline stuff, so instead just hard code 0 for YY_NULL. That's - it's defined value on unix anyway. */ - -int -calc_input (char *buf, size_t max_size) -{ - if (calc_option_readline) - { - static char *line = NULL; - static size_t line_size = 0; - static size_t upto = 0; - size_t copy_size; - - if (upto >= line_size) - { - if (line != NULL) - free (line); - - line = readline (calc_more_input ? "more> " : "> "); - calc_more_input = 1; - if (line == NULL) - return 0; - TRACE (printf ("readline: %s\n", line)); - - if (line[0] != '\0') - add_history (line); - - line_size = strlen (line); - line[line_size] = '\n'; - line_size++; - upto = 0; - } - - copy_size = MIN (line_size-upto, max_size); - memcpy (buf, line+upto, copy_size); - upto += copy_size; - return copy_size; - } - else - { - /* not readline */ - return fread (buf, 1, max_size, stdin); - } -} - - -/* This redefined input() might let a traditional lex use the readline - support here. Apparently POSIX doesn't specify whether an override like - this will work, so maybe it'll work or maybe it won't. This function is - also not particularly efficient, but don't worry about that, since flex - is the preferred parser. */ - -int -input (void) -{ - char c; - if (calc_input (&c, 1) != 1) - return EOF; - else - return (int) c; -} - -#endif /* WITH_READLINE */ diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/expr/Makefile.am b/src/plugins/e-acsl/contrib/libgmp/demos/expr/Makefile.am deleted file mode 100644 index 252300aafbe..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/expr/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ -## Process this file with automake to generate Makefile.in - -# Copyright 2001-2004 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. - - -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests - -# FIXME: This is a workaround for a bug in automake 1.8.4. When the only -# library is in EXTRA_LIBRARIES, $(ARFLAGS) is used but no default setting -# for that variable is established. We give an explicit ARFLAGS=cru the -# same as generated for lib_LIBRARIES or noinst_LIBRARIES. -# -ARFLAGS = cru - -EXTRA_LIBRARIES = libexpr.a -libexpr_a_SOURCES = expr.h expr-impl.h \ - expr.c exprv.c exprz.c exprza.c exprq.c exprqa.c exprf.c exprfa.c - -EXTRA_PROGRAMS = run-expr t-expr -LDADD = libexpr.a $(top_builddir)/libgmp.la -t_expr_LDADD = $(top_builddir)/tests/libtests.la $(LDADD) - -CLEANFILES = $(EXTRA_PROGRAMS) $(EXTRA_LIBRARIES) - -allprogs: $(EXTRA_PROGRAMS) - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/expr/Makefile.in b/src/plugins/e-acsl/contrib/libgmp/demos/expr/Makefile.in deleted file mode 100644 index 354e23951b2..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/expr/Makefile.in +++ /dev/null @@ -1,666 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright 2001-2004 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -EXTRA_PROGRAMS = run-expr$(EXEEXT) t-expr$(EXEEXT) -subdir = demos/expr -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_AR = $(am__v_AR_@AM_V@) -am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) -am__v_AR_0 = @echo " AR " $@; -am__v_AR_1 = -libexpr_a_AR = $(AR) $(ARFLAGS) -libexpr_a_LIBADD = -am_libexpr_a_OBJECTS = expr.$(OBJEXT) exprv.$(OBJEXT) exprz.$(OBJEXT) \ - exprza.$(OBJEXT) exprq.$(OBJEXT) exprqa.$(OBJEXT) \ - exprf.$(OBJEXT) exprfa.$(OBJEXT) -libexpr_a_OBJECTS = $(am_libexpr_a_OBJECTS) -run_expr_SOURCES = run-expr.c -run_expr_OBJECTS = run-expr.$(OBJEXT) -run_expr_LDADD = $(LDADD) -run_expr_DEPENDENCIES = libexpr.a $(top_builddir)/libgmp.la -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -t_expr_SOURCES = t-expr.c -t_expr_OBJECTS = t-expr.$(OBJEXT) -t_expr_DEPENDENCIES = $(top_builddir)/tests/libtests.la $(LDADD) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(libexpr_a_SOURCES) run-expr.c t-expr.c -DIST_SOURCES = $(libexpr_a_SOURCES) run-expr.c t-expr.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ABI = @ABI@ -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -ASMFLAGS = @ASMFLAGS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ -CC = @CC@ -CCAS = @CCAS@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CPP_FOR_BUILD = @CPP_FOR_BUILD@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@ -DEFS = @DEFS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -FGREP = @FGREP@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIMB_BITS = @GMP_LIMB_BITS@ -GMP_NAIL_BITS = @GMP_NAIL_BITS@ -GREP = @GREP@ -HAVE_CLOCK_01 = @HAVE_CLOCK_01@ -HAVE_CPUTIME_01 = @HAVE_CPUTIME_01@ -HAVE_GETRUSAGE_01 = @HAVE_GETRUSAGE_01@ -HAVE_GETTIMEOFDAY_01 = @HAVE_GETTIMEOFDAY_01@ -HAVE_HOST_CPU_FAMILY_power = @HAVE_HOST_CPU_FAMILY_power@ -HAVE_HOST_CPU_FAMILY_powerpc = @HAVE_HOST_CPU_FAMILY_powerpc@ -HAVE_SIGACTION_01 = @HAVE_SIGACTION_01@ -HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@ -HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@ -HAVE_STACK_T_01 = @HAVE_STACK_T_01@ -HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBCURSES = @LIBCURSES@ -LIBGMPXX_LDFLAGS = @LIBGMPXX_LDFLAGS@ -LIBGMP_DLL = @LIBGMP_DLL@ -LIBGMP_LDFLAGS = @LIBGMP_LDFLAGS@ -LIBM = @LIBM@ -LIBM_FOR_BUILD = @LIBM_FOR_BUILD@ -LIBOBJS = @LIBOBJS@ -LIBREADLINE = @LIBREADLINE@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -M4 = @M4@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@ -STRIP = @STRIP@ -TAL_OBJECT = @TAL_OBJECT@ -TUNE_LIBS = @TUNE_LIBS@ -TUNE_SQR_OBJ = @TUNE_SQR_OBJ@ -U_FOR_BUILD = @U_FOR_BUILD@ -VERSION = @VERSION@ -WITH_READLINE_01 = @WITH_READLINE_01@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gmp_srclinks = @gmp_srclinks@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -mpn_objects = @mpn_objects@ -mpn_objs_in_libgmp = @mpn_objs_in_libgmp@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests - -# FIXME: This is a workaround for a bug in automake 1.8.4. When the only -# library is in EXTRA_LIBRARIES, $(ARFLAGS) is used but no default setting -# for that variable is established. We give an explicit ARFLAGS=cru the -# same as generated for lib_LIBRARIES or noinst_LIBRARIES. -# -ARFLAGS = cru -EXTRA_LIBRARIES = libexpr.a -libexpr_a_SOURCES = expr.h expr-impl.h \ - expr.c exprv.c exprz.c exprza.c exprq.c exprqa.c exprf.c exprfa.c - -LDADD = libexpr.a $(top_builddir)/libgmp.la -t_expr_LDADD = $(top_builddir)/tests/libtests.la $(LDADD) -CLEANFILES = $(EXTRA_PROGRAMS) $(EXTRA_LIBRARIES) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps demos/expr/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu --ignore-deps demos/expr/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -libexpr.a: $(libexpr_a_OBJECTS) $(libexpr_a_DEPENDENCIES) $(EXTRA_libexpr_a_DEPENDENCIES) - $(AM_V_at)-rm -f libexpr.a - $(AM_V_AR)$(libexpr_a_AR) libexpr.a $(libexpr_a_OBJECTS) $(libexpr_a_LIBADD) - $(AM_V_at)$(RANLIB) libexpr.a - -run-expr$(EXEEXT): $(run_expr_OBJECTS) $(run_expr_DEPENDENCIES) $(EXTRA_run_expr_DEPENDENCIES) - @rm -f run-expr$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(run_expr_OBJECTS) $(run_expr_LDADD) $(LIBS) - -t-expr$(EXEEXT): $(t_expr_OBJECTS) $(t_expr_DEPENDENCIES) $(EXTRA_t_expr_DEPENDENCIES) - @rm -f t-expr$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_expr_OBJECTS) $(t_expr_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(AM_V_CC)$(COMPILE) -c -o $@ $< - -.c.obj: - $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ - clean-libtool cscopelist-am ctags ctags-am distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -allprogs: $(EXTRA_PROGRAMS) - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/expr/README b/src/plugins/e-acsl/contrib/libgmp/demos/expr/README deleted file mode 100644 index a54fe42c08a..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/expr/README +++ /dev/null @@ -1,501 +0,0 @@ -Copyright 2001, 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. - - - - - - - GMP EXPRESSION EVALUATION - ------------------------- - - - -THIS CODE IS PRELIMINARY AND MAY BE SUBJECT TO INCOMPATIBLE CHANGES IN -FUTURE VERSIONS OF GMP. - - - -The files in this directory implement a simple scheme of string based -expression parsing and evaluation, supporting mpz, mpq and mpf. - -This will be slower than direct GMP library calls, but may be convenient in -various circumstances, such as while prototyping, or for letting a user -enter values in symbolic form. "2**5723-7" for example is a lot easier to -enter or maintain than the equivalent written out in decimal. - - - -BUILDING - -Nothing in this directory is a normal part of libgmp, and nothing is built -or installed, but various Makefile rules are available to compile -everything. - -All the functions are available through a little library (there's no shared -library since upward binary compatibility is not guaranteed). - - make libexpr.a - -In a program, prototypes are available using - - #include "expr.h" - -run-expr.c is a sample program doing evaluations from the command line. - - make run-expr - ./run-expr '1+2*3' - -t-expr.c is self-test program, it prints nothing if successful. - - make t-expr - ./t-expr - -The expr*.c sources don't depend on gmp-impl.h and can be compiled with just -a standard installed GMP. This isn't true of t-expr though, since it uses -some of the internal tests/libtests.la. - - - -SIMPLE USAGE - -int mpz_expr (mpz_t res, int base, const char *e, ...); -int mpq_expr (mpq_t res, int base, const char *e, ...); -int mpf_expr (mpf_t res, int base, const char *e, ...); - -These functions evaluate simple arithmetic expressions. For example, - - mpz_expr (result, 0, "123+456", NULL); - -Numbers are parsed by mpz_expr and mpq_expr the same as mpz_set_str with the -given base. mpf_expr follows mpf_set_str, but supporting an "0x" prefix for -hex when base==0. - - mpz_expr (result, 0, "0xAAAA * 0x5555", NULL); - -White space, as indicated by <ctype.h> isspace(), is ignored except for the -purpose of separating tokens. - -Variables can be included in expressions by putting them in the stdarg list -after the string. "a", "b", "c" etc in the expression string designate -those values. For example, - - mpq_t foo, bar; - ... - mpq_expr (q, 10, "2/3 + 1/a + b/2", foo, bar, NULL); - -Here "a" will be the value from foo and "b" from bar. Up to 26 variables -can be included this way. The NULL must be present to indicate the end of -the list. - -Variables can also be written "$a", "$b" etc. This is necessary when using -bases greater than 10 since plain "a", "b" etc will otherwise be interpreted -as numbers. For example, - - mpf_t quux; - mpf_expr (f, 16, "F00F@-6 * $a", quux, NULL); - -All the standard C operators are available, with the usual precedences, plus -"**" for exponentiation at the highest precedence (and right associative). - - Operators Precedence - ** 220 - ~ ! - (unary) 210 - * / % 200 - + - 190 - << >> 180 - <= < >= > 170 - == != 160 - & 150 - ^ 140 - | 130 - && 120 - || 110 - ? : 100/101 - -Currently only mpz_expr has the bitwise ~ % & ^ and | operators. The -precedence numbers are of interest in the advanced usage described below. - -Various functions are available too. For example, - - mpz_expr (res, 10, "gcd(123,456,789) * abs(a)", var, NULL); - -The following is the full set of functions, - - mpz_expr - abs bin clrbit cmp cmpabs congruent_p divisible_p even_p fib fac - gcd hamdist invert jacobi kronecker lcm lucnum max min nextprime - odd_p perfect_power_p perfect_square_p popcount powm - probab_prime_p root scan0 scan1 setbit sgn sqrt - - mpq_expr - abs, cmp, den, max, min, num, sgn - - mpf_expr - abs, ceil, cmp, eq, floor, integer_p, max, min, reldiff, sgn, - sqrt, trunc - -All these are the same as the GMP library functions, except that min and max -don't exist in the library. Note also that min, max, gcd and lcm take any -number of arguments, not just two. - -mpf_expr does all calculations to the precision of the destination variable. - - -Expression parsing can succeed or fail. The return value indicates this, -and will be one of the following - - MPEXPR_RESULT_OK - MPEXPR_RESULT_BAD_VARIABLE - MPEXPR_RESULT_BAD_TABLE - MPEXPR_RESULT_PARSE_ERROR - MPEXPR_RESULT_NOT_UI - -BAD_VARIABLE is when a variable is referenced that hasn't been provided. -For example if "c" is used when only two parameters have been passed. -BAD_TABLE is applicable to the advanced usage described below. - -PARSE_ERROR is a general syntax error, returned for any mal-formed input -string. - -NOT_UI is returned when an attempt is made to use an operand that's bigger -than an "unsigned long" with a function that's restricted to that range. -For example "fib" is mpz_fib_ui and only accepts an "unsigned long". - - - - -ADVANCED USAGE - -int mpz_expr_a (const struct mpexpr_operator_t *table, - mpz_ptr res, int base, const char *e, size_t elen, - mpz_srcptr var[26]) -int mpq_expr_a (const struct mpexpr_operator_t *table, - mpq_ptr res, int base, const char *e, size_t elen, - mpq_srcptr var[26]) -int mpf_expr_a (const struct mpexpr_operator_t *table, - mpf_ptr res, int base, unsigned long prec, - const char *e, size_t elen, - mpf_srcptr var[26]) - -These functions are an advanced interface to expression parsing. - -The string is taken as pointer and length. This makes it possible to parse -an expression in the middle of somewhere without copying and null -terminating it. - -Variables are an array of 26 pointers to the appropriate operands, or NULL -for variables that are not available. Any combination of variables can be -given, for example just "x" and "y" (var[23] and var[24]) could be set. - -Operators and functions are specified with a table. This makes it possible -to provide additional operators or functions, or to completely change the -syntax. The standard tables used by the simple functions above are -available as - - const struct mpexpr_operator_t * const mpz_expr_standard_table; - const struct mpexpr_operator_t * const mpq_expr_standard_table; - const struct mpexpr_operator_t * const mpf_expr_standard_table; - -struct mpexpr_operator_t is the following - - struct mpexpr_operator_t { - const char *name; - mpexpr_fun_t fun; - int type; - int precedence; - }; - - typedef void (*mpexpr_fun_t) (void); - -As an example, the standard mpz_expr table entry for multiplication is as -follows. See the source code for the full set of standard entries. - - { "*", (mpexpr_fun_t) mpz_mul, MPEXPR_TYPE_BINARY, 200 }, - -"name" is the string to parse, "fun" is the function to call for it, "type" -indicates what parameters the function takes (among other things), and -"precedence" sets its operator precedence. - -A NULL for "name" indicates the end of the table, so for example an mpf -table with nothing but addition could be - - struct mpexpr_operator_t table[] = { - { "+", (mpexpr_fun_t) mpf_add, MPEXPR_TYPE_BINARY, 190 }, - { NULL } - }; - -A special type MPEXPR_TYPE_NEW_TABLE makes it possible to chain from one -table to another. For example the following would add a "mod" operator to -the standard mpz table, - - struct mpexpr_operator_t table[] = { - { "mod", (mpexpr_fun_t) mpz_fdiv_r, MPEXPR_TYPE_BINARY, 125 }, - { (const char *) mpz_expr_standard_table, NULL, MPEXPR_TYPE_NEW_TABLE } - }; - -Notice the low precedence on "mod", so that for instance "45+26 mod 7" -parses as "(45+26)mod7". - - -Functions are designated by a precedence of 0. They always occur as -"foo(expr)" and so have no need for a precedence level. mpq_abs in the -standard mpq table is - - { "abs", (mpexpr_fun_t) mpq_abs, MPEXPR_TYPE_UNARY }, - -Functions expecting no arguments as in "foo()" can be given with -MPEXPR_TYPE_0ARY, or actual constants to be parsed as just "foo" are -MPEXPR_TYPE_CONSTANT. For example if a "void mpf_const_pi(mpf_t f)" -function existed (which it doesn't) it could be, - - { "pi", (mpexpr_fun_t) mpf_const_pi, MPEXPR_TYPE_CONSTANT }, - - -Parsing of operator names is done by seeking the table entry with the -longest matching name. So for instance operators "<" and "<=" exist, and -when presented with "x <= y" the parser matches "<=" because it's longer. - -Parsing of function names, on the other hand, is done by requiring a whole -alphanumeric word to match. For example presented with "fib2zz(5)" the -parser will attempt to find a function called "fib2zz". A function "fib" -wouldn't be used because it doesn't match the whole word. - -The flag MPEXPR_TYPE_WHOLEWORD can be ORed into an operator type to override -the default parsing style. Similarly MPEXPR_TYPE_OPERATOR into a function. - - -Binary operators are left associative by default, meaning they're evaluated -from left to right, so for example "1+2+3" is treated as "(1+2)+3". -MPEXPR_TYPE_RIGHTASSOC can be ORed into the operator type to work from right -to left as in "1+(2+3)". This is generally what's wanted for -exponentiation, and for example the standard mpz table has - - { "**", (mpexpr_fun_t) mpz_pow_ui, - MPEXPR_TYPE_BINARY_UI | MPEXPR_TYPE_RIGHTASSOC, 220 } - -Unary operators are postfix by default. For example a factorial to be used -as "123!" might be - - { "!", (mpexpr_fun_t) mpz_fac_ui, MPEXPR_TYPE_UNARY_UI, 215 } - -MPEXPR_TYPE_PREFIX can be ORed into the type to get a prefix operator. For -instance negation (unary minus) in the standard mpf table is - - { "-", (mpexpr_fun_t) mpf_neg, - MPEXPR_TYPE_UNARY | MPEXPR_TYPE_PREFIX, 210 }, - - -The same operator can exist as a prefix unary and a binary, or as a prefix -and postfix unary, simply by putting two entries in the table. While -parsing the context determines which style is sought. But note that the -same operator can't be both a postfix unary and a binary, since the parser -doesn't try to look ahead to decide which ought to be used. - -When there's two entries for an operator, both prefix or both postfix (or -binary), then the first in the table will be used. This makes it possible -to override an entry in a standard table, for example to change the function -it calls, or perhaps its precedence level. The following would change mpz -division from tdiv to cdiv, - - struct mpexpr_operator_t table[] = { - { "/", (mpexpr_fun_t) mpz_cdiv_q, MPEXPR_TYPE_BINARY, 200 }, - { "%", (mpexpr_fun_t) mpz_cdiv_r, MPEXPR_TYPE_BINARY, 200 }, - { (char *) mpz_expr_standard_table, NULL, MPEXPR_TYPE_NEW_TABLE } - }; - - -The type field indicates what parameters the given function expects. The -following styles of functions are supported. mpz_t is shown, but of course -this is mpq_t for mpq_expr_a, mpf_t for mpf_expr_a, etc. - - MPEXPR_TYPE_CONSTANT void func (mpz_t result); - - MPEXPR_TYPE_0ARY void func (mpz_t result); - MPEXPR_TYPE_I_0ARY int func (void); - - MPEXPR_TYPE_UNARY void func (mpz_t result, mpz_t op); - MPEXPR_TYPE_UNARY_UI void func (mpz_t result, unsigned long op); - MPEXPR_TYPE_I_UNARY int func (mpz_t op); - MPEXPR_TYPE_I_UNARY_UI int func (unsigned long op); - - MPEXPR_TYPE_BINARY void func (mpz_t result, mpz_t op1, mpz_t op2); - MPEXPR_TYPE_BINARY_UI void func (mpz_t result, - mpz_t op1, unsigned long op2); - MPEXPR_TYPE_I_BINARY int func (mpz_t op1, mpz_t op2); - MPEXPR_TYPE_I_BINARY_UI int func (mpz_t op1, unsigned long op2); - - MPEXPR_TYPE_TERNARY void func (mpz_t result, - mpz_t op1, mpz_t op2, mpz_t op3); - MPEXPR_TYPE_TERNARY_UI void func (mpz_t result, mpz_t op1, mpz_t op2, - unsigned long op3); - MPEXPR_TYPE_I_TERNARY int func (mpz_t op1, mpz_t op2, mpz_t op3); - MPEXPR_TYPE_I_TERNARY_UI int func (mpz_t op1, mpz_t op2, - unsigned long op3); - -Notice the pattern of "UI" for the last parameter as an unsigned long, or -"I" for the result as an "int" return value. - -It's important that the declared type for an operator or function matches -the function pointer given. Any mismatch will have unpredictable results. - -For binary functions, a further type attribute is MPEXPR_TYPE_PAIRWISE which -indicates that any number of arguments should be accepted, and evaluated by -applying the given binary function to them pairwise. This is used by gcd, -lcm, min and max. For example the standard mpz gcd is - - { "gcd", (mpexpr_fun_t) mpz_gcd, - MPEXPR_TYPE_BINARY | MPEXPR_TYPE_PAIRWISE }, - -Some special types exist for comparison operators (or functions). -MPEXPR_TYPE_CMP_LT through MPEXPR_TYPE_CMP_GE expect an MPEXPR_TYPE_I_BINARY -function, returning positive, negative or zero like mpz_cmp and similar. -For example the standard mpf "!=" operator is - - { "!=", (mpexpr_fun_t) mpf_cmp, MPEXPR_TYPE_CMP_NE, 160 }, - -But there's no obligation to use these types, for instance the standard mpq -table just uses a plain MPEXPR_TYPE_I_BINARY and mpq_equal for "==". - -Further special types MPEXPR_TYPE_MIN and MPEXPR_TYPE_MAX exist to implement -the min and max functions, and they take a function like mpf_cmp similarly. -The standard mpf max function is - - { "max", (mpexpr_fun_t) mpf_cmp, - MPEXPR_TYPE_MAX | MPEXPR_TYPE_PAIRWISE }, - -These can be used as operators too, for instance the following would be the ->? operator which is a feature of GNU C++, - - { ">?", (mpexpr_fun_t) mpf_cmp, MPEXPR_TYPE_MAX, 175 }, - -Other special types are used to define "(" ")" parentheses, "," function -argument separator, "!" through "||" logical booleans, ternary "?" ":", and -the "$" which introduces variables. See the sources for how they should be -used. - - -User definable operator tables will have various uses. For example, - - - a subset of the C operators, to be rid of infrequently used things - - a more mathematical syntax like "." for multiply, "^" for powering, - and "!" for factorial - - a boolean evaluator with "^" for AND, "v" for OR - - variables introduced with "%" instead of "$" - - brackets as "[" and "]" instead of "(" and ")" - -The only fixed parts of the parsing are the treatment of numbers, whitespace -and the two styles of operator/function name recognition. - -As a final example, the following would be a complete mpz table implementing -some operators with a more mathematical syntax. Notice there's no need to -preserve the standard precedence values, anything can be used so long as -they're in the desired relation to each other. There's also no need to have -entries in precedence order, but it's convenient to do so to show what comes -where. - - static const struct mpexpr_operator_t table[] = { - { "^", (mpexpr_fun_t) mpz_pow_ui, - MPEXPR_TYPE_BINARY_UI | MPEXPR_TYPE_RIGHTASSOC, 9 }, - - { "!", (mpexpr_fun_t) mpz_fac_ui, MPEXPR_TYPE_UNARY_UI, 8 }, - { "-", (mpexpr_fun_t) mpz_neg, - MPEXPR_TYPE_UNARY | MPEXPR_TYPE_PREFIX, 7 }, - - { "*", (mpexpr_fun_t) mpz_mul, MPEXPR_TYPE_BINARY, 6 }, - { "/", (mpexpr_fun_t) mpz_fdiv_q, MPEXPR_TYPE_BINARY, 6 }, - - { "+", (mpexpr_fun_t) mpz_add, MPEXPR_TYPE_BINARY, 5 }, - { "-", (mpexpr_fun_t) mpz_sub, MPEXPR_TYPE_BINARY, 5 }, - - { "mod", (mpexpr_fun_t) mpz_mod, MPEXPR_TYPE_BINARY, 6 }, - - { ")", NULL, MPEXPR_TYPE_CLOSEPAREN, 4 }, - { "(", NULL, MPEXPR_TYPE_OPENPAREN, 3 }, - { ",", NULL, MPEXPR_TYPE_ARGSEP, 2 }, - - { "$", NULL, MPEXPR_TYPE_VARIABLE, 1 }, - { NULL } - }; - - - - -INTERNALS - -Operator precedence is implemented using a control and data stack, there's -no C recursion. When an expression like 1+2*3 is read the "+" is held on -the control stack and 1 on the data stack until "*" has been parsed and -applied to 2 and 3. This happens any time a higher precedence operator -follows a lower one, or when a right-associative operator like "**" is -repeated. - -Parentheses are handled by making "(" a special prefix unary with a low -precedence so a whole following expression is read. The special operator -")" knows to discard the pending "(". Function arguments are handled -similarly, with the function pretending to be a low precedence prefix unary -operator, and with "," allowed within functions. The same special ")" -operator recognises a pending function and will invoke it appropriately. - -The ternary "? :" operator is also handled using precedences. ":" is one -level higher than "?", so when a valid a?b:c is parsed the ":" finds a "?" -on the control stack. It's a parse error for ":" to find anything else. - - - -FUTURE - -The ternary "?:" operator evaluates the "false" side of its pair, which is -wasteful, though it ought to be harmless. It'd be better if it could -evaluate only the "true" side. Similarly for the logical booleans "&&" and -"||" if they know their result already. - -Functions like MPEXPR_TYPE_BINARY could return a status indicating operand -out of range or whatever, to get an error back through mpz_expr etc. That -would want to be just an option, since plain mpz_add etc have no such -return. - -Could have assignments like "a = b*c" modifying the input variables. -Assignment could be an operator attribute, making it expect an lvalue. -There would want to be a standard table without assignments available -though, so user input could be safely parsed. - -The closing parenthesis table entry could specify the type of open paren it -expects, so that "(" and ")" could match and "[" and "]" match but not a -mixture of the two. Currently "[" and "]" can be added, but there's no -error on writing a mixed expression like "2*(3+4]". Maybe also there could -be a way to say that functions can only be written with one or the other -style of parens. - - - ----------------- -Local variables: -mode: text -fill-column: 76 -End: diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/expr/expr-impl.h b/src/plugins/e-acsl/contrib/libgmp/demos/expr/expr-impl.h deleted file mode 100644 index 9b6458fbd08..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/expr/expr-impl.h +++ /dev/null @@ -1,125 +0,0 @@ -/* Implementation specifics for expression evaluation. - -Copyright 2000-2002, 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ - -#include <stdarg.h> - -#include "expr.h" - - -#define isasciidigit(c) (isascii (c) && isdigit (c)) -#define isasciicsym(c) (isascii (c) && (isalnum(c) || (c) == '_')) - -#define isasciidigit_in_base(c,base) \ - (isascii (c) \ - && ((isdigit (c) && (c)-'0' < (base)) \ - || (isupper (c) && (c)-'A'+10 < (base)) \ - || (islower (c) && (c)-'a'+10 < (base)))) - - -union mpX_t { - mpz_t z; - mpq_t q; - mpf_t f; -}; - -typedef union mpX_t *mpX_ptr; -typedef const union mpX_t *mpX_srcptr; - -typedef void (*mpexpr_fun_one_t) (mpX_ptr); -typedef unsigned long (*mpexpr_fun_ui_one_t) (mpX_ptr); - -typedef void (*mpexpr_fun_0ary_t) (mpX_ptr); -typedef int (*mpexpr_fun_i_0ary_t) (void); - -typedef void (*mpexpr_fun_unary_t) (mpX_ptr, mpX_srcptr); -typedef void (*mpexpr_fun_unary_ui_t) (mpX_ptr, unsigned long); -typedef int (*mpexpr_fun_i_unary_t) (mpX_srcptr); -typedef int (*mpexpr_fun_i_unary_ui_t) (unsigned long); - -typedef void (*mpexpr_fun_binary_t) (mpX_ptr, mpX_srcptr, mpX_srcptr); -typedef void (*mpexpr_fun_binary_ui_t) (mpX_ptr, mpX_srcptr, unsigned long); -typedef int (*mpexpr_fun_i_binary_t) (mpX_srcptr, mpX_srcptr); -typedef int (*mpexpr_fun_i_binary_ui_t) (mpX_srcptr, unsigned long); - -typedef void (*mpexpr_fun_ternary_t) (mpX_ptr, mpX_srcptr, mpX_srcptr, mpX_srcptr); -typedef void (*mpexpr_fun_ternary_ui_t) (mpX_ptr, mpX_srcptr, mpX_srcptr, unsigned long); -typedef int (*mpexpr_fun_i_ternary_t) (mpX_srcptr, mpX_srcptr, mpX_srcptr); -typedef int (*mpexpr_fun_i_ternary_ui_t) (mpX_srcptr, mpX_srcptr, unsigned long); - -typedef size_t (*mpexpr_fun_number_t) (mpX_ptr, const char *str, size_t len, int base); -typedef void (*mpexpr_fun_swap_t) (mpX_ptr, mpX_ptr); -typedef unsigned long (*mpexpr_fun_get_ui_t) (mpX_srcptr); -typedef void (*mpexpr_fun_set_si_t) (mpX_srcptr, long); - -struct mpexpr_control_t { - const struct mpexpr_operator_t *op; - int argcount; -}; - -#define MPEXPR_VARIABLES 26 - -struct mpexpr_parse_t { - const struct mpexpr_operator_t *table; - - mpX_ptr res; - int base; - unsigned long prec; - const char *e; - size_t elen; - mpX_srcptr *var; - int error_code; - - int token; - const struct mpexpr_operator_t *token_op; - - union mpX_t *data_stack; - int data_top; - int data_alloc; - int data_inited; - - struct mpexpr_control_t *control_stack; - int control_top; - int control_alloc; - - mpexpr_fun_0ary_t mpX_clear; - mpexpr_fun_i_unary_t mpX_ulong_p; - mpexpr_fun_get_ui_t mpX_get_ui; - mpexpr_fun_unary_ui_t mpX_init; - mpexpr_fun_number_t mpX_number; - mpexpr_fun_unary_t mpX_set; - mpexpr_fun_unary_t mpX_set_or_swap; - mpexpr_fun_set_si_t mpX_set_si; - mpexpr_fun_swap_t mpX_swap; -}; - - -int mpexpr_evaluate (struct mpexpr_parse_t *p); -int mpexpr_va_to_var (void *var[], va_list ap); -size_t mpexpr_mpz_number (mpz_ptr res, const char *e, size_t elen, int base); diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/expr/expr.c b/src/plugins/e-acsl/contrib/libgmp/demos/expr/expr.c deleted file mode 100644 index 42dd7966bec..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/expr/expr.c +++ /dev/null @@ -1,834 +0,0 @@ -/* mpexpr_evaluate -- shared code for simple expression evaluation - -Copyright 2000-2002, 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ - -#include <ctype.h> -#include <stdio.h> -#include <string.h> - -#include "gmp.h" -#include "expr-impl.h" - - -/* Change this to "#define TRACE(x) x" to get some traces. The trace - printfs junk up the code a bit, but it's very hard to tell what's going - on without them. Set MPX_TRACE to a suitable output function for the - mpz/mpq/mpf being run (if you have the wrong trace function it'll - probably segv). */ - -#define TRACE(x) -#define MPX_TRACE mpz_trace - - -/* A few helper macros copied from gmp-impl.h */ -#define ALLOCATE_FUNC_TYPE(n,type) \ - ((type *) (*allocate_func) ((n) * sizeof (type))) -#define ALLOCATE_FUNC_LIMBS(n) ALLOCATE_FUNC_TYPE (n, mp_limb_t) -#define REALLOCATE_FUNC_TYPE(p, old_size, new_size, type) \ - ((type *) (*reallocate_func) \ - (p, (old_size) * sizeof (type), (new_size) * sizeof (type))) -#define REALLOCATE_FUNC_LIMBS(p, old_size, new_size) \ - REALLOCATE_FUNC_TYPE(p, old_size, new_size, mp_limb_t) -#define FREE_FUNC_TYPE(p,n,type) (*free_func) (p, (n) * sizeof (type)) -#define FREE_FUNC_LIMBS(p,n) FREE_FUNC_TYPE (p, n, mp_limb_t) -#define ASSERT(x) - - - -/* All the error strings are just for diagnostic traces. Only the error - code is actually returned. */ -#define ERROR(str,code) \ - { \ - TRACE (printf ("%s\n", str)); \ - p->error_code = (code); \ - goto done; \ - } - - -#define REALLOC(ptr, alloc, incr, type) \ - do { \ - int new_alloc = (alloc) + (incr); \ - ptr = REALLOCATE_FUNC_TYPE (ptr, alloc, new_alloc, type); \ - (alloc) = new_alloc; \ - } while (0) - - -/* data stack top element */ -#define SP (p->data_stack + p->data_top) - -/* Make sure there's room for another data element above current top. - reallocate_func is fetched for when this macro is used in lookahead(). */ -#define DATA_SPACE() \ - do { \ - if (p->data_top + 1 >= p->data_alloc) \ - { \ - void *(*reallocate_func) (void *, size_t, size_t); \ - mp_get_memory_functions (NULL, &reallocate_func, NULL); \ - TRACE (printf ("grow stack from %d\n", p->data_alloc)); \ - REALLOC (p->data_stack, p->data_alloc, 20, union mpX_t); \ - } \ - ASSERT (p->data_top + 1 <= p->data_inited); \ - if (p->data_top + 1 == p->data_inited) \ - { \ - TRACE (printf ("initialize %d\n", p->data_top + 1)); \ - (*p->mpX_init) (&p->data_stack[p->data_top + 1], p->prec); \ - p->data_inited++; \ - } \ - } while (0) - -#define DATA_PUSH() \ - do { \ - p->data_top++; \ - ASSERT (p->data_top < p->data_alloc); \ - ASSERT (p->data_top < p->data_inited); \ - } while (0) - -/* the last stack entry is never popped, so top>=0 will be true */ -#define DATA_POP(n) \ - do { \ - p->data_top -= (n); \ - ASSERT (p->data_top >= 0); \ - } while (0) - - -/* lookahead() parses the next token. Return 1 if successful, with some - extra data. Return 0 if fail, with reason in p->error_code. - - "prefix" is MPEXPR_TYPE_PREFIX if an operator with that attribute is - preferred, or 0 if an operator without is preferred. */ - -#define TOKEN_EOF -1 /* no extra data */ -#define TOKEN_VALUE -2 /* pushed onto data stack */ -#define TOKEN_OPERATOR -3 /* stored in p->token_op */ -#define TOKEN_FUNCTION -4 /* stored in p->token_op */ - -#define TOKEN_NAME(n) \ - ((n) == TOKEN_EOF ? "TOKEN_EOF" \ - : (n) == TOKEN_VALUE ? "TOKEN_VALUE" \ - : (n) == TOKEN_OPERATOR ? "TOKEN_OPERATOR" \ - : (n) == TOKEN_VALUE ? "TOKEN_FUNCTION" \ - : "UNKNOWN TOKEN") - -/* Functions default to being parsed as whole words, operators to match just - at the start of the string. The type flags override this. */ -#define WHOLEWORD(op) \ - (op->precedence == 0 \ - ? (! (op->type & MPEXPR_TYPE_OPERATOR)) \ - : (op->type & MPEXPR_TYPE_WHOLEWORD)) - -#define isasciispace(c) (isascii (c) && isspace (c)) - -static int -lookahead (struct mpexpr_parse_t *p, int prefix) -{ - const struct mpexpr_operator_t *op, *op_found; - size_t oplen, oplen_found, wlen; - int i; - - /* skip white space */ - while (p->elen > 0 && isasciispace (*p->e)) - p->e++, p->elen--; - - if (p->elen == 0) - { - TRACE (printf ("lookahead EOF\n")); - p->token = TOKEN_EOF; - return 1; - } - - DATA_SPACE (); - - /* Get extent of whole word. */ - for (wlen = 0; wlen < p->elen; wlen++) - if (! isasciicsym (p->e[wlen])) - break; - - TRACE (printf ("lookahead at: \"%.*s\" length %u, word %u\n", - (int) p->elen, p->e, p->elen, wlen)); - - op_found = NULL; - oplen_found = 0; - for (op = p->table; op->name != NULL; op++) - { - if (op->type == MPEXPR_TYPE_NEW_TABLE) - { - printf ("new\n"); - op = (struct mpexpr_operator_t *) op->name - 1; - continue; - } - - oplen = strlen (op->name); - if (! ((WHOLEWORD (op) ? wlen == oplen : p->elen >= oplen) - && memcmp (p->e, op->name, oplen) == 0)) - continue; - - /* Shorter matches don't replace longer previous ones. */ - if (op_found && oplen < oplen_found) - continue; - - /* On a match of equal length to a previous one, the old match isn't - replaced if it has the preferred prefix, and if it doesn't then - it's not replaced if the new one also doesn't. */ - if (op_found && oplen == oplen_found - && ((op_found->type & MPEXPR_TYPE_PREFIX) == prefix - || (op->type & MPEXPR_TYPE_PREFIX) != prefix)) - continue; - - /* This is now either the first match seen, or a longer than previous - match, or an equal to previous one but with a preferred prefix. */ - op_found = op; - oplen_found = oplen; - } - - if (op_found) - { - p->e += oplen_found, p->elen -= oplen_found; - - if (op_found->type == MPEXPR_TYPE_VARIABLE) - { - if (p->elen == 0) - ERROR ("end of string expecting a variable", - MPEXPR_RESULT_PARSE_ERROR); - i = p->e[0] - 'a'; - if (i < 0 || i >= MPEXPR_VARIABLES) - ERROR ("bad variable name", MPEXPR_RESULT_BAD_VARIABLE); - goto variable; - } - - if (op_found->precedence == 0) - { - TRACE (printf ("lookahead function: %s\n", op_found->name)); - p->token = TOKEN_FUNCTION; - p->token_op = op_found; - return 1; - } - else - { - TRACE (printf ("lookahead operator: %s\n", op_found->name)); - p->token = TOKEN_OPERATOR; - p->token_op = op_found; - return 1; - } - } - - oplen = (*p->mpX_number) (SP+1, p->e, p->elen, p->base); - if (oplen != 0) - { - p->e += oplen, p->elen -= oplen; - p->token = TOKEN_VALUE; - DATA_PUSH (); - TRACE (MPX_TRACE ("lookahead number", SP)); - return 1; - } - - /* Maybe an unprefixed one character variable */ - i = p->e[0] - 'a'; - if (wlen == 1 && i >= 0 && i < MPEXPR_VARIABLES) - { - variable: - p->e++, p->elen--; - if (p->var[i] == NULL) - ERROR ("NULL variable", MPEXPR_RESULT_BAD_VARIABLE); - TRACE (printf ("lookahead variable: var[%d] = ", i); - MPX_TRACE ("", p->var[i])); - p->token = TOKEN_VALUE; - DATA_PUSH (); - (*p->mpX_set) (SP, p->var[i]); - return 1; - } - - ERROR ("no token matched", MPEXPR_RESULT_PARSE_ERROR); - - done: - return 0; -} - - -/* control stack current top element */ -#define CP (p->control_stack + p->control_top) - -/* make sure there's room for another control element above current top */ -#define CONTROL_SPACE() \ - do { \ - if (p->control_top + 1 >= p->control_alloc) \ - { \ - TRACE (printf ("grow control stack from %d\n", p->control_alloc)); \ - REALLOC (p->control_stack, p->control_alloc, 20, \ - struct mpexpr_control_t); \ - } \ - } while (0) - -/* Push an operator on the control stack, claiming currently to have the - given number of args ready. Local variable "op" is used in case opptr is - a reference through CP. */ -#define CONTROL_PUSH(opptr,args) \ - do { \ - const struct mpexpr_operator_t *op = opptr; \ - struct mpexpr_control_t *cp; \ - CONTROL_SPACE (); \ - p->control_top++; \ - ASSERT (p->control_top < p->control_alloc); \ - cp = CP; \ - cp->op = op; \ - cp->argcount = (args); \ - TRACE_CONTROL("control stack push:"); \ - } while (0) - -/* The special operator_done is never popped, so top>=0 will hold. */ -#define CONTROL_POP() \ - do { \ - p->control_top--; \ - ASSERT (p->control_top >= 0); \ - TRACE_CONTROL ("control stack pop:"); \ - } while (0) - -#define TRACE_CONTROL(str) \ - TRACE ({ \ - int i; \ - printf ("%s depth %d:", str, p->control_top); \ - for (i = 0; i <= p->control_top; i++) \ - printf (" \"%s\"(%d)", \ - p->control_stack[i].op->name, \ - p->control_stack[i].argcount); \ - printf ("\n"); \ - }); - - -#define LOOKAHEAD(prefix) \ - do { \ - if (! lookahead (p, prefix)) \ - goto done; \ - } while (0) - -#define CHECK_UI(n) \ - do { \ - if (! (*p->mpX_ulong_p) (n)) \ - ERROR ("operand doesn't fit ulong", MPEXPR_RESULT_NOT_UI); \ - } while (0) - -#define CHECK_ARGCOUNT(str,n) \ - do { \ - if (CP->argcount != (n)) \ - { \ - TRACE (printf ("wrong number of arguments for %s, got %d want %d", \ - str, CP->argcount, n)); \ - ERROR ("", MPEXPR_RESULT_PARSE_ERROR); \ - } \ - } while (0) - - -/* There's two basic states here. In both p->token is the next token. - - "another_expr" is when a whole expression should be parsed. This means a - literal or variable value possibly followed by an operator, or a function - or prefix operator followed by a further whole expression. - - "another_operator" is when an expression has been parsed and its value is - on the top of the data stack (SP) and an optional further postfix or - infix operator should be parsed. - - In "another_operator" precedences determine whether to push the operator - onto the control stack, or instead go to "apply_control" to reduce the - operator currently on top of the control stack. - - When an operator has both a prefix and postfix/infix form, a LOOKAHEAD() - for "another_expr" will seek the prefix form, a LOOKAHEAD() for - "another_operator" will seek the postfix/infix form. The grammar is - simple enough that the next state is known before reading the next token. - - Argument count checking guards against functions consuming the wrong - number of operands from the data stack. The same checks are applied to - operators, but will always pass since a UNARY or BINARY will only ever - parse with the correct operands. */ - -int -mpexpr_evaluate (struct mpexpr_parse_t *p) -{ - void *(*allocate_func) (size_t); - void *(*reallocate_func) (void *, size_t, size_t); - void (*free_func) (void *, size_t); - - mp_get_memory_functions (&allocate_func, &reallocate_func, &free_func); - - TRACE (printf ("mpexpr_evaluate() base %d \"%.*s\"\n", - p->base, (int) p->elen, p->e)); - - /* "done" is a special sentinel at the bottom of the control stack, - precedence -1 is lower than any normal operator. */ - { - static const struct mpexpr_operator_t operator_done - = { "DONE", NULL, MPEXPR_TYPE_DONE, -1 }; - - p->control_alloc = 20; - p->control_stack = ALLOCATE_FUNC_TYPE (p->control_alloc, - struct mpexpr_control_t); - p->control_top = 0; - CP->op = &operator_done; - CP->argcount = 1; - } - - p->data_inited = 0; - p->data_alloc = 20; - p->data_stack = ALLOCATE_FUNC_TYPE (p->data_alloc, union mpX_t); - p->data_top = -1; - - p->error_code = MPEXPR_RESULT_OK; - - - another_expr_lookahead: - LOOKAHEAD (MPEXPR_TYPE_PREFIX); - TRACE (printf ("another expr\n")); - - /*another_expr:*/ - switch (p->token) { - case TOKEN_VALUE: - goto another_operator_lookahead; - - case TOKEN_OPERATOR: - TRACE (printf ("operator %s\n", p->token_op->name)); - if (! (p->token_op->type & MPEXPR_TYPE_PREFIX)) - ERROR ("expected a prefix operator", MPEXPR_RESULT_PARSE_ERROR); - - CONTROL_PUSH (p->token_op, 1); - goto another_expr_lookahead; - - case TOKEN_FUNCTION: - CONTROL_PUSH (p->token_op, 1); - - if (p->token_op->type & MPEXPR_TYPE_CONSTANT) - goto apply_control_lookahead; - - LOOKAHEAD (MPEXPR_TYPE_PREFIX); - if (! (p->token == TOKEN_OPERATOR - && p->token_op->type == MPEXPR_TYPE_OPENPAREN)) - ERROR ("expected open paren for function", MPEXPR_RESULT_PARSE_ERROR); - - TRACE (printf ("open paren for function \"%s\"\n", CP->op->name)); - - if ((CP->op->type & MPEXPR_TYPE_MASK_ARGCOUNT) == MPEXPR_TYPE_NARY(0)) - { - LOOKAHEAD (0); - if (! (p->token == TOKEN_OPERATOR - && p->token_op->type == MPEXPR_TYPE_CLOSEPAREN)) - ERROR ("expected close paren for 0ary function", - MPEXPR_RESULT_PARSE_ERROR); - goto apply_control_lookahead; - } - - goto another_expr_lookahead; - } - ERROR ("unrecognised start of expression", MPEXPR_RESULT_PARSE_ERROR); - - - another_operator_lookahead: - LOOKAHEAD (0); - another_operator: - TRACE (printf ("another operator maybe: %s\n", TOKEN_NAME(p->token))); - - switch (p->token) { - case TOKEN_EOF: - goto apply_control; - - case TOKEN_OPERATOR: - /* The next operator is compared to the one on top of the control stack. - If the next is lower precedence, or the same precedence and not - right-associative, then reduce using the control stack and look at - the next operator again later. */ - -#define PRECEDENCE_TEST_REDUCE(tprec,cprec,ttype,ctype) \ - ((tprec) < (cprec) \ - || ((tprec) == (cprec) && ! ((ttype) & MPEXPR_TYPE_RIGHTASSOC))) - - if (PRECEDENCE_TEST_REDUCE (p->token_op->precedence, CP->op->precedence, - p->token_op->type, CP->op->type)) - { - TRACE (printf ("defer operator: %s (prec %d vs %d, type 0x%X)\n", - p->token_op->name, - p->token_op->precedence, CP->op->precedence, - p->token_op->type)); - goto apply_control; - } - - /* An argsep is a binary operator, but is never pushed on the control - stack, it just accumulates an extra argument for a function. */ - if (p->token_op->type == MPEXPR_TYPE_ARGSEP) - { - if (CP->op->precedence != 0) - ERROR ("ARGSEP not in a function call", MPEXPR_RESULT_PARSE_ERROR); - - TRACE (printf ("argsep for function \"%s\"(%d)\n", - CP->op->name, CP->argcount)); - -#define IS_PAIRWISE(type) \ - (((type) & (MPEXPR_TYPE_MASK_ARGCOUNT | MPEXPR_TYPE_PAIRWISE)) \ - == (MPEXPR_TYPE_BINARY | MPEXPR_TYPE_PAIRWISE)) - - if (IS_PAIRWISE (CP->op->type) && CP->argcount >= 2) - { - TRACE (printf (" will reduce pairwise now\n")); - CP->argcount--; - CONTROL_PUSH (CP->op, 2); - goto apply_control; - } - - CP->argcount++; - goto another_expr_lookahead; - } - - switch (p->token_op->type & MPEXPR_TYPE_MASK_ARGCOUNT) { - case MPEXPR_TYPE_NARY(1): - /* Postfix unary operators can always be applied immediately. The - easiest way to do this is just push it on the control stack and go - to the normal control stack reduction code. */ - - TRACE (printf ("postfix unary operator: %s\n", p->token_op->name)); - if (p->token_op->type & MPEXPR_TYPE_PREFIX) - ERROR ("prefix unary operator used postfix", - MPEXPR_RESULT_PARSE_ERROR); - CONTROL_PUSH (p->token_op, 1); - goto apply_control_lookahead; - - case MPEXPR_TYPE_NARY(2): - CONTROL_PUSH (p->token_op, 2); - goto another_expr_lookahead; - - case MPEXPR_TYPE_NARY(3): - CONTROL_PUSH (p->token_op, 1); - goto another_expr_lookahead; - } - - TRACE (printf ("unrecognised operator \"%s\" type: 0x%X", - CP->op->name, CP->op->type)); - ERROR ("", MPEXPR_RESULT_PARSE_ERROR); - break; - - default: - TRACE (printf ("expecting an operator, got token %d", p->token)); - ERROR ("", MPEXPR_RESULT_PARSE_ERROR); - } - - - apply_control_lookahead: - LOOKAHEAD (0); - apply_control: - /* Apply the top element CP of the control stack. Data values are SP, - SP-1, etc. Result is left as stack top SP after popping consumed - values. - - The use of sp as a duplicate of SP will help compilers that can't - otherwise recognise the various uses of SP as common subexpressions. */ - - TRACE (printf ("apply control: nested %d, \"%s\" 0x%X, %d args\n", - p->control_top, CP->op->name, CP->op->type, CP->argcount)); - - TRACE (printf ("apply 0x%X-ary\n", - CP->op->type & MPEXPR_TYPE_MASK_ARGCOUNT)); - switch (CP->op->type & MPEXPR_TYPE_MASK_ARGCOUNT) { - case MPEXPR_TYPE_NARY(0): - { - mpX_ptr sp; - DATA_SPACE (); - DATA_PUSH (); - sp = SP; - switch (CP->op->type & MPEXPR_TYPE_MASK_ARGSTYLE) { - case 0: - (* (mpexpr_fun_0ary_t) CP->op->fun) (sp); - break; - case MPEXPR_TYPE_RESULT_INT: - (*p->mpX_set_si) (sp, (long) (* (mpexpr_fun_i_0ary_t) CP->op->fun) ()); - break; - default: - ERROR ("unrecognised 0ary argument calling style", - MPEXPR_RESULT_BAD_TABLE); - } - } - break; - - case MPEXPR_TYPE_NARY(1): - { - mpX_ptr sp = SP; - CHECK_ARGCOUNT ("unary", 1); - TRACE (MPX_TRACE ("before", sp)); - - switch (CP->op->type & MPEXPR_TYPE_MASK_SPECIAL) { - case 0: - /* not a special */ - break; - - case MPEXPR_TYPE_DONE & MPEXPR_TYPE_MASK_SPECIAL: - TRACE (printf ("special done\n")); - goto done; - - case MPEXPR_TYPE_LOGICAL_NOT & MPEXPR_TYPE_MASK_SPECIAL: - TRACE (printf ("special logical not\n")); - (*p->mpX_set_si) - (sp, (long) ((* (mpexpr_fun_i_unary_t) CP->op->fun) (sp) == 0)); - goto apply_control_done; - - case MPEXPR_TYPE_CLOSEPAREN & MPEXPR_TYPE_MASK_SPECIAL: - CONTROL_POP (); - if (CP->op->type == MPEXPR_TYPE_OPENPAREN) - { - TRACE (printf ("close paren matching open paren\n")); - CONTROL_POP (); - goto another_operator; - } - if (CP->op->precedence == 0) - { - TRACE (printf ("close paren for function\n")); - goto apply_control; - } - ERROR ("unexpected close paren", MPEXPR_RESULT_PARSE_ERROR); - - default: - TRACE (printf ("unrecognised special unary operator 0x%X", - CP->op->type & MPEXPR_TYPE_MASK_SPECIAL)); - ERROR ("", MPEXPR_RESULT_BAD_TABLE); - } - - switch (CP->op->type & MPEXPR_TYPE_MASK_ARGSTYLE) { - case 0: - (* (mpexpr_fun_unary_t) CP->op->fun) (sp, sp); - break; - case MPEXPR_TYPE_LAST_UI: - CHECK_UI (sp); - (* (mpexpr_fun_unary_ui_t) CP->op->fun) - (sp, (*p->mpX_get_ui) (sp)); - break; - case MPEXPR_TYPE_RESULT_INT: - (*p->mpX_set_si) - (sp, (long) (* (mpexpr_fun_i_unary_t) CP->op->fun) (sp)); - break; - case MPEXPR_TYPE_RESULT_INT | MPEXPR_TYPE_LAST_UI: - CHECK_UI (sp); - (*p->mpX_set_si) - (sp, - (long) (* (mpexpr_fun_i_unary_ui_t) CP->op->fun) - ((*p->mpX_get_ui) (sp))); - break; - default: - ERROR ("unrecognised unary argument calling style", - MPEXPR_RESULT_BAD_TABLE); - } - } - break; - - case MPEXPR_TYPE_NARY(2): - { - mpX_ptr sp; - - /* pairwise functions are allowed to have just one argument */ - if ((CP->op->type & MPEXPR_TYPE_PAIRWISE) - && CP->op->precedence == 0 - && CP->argcount == 1) - goto apply_control_done; - - CHECK_ARGCOUNT ("binary", 2); - DATA_POP (1); - sp = SP; - TRACE (MPX_TRACE ("lhs", sp); - MPX_TRACE ("rhs", sp+1)); - - if (CP->op->type & MPEXPR_TYPE_MASK_CMP) - { - int type = CP->op->type; - int cmp = (* (mpexpr_fun_i_binary_t) CP->op->fun) - (sp, sp+1); - (*p->mpX_set_si) - (sp, - (long) - (( (cmp < 0) & ((type & MPEXPR_TYPE_MASK_CMP_LT) != 0)) - | ((cmp == 0) & ((type & MPEXPR_TYPE_MASK_CMP_EQ) != 0)) - | ((cmp > 0) & ((type & MPEXPR_TYPE_MASK_CMP_GT) != 0)))); - goto apply_control_done; - } - - switch (CP->op->type & MPEXPR_TYPE_MASK_SPECIAL) { - case 0: - /* not a special */ - break; - - case MPEXPR_TYPE_QUESTION & MPEXPR_TYPE_MASK_SPECIAL: - ERROR ("'?' without ':'", MPEXPR_RESULT_PARSE_ERROR); - - case MPEXPR_TYPE_COLON & MPEXPR_TYPE_MASK_SPECIAL: - TRACE (printf ("special colon\n")); - CONTROL_POP (); - if (CP->op->type != MPEXPR_TYPE_QUESTION) - ERROR ("':' without '?'", MPEXPR_RESULT_PARSE_ERROR); - - CP->argcount--; - DATA_POP (1); - sp--; - TRACE (MPX_TRACE ("query", sp); - MPX_TRACE ("true", sp+1); - MPX_TRACE ("false", sp+2)); - (*p->mpX_set) - (sp, (* (mpexpr_fun_i_unary_t) CP->op->fun) (sp) - ? sp+1 : sp+2); - goto apply_control_done; - - case MPEXPR_TYPE_LOGICAL_AND & MPEXPR_TYPE_MASK_SPECIAL: - TRACE (printf ("special logical and\n")); - (*p->mpX_set_si) - (sp, - (long) - ((* (mpexpr_fun_i_unary_t) CP->op->fun) (sp) - && (* (mpexpr_fun_i_unary_t) CP->op->fun) (sp+1))); - goto apply_control_done; - - case MPEXPR_TYPE_LOGICAL_OR & MPEXPR_TYPE_MASK_SPECIAL: - TRACE (printf ("special logical and\n")); - (*p->mpX_set_si) - (sp, - (long) - ((* (mpexpr_fun_i_unary_t) CP->op->fun) (sp) - || (* (mpexpr_fun_i_unary_t) CP->op->fun) (sp+1))); - goto apply_control_done; - - case MPEXPR_TYPE_MAX & MPEXPR_TYPE_MASK_SPECIAL: - TRACE (printf ("special max\n")); - if ((* (mpexpr_fun_i_binary_t) CP->op->fun) (sp, sp+1) < 0) - (*p->mpX_swap) (sp, sp+1); - goto apply_control_done; - case MPEXPR_TYPE_MIN & MPEXPR_TYPE_MASK_SPECIAL: - TRACE (printf ("special min\n")); - if ((* (mpexpr_fun_i_binary_t) CP->op->fun) (sp, sp+1) > 0) - (*p->mpX_swap) (sp, sp+1); - goto apply_control_done; - - default: - ERROR ("unrecognised special binary operator", - MPEXPR_RESULT_BAD_TABLE); - } - - switch (CP->op->type & MPEXPR_TYPE_MASK_ARGSTYLE) { - case 0: - (* (mpexpr_fun_binary_t) CP->op->fun) (sp, sp, sp+1); - break; - case MPEXPR_TYPE_LAST_UI: - CHECK_UI (sp+1); - (* (mpexpr_fun_binary_ui_t) CP->op->fun) - (sp, sp, (*p->mpX_get_ui) (sp+1)); - break; - case MPEXPR_TYPE_RESULT_INT: - (*p->mpX_set_si) - (sp, - (long) (* (mpexpr_fun_i_binary_t) CP->op->fun) (sp, sp+1)); - break; - case MPEXPR_TYPE_LAST_UI | MPEXPR_TYPE_RESULT_INT: - CHECK_UI (sp+1); - (*p->mpX_set_si) - (sp, - (long) (* (mpexpr_fun_i_binary_ui_t) CP->op->fun) - (sp, (*p->mpX_get_ui) (sp+1))); - break; - default: - ERROR ("unrecognised binary argument calling style", - MPEXPR_RESULT_BAD_TABLE); - } - } - break; - - case MPEXPR_TYPE_NARY(3): - { - mpX_ptr sp; - - CHECK_ARGCOUNT ("ternary", 3); - DATA_POP (2); - sp = SP; - TRACE (MPX_TRACE ("arg1", sp); - MPX_TRACE ("arg2", sp+1); - MPX_TRACE ("arg3", sp+1)); - - switch (CP->op->type & MPEXPR_TYPE_MASK_ARGSTYLE) { - case 0: - (* (mpexpr_fun_ternary_t) CP->op->fun) (sp, sp, sp+1, sp+2); - break; - case MPEXPR_TYPE_LAST_UI: - CHECK_UI (sp+2); - (* (mpexpr_fun_ternary_ui_t) CP->op->fun) - (sp, sp, sp+1, (*p->mpX_get_ui) (sp+2)); - break; - case MPEXPR_TYPE_RESULT_INT: - (*p->mpX_set_si) - (sp, - (long) (* (mpexpr_fun_i_ternary_t) CP->op->fun) - (sp, sp+1, sp+2)); - break; - case MPEXPR_TYPE_LAST_UI | MPEXPR_TYPE_RESULT_INT: - CHECK_UI (sp+2); - (*p->mpX_set_si) - (sp, - (long) (* (mpexpr_fun_i_ternary_ui_t) CP->op->fun) - (sp, sp+1, (*p->mpX_get_ui) (sp+2))); - break; - default: - ERROR ("unrecognised binary argument calling style", - MPEXPR_RESULT_BAD_TABLE); - } - } - break; - - default: - TRACE (printf ("unrecognised operator type: 0x%X\n", CP->op->type)); - ERROR ("", MPEXPR_RESULT_PARSE_ERROR); - } - - apply_control_done: - TRACE (MPX_TRACE ("result", SP)); - CONTROL_POP (); - goto another_operator; - - done: - if (p->error_code == MPEXPR_RESULT_OK) - { - if (p->data_top != 0) - { - TRACE (printf ("data stack want top at 0, got %d\n", p->data_top)); - p->error_code = MPEXPR_RESULT_PARSE_ERROR; - } - else - (*p->mpX_set_or_swap) (p->res, SP); - } - - { - int i; - for (i = 0; i < p->data_inited; i++) - { - TRACE (printf ("clear %d\n", i)); - (*p->mpX_clear) (p->data_stack+i); - } - } - - FREE_FUNC_TYPE (p->data_stack, p->data_alloc, union mpX_t); - FREE_FUNC_TYPE (p->control_stack, p->control_alloc, struct mpexpr_control_t); - - return p->error_code; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/expr/expr.h b/src/plugins/e-acsl/contrib/libgmp/demos/expr/expr.h deleted file mode 100644 index d3b7c77cc3c..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/expr/expr.h +++ /dev/null @@ -1,142 +0,0 @@ -/* Header for expression evaluation. - -Copyright 2000-2002, 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ - - -#ifndef __EXPR_H__ -#define __EXPR_H__ - -#define MPEXPR_RESULT_OK 0 -#define MPEXPR_RESULT_BAD_VARIABLE 1 -#define MPEXPR_RESULT_BAD_TABLE 2 -#define MPEXPR_RESULT_PARSE_ERROR 3 -#define MPEXPR_RESULT_NOT_UI 4 - - -/* basic types */ -#define MPEXPR_TYPE_NARY(n) ((n) * 0x0100) -#define MPEXPR_TYPE_MASK_ARGCOUNT MPEXPR_TYPE_NARY(0xF) -#define MPEXPR_TYPE_0ARY MPEXPR_TYPE_NARY(0) -#define MPEXPR_TYPE_UNARY MPEXPR_TYPE_NARY(1) -#define MPEXPR_TYPE_BINARY MPEXPR_TYPE_NARY(2) -#define MPEXPR_TYPE_TERNARY MPEXPR_TYPE_NARY(3) - -/* options for all */ -#define MPEXPR_TYPE_LAST_UI 0x0010 -#define MPEXPR_TYPE_RESULT_INT 0x0020 -#define MPEXPR_TYPE_MASK_ARGSTYLE 0x0030 - -#define MPEXPR_TYPE_UNARY_UI (MPEXPR_TYPE_UNARY | MPEXPR_TYPE_LAST_UI) -#define MPEXPR_TYPE_I_UNARY (MPEXPR_TYPE_UNARY | MPEXPR_TYPE_RESULT_INT) -#define MPEXPR_TYPE_I_UNARY_UI (MPEXPR_TYPE_I_UNARY | MPEXPR_TYPE_LAST_UI) -#define MPEXPR_TYPE_BINARY_UI (MPEXPR_TYPE_BINARY | MPEXPR_TYPE_LAST_UI) -#define MPEXPR_TYPE_I_BINARY (MPEXPR_TYPE_BINARY | MPEXPR_TYPE_RESULT_INT) -#define MPEXPR_TYPE_I_BINARY_UI (MPEXPR_TYPE_I_BINARY| MPEXPR_TYPE_LAST_UI) -#define MPEXPR_TYPE_TERNARY_UI (MPEXPR_TYPE_TERNARY | MPEXPR_TYPE_LAST_UI) -#define MPEXPR_TYPE_I_TERNARY (MPEXPR_TYPE_TERNARY | MPEXPR_TYPE_RESULT_INT) -#define MPEXPR_TYPE_I_TERNARY_UI (MPEXPR_TYPE_I_TERNARY|MPEXPR_TYPE_LAST_UI) - -/* 0ary with options */ -#define MPEXPR_TYPE_CONSTANT (MPEXPR_TYPE_0ARY | 0x0040) - -/* unary options */ -#define MPEXPR_TYPE_PREFIX 0x0040 - -/* binary options */ -#define MPEXPR_TYPE_RIGHTASSOC 0x0040 -#define MPEXPR_TYPE_PAIRWISE 0x0080 - -#define MPEXPR_TYPE_MASK_SPECIAL 0x000F - -/* unary specials */ -#define MPEXPR_TYPE_NEW_TABLE (MPEXPR_TYPE_UNARY | 0x001) -#define MPEXPR_TYPE_DONE (MPEXPR_TYPE_UNARY | 0x002) -#define MPEXPR_TYPE_VARIABLE (MPEXPR_TYPE_UNARY | 0x003) -#define MPEXPR_TYPE_LOGICAL_NOT (MPEXPR_TYPE_UNARY | 0x004) -#define MPEXPR_TYPE_CLOSEPAREN (MPEXPR_TYPE_UNARY | 0x005) -#define MPEXPR_TYPE_OPENPAREN (MPEXPR_TYPE_CLOSEPAREN | MPEXPR_TYPE_PREFIX) - -/* binary specials */ -#define MPEXPR_TYPE_LOGICAL_AND (MPEXPR_TYPE_BINARY | 0x001) -#define MPEXPR_TYPE_LOGICAL_OR (MPEXPR_TYPE_BINARY | 0x002) -#define MPEXPR_TYPE_ARGSEP (MPEXPR_TYPE_BINARY | 0x003) -#define MPEXPR_TYPE_QUESTION (MPEXPR_TYPE_BINARY | 0x004) -#define MPEXPR_TYPE_COLON (MPEXPR_TYPE_BINARY | 0x005) -#define MPEXPR_TYPE_MAX (MPEXPR_TYPE_BINARY | 0x006) -#define MPEXPR_TYPE_MIN (MPEXPR_TYPE_BINARY | 0x007) -#define MPEXPR_TYPE_MASK_CMP 0x008 -#define MPEXPR_TYPE_MASK_CMP_LT 0x001 -#define MPEXPR_TYPE_MASK_CMP_EQ 0x002 -#define MPEXPR_TYPE_MASK_CMP_GT 0x004 -#define MPEXPR_TYPE_CMP_LT (MPEXPR_TYPE_BINARY | MPEXPR_TYPE_MASK_CMP \ - | MPEXPR_TYPE_MASK_CMP_LT) -#define MPEXPR_TYPE_CMP_EQ (MPEXPR_TYPE_BINARY | MPEXPR_TYPE_MASK_CMP \ - | MPEXPR_TYPE_MASK_CMP_EQ) -#define MPEXPR_TYPE_CMP_GT (MPEXPR_TYPE_BINARY | MPEXPR_TYPE_MASK_CMP \ - | MPEXPR_TYPE_MASK_CMP_GT) -#define MPEXPR_TYPE_CMP_LE (MPEXPR_TYPE_CMP_LT | MPEXPR_TYPE_MASK_CMP_EQ) -#define MPEXPR_TYPE_CMP_NE (MPEXPR_TYPE_CMP_LT | MPEXPR_TYPE_MASK_CMP_GT) -#define MPEXPR_TYPE_CMP_GE (MPEXPR_TYPE_CMP_GT | MPEXPR_TYPE_MASK_CMP_EQ) - -/* parse options */ -#define MPEXPR_TYPE_WHOLEWORD 0x1000 -#define MPEXPR_TYPE_OPERATOR 0x2000 - - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void (*mpexpr_fun_t) (void); - -struct mpexpr_operator_t { - const char *name; - mpexpr_fun_t fun; - int type; - int precedence; -}; - - -int mpf_expr_a (const struct mpexpr_operator_t *, mpf_ptr, int, - unsigned long, const char *, size_t, mpf_srcptr [26]); -int mpf_expr (mpf_ptr, int, const char *, ...); - -int mpq_expr_a (const struct mpexpr_operator_t *, mpq_ptr, - int, const char *, size_t, mpq_srcptr [26]); -int mpq_expr (mpq_ptr, int, const char *, ...); - -int mpz_expr_a (const struct mpexpr_operator_t *, mpz_ptr, int, - const char *, size_t, mpz_srcptr [26]); -int mpz_expr (mpz_ptr, int, const char *, ...); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprf.c b/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprf.c deleted file mode 100644 index 1f7e21f8934..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprf.c +++ /dev/null @@ -1,123 +0,0 @@ -/* mpf expression evaluation - -Copyright 2000-2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <string.h> -#include "gmp.h" -#include "expr-impl.h" - - -/* Change this to "#define TRACE(x) x" to get some traces. */ -#define TRACE(x) - - -static int -e_mpf_sgn (mpf_srcptr x) -{ - return mpf_sgn (x); -} - - -static const struct mpexpr_operator_t _mpf_expr_standard_table[] = { - - { "**", (mpexpr_fun_t) mpf_pow_ui, - MPEXPR_TYPE_BINARY_UI | MPEXPR_TYPE_RIGHTASSOC, 220 }, - - { "!", (mpexpr_fun_t) e_mpf_sgn, - MPEXPR_TYPE_LOGICAL_NOT | MPEXPR_TYPE_PREFIX, 210 }, - { "-", (mpexpr_fun_t) mpf_neg, - MPEXPR_TYPE_UNARY | MPEXPR_TYPE_PREFIX, 210 }, - - { "*", (mpexpr_fun_t) mpf_mul, MPEXPR_TYPE_BINARY, 200 }, - { "/", (mpexpr_fun_t) mpf_div, MPEXPR_TYPE_BINARY, 200 }, - - { "+", (mpexpr_fun_t) mpf_add, MPEXPR_TYPE_BINARY, 190 }, - { "-", (mpexpr_fun_t) mpf_sub, MPEXPR_TYPE_BINARY, 190 }, - - { "<<", (mpexpr_fun_t) mpf_mul_2exp, MPEXPR_TYPE_BINARY_UI, 180 }, - { ">>", (mpexpr_fun_t) mpf_div_2exp, MPEXPR_TYPE_BINARY_UI, 180 }, - - { "<=", (mpexpr_fun_t) mpf_cmp, MPEXPR_TYPE_CMP_LE, 170 }, - { "<", (mpexpr_fun_t) mpf_cmp, MPEXPR_TYPE_CMP_LT, 170 }, - { ">=", (mpexpr_fun_t) mpf_cmp, MPEXPR_TYPE_CMP_GE, 170 }, - { ">", (mpexpr_fun_t) mpf_cmp, MPEXPR_TYPE_CMP_GT, 170 }, - - { "==", (mpexpr_fun_t) mpf_cmp, MPEXPR_TYPE_CMP_EQ, 160 }, - { "!=", (mpexpr_fun_t) mpf_cmp, MPEXPR_TYPE_CMP_NE, 160 }, - - { "&&", (mpexpr_fun_t) e_mpf_sgn, MPEXPR_TYPE_LOGICAL_AND, 120 }, - { "||", (mpexpr_fun_t) e_mpf_sgn, MPEXPR_TYPE_LOGICAL_OR, 110 }, - - { ":", NULL, MPEXPR_TYPE_COLON, 101 }, - { "?", (mpexpr_fun_t) e_mpf_sgn, MPEXPR_TYPE_QUESTION, 100 }, - - { ")", NULL, MPEXPR_TYPE_CLOSEPAREN, 4 }, - { "(", NULL, MPEXPR_TYPE_OPENPAREN, 3 }, - { ",", NULL, MPEXPR_TYPE_ARGSEP, 2 }, - { "$", NULL, MPEXPR_TYPE_VARIABLE, 1 }, - - { "abs", (mpexpr_fun_t) mpf_abs, MPEXPR_TYPE_UNARY }, - { "ceil", (mpexpr_fun_t) mpf_ceil, MPEXPR_TYPE_UNARY }, - { "cmp", (mpexpr_fun_t) mpf_cmp, MPEXPR_TYPE_I_BINARY }, - { "eq", (mpexpr_fun_t) mpf_eq, MPEXPR_TYPE_I_TERNARY_UI }, - { "floor", (mpexpr_fun_t) mpf_floor, MPEXPR_TYPE_UNARY }, - { "integer_p",(mpexpr_fun_t) mpf_integer_p, MPEXPR_TYPE_I_UNARY }, - { "max", (mpexpr_fun_t) mpf_cmp, MPEXPR_TYPE_MAX | MPEXPR_TYPE_PAIRWISE }, - { "min", (mpexpr_fun_t) mpf_cmp, MPEXPR_TYPE_MIN | MPEXPR_TYPE_PAIRWISE }, - { "reldiff", (mpexpr_fun_t) mpf_reldiff, MPEXPR_TYPE_BINARY }, - { "sgn", (mpexpr_fun_t) e_mpf_sgn, MPEXPR_TYPE_I_UNARY }, - { "sqrt", (mpexpr_fun_t) mpf_sqrt, MPEXPR_TYPE_UNARY }, - { "trunc", (mpexpr_fun_t) mpf_trunc, MPEXPR_TYPE_UNARY }, - - { NULL } -}; - -const struct mpexpr_operator_t * const mpf_expr_standard_table -= _mpf_expr_standard_table; - - -int -mpf_expr (mpf_ptr res, int base, const char *e, ...) -{ - mpf_srcptr var[MPEXPR_VARIABLES]; - va_list ap; - int ret; - va_start (ap, e); - - TRACE (printf ("mpf_expr(): base %d, %s\n", base, e)); - ret = mpexpr_va_to_var ((void **) var, ap); - va_end (ap); - - if (ret != MPEXPR_RESULT_OK) - return ret; - - return mpf_expr_a (mpf_expr_standard_table, res, base, - mpf_get_prec (res), e, strlen(e), var); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprfa.c b/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprfa.c deleted file mode 100644 index 1918cb55cd9..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprfa.c +++ /dev/null @@ -1,191 +0,0 @@ -/* mpf expression evaluation - -Copyright 2000-2002, 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ - - -/* Future: Bitwise "&", "|" and "&" could be done, if desired. Not sure - those functions would be much value though. */ - - -#include <ctype.h> -#include <stdio.h> -#include <string.h> - -#include "gmp.h" -#include "expr-impl.h" - - -/* Change this to "#define TRACE(x) x" to get some traces. */ -#define TRACE(x) - - -static size_t -e_mpf_number (mpf_ptr res, const char *e, size_t elen, int base) -{ - char *edup; - size_t i, ret, extra=0; - int mant_base, exp_base; - void *(*allocate_func) (size_t); - void (*free_func) (void *, size_t); - - TRACE (printf ("mpf_number base=%d \"%.*s\"\n", base, (int) elen, e)); - - /* mpf_set_str doesn't currently accept 0x for hex in base==0, so do it - here instead. FIXME: Would prefer to let mpf_set_str handle this. */ - if (base == 0 && elen >= 2 && e[0] == '0' && (e[1] == 'x' || e[1] == 'X')) - { - base = 16; - extra = 2; - e += extra; - elen -= extra; - } - - if (base == 0) - mant_base = 10; - else if (base < 0) - mant_base = -base; - else - mant_base = base; - - /* exponent in decimal if base is negative */ - if (base < 0) - exp_base = 10; - else if (base == 0) - exp_base = 10; - else - exp_base = base; - -#define IS_EXPONENT(c) \ - (c == '@' || (base <= 10 && base >= -10 && (e[i] == 'e' || e[i] == 'E'))) - - i = 0; - for (;;) - { - if (i >= elen) - goto parsed; - if (e[i] == '.') - break; - if (IS_EXPONENT (e[i])) - goto exponent; - if (! isasciidigit_in_base (e[i], mant_base)) - goto parsed; - i++; - } - - /* fraction */ - i++; - for (;;) - { - if (i >= elen) - goto parsed; - if (IS_EXPONENT (e[i])) - goto exponent; - if (! isasciidigit_in_base (e[i], mant_base)) - goto parsed; - i++; - } - - exponent: - i++; - if (i >= elen) - goto parsed; - if (e[i] == '-') - i++; - for (;;) - { - if (i >= elen) - goto parsed; - if (! isasciidigit_in_base (e[i], exp_base)) - break; - i++; - } - - parsed: - TRACE (printf (" parsed i=%u \"%.*s\"\n", i, (int) i, e)); - - mp_get_memory_functions (&allocate_func, NULL, &free_func); - edup = (*allocate_func) (i+1); - memcpy (edup, e, i); - edup[i] = '\0'; - - if (mpf_set_str (res, edup, base) == 0) - ret = i + extra; - else - ret = 0; - - (*free_func) (edup, i+1); - return ret; -} - -static int -e_mpf_ulong_p (mpf_srcptr f) -{ - return mpf_integer_p (f) && mpf_fits_ulong_p (f); -} - -/* Don't want to change the precision of w, can only do an actual swap when - w and x have the same precision. */ -static void -e_mpf_set_or_swap (mpf_ptr w, mpf_ptr x) -{ - if (mpf_get_prec (w) == mpf_get_prec (x)) - mpf_swap (w, x); - else - mpf_set (w, x); -} - - -int -mpf_expr_a (const struct mpexpr_operator_t *table, - mpf_ptr res, int base, unsigned long prec, - const char *e, size_t elen, - mpf_srcptr var[26]) -{ - struct mpexpr_parse_t p; - - p.table = table; - p.res = (mpX_ptr) res; - p.base = base; - p.prec = prec; - p.e = e; - p.elen = elen; - p.var = (mpX_srcptr *) var; - - p.mpX_clear = (mpexpr_fun_one_t) mpf_clear; - p.mpX_ulong_p = (mpexpr_fun_i_unary_t) e_mpf_ulong_p; - p.mpX_get_ui = (mpexpr_fun_get_ui_t) mpf_get_ui; - p.mpX_init = (mpexpr_fun_unary_ui_t) mpf_init2; - p.mpX_number = (mpexpr_fun_number_t) e_mpf_number; - p.mpX_set = (mpexpr_fun_unary_t) mpf_set; - p.mpX_set_or_swap = (mpexpr_fun_unary_t) e_mpf_set_or_swap; - p.mpX_set_si = (mpexpr_fun_set_si_t) mpf_set_si; - p.mpX_swap = (mpexpr_fun_swap_t) mpf_swap; - - return mpexpr_evaluate (&p); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprq.c b/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprq.c deleted file mode 100644 index 96432006ef0..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprq.c +++ /dev/null @@ -1,155 +0,0 @@ -/* mpq expression evaluation - -Copyright 2000-2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <string.h> -#include "gmp.h" -#include "expr-impl.h" - - -/* Change this to "#define TRACE(x) x" to get some traces. */ -#define TRACE(x) - - -static void -e_mpq_pow_ui (mpq_ptr r, mpq_srcptr b, unsigned long e) -{ - mpz_pow_ui (mpq_numref(r), mpq_numref(b), e); - mpz_pow_ui (mpq_denref(r), mpq_denref(b), e); -} - -/* Wrapped because mpq_sgn is a macro. */ -static int -e_mpq_sgn (mpq_srcptr x) -{ - return mpq_sgn (x); -} - -/* Wrapped because mpq_equal only guarantees a non-zero return, whereas we - want 1 or 0 for == and !=. */ -static int -e_mpq_equal (mpq_srcptr x, mpq_srcptr y) -{ - return mpq_equal (x, y) != 0; -} -static int -e_mpq_notequal (mpq_srcptr x, mpq_srcptr y) -{ - return ! mpq_equal (x, y); -} - -static void -e_mpq_num (mpq_ptr w, mpq_srcptr x) -{ - if (w != x) - mpz_set (mpq_numref(w), mpq_numref(x)); - mpz_set_ui (mpq_denref(w), 1L); -} -static void -e_mpq_den (mpq_ptr w, mpq_srcptr x) -{ - if (w == x) - mpz_swap (mpq_numref(w), mpq_denref(w)); - else - mpz_set (mpq_numref(w), mpq_denref(x)); - mpz_set_ui (mpq_denref(w), 1L); -} - - -static const struct mpexpr_operator_t _mpq_expr_standard_table[] = { - - { "**", (mpexpr_fun_t) e_mpq_pow_ui, - MPEXPR_TYPE_BINARY_UI | MPEXPR_TYPE_RIGHTASSOC, 220 }, - - { "!", (mpexpr_fun_t) e_mpq_sgn, - MPEXPR_TYPE_LOGICAL_NOT | MPEXPR_TYPE_PREFIX, 210 }, - { "-", (mpexpr_fun_t) mpq_neg, - MPEXPR_TYPE_UNARY | MPEXPR_TYPE_PREFIX, 210 }, - - { "*", (mpexpr_fun_t) mpq_mul, MPEXPR_TYPE_BINARY, 200 }, - { "/", (mpexpr_fun_t) mpq_div, MPEXPR_TYPE_BINARY, 200 }, - - { "+", (mpexpr_fun_t) mpq_add, MPEXPR_TYPE_BINARY, 190 }, - { "-", (mpexpr_fun_t) mpq_sub, MPEXPR_TYPE_BINARY, 190 }, - - { "<<", (mpexpr_fun_t) mpq_mul_2exp, MPEXPR_TYPE_BINARY_UI, 180 }, - { ">>", (mpexpr_fun_t) mpq_div_2exp, MPEXPR_TYPE_BINARY_UI, 180 }, - - { "<=", (mpexpr_fun_t) mpq_cmp, MPEXPR_TYPE_CMP_LE, 170 }, - { "<", (mpexpr_fun_t) mpq_cmp, MPEXPR_TYPE_CMP_LT, 170 }, - { ">=", (mpexpr_fun_t) mpq_cmp, MPEXPR_TYPE_CMP_GE, 170 }, - { ">", (mpexpr_fun_t) mpq_cmp, MPEXPR_TYPE_CMP_GT, 170 }, - - { "==", (mpexpr_fun_t) e_mpq_equal, MPEXPR_TYPE_I_BINARY, 160 }, - { "!=", (mpexpr_fun_t) e_mpq_notequal, MPEXPR_TYPE_I_BINARY, 160 }, - - { "&&", (mpexpr_fun_t) e_mpq_sgn, MPEXPR_TYPE_LOGICAL_AND, 120 }, - { "||", (mpexpr_fun_t) e_mpq_sgn, MPEXPR_TYPE_LOGICAL_OR, 110 }, - - { ":", NULL, MPEXPR_TYPE_COLON, 101 }, - { "?", (mpexpr_fun_t) e_mpq_sgn, MPEXPR_TYPE_QUESTION, 100 }, - - { ")", (mpexpr_fun_t) e_mpq_sgn, MPEXPR_TYPE_CLOSEPAREN, 4 }, - { "(", (mpexpr_fun_t) e_mpq_sgn, MPEXPR_TYPE_OPENPAREN, 3 }, - { ",", (mpexpr_fun_t) e_mpq_sgn, MPEXPR_TYPE_ARGSEP, 2 }, - { "$", NULL, MPEXPR_TYPE_VARIABLE, 1 }, - - { "abs", (mpexpr_fun_t) mpq_abs, MPEXPR_TYPE_UNARY }, - { "cmp", (mpexpr_fun_t) mpq_cmp, MPEXPR_TYPE_I_BINARY }, - { "den", (mpexpr_fun_t) e_mpq_den, MPEXPR_TYPE_UNARY }, - { "max", (mpexpr_fun_t) mpq_cmp, MPEXPR_TYPE_MAX | MPEXPR_TYPE_PAIRWISE }, - { "min", (mpexpr_fun_t) mpq_cmp, MPEXPR_TYPE_MIN | MPEXPR_TYPE_PAIRWISE }, - { "num", (mpexpr_fun_t) e_mpq_num, MPEXPR_TYPE_UNARY }, - { "sgn", (mpexpr_fun_t) e_mpq_sgn, MPEXPR_TYPE_I_UNARY }, - - { NULL } -}; - -const struct mpexpr_operator_t * const mpq_expr_standard_table -= _mpq_expr_standard_table; - - -int -mpq_expr (mpq_ptr res, int base, const char *e, ...) -{ - mpq_srcptr var[MPEXPR_VARIABLES]; - va_list ap; - int ret; - va_start (ap, e); - - TRACE (printf ("mpq_expr(): base %d, %s\n", base, e)); - ret = mpexpr_va_to_var ((void **) var, ap); - va_end (ap); - - if (ret != MPEXPR_RESULT_OK) - return ret; - - return mpq_expr_a (mpq_expr_standard_table, res, base, e, strlen(e), var); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprqa.c b/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprqa.c deleted file mode 100644 index f3b6ecb4951..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprqa.c +++ /dev/null @@ -1,100 +0,0 @@ -/* mpq expression evaluation - -Copyright 2000, 2001, 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ - - -#include <stdio.h> -#include "gmp.h" -#include "expr-impl.h" - - -static int -e_mpq_ulong_p (mpq_srcptr q) -{ - return mpz_fits_ulong_p (mpq_numref (q)) - && mpz_cmp_ui (mpq_denref (q), 1L) == 0; -} - -/* get value as a ui, on the assumption it fits */ -static int -e_mpq_get_ui_fits (mpq_srcptr q) -{ - return mpz_get_ui (mpq_numref (q)); -} - -static void -e_mpq_set_si1 (mpq_ptr q, long num) -{ - mpq_set_si (q, num, 1L); -} - -/* The same as mpz, but putting the result in the numerator. Negatives and - fractions aren't parsed here because '-' and '/' are operators. */ -static size_t -e_mpq_number (mpq_ptr res, const char *e, size_t elen, int base) -{ - mpz_set_ui (mpq_denref (res), 1L); - return mpexpr_mpz_number (mpq_numref (res), e, elen, base); -} - - -/* ignoring prec */ -static void -e_mpq_init (mpq_ptr q, unsigned long prec) -{ - mpq_init (q); -} - -int -mpq_expr_a (const struct mpexpr_operator_t *table, - mpq_ptr res, int base, - const char *e, size_t elen, - mpq_srcptr var[26]) -{ - struct mpexpr_parse_t p; - - p.table = table; - p.res = (mpX_ptr) res; - p.base = base; - p.e = e; - p.elen = elen; - p.var = (mpX_srcptr *) var; - - p.mpX_clear = (mpexpr_fun_one_t) mpq_clear; - p.mpX_ulong_p = (mpexpr_fun_i_unary_t) e_mpq_ulong_p; - p.mpX_get_ui = (mpexpr_fun_get_ui_t) e_mpq_get_ui_fits; - p.mpX_init = (mpexpr_fun_unary_ui_t) e_mpq_init; - p.mpX_number = (mpexpr_fun_number_t) e_mpq_number; - p.mpX_set = (mpexpr_fun_unary_t) mpq_set; - p.mpX_set_or_swap = (mpexpr_fun_unary_t) mpq_swap; - p.mpX_set_si = (mpexpr_fun_set_si_t) e_mpq_set_si1; - p.mpX_swap = (mpexpr_fun_swap_t) mpq_swap; - - return mpexpr_evaluate (&p); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprv.c b/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprv.c deleted file mode 100644 index c25741b0233..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprv.c +++ /dev/null @@ -1,57 +0,0 @@ -/* mpz expression evaluation, simple part */ - -/* -Copyright 2000, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include "gmp.h" -#include "expr-impl.h" - - -int -mpexpr_va_to_var (void *var[], va_list ap) -{ - int i = 0; - void *v; - - for (;;) - { - v = va_arg (ap, void *); - if (v == NULL) - break; - if (i >= MPEXPR_VARIABLES) - return MPEXPR_RESULT_BAD_VARIABLE; - var[i++] = v; - } - - while (i < MPEXPR_VARIABLES) - var[i++] = NULL; - - return MPEXPR_RESULT_OK; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprz.c b/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprz.c deleted file mode 100644 index bac1a9992e8..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprz.c +++ /dev/null @@ -1,206 +0,0 @@ -/* mpz expression evaluation, simple part - -Copyright 2000-2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ - -#include <ctype.h> -#include <stdio.h> -#include <string.h> -#include "gmp.h" -#include "expr-impl.h" - - -/* Change this to "#define TRACE(x) x" to get some traces. */ -#define TRACE(x) - - -/* These are macros, so need function wrappers. */ -static int -e_mpz_sgn (mpz_srcptr x) -{ - return mpz_sgn (x); -} -static int -e_mpz_odd_p (mpz_srcptr x) -{ - return mpz_odd_p (x); -} -static int -e_mpz_even_p (mpz_srcptr x) -{ - return mpz_even_p (x); -} - -/* These wrapped because MPEXPR_TYPE_I_ functions are expected to return - "int" whereas these return "unsigned long". */ -static void -e_mpz_hamdist (mpz_ptr w, mpz_srcptr x, mpz_srcptr y) -{ - mpz_set_ui (w, mpz_hamdist (x, y)); -} -static void -e_mpz_popcount (mpz_ptr w, mpz_srcptr x) -{ - mpz_set_ui (w, mpz_popcount (x)); -} -static void -e_mpz_scan0 (mpz_ptr w, mpz_srcptr x, unsigned long start) -{ - mpz_set_ui (w, mpz_scan0 (x, start)); -} -static void -e_mpz_scan1 (mpz_ptr w, mpz_srcptr x, unsigned long start) -{ - mpz_set_ui (w, mpz_scan1 (x, start)); -} - -/* These wrapped because they're in-place whereas MPEXPR_TYPE_BINARY_UI - expects a separate source and destination. Actually the parser will - normally pass w==x anyway. */ -static void -e_mpz_setbit (mpz_ptr w, mpz_srcptr x, unsigned long n) -{ - if (w != x) - mpz_set (w, x); - mpz_setbit (w, n); -} -static void -e_mpz_clrbit (mpz_ptr w, mpz_srcptr x, unsigned long n) -{ - if (w != x) - mpz_set (w, x); - mpz_clrbit (w, n); -} - -static const struct mpexpr_operator_t _mpz_expr_standard_table[] = { - - { "**", (mpexpr_fun_t) mpz_pow_ui, - MPEXPR_TYPE_BINARY_UI | MPEXPR_TYPE_RIGHTASSOC, 220 }, - - { "~", (mpexpr_fun_t) mpz_com, - MPEXPR_TYPE_UNARY | MPEXPR_TYPE_PREFIX, 210 }, - { "!", (mpexpr_fun_t) e_mpz_sgn, - MPEXPR_TYPE_LOGICAL_NOT | MPEXPR_TYPE_PREFIX, 210 }, - { "-", (mpexpr_fun_t) mpz_neg, - MPEXPR_TYPE_UNARY | MPEXPR_TYPE_PREFIX, 210 }, - - { "*", (mpexpr_fun_t) mpz_mul, MPEXPR_TYPE_BINARY, 200 }, - { "/", (mpexpr_fun_t) mpz_tdiv_q, MPEXPR_TYPE_BINARY, 200 }, - { "%", (mpexpr_fun_t) mpz_tdiv_r, MPEXPR_TYPE_BINARY, 200 }, - - { "+", (mpexpr_fun_t) mpz_add, MPEXPR_TYPE_BINARY, 190 }, - { "-", (mpexpr_fun_t) mpz_sub, MPEXPR_TYPE_BINARY, 190 }, - - { "<<", (mpexpr_fun_t) mpz_mul_2exp, MPEXPR_TYPE_BINARY_UI, 180 }, - { ">>", (mpexpr_fun_t) mpz_tdiv_q_2exp, MPEXPR_TYPE_BINARY_UI, 180 }, - - { "<=", (mpexpr_fun_t) mpz_cmp, MPEXPR_TYPE_CMP_LE, 170 }, - { "<", (mpexpr_fun_t) mpz_cmp, MPEXPR_TYPE_CMP_LT, 170 }, - { ">=", (mpexpr_fun_t) mpz_cmp, MPEXPR_TYPE_CMP_GE, 170 }, - { ">", (mpexpr_fun_t) mpz_cmp, MPEXPR_TYPE_CMP_GT, 170 }, - - { "==", (mpexpr_fun_t) mpz_cmp, MPEXPR_TYPE_CMP_EQ, 160 }, - { "!=", (mpexpr_fun_t) mpz_cmp, MPEXPR_TYPE_CMP_NE, 160 }, - - { "&", (mpexpr_fun_t) mpz_and, MPEXPR_TYPE_BINARY, 150 }, - { "^", (mpexpr_fun_t) mpz_xor, MPEXPR_TYPE_BINARY, 140 }, - { "|", (mpexpr_fun_t) mpz_ior, MPEXPR_TYPE_BINARY, 130 }, - { "&&", (mpexpr_fun_t) e_mpz_sgn, MPEXPR_TYPE_LOGICAL_AND, 120 }, - { "||", (mpexpr_fun_t) e_mpz_sgn, MPEXPR_TYPE_LOGICAL_OR, 110 }, - - { ":", NULL, MPEXPR_TYPE_COLON, 101 }, - { "?", (mpexpr_fun_t) e_mpz_sgn, MPEXPR_TYPE_QUESTION, 100 }, - - { ")", NULL, MPEXPR_TYPE_CLOSEPAREN, 4 }, - { "(", NULL, MPEXPR_TYPE_OPENPAREN, 3 }, - { ",", NULL, MPEXPR_TYPE_ARGSEP, 2 }, - { "$", NULL, MPEXPR_TYPE_VARIABLE, 1 }, - - { "abs", (mpexpr_fun_t) mpz_abs, MPEXPR_TYPE_UNARY }, - { "bin", (mpexpr_fun_t) mpz_bin_ui, MPEXPR_TYPE_BINARY_UI }, - { "clrbit", (mpexpr_fun_t) e_mpz_clrbit, MPEXPR_TYPE_BINARY_UI }, - { "cmp", (mpexpr_fun_t) mpz_cmp, MPEXPR_TYPE_I_BINARY }, - { "cmpabs", (mpexpr_fun_t) mpz_cmpabs, MPEXPR_TYPE_I_BINARY }, - { "congruent_p",(mpexpr_fun_t)mpz_congruent_p, MPEXPR_TYPE_I_TERNARY }, - { "divisible_p",(mpexpr_fun_t)mpz_divisible_p, MPEXPR_TYPE_I_BINARY }, - { "even_p", (mpexpr_fun_t) e_mpz_even_p, MPEXPR_TYPE_I_UNARY }, - { "fib", (mpexpr_fun_t) mpz_fib_ui, MPEXPR_TYPE_UNARY_UI }, - { "fac", (mpexpr_fun_t) mpz_fac_ui, MPEXPR_TYPE_UNARY_UI }, - { "gcd", (mpexpr_fun_t) mpz_gcd, MPEXPR_TYPE_BINARY - | MPEXPR_TYPE_PAIRWISE }, - { "hamdist", (mpexpr_fun_t) e_mpz_hamdist, MPEXPR_TYPE_BINARY }, - { "invert", (mpexpr_fun_t) mpz_invert, MPEXPR_TYPE_BINARY }, - { "jacobi", (mpexpr_fun_t) mpz_jacobi, MPEXPR_TYPE_I_BINARY }, - { "kronecker", (mpexpr_fun_t) mpz_kronecker, MPEXPR_TYPE_I_BINARY }, - { "lcm", (mpexpr_fun_t) mpz_lcm, MPEXPR_TYPE_BINARY - | MPEXPR_TYPE_PAIRWISE }, - { "lucnum", (mpexpr_fun_t) mpz_lucnum_ui, MPEXPR_TYPE_UNARY_UI }, - { "max", (mpexpr_fun_t) mpz_cmp, MPEXPR_TYPE_MAX - | MPEXPR_TYPE_PAIRWISE }, - { "min", (mpexpr_fun_t) mpz_cmp, MPEXPR_TYPE_MIN - | MPEXPR_TYPE_PAIRWISE }, - { "nextprime", (mpexpr_fun_t) mpz_nextprime, MPEXPR_TYPE_UNARY }, - { "odd_p", (mpexpr_fun_t) e_mpz_odd_p, MPEXPR_TYPE_I_UNARY }, - { "perfect_power_p", (mpexpr_fun_t)mpz_perfect_power_p, MPEXPR_TYPE_I_UNARY}, - { "perfect_square_p",(mpexpr_fun_t)mpz_perfect_square_p,MPEXPR_TYPE_I_UNARY}, - { "popcount", (mpexpr_fun_t) e_mpz_popcount, MPEXPR_TYPE_UNARY }, - { "powm", (mpexpr_fun_t) mpz_powm, MPEXPR_TYPE_TERNARY }, - { "probab_prime_p", (mpexpr_fun_t)mpz_probab_prime_p, MPEXPR_TYPE_I_UNARY}, - { "root", (mpexpr_fun_t) mpz_root, MPEXPR_TYPE_BINARY_UI }, - { "scan0", (mpexpr_fun_t) e_mpz_scan0, MPEXPR_TYPE_BINARY_UI }, - { "scan1", (mpexpr_fun_t) e_mpz_scan1, MPEXPR_TYPE_BINARY_UI }, - { "setbit", (mpexpr_fun_t) e_mpz_setbit, MPEXPR_TYPE_BINARY_UI }, - { "tstbit", (mpexpr_fun_t) mpz_tstbit, MPEXPR_TYPE_I_BINARY_UI }, - { "sgn", (mpexpr_fun_t) e_mpz_sgn, MPEXPR_TYPE_I_UNARY }, - { "sqrt", (mpexpr_fun_t) mpz_sqrt, MPEXPR_TYPE_UNARY }, - { NULL } -}; - -/* The table is available globally only through a pointer, so the table size - can change without breaking binary compatibility. */ -const struct mpexpr_operator_t * const mpz_expr_standard_table -= _mpz_expr_standard_table; - - -int -mpz_expr (mpz_ptr res, int base, const char *e, ...) -{ - mpz_srcptr var[MPEXPR_VARIABLES]; - va_list ap; - int ret; - va_start (ap, e); - - TRACE (printf ("mpz_expr(): base %d, %s\n", base, e)); - ret = mpexpr_va_to_var ((void **) var, ap); - va_end (ap); - - if (ret != MPEXPR_RESULT_OK) - return ret; - - return mpz_expr_a (mpz_expr_standard_table, res, base, e, strlen(e), var); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprza.c b/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprza.c deleted file mode 100644 index eda830d970d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/expr/exprza.c +++ /dev/null @@ -1,108 +0,0 @@ -/* mpz expression evaluation - -Copyright 2000-2002, 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ - -#include <ctype.h> -#include <stdio.h> -#include <string.h> -#include "gmp.h" -#include "expr-impl.h" - - -/* No need to parse '-' since that's handled as an operator. - This function also by mpq_expr_a, so it's not static. */ -size_t -mpexpr_mpz_number (mpz_ptr res, const char *e, size_t elen, int base) -{ - char *edup; - size_t i, ret; - int base_effective = (base == 0 ? 10 : base); - void *(*allocate_func) (size_t); - void (*free_func) (void *, size_t); - - i = 0; - if (e[i] == '0') - { - i++; - if (e[i] == 'x' || e[i] == 'b') - i++; - } - - for ( ; i < elen; i++) - if (! isasciidigit_in_base (e[i], base_effective)) - break; - - mp_get_memory_functions (&allocate_func, NULL, &free_func); - edup = (*allocate_func) (i+1); - memcpy (edup, e, i); - edup[i] = '\0'; - - if (mpz_set_str (res, edup, base) == 0) - ret = i; - else - ret = 0; - - (*free_func) (edup, i+1); - return ret; -} - -/* ignoring prec */ -static void -e_mpz_init (mpz_ptr z, unsigned long prec) -{ - mpz_init (z); -} - -int -mpz_expr_a (const struct mpexpr_operator_t *table, - mpz_ptr res, int base, - const char *e, size_t elen, - mpz_srcptr var[26]) -{ - struct mpexpr_parse_t p; - - p.table = table; - p.res = (mpX_ptr) res; - p.base = base; - p.e = e; - p.elen = elen; - p.var = (mpX_srcptr *) var; - - p.mpX_clear = (mpexpr_fun_one_t) mpz_clear; - p.mpX_ulong_p = (mpexpr_fun_i_unary_t) mpz_fits_ulong_p; - p.mpX_get_ui = (mpexpr_fun_get_ui_t) mpz_get_ui; - p.mpX_init = (mpexpr_fun_unary_ui_t) e_mpz_init; - p.mpX_number = (mpexpr_fun_number_t) mpexpr_mpz_number; - p.mpX_set = (mpexpr_fun_unary_t) mpz_set; - p.mpX_set_or_swap = (mpexpr_fun_unary_t) mpz_swap; - p.mpX_set_si = (mpexpr_fun_set_si_t) mpz_set_si; - p.mpX_swap = (mpexpr_fun_swap_t) mpz_swap; - - return mpexpr_evaluate (&p); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/expr/run-expr.c b/src/plugins/e-acsl/contrib/libgmp/demos/expr/run-expr.c deleted file mode 100644 index 706b9102878..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/expr/run-expr.c +++ /dev/null @@ -1,242 +0,0 @@ -/* Demo program to run expression evaluation. - -Copyright 2000-2002, 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ - - -/* Usage: ./run-expr [-z] [-q] [-f] [-p prec] [-b base] expression... - - Evaluate each argument as a simple expression. By default this is in mpz - integers, but -q selects mpq or -f selects mpf. For mpf the float - precision can be set with -p. In all cases the input base can be set - with -b, or the default is "0" meaning decimal with "0x" allowed. - - This is a pretty trivial program, it's just an easy way to experiment - with the evaluation functions. */ - - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "expr.h" - - -void -run_expr (int type, int base, unsigned long prec, char *str) -{ - int outbase = (base == 0 ? 10 : base); - int ret; - - switch (type) { - case 'z': - default: - { - mpz_t res, var_a, var_b; - - mpz_init (res); - mpz_init_set_ui (var_a, 55L); - mpz_init_set_ui (var_b, 99L); - - ret = mpz_expr (res, base, str, var_a, var_b, NULL); - printf ("\"%s\" base %d: ", str, base); - if (ret == MPEXPR_RESULT_OK) - { - printf ("result "); - mpz_out_str (stdout, outbase, res); - printf ("\n"); - } - else - printf ("invalid (return code %d)\n", ret); - - mpz_clear (res); - mpz_clear (var_a); - mpz_clear (var_b); - } - break; - - case 'q': - { - mpq_t res, var_a, var_b; - - mpq_init (res); - mpq_init (var_a); - mpq_init (var_b); - - mpq_set_ui (var_a, 55L, 1); - mpq_set_ui (var_b, 99L, 1); - - ret = mpq_expr (res, base, str, var_a, var_b, NULL); - printf ("\"%s\" base %d: ", str, base); - if (ret == MPEXPR_RESULT_OK) - { - printf ("result "); - mpq_out_str (stdout, outbase, res); - printf ("\n"); - } - else - printf ("invalid (return code %d)\n", ret); - - mpq_clear (res); - mpq_clear (var_a); - mpq_clear (var_b); - } - break; - - case 'f': - { - mpf_t res, var_a, var_b; - - mpf_init2 (res, prec); - mpf_init_set_ui (var_a, 55L); - mpf_init_set_ui (var_b, 99L); - - ret = mpf_expr (res, base, str, var_a, var_b, NULL); - printf ("\"%s\" base %d: ", str, base); - if (ret == MPEXPR_RESULT_OK) - { - printf ("result "); - mpf_out_str (stdout, outbase, (size_t) 0, res); - printf ("\n"); - } - else - printf ("invalid (return code %d)\n", ret); - - mpf_clear (res); - mpf_clear (var_a); - mpf_clear (var_b); - } - break; - } -} - -int -main (int argc, char *argv[]) -{ - int type = 'z'; - int base = 0; - unsigned long prec = 64; - int seen_expr = 0; - int opt; - char *arg; - - for (;;) - { - argv++; - arg = argv[0]; - if (arg == NULL) - break; - - if (arg[0] == '-') - { - for (;;) - { - arg++; - opt = arg[0]; - - switch (opt) { - case '\0': - goto end_opt; - - case 'f': - case 'q': - case 'z': - type = opt; - break; - - case 'b': - arg++; - if (arg[0] == '\0') - { - argv++; - arg = argv[0]; - if (arg == NULL) - { - need_arg: - fprintf (stderr, "Need argument for -%c\n", opt); - exit (1); - } - } - base = atoi (arg); - goto end_opt; - - case 'p': - arg++; - if (arg[0] == '\0') - { - argv++; - arg = argv[0]; - if (arg == NULL) - goto need_arg; - } - prec = atoi (arg); - goto end_opt; - - case '-': - arg++; - if (arg[0] != '\0') - { - /* no "--foo" options */ - fprintf (stderr, "Unrecognised option --%s\n", arg); - exit (1); - } - /* stop option interpretation at "--" */ - for (;;) - { - argv++; - arg = argv[0]; - if (arg == NULL) - goto done; - run_expr (type, base, prec, arg); - seen_expr = 1; - } - - default: - fprintf (stderr, "Unrecognised option -%c\n", opt); - exit (1); - } - } - end_opt: - ; - } - else - { - run_expr (type, base, prec, arg); - seen_expr = 1; - } - } - - done: - if (! seen_expr) - { - printf ("Usage: %s [-z] [-q] [-f] [-p prec] [-b base] expression...\n", argv[0]); - exit (1); - } - - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/expr/t-expr.c b/src/plugins/e-acsl/contrib/libgmp/demos/expr/t-expr.c deleted file mode 100644 index 2f808dd8cd3..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/expr/t-expr.c +++ /dev/null @@ -1,510 +0,0 @@ -/* Test expression evaluation (print nothing and exit 0 if successful). - -Copyright 2000-2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "tests.h" -#include "expr-impl.h" - - -int option_trace = 0; - - -struct data_t { - int base; - const char *expr; - const char *want; -}; - -#define numberof(x) (sizeof (x) / sizeof ((x)[0])) - - -/* These data_xxx[] arrays are tables to be tested with one or more of the - mp?_t types. z=mpz_t, q=mpz_t, f=mpf_t. */ - -struct data_t data_zqf[] = { - - /* various deliberately wrong expressions */ - { 0, "", NULL }, - { 0, "1+", NULL }, - { 0, "+2", NULL }, - { 0, "1,2", NULL }, - { 0, "foo(1,2)", NULL }, - { 0, "1+foo", NULL }, - { 10, "0fff", NULL }, - { 0, "!", NULL }, - { 0, "10!", NULL }, - { 0, "-10!", NULL }, - { 0, "gcd((4,6))", NULL }, - { 0, "()", NULL }, - { 0, "fac(2**1000)", NULL }, - { 0, "$", NULL }, - { 0, "$-", NULL }, - - /* some basics */ - { 10, "123", "123" }, - { 10, "-123", "-123" }, - { 10, "1+2", "3" }, - { 10, "1+2+3", "6" }, - { 10, "1+2*3", "7" }, - { 10, "3*2+1", "7" }, - { 10, "$a", "55" }, - { 10, "b", "99" }, - { 16, "b", "11" }, - { 10, "4**3 * 2 + 1", "129" }, - { 10, "1<2", "1" }, - { 10, "1>2", "0" }, - - { 10, "(123)", "123" }, - - { 10, "sgn(-123)", "-1" }, - { 10, "5-7", "-2" }, - - { 0, "cmp(0,0)", "0" }, - { 0, "cmp(1,0)", "1" }, - { 0, "cmp(0,1)", "-1" }, - { 0, "cmp(-1,0)", "-1" }, - { 0, "cmp(0,-1)", "1" }, - - { 10, "0 ? 123 : 456", "456" }, - { 10, "1 ? 4+5 : 6+7", "9" }, - - { 10, "(123)", "123" }, - { 10, "(2+3)", "5" }, - { 10, "(4+5)*(5+6)", "99" }, - - { 0, "1 << 16", "65536" }, - { 0, "256 >> 4", "16" }, - { 0, "-256 >> 4", "-16" }, - - { 0, "!1", "0" }, - { 0, "!9", "0" }, - { 0, "!0", "1" }, - - { 0, "2**2**2", "16" }, - { 0, "-2**2**2", "-16" }, - - { 0, "0x100", "256" }, - { 10, "0x100", NULL }, - { 10, "0x 100", NULL }, - - { 0, " max ( 1, 2, 3, 4, 5, 6, 7, 8)", "8" }, - { 0, " max ( 1, 9, 2, 3, 4, 5, 6, 7, 8)", "9" }, - { 0, " min ( 1, 9, 2, 3, 4, 5, 6, 7, 8)", "1" }, - - { 10, "abs(123)", "123" }, - { 10, "abs(-123)", "123" }, - { 10, "abs(0)", "0" }, - - /* filling data stack */ - { 0, "1+(1+(1+(1+(1+(1+(1+(1+(1+(1+(1+(1+(1+(1+(1+1))))))))))))))", "16" }, - - /* filling control stack */ - { 0, "----------------------------------------------------1", "1" }, -}; - - -const struct data_t data_z[] = { - { 0, "divisible_p(333,3)", "1" }, - { 0, "congruent_p(7,1,3)", "1" }, - - { 0, "cmpabs(0,0)", "0" }, - { 0, "cmpabs(1,0)", "1" }, - { 0, "cmpabs(0,1)", "-1" }, - { 0, "cmpabs(-1,0)", "1" }, - { 0, "cmpabs(0,-1)", "-1" }, - - { 0, "odd_p(1)", "1" }, - { 0, "odd_p(0)", "0" }, - { 0, "odd_p(-1)", "1" }, - - { 0, "even_p(1)", "0" }, - { 0, "even_p(0)", "1" }, - { 0, "even_p(-1)", "0" }, - - { 0, "fac(0)", "1" }, - { 0, "fac(1)", "1" }, - { 0, "fac(2)", "2" }, - { 0, "fac(3)", "6" }, - { 0, "fac(10)", "3628800" }, - - { 10, "root(81,4)", "3" }, - - { 10, "gcd(4,6)", "2" }, - { 10, "gcd(4,6,9)", "1" }, - - { 10, "powm(3,2,9)", "0" }, - { 10, "powm(3,2,8)", "1" }, - - /* filling data stack */ - { 0, "1 ? 1 : 1 || 1 && 1 | 1 ^ 1 & 1 == 1 >= 1 << 1 - 1 * 1 ** 1", "1" }, - - /* filling control stack */ - { 0, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1", "1" }, - - { 0, "fib(10)", "55" }, - - { 0, "setbit(0,5)", "32" }, - { 0, "clrbit(32,5)", "0" }, - { 0, "tstbit(32,5)", "1" }, - { 0, "tstbit(32,4)", "0" }, - { 0, "scan0(7,0)", "3" }, - { 0, "scan1(7,0)", "0" }, -}; - -const struct data_t data_zq[] = { - /* expecting failure */ - { 0, "1.2", NULL }, -}; - -const struct data_t data_q[] = { - { 10, "(1/2 + 1/3 + 1/4 + 1/5 + 1/6)*20", "29" }, - { 0, "num(5/9)", "5" }, - { 0, "den(5/9)", "9" }, -}; - -const struct data_t data_zf[] = { - { 10, "sqrt ( 49 )", "7" }, - { 10, "sqrt ( 49 ) + 1", "8" }, - { 10, "sqrt((49))", "7" }, - { 10, "sqrt((((((((49))))))))", "7" }, -}; - -const struct data_t data_f[] = { - { 0, "1@10", "10000000000" }, - { 0, "1.5@10", "15000000000" }, - { 0, "1000@-1", "100" }, - { 0, "10.00@-1", "1" }, - - { 0, "1e10", "10000000000" }, - { 0, "1.5e10", "15000000000" }, - { 0, "1000e-1", "100" }, - { 0, "10.00e-1", "1" }, - - { 16, "1@9", "68719476736" }, - - { 16, "1@10", "18446744073709551616" }, - { -16, "1@10", "1099511627776" }, - - { 0, "ceil(0)", "0" }, - { 0, "ceil(0.25)", "1" }, - { 0, "ceil(0.5)", "1" }, - { 0, "ceil(1.5)", "2" }, - { 0, "ceil(-0.5)", "0" }, - { 0, "ceil(-1.5)", "-1" }, - - /* only simple cases because mpf_eq currently only works on whole limbs */ - { 0, "eq(0xFFFFFFFFFFFFFFFF1111111111111111,0xFFFFFFFFFFFFFFFF2222222222222222,64)", "1" }, - { 0, "eq(0xFFFFFFFFFFFFFFFF1111111111111111,0xFFFFFFFFFFFFFFFF2222222222222222,128)", "0" }, - - { 0, "floor(0)", "0" }, - { 0, "floor(0.25)", "0" }, - { 0, "floor(0.5)", "0" }, - { 0, "floor(1.5)", "1" }, - { 0, "floor(-0.5)", "-1" }, - { 0, "floor(-1.5)", "-2" }, - - { 0, "integer_p(1)", "1" }, - { 0, "integer_p(0.5)", "0" }, - - { 0, "trunc(0)", "0" }, - { 0, "trunc(0.25)", "0" }, - { 0, "trunc(0.5)", "0" }, - { 0, "trunc(1.5)", "1" }, - { 0, "trunc(-0.5)", "0" }, - { 0, "trunc(-1.5)", "-1" }, -}; - -struct datalist_t { - const struct data_t *data; - int num; -}; - -#define DATALIST(data) { data, numberof (data) } - -struct datalist_t list_z[] = { - DATALIST (data_z), - DATALIST (data_zq), - DATALIST (data_zf), - DATALIST (data_zqf), -}; - -struct datalist_t list_q[] = { - DATALIST (data_q), - DATALIST (data_zq), - DATALIST (data_zqf), -}; - -struct datalist_t list_f[] = { - DATALIST (data_zf), - DATALIST (data_zqf), - DATALIST (data_f), -}; - - -void -check_z (void) -{ - const struct data_t *data; - mpz_t a, b, got, want; - int l, i, ret; - - mpz_init (got); - mpz_init (want); - mpz_init_set_ui (a, 55); - mpz_init_set_ui (b, 99); - - for (l = 0; l < numberof (list_z); l++) - { - data = list_z[l].data; - - for (i = 0; i < list_z[l].num; i++) - { - if (option_trace) - printf ("mpz_expr \"%s\"\n", data[i].expr); - - ret = mpz_expr (got, data[i].base, data[i].expr, a, b, NULL); - - if (data[i].want == NULL) - { - /* expect to fail */ - if (ret == MPEXPR_RESULT_OK) - { - printf ("mpz_expr wrong return value, got %d, expected failure\n", ret); - goto error; - } - } - else - { - if (mpz_set_str (want, data[i].want, 0) != 0) - { - printf ("Cannot parse wanted value string\n"); - goto error; - } - if (ret != MPEXPR_RESULT_OK) - { - printf ("mpz_expr failed unexpectedly\n"); - printf (" return value %d\n", ret); - goto error; - } - if (mpz_cmp (got, want) != 0) - { - printf ("mpz_expr wrong result\n"); - printf (" got "); mpz_out_str (stdout, 10, got); - printf ("\n"); - printf (" want "); mpz_out_str (stdout, 10, want); - printf ("\n"); - goto error; - } - } - } - } - mpz_clear (a); - mpz_clear (b); - mpz_clear (got); - mpz_clear (want); - return; - - error: - printf (" base %d\n", data[i].base); - printf (" expr \"%s\"\n", data[i].expr); - if (data[i].want != NULL) - printf (" want \"%s\"\n", data[i].want); - abort (); -} - -void -check_q (void) -{ - const struct data_t *data; - mpq_t a, b, got, want; - int l, i, ret; - - mpq_init (got); - mpq_init (want); - mpq_init (a); - mpq_init (b); - - mpq_set_ui (a, 55, 1); - mpq_set_ui (b, 99, 1); - - for (l = 0; l < numberof (list_q); l++) - { - data = list_q[l].data; - - for (i = 0; i < list_q[l].num; i++) - { - if (option_trace) - printf ("mpq_expr \"%s\"\n", data[i].expr); - - ret = mpq_expr (got, data[i].base, data[i].expr, a, b, NULL); - - if (data[i].want == NULL) - { - /* expect to fail */ - if (ret == MPEXPR_RESULT_OK) - { - printf ("mpq_expr wrong return value, got %d, expected failure\n", ret); - goto error; - } - } - else - { - if (mpz_set_str (mpq_numref(want), data[i].want, 0) != 0) - { - printf ("Cannot parse wanted value string\n"); - goto error; - } - mpz_set_ui (mpq_denref(want), 1); - - if (ret != MPEXPR_RESULT_OK) - { - printf ("mpq_expr failed unexpectedly\n"); - printf (" return value %d\n", ret); - goto error; - } - if (mpq_cmp (got, want) != 0) - { - printf ("mpq_expr wrong result\n"); - printf (" got "); mpq_out_str (stdout, 10, got); - printf ("\n"); - printf (" want "); mpq_out_str (stdout, 10, want); - printf ("\n"); - goto error; - } - } - } - } - mpq_clear (a); - mpq_clear (b); - mpq_clear (got); - mpq_clear (want); - return; - - error: - printf (" base %d\n", data[i].base); - printf (" expr \"%s\"\n", data[i].expr); - if (data[i].want != NULL) - printf (" want \"%s\"\n", data[i].want); - abort (); -} - -void -check_f (void) -{ - const struct data_t *data; - mpf_t a, b, got, want; - int l, i, ret; - - mpf_set_default_prec (200L); - - mpf_init (got); - mpf_init (want); - mpf_init_set_ui (a, 55); - mpf_init_set_ui (b, 99); - - for (l = 0; l < numberof (list_f); l++) - { - data = list_f[l].data; - - for (i = 0; i < list_f[l].num; i++) - { - if (option_trace) - printf ("mpf_expr \"%s\"\n", data[i].expr); - - ret = mpf_expr (got, data[i].base, data[i].expr, a, b, NULL); - - if (data[i].want == NULL) - { - /* expect to fail */ - if (ret == MPEXPR_RESULT_OK) - { - printf ("mpf_expr wrong return value, got %d, expected failure\n", ret); - goto error; - } - } - else - { - if (mpf_set_str (want, data[i].want, 0) != 0) - { - printf ("Cannot parse wanted value string\n"); - goto error; - } - - if (ret != MPEXPR_RESULT_OK) - { - printf ("mpf_expr failed unexpectedly\n"); - printf (" return value %d\n", ret); - goto error; - } - if (mpf_cmp (got, want) != 0) - { - printf ("mpf_expr wrong result\n"); - printf (" got "); mpf_out_str (stdout, 10, 20, got); - printf ("\n"); - printf (" want "); mpf_out_str (stdout, 10, 20, want); - printf ("\n"); - goto error; - } - } - } - } - mpf_clear (a); - mpf_clear (b); - mpf_clear (got); - mpf_clear (want); - return; - - error: - printf (" base %d\n", data[i].base); - printf (" expr \"%s\"\n", data[i].expr); - if (data[i].want != NULL) - printf (" want \"%s\"\n", data[i].want); - abort (); -} - - -int -main (int argc, char *argv[]) -{ - tests_start (); - - if (argc >= 2) - option_trace = 1; - - check_z (); - check_q (); - check_f (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/factorize.c b/src/plugins/e-acsl/contrib/libgmp/demos/factorize.c deleted file mode 100644 index 91e645591ee..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/factorize.c +++ /dev/null @@ -1,447 +0,0 @@ -/* Factoring with Pollard's rho method. - -Copyright 1995, 1997-2003, 2005, 2009, 2012, 2015 Free Software -Foundation, Inc. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <inttypes.h> - -#include "gmp.h" - -static unsigned char primes_diff[] = { -#define P(a,b,c) a, -#include "primes.h" -#undef P -}; -#define PRIMES_PTAB_ENTRIES (sizeof(primes_diff) / sizeof(primes_diff[0])) - -int flag_verbose = 0; - -/* Prove primality or run probabilistic tests. */ -int flag_prove_primality = 1; - -/* Number of Miller-Rabin tests to run when not proving primality. */ -#define MR_REPS 25 - -struct factors -{ - mpz_t *p; - unsigned long *e; - long nfactors; -}; - -void factor (mpz_t, struct factors *); - -void -factor_init (struct factors *factors) -{ - factors->p = malloc (1); - factors->e = malloc (1); - factors->nfactors = 0; -} - -void -factor_clear (struct factors *factors) -{ - int i; - - for (i = 0; i < factors->nfactors; i++) - mpz_clear (factors->p[i]); - - free (factors->p); - free (factors->e); -} - -void -factor_insert (struct factors *factors, mpz_t prime) -{ - long nfactors = factors->nfactors; - mpz_t *p = factors->p; - unsigned long *e = factors->e; - long i, j; - - /* Locate position for insert new or increment e. */ - for (i = nfactors - 1; i >= 0; i--) - { - if (mpz_cmp (p[i], prime) <= 0) - break; - } - - if (i < 0 || mpz_cmp (p[i], prime) != 0) - { - p = realloc (p, (nfactors + 1) * sizeof p[0]); - e = realloc (e, (nfactors + 1) * sizeof e[0]); - - mpz_init (p[nfactors]); - for (j = nfactors - 1; j > i; j--) - { - mpz_set (p[j + 1], p[j]); - e[j + 1] = e[j]; - } - mpz_set (p[i + 1], prime); - e[i + 1] = 1; - - factors->p = p; - factors->e = e; - factors->nfactors = nfactors + 1; - } - else - { - e[i] += 1; - } -} - -void -factor_insert_ui (struct factors *factors, unsigned long prime) -{ - mpz_t pz; - - mpz_init_set_ui (pz, prime); - factor_insert (factors, pz); - mpz_clear (pz); -} - - -void -factor_using_division (mpz_t t, struct factors *factors) -{ - mpz_t q; - unsigned long int p; - int i; - - if (flag_verbose > 0) - { - printf ("[trial division] "); - } - - mpz_init (q); - - p = mpz_scan1 (t, 0); - mpz_fdiv_q_2exp (t, t, p); - while (p) - { - factor_insert_ui (factors, 2); - --p; - } - - p = 3; - for (i = 1; i <= PRIMES_PTAB_ENTRIES;) - { - if (! mpz_divisible_ui_p (t, p)) - { - p += primes_diff[i++]; - if (mpz_cmp_ui (t, p * p) < 0) - break; - } - else - { - mpz_tdiv_q_ui (t, t, p); - factor_insert_ui (factors, p); - } - } - - mpz_clear (q); -} - -static int -mp_millerrabin (mpz_srcptr n, mpz_srcptr nm1, mpz_ptr x, mpz_ptr y, - mpz_srcptr q, unsigned long int k) -{ - unsigned long int i; - - mpz_powm (y, x, q, n); - - if (mpz_cmp_ui (y, 1) == 0 || mpz_cmp (y, nm1) == 0) - return 1; - - for (i = 1; i < k; i++) - { - mpz_powm_ui (y, y, 2, n); - if (mpz_cmp (y, nm1) == 0) - return 1; - if (mpz_cmp_ui (y, 1) == 0) - return 0; - } - return 0; -} - -int -mp_prime_p (mpz_t n) -{ - int k, r, is_prime; - mpz_t q, a, nm1, tmp; - struct factors factors; - - if (mpz_cmp_ui (n, 1) <= 0) - return 0; - - /* We have already casted out small primes. */ - if (mpz_cmp_ui (n, (long) FIRST_OMITTED_PRIME * FIRST_OMITTED_PRIME) < 0) - return 1; - - mpz_inits (q, a, nm1, tmp, NULL); - - /* Precomputation for Miller-Rabin. */ - mpz_sub_ui (nm1, n, 1); - - /* Find q and k, where q is odd and n = 1 + 2**k * q. */ - k = mpz_scan1 (nm1, 0); - mpz_tdiv_q_2exp (q, nm1, k); - - mpz_set_ui (a, 2); - - /* Perform a Miller-Rabin test, finds most composites quickly. */ - if (!mp_millerrabin (n, nm1, a, tmp, q, k)) - { - is_prime = 0; - goto ret2; - } - - if (flag_prove_primality) - { - /* Factor n-1 for Lucas. */ - mpz_set (tmp, nm1); - factor (tmp, &factors); - } - - /* Loop until Lucas proves our number prime, or Miller-Rabin proves our - number composite. */ - for (r = 0; r < PRIMES_PTAB_ENTRIES; r++) - { - int i; - - if (flag_prove_primality) - { - is_prime = 1; - for (i = 0; i < factors.nfactors && is_prime; i++) - { - mpz_divexact (tmp, nm1, factors.p[i]); - mpz_powm (tmp, a, tmp, n); - is_prime = mpz_cmp_ui (tmp, 1) != 0; - } - } - else - { - /* After enough Miller-Rabin runs, be content. */ - is_prime = (r == MR_REPS - 1); - } - - if (is_prime) - goto ret1; - - mpz_add_ui (a, a, primes_diff[r]); /* Establish new base. */ - - if (!mp_millerrabin (n, nm1, a, tmp, q, k)) - { - is_prime = 0; - goto ret1; - } - } - - fprintf (stderr, "Lucas prime test failure. This should not happen\n"); - abort (); - - ret1: - if (flag_prove_primality) - factor_clear (&factors); - ret2: - mpz_clears (q, a, nm1, tmp, NULL); - - return is_prime; -} - -void -factor_using_pollard_rho (mpz_t n, unsigned long a, struct factors *factors) -{ - mpz_t x, z, y, P; - mpz_t t, t2; - unsigned long long k, l, i; - - if (flag_verbose > 0) - { - printf ("[pollard-rho (%lu)] ", a); - } - - mpz_inits (t, t2, NULL); - mpz_init_set_si (y, 2); - mpz_init_set_si (x, 2); - mpz_init_set_si (z, 2); - mpz_init_set_ui (P, 1); - k = 1; - l = 1; - - while (mpz_cmp_ui (n, 1) != 0) - { - for (;;) - { - do - { - mpz_mul (t, x, x); - mpz_mod (x, t, n); - mpz_add_ui (x, x, a); - - mpz_sub (t, z, x); - mpz_mul (t2, P, t); - mpz_mod (P, t2, n); - - if (k % 32 == 1) - { - mpz_gcd (t, P, n); - if (mpz_cmp_ui (t, 1) != 0) - goto factor_found; - mpz_set (y, x); - } - } - while (--k != 0); - - mpz_set (z, x); - k = l; - l = 2 * l; - for (i = 0; i < k; i++) - { - mpz_mul (t, x, x); - mpz_mod (x, t, n); - mpz_add_ui (x, x, a); - } - mpz_set (y, x); - } - - factor_found: - do - { - mpz_mul (t, y, y); - mpz_mod (y, t, n); - mpz_add_ui (y, y, a); - - mpz_sub (t, z, y); - mpz_gcd (t, t, n); - } - while (mpz_cmp_ui (t, 1) == 0); - - mpz_divexact (n, n, t); /* divide by t, before t is overwritten */ - - if (!mp_prime_p (t)) - { - if (flag_verbose > 0) - { - printf ("[composite factor--restarting pollard-rho] "); - } - factor_using_pollard_rho (t, a + 1, factors); - } - else - { - factor_insert (factors, t); - } - - if (mp_prime_p (n)) - { - factor_insert (factors, n); - break; - } - - mpz_mod (x, x, n); - mpz_mod (z, z, n); - mpz_mod (y, y, n); - } - - mpz_clears (P, t2, t, z, x, y, NULL); -} - -void -factor (mpz_t t, struct factors *factors) -{ - factor_init (factors); - - if (mpz_sgn (t) != 0) - { - factor_using_division (t, factors); - - if (mpz_cmp_ui (t, 1) != 0) - { - if (flag_verbose > 0) - { - printf ("[is number prime?] "); - } - if (mp_prime_p (t)) - factor_insert (factors, t); - else - factor_using_pollard_rho (t, 1, factors); - } - } -} - -int -main (int argc, char *argv[]) -{ - mpz_t t; - int i, j, k; - struct factors factors; - - while (argc > 1) - { - if (!strcmp (argv[1], "-v")) - flag_verbose = 1; - else if (!strcmp (argv[1], "-w")) - flag_prove_primality = 0; - else - break; - - argv++; - argc--; - } - - mpz_init (t); - if (argc > 1) - { - for (i = 1; i < argc; i++) - { - mpz_set_str (t, argv[i], 0); - - gmp_printf ("%Zd:", t); - factor (t, &factors); - - for (j = 0; j < factors.nfactors; j++) - for (k = 0; k < factors.e[j]; k++) - gmp_printf (" %Zd", factors.p[j]); - - puts (""); - factor_clear (&factors); - } - } - else - { - for (;;) - { - mpz_inp_str (t, stdin, 0); - if (feof (stdin)) - break; - - gmp_printf ("%Zd:", t); - factor (t, &factors); - - for (j = 0; j < factors.nfactors; j++) - for (k = 0; k < factors.e[j]; k++) - gmp_printf (" %Zd", factors.p[j]); - - puts (""); - factor_clear (&factors); - } - } - - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/isprime.c b/src/plugins/e-acsl/contrib/libgmp/demos/isprime.c deleted file mode 100644 index 40ee70eb994..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/isprime.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Classify numbers as probable primes, primes or composites. - With -q return true if the following argument is a (probable) prime. - -Copyright 1999, 2000, 2002, 2005, 2012 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program. If not, see https://www.gnu.org/licenses/. */ - -#include <stdlib.h> -#include <string.h> -#include <stdio.h> -#include "gmp.h" - -char *progname; - -void -print_usage_and_exit () -{ - fprintf (stderr, "usage: %s -q nnn\n", progname); - fprintf (stderr, "usage: %s nnn ...\n", progname); - exit (-1); -} - -int -main (int argc, char **argv) -{ - mpz_t n; - int i; - - progname = argv[0]; - - if (argc < 2) - print_usage_and_exit (); - - mpz_init (n); - - if (argc == 3 && strcmp (argv[1], "-q") == 0) - { - if (mpz_set_str (n, argv[2], 0) != 0) - print_usage_and_exit (); - exit (mpz_probab_prime_p (n, 25) == 0); - } - - for (i = 1; i < argc; i++) - { - int class; - if (mpz_set_str (n, argv[i], 0) != 0) - print_usage_and_exit (); - class = mpz_probab_prime_p (n, 25); - mpz_out_str (stdout, 10, n); - if (class == 0) - puts (" is composite"); - else if (class == 1) - puts (" is a probable prime"); - else /* class == 2 */ - puts (" is a prime"); - } - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP.pm b/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP.pm deleted file mode 100644 index 46bc707cfe6..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP.pm +++ /dev/null @@ -1,671 +0,0 @@ -# GMP perl module - -# Copyright 2001-2004 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. - -# [Note: The above copyright notice is repeated in the documentation section -# below, in order to get it into man pages etc generated by the various pod -# conversions. When changing, be sure to update below too.] - - -# This code is designed to work with perl 5.005, so it and the sub-packages -# aren't as modern as they could be. - -package GMP; - -require Symbol; -require Exporter; -require DynaLoader; -@ISA = qw(Exporter DynaLoader); - -@EXPORT = qw(); -@EXPORT_OK = qw(version); -%EXPORT_TAGS = ('all' => [qw( - get_d get_d_2exp get_si get_str integer_p - printf sgn sprintf)], - 'constants' => [()]); -Exporter::export_ok_tags('all'); - -$VERSION = '2.00'; -bootstrap GMP $VERSION; - - -# The format string is cut up into "%" specifiers so GMP types can be -# passed to GMP::sprintf_internal. Any "*"s are interpolated before -# calling sprintf_internal, which saves worrying about variable -# argument lists there. -# -# Because sprintf_internal is only called after the conversion and -# operand have been checked there won't be any crashes from a bad -# format string. -# -sub sprintf { - my $fmt = shift; - my $out = ''; - my ($pre, $dummy, $pat, $rest); - - while (($pre, $dummy, $pat, $rest) = ($fmt =~ /^((%%|[^%])*)(%[- +#.*hlLqv\d]*[bcdfeEgGinopsuxX])(.*)$/s)) { - - $out .= $pre; - - my $pat2 = $pat; # $pat with "*"s expanded - my @params = (); # arguments per "*"s - while ($pat2 =~ /[*]/) { - my $arg = shift; - $pat2 =~ s/[*]/$arg/; - push @params, $arg; - } - - if (UNIVERSAL::isa($_[0],"GMP::Mpz")) { - if ($pat2 !~ /[dioxX]$/) { - die "GMP::sprintf: unsupported output format for mpz: $pat2\n"; - } - $pat2 =~ s/(.)$/Z$1/; - $out .= sprintf_internal ($pat2, shift); - - } elsif (UNIVERSAL::isa($_[0],"GMP::Mpq")) { - if ($pat2 !~ /[dioxX]$/) { - die "GMP::sprintf: unsupported output format for mpq: $pat2\n"; - } - $pat2 =~ s/(.)$/Q$1/; - $out .= sprintf_internal ($pat2, shift); - - } elsif (UNIVERSAL::isa($_[0],"GMP::Mpf")) { - if ($pat2 !~ /[eEfgG]$/) { - die "GMP::sprintf: unsupported output format for mpf: $pat2\n"; - } - $pat2 =~ s/(.)$/F$1/; - $out .= sprintf_internal ($pat2, shift); - - } elsif ($pat =~ /n$/) { - # do it this way so h, l or V type modifiers are respected, and use a - # dummy variable to avoid a warning about discarding the value - my $dummy = sprintf "%s$pat", $out, $_[0]; - shift; - - } else { - $out .= sprintf $pat, @params, shift; - } - - $fmt = $rest; - } - $out .= $fmt; - return $out; -} - -sub printf { - if (ref($_[0]) eq 'GLOB') { - my $h = Symbol::qualify_to_ref(shift, caller); - print $h GMP::sprintf(@_); - } else { - print STDOUT GMP::sprintf(@_); - } -} - -1; -__END__ - - - -=head1 NAME - -GMP - Perl interface to the GNU Multiple Precision Arithmetic Library - -=head1 SYNOPSIS - - use GMP; - use GMP::Mpz; - use GMP::Mpq; - use GMP::Mpf; - use GMP::Rand; - -=head1 DESCRIPTION - -This module provides access to GNU MP arbitrary precision integers, -rationals and floating point. - -No functions are exported from these packages by default, but can be -selected in the usual way, or the tag :all for everything. - - use GMP::Mpz qw(gcd, lcm); # just these functions - use GMP::Mpq qw(:all); # everything in mpq - -=head2 GMP::Mpz - -This class provides arbitrary precision integers. A new mpz can be -constructed with C<mpz>. The initial value can be an integer, float, -string, mpz, mpq or mpf. Floats, mpq and mpf will be automatically -truncated to an integer. - - use GMP::Mpz qw(:all); - my $a = mpz(123); - my $b = mpz("0xFFFF"); - my $c = mpz(1.5); # truncated - -The following overloaded operators are available, and corresponding -assignment forms like C<+=>, - -=over 4 - -=item - -+ - * / % E<lt>E<lt> E<gt>E<gt> ** & | ^ ! E<lt> E<lt>= == != E<gt> E<gt>= -E<lt>=E<gt> abs not sqrt - -=back - -C</> and C<%> round towards zero (as per the C<tdiv> functions in GMP). - -The following functions are available, behaving the same as the -corresponding GMP mpz functions, - -=over 4 - -=item - -bin, cdiv, cdiv_2exp, clrbit, combit, congruent_p, congruent_2exp_p, -divexact, divisible_p, divisible_2exp_p, even_p, fac, fdiv, fdiv_2exp, fib, -fib2, gcd, gcdext, hamdist, invert, jacobi, kronecker, lcm, lucnum, lucnum2, -mod, mpz_export, mpz_import, nextprime, odd_p, perfect_power_p, -perfect_square_p, popcount, powm, probab_prime_p, realloc, remove, root, -roote, scan0, scan1, setbit, sizeinbase, sqrtrem, tdiv, tdiv_2exp, tstbit - -=back - -C<cdiv>, C<fdiv> and C<tdiv> and their C<2exp> variants return a -quotient/remainder pair. C<fib2> returns a pair F[n] and F[n-1], similarly -C<lucnum2>. C<gcd> and C<lcm> accept a variable number of arguments (one or -more). C<gcdext> returns a triplet of gcd and two cofactors, for example - - use GMP::Mpz qw(:all); - $a = 7257; - $b = 10701; - ($g, $x, $y) = gcdext ($a, $b); - print "gcd($a,$b) is $g, and $g == $a*$x + $b*$y\n"; - -C<mpz_import> and C<mpz_export> are so named to avoid the C<import> keyword. -Their parameters are as follows, - - $z = mpz_import ($order, $size, $endian, $nails, $string); - $string = mpz_export ($order, $size, $endian, $nails, $z); - -The order, size, endian and nails parameters are as per the corresponding C -functions. The string input for C<mpz_import> is interpreted as byte data -and must be a multiple of $size bytes. C<mpz_export> conversely returns a -string of byte data, which will be a multiple of $size bytes. - -C<invert> returns the inverse, or undef if it doesn't exist. C<remove> -returns a remainder/multiplicity pair. C<root> returns the nth root, and -C<roote> returns a root/bool pair, the bool indicating whether the root is -exact. C<sqrtrem> and C<rootrem> return a root/remainder pair. - -C<clrbit>, C<combit> and C<setbit> expect a variable which they can modify, -it doesn't make sense to pass a literal constant. Only the given variable -is modified, if other variables are referencing the same mpz object then a -new copy is made of it. If the variable isn't an mpz it will be coerced to -one. For instance, - - use GMP::Mpz qw(setbit); - setbit (123, 0); # wrong, don't pass a constant - $a = mpz(6); - $b = $a; - setbit ($a, 0); # $a becomes 7, $b stays at 6 - -C<scan0> and C<scan1> return ~0 if no 0 or 1 bit respectively is found. - -=head2 GMP::Mpq - -This class provides rationals with arbitrary precision numerators and -denominators. A new mpq can be constructed with C<mpq>. The initial value -can be an integer, float, string, mpz, mpq or mpf, or a pair of integers or -mpz's. No precision is lost when converting a float or mpf, the exact value -is retained. - - use GMP::Mpq qw(:all); - $a = mpq(); # zero - $b = mpq(0.5); # gives 1/2 - $b = mpq(14); # integer 14 - $b = mpq(3,4); # fraction 3/4 - $b = mpq("7/12"); # fraction 7/12 - $b = mpq("0xFF/0x100"); # fraction 255/256 - -When a fraction is given, it should be in the canonical form specified in -the GMP manual, which is denominator positive, no common factors, and zero -always represented as 0/1. If not then C<canonicalize> can be called to put -it in that form. For example, - - use GMP::Mpq qw(:all); - $q = mpq(21,15); # eek! common factor 3 - canonicalize($q); # get rid of it - -The following overloaded operators are available, and corresponding -assignment forms like C<+=>, - -=over 4 - -=item - -+ - * / E<lt>E<lt> E<gt>E<gt> ** ! E<lt> E<lt>= == != E<gt> E<gt>= -E<lt>=E<gt> abs not - -=back - -The following functions are available, - -=over 4 - -=item - -den, inv, num - -=back - -C<inv> calculates 1/q, as per the corresponding GMP function. C<num> and -C<den> return an mpz copy of the numerator or denominator respectively. In -the future C<num> and C<den> might give lvalues so the original mpq can be -modified through them, but this is not done currently. - -=head2 GMP::Mpf - -This class provides arbitrary precision floating point numbers. The -mantissa is an arbitrary user-selected precision and the exponent is a fixed -size (one machine word). - -A new mpf can be constructed with C<mpf>. The initial value can be an -integer, float, string, mpz, mpq or mpf. The second argument specifies the -desired precision in bits, or if omitted then the default precision is used. - - use GMP::Mpf qw(:all); - $a = mpf(); # zero - $b = mpf(-7.5); # default precision - $c = mpf(1.5, 500); # 500 bits precision - $d = mpf("1.0000000000000001"); - -The following overloaded operators are available, with the corresponding -assignment forms like C<+=>, - -=over 4 - -=item - -+ - * / E<lt>E<lt> E<gt>E<gt> ** ! E<lt> E<lt>= == != E<gt> E<gt>= -E<lt>=E<gt> abs not sqrt - -=back - -The following functions are available, behaving the same as the -corresponding GMP mpf functions, - -=over 4 - -=item - -ceil, floor, get_default_prec, get_prec, mpf_eq, set_default_prec, set_prec, -trunc - -=back - -C<mpf_eq> is so named to avoid clashing with the perl C<eq> operator. - -C<set_prec> expects a variable which it can modify, it doesn't make sense to -pass a literal constant. Only the given variable is modified, if other -variables are referencing the same mpf object then a new copy is made of it. -If the variable isn't an mpf it will be coerced to one. - -Results are the same precision as inputs, or if two mpf's are given to a -binary operator then the precision of the first is used. For example, - - use GMP::Mpf qw(mpf); - $a = mpf(2.0, 100); - $b = mpf(2.0, 500); - $c = $a + $b; # gives 100 bits precision - -Mpf to string conversion via "" or the usual string contexts uses C<$#> the -same as normal float to string conversions, or defaults to C<%.g> if C<$#> -is not defined. C<%.g> means all significant digits in the selected -precision. - -=head2 GMP class - -The following functions are available in the GMP class, - -=over 4 - -=item - -fits_slong_p, get_d, get_d_2exp, get_si, get_str, integer_p, printf, sgn, -sprintf, version - -=back - -C<get_d_2exp> accepts any integer, string, float, mpz, mpq or mpf operands -and returns a float and an integer exponent, - - ($dbl, $exp) = get_d_2exp (mpf ("3.0")); - # dbl is 0.75, exp is 2 - -C<get_str> takes an optional second argument which is the base, defaulting -to decimal. A negative base means upper case, as per the C functions. For -integer, integer string, mpz or mpq operands a string is returned. - - use GMP qw(:all); - use GMP::Mpq qw(:all); - print get_str(mpq(-5,8)),"\n"; # -5/8 - print get_str(255,16),"\n"; # ff - -For float, float strings or mpf operands, C<get_str> accepts an optional -third parameter being how many digits to produce, defaulting to 0 which -means all digits. (Only as many digits as can be accurately represented by -the float precision are ever produced though.) A string/exponent pair is -returned, as per the C mpf_get_str function. For example, - - use GMP qw(:all); - use GMP::Mpf qw(:all); - ($s, $e) = get_str(111.111111111, 10, 4); - printf ".$se$e\n"; # .1111e3 - ($s, $e) = get_str(1.625, 10); - print "0.$s*10^$e\n"; # 0.1625*10^1 - ($s, $e) = get_str(mpf(2)**20, 16); - printf ".%s@%x\n", $s, $e; # .1@14 - -C<printf> and C<sprintf> allow formatted output of GMP types. mpz and mpq -values can be used with integer conversions (d, o, x, X) and mpf with float -conversions (f, e, E, g, G). All the standard perl printf features are -available too. For example, - - use GMP::Mpz qw(mpz); - use GMP::Mpf qw(mpf); - GMP::printf ("%d %d %s", 123, mpz(2)**128, 'foo'); - GMP::printf STDERR "%.40f", mpf(1.234); - -In perl 5.6.1 it doesn't seem to work to export C<printf>, the plain builtin -C<printf> is reached unless calls are C<&printf()> style. Explicit use of -C<GMP::printf> is suggested. C<sprintf> doesn't suffer this problem. - - use GMP qw(sprintf); - use GMP::Mpq qw(mpq); - $s = sprintf "%x", mpq(15,16); - -C<version> is not exported by default or by tag :all, calling it as -C<GMP::version()> is recommended. It returns the GMP library version -string, which is not to be confused with the module version number. - -The other GMP module functions behave as per the corresponding GMP routines, -and accept any integer, string, float, mpz, mpq or mpf. For example, - - use GMP qw(:all); - use GMP::Mpz qw(mpz); - $z = mpz(123); - print sgn($z); # gives 1 - -Because each of GMP::Mpz, GMP::Mpq and GMP::Mpf is a sub-class of GMP, -C<-E<gt>> style calls work too. - - use GMP qw(:all); - use GMP::Mpq qw(mpf); - $q = mpq(-5,7); - if ($q->integer_p()) # false - ... - -=head2 GMP::Rand - -This class provides objects holding an algorithm and state for random number -generation. C<randstate> creates a new object, for example, - - use GMP::Rand qw(randstate); - $r = randstate(); - $r = randstate('lc_2exp_size', 64); - $r = randstate('lc_2exp', 43840821, 1, 32); - $r = randstate('mt'); - $r = randstate($another_r); - -With no parameters this corresponds to the C function -C<gmp_randinit_default>, and is a compromise between speed and randomness. -'lc_2exp_size' corresponds to C<gmp_randinit_lc_2exp_size>, 'lc_2exp' -corresponds to C<gmp_randinit_lc_2exp>, and 'mt' corresponds to -C<gmp_randinit_mt>. Or when passed another randstate object, a copy of that -object is made. - -'lc_2exp_size' can fail if the requested size is bigger than the internal -table provides for, in which case undef is returned. The maximum size -currently supported is 128. The other forms always succeed. - -A randstate can be seeded with an integer or mpz, using the C<seed> method. -/dev/random might be a good source of randomness, or time() or -Time::HiRes::time() might be adequate, depending on the application. - - $r->seed(time())); - -Random numbers can be generated with the following functions, - -=over 4 - -=item - -mpf_urandomb, mpz_rrandomb, mpz_urandomb, mpz_urandomm, -gmp_urandomb_ui, gmp_urandomm_ui - -=back - -Each constructs a new mpz or mpf and with a distribution per the -corresponding GMP function. For example, - - use GMP::Rand (:all); - $r = randstate(); - $a = mpz_urandomb($r,256); # uniform mpz, 256 bits - $b = mpz_urandomm($r,mpz(3)**100); # uniform mpz, 0 to 3**100-1 - $c = mpz_rrandomb($r,1024); # special mpz, 1024 bits - $f = mpf_urandomb($r,128); # uniform mpf, 128 bits, 0<=$f<1 - $f = gmp_urandomm_ui($r,56); # uniform int, 0 to 55 - -=head2 Coercion - -Arguments to operators and functions are converted as necessary to the -appropriate type. For instance C<**> requires an unsigned integer exponent, -and an mpq argument will be converted, so long as it's an integer in the -appropriate range. - - use GMP::Mpz (mpz); - use GMP::Mpq (mpq); - $p = mpz(3) ** mpq(45); # allowed, 45 is an integer - -It's an error if a conversion to an integer or mpz would cause any -truncation. For example, - - use GMP::Mpz (mpz); - $p = mpz(3) + 1.25; # not allowed - $p = mpz(3) + mpz(1.25); # allowed, explicit truncation - -Comparisons, however, accept any combination of operands and are always done -exactly. For example, - - use GMP::Mpz (mpz); - print mpz(3) < 3.1; # true - -Variables used on the left of an assignment operator like C<+=> are subject -to coercion too. An integer, float or string will change type when an mpz, -mpq or mpf is applied to it. For example, - - use GMP::Mpz (mpz); - $a = 1; - $a += mpz(1234); # $a becomes an mpz - -=head2 Overloading - -The rule for binary operators in the C<overload> mechanism is that if both -operands are class objects then the method from the first is used. This -determines the result type when mixing GMP classes. For example, - - use GMP::Mpz (mpz); - use GMP::Mpq (mpq); - use GMP::Mpf (mpf); - $z = mpz(123); - $q = mpq(3,2); - $f = mpf(1.375) - print $q+$f; # gives an mpq - print $f+$z; # gives an mpf - print $z+$f; # not allowed, would lose precision - -=head2 Constants - -A special tag C<:constants> is recognised in the module exports list. It -doesn't select any functions, but indicates that perl constants should be -GMP objects. This can only be used on one of GMP::Mpz, GMP::Mpq or GMP::Mpf -at any one time, since they apply different rules. - -GMP::Mpz will treat constants as mpz's if they're integers, or ordinary -floats if not. For example, - - use GMP::Mpz qw(:constants); - print 764861287634126387126378128,"\n"; # an mpz - print 1.25,"\n"; # a float - -GMP::Mpq is similar, treating integers as mpq's and leaving floats to the -normal perl handling. Something like 3/4 is read as two integer mpq's and a -division, but that's fine since it gives the intended fraction. - - use GMP::Mpq qw(:constants); - print 3/4,"\n"; # an mpq - print 1.25,"\n"; # a float - -GMP::Mpf will treat all constants as mpf's using the default precision. -BEGIN blocks can be used to set that precision while the code is parsed. -For example, - - use GMP::Mpf qw(:constants); - BEGIN { GMP::Mpf::set_default_prec(256); } - print 1/3; - BEGIN { GMP::Mpf::set_default_prec(64); } - print 5/7; - -A similar special tag :noconstants is recognised to turn off the constants -feature. For example, - - use GMP::Mpz qw(:constants); - print 438249738748174928193,"\n"; # an mpz - use GMP::Mpz qw(:noconstants); - print 438249738748174928193,"\n"; # now a float - -All three 'integer', 'binary' and 'float' constant methods are captured. -'float' is captured even for GMP::Mpz and GMP::Mpq since perl by default -treats integer strings as floats if they don't fit a plain integer. - -=head1 SEE ALSO - -GMP manual, L<perl>, L<overload>. - -=head1 BUGS - -In perl 5.005_03 on i386 FreeBSD, the overloaded constants sometimes provoke -seg faults. Don't know if that's a perl bug or a GMP module bug, though it -does seem to go bad before reaching anything in GMP.xs. - -There's no way to specify an arbitrary base when converting a string to an -mpz (or mpq or mpf), only hex or octal with 0x or 0 (for mpz and mpq, but -not for mpf). - -These modules are not reentrant or thread safe, due to the implementation of -the XSUBs. - -Returning a new object from the various functions is convenient, but -assignment versions could avoid creating new objects. Perhaps they could be -named after the C language functions, eg. mpq_inv($q,$q); - -It'd be good if C<num> and C<den> gave lvalues so the underlying mpq could -be manipulated. - -C<printf> could usefully accept %b for mpz, mpq and mpf, and perhaps %x for -mpf too. - -C<get_str> returning different style values for integer versus float is a -bit unfortunate. With mpz, mpq and mpf objects there's no doubt what it -will do, but on a plain scalar its action depends on whether the scalar was -promoted to a float at any stage, and then on the GMP module rules about -using the integer or float part. - -=head1 INTERNALS - -In usual perl object style, an mpz is a reference to an object blessed into -class C<GMP::Mpz>. The object holds a pointer to the C language C<mpz_t> -structure. Similarly for mpq, mpf and randstate. - -A free list of mpz and mpq values is kept to avoid repeated initializing and -clearing when objects are created and destroyed. This aims to help speed, -but it's not clear whether it's really needed. - -mpf doesn't use a free list because the precision of new objects can be -different each time. - -No interface to C<mpf_set_prec_raw> is provided. It wouldn't be very useful -since there's no way to make an operation store its result in a particular -object. The plain C<set_prec> is useful though, for truncating to a lower -precision, or as a sort of directive that subsequent calculations involving -that variable should use a higher precision. - -The overheads of perl dynamic typing (operator dispatch, operand type -checking or coercion) will mean this interface is slower than using C -directly. - -Some assertion checking is available as a compile-time option. - -=head1 COPYRIGHT - -Copyright 2001-2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. - -=cut - -# Local variables: -# perl-indent-level: 2 -# fill-column: 76 -# End: diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP.xs b/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP.xs deleted file mode 100644 index 8f5acc914d4..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP.xs +++ /dev/null @@ -1,3212 +0,0 @@ -/* GMP module external subroutines. - -Copyright 2001-2003, 2015 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. - - -/* Notes: - - Routines are grouped with the alias feature and a table of function - pointers where possible, since each xsub routine ends up with quite a bit - of code size. Different combinations of arguments and return values have - to be separate though. - - The "INTERFACE:" feature isn't available in perl 5.005 and so isn't used. - "ALIAS:" requires a table lookup with CvXSUBANY(cv).any_i32 (which is - "ix") whereas "INTERFACE:" would have CvXSUBANY(cv).any_dptr as the - function pointer immediately. - - Mixed-type swapped-order assignments like "$a = 123; $a += mpz(456);" - invoke the plain overloaded "+", not "+=", which makes life easier. - - mpz_assume etc types are used with the overloaded operators since such - operators are always called with a class object as the first argument, we - don't need an sv_derived_from() lookup to check. There's assert()s in - MPX_ASSUME() for this though. - - The overload_constant routines reached via overload::constant get 4 - arguments in perl 5.6, not the 3 as documented. This is apparently a - bug, using "..." lets us ignore the extra one. - - There's only a few "si" functions in gmp, so usually SvIV values get - handled with an mpz_set_si into a temporary and then a full precision mpz - routine. This is reasonably efficient. - - Argument types are checked, with a view to preserving all bits in the - operand. Perl is a bit looser in its arithmetic, allowing rounding or - truncation to an intended operand type (IV, UV or NV). - - Bugs: - - The memory leak detection attempted in GMP::END() doesn't work when mpz's - are created as constants because END() is called before they're - destroyed. What's the right place to hook such a check? - - See the bugs section of GMP.pm too. */ - - -/* Comment this out to get assertion checking. */ -#define NDEBUG - -/* Change this to "#define TRACE(x) x" for some diagnostics. */ -#define TRACE(x) - - -#include <assert.h> -#include <float.h> - -#include "EXTERN.h" -#include "perl.h" -#include "XSUB.h" -#include "patchlevel.h" - -#include "gmp.h" - - -/* Perl 5.005 doesn't have SvIsUV, only 5.6 and up. - Perl 5.8 has SvUOK, but not 5.6, so we don't use that. */ -#ifndef SvIsUV -#define SvIsUV(sv) 0 -#endif -#ifndef SvUVX -#define SvUVX(sv) (croak("GMP: oops, shouldn't be using SvUVX"), 0) -#endif - - -/* Code which doesn't check anything itself, but exists to support other - assert()s. */ -#ifdef NDEBUG -#define assert_support(x) -#else -#define assert_support(x) x -#endif - -/* LONG_MAX + 1 and ULONG_MAX + 1, as a doubles */ -#define LONG_MAX_P1_AS_DOUBLE ((double) ((unsigned long) LONG_MAX + 1)) -#define ULONG_MAX_P1_AS_DOUBLE (2.0 * (double) ((unsigned long) ULONG_MAX/2 + 1)) - -/* Check for perl version "major.minor". - Perl 5.004 doesn't have PERL_REVISION and PERL_VERSION, but that's ok, - we're only interested in tests above that. */ -#if defined (PERL_REVISION) && defined (PERL_VERSION) -#define PERL_GE(major,minor) \ - (PERL_REVISION > (major) \ - || ((major) == PERL_REVISION && PERL_VERSION >= (minor))) -#else -#define PERL_GE(major,minor) (0) -#endif -#define PERL_LT(major,minor) (! PERL_GE(major,minor)) - -/* sv_derived_from etc in 5.005 took "char *" rather than "const char *". - Avoid some compiler warnings by using const only where it works. */ -#if PERL_LT (5,6) -#define classconst -#else -#define classconst const -#endif - -/* In a MINGW or Cygwin DLL build of gmp, the various gmp functions are - given with dllimport directives, which prevents them being used as - initializers for constant data. We give function tables as - "static_functable const ...", which is normally "static const", but for - mingw expands to just "const" making the table an automatic with a - run-time initializer. - - In gcc 3.3.1, the function tables initialized like this end up getting - all the __imp__foo values fetched, even though just one or two will be - used. This is wasteful, but probably not too bad. */ - -#if defined (__MINGW32__) || defined (__CYGWIN__) -#define static_functable -#else -#define static_functable static -#endif - -#define GMP_MALLOC_ID 42 - -static classconst char mpz_class[] = "GMP::Mpz"; -static classconst char mpq_class[] = "GMP::Mpq"; -static classconst char mpf_class[] = "GMP::Mpf"; -static classconst char rand_class[] = "GMP::Rand"; - -static HV *mpz_class_hv; -static HV *mpq_class_hv; -static HV *mpf_class_hv; - -assert_support (static long mpz_count = 0;) -assert_support (static long mpq_count = 0;) -assert_support (static long mpf_count = 0;) -assert_support (static long rand_count = 0;) - -#define TRACE_ACTIVE() \ - assert_support \ - (TRACE (printf (" active %ld mpz, %ld mpq, %ld mpf, %ld randstate\n", \ - mpz_count, mpq_count, mpf_count, rand_count))) - - -/* Each "struct mpz_elem" etc is an mpz_t with a link field tacked on the - end so they can be held on a linked list. */ - -#define CREATE_MPX(type) \ - \ - /* must have mpz_t etc first, for sprintf below */ \ - struct type##_elem { \ - type##_t m; \ - struct type##_elem *next; \ - }; \ - typedef struct type##_elem *type; \ - typedef struct type##_elem *type##_assume; \ - typedef type##_ptr type##_coerce; \ - \ - static type type##_freelist = NULL; \ - \ - static type \ - new_##type (void) \ - { \ - type p; \ - TRACE (printf ("new %s\n", type##_class)); \ - if (type##_freelist != NULL) \ - { \ - p = type##_freelist; \ - type##_freelist = type##_freelist->next; \ - } \ - else \ - { \ - New (GMP_MALLOC_ID, p, 1, struct type##_elem); \ - type##_init (p->m); \ - } \ - TRACE (printf (" p=%p\n", p)); \ - assert_support (type##_count++); \ - TRACE_ACTIVE (); \ - return p; \ - } \ - -CREATE_MPX (mpz) -CREATE_MPX (mpq) - -typedef mpf_ptr mpf; -typedef mpf_ptr mpf_assume; -typedef mpf_ptr mpf_coerce_st0; -typedef mpf_ptr mpf_coerce_def; - - -static mpf -new_mpf (unsigned long prec) -{ - mpf p; - New (GMP_MALLOC_ID, p, 1, __mpf_struct); - mpf_init2 (p, prec); - TRACE (printf (" mpf p=%p\n", p)); - assert_support (mpf_count++); - TRACE_ACTIVE (); - return p; -} - - -/* tmp_mpf_t records an allocated precision with an mpf_t so changes of - precision can be done with just an mpf_set_prec_raw. */ - -struct tmp_mpf_struct { - mpf_t m; - unsigned long allocated_prec; -}; -typedef const struct tmp_mpf_struct *tmp_mpf_srcptr; -typedef struct tmp_mpf_struct *tmp_mpf_ptr; -typedef struct tmp_mpf_struct tmp_mpf_t[1]; - -#define tmp_mpf_init(f) \ - do { \ - mpf_init (f->m); \ - f->allocated_prec = mpf_get_prec (f->m); \ - } while (0) - -static void -tmp_mpf_grow (tmp_mpf_ptr f, unsigned long prec) -{ - mpf_set_prec_raw (f->m, f->allocated_prec); - mpf_set_prec (f->m, prec); - f->allocated_prec = mpf_get_prec (f->m); -} - -#define tmp_mpf_shrink(f) tmp_mpf_grow (f, 1L) - -#define tmp_mpf_set_prec(f,prec) \ - do { \ - if (prec > f->allocated_prec) \ - tmp_mpf_grow (f, prec); \ - else \ - mpf_set_prec_raw (f->m, prec); \ - } while (0) - - -static mpz_t tmp_mpz_0, tmp_mpz_1, tmp_mpz_2; -static mpq_t tmp_mpq_0, tmp_mpq_1; -static tmp_mpf_t tmp_mpf_0, tmp_mpf_1; - -/* for GMP::Mpz::export */ -#define tmp_mpz_4 tmp_mpz_2 - - -#define FREE_MPX_FREELIST(p,type) \ - do { \ - TRACE (printf ("free %s\n", type##_class)); \ - p->next = type##_freelist; \ - type##_freelist = p; \ - assert_support (type##_count--); \ - TRACE_ACTIVE (); \ - assert (type##_count >= 0); \ - } while (0) - -/* this version for comparison, if desired */ -#define FREE_MPX_NOFREELIST(p,type) \ - do { \ - TRACE (printf ("free %s\n", type##_class)); \ - type##_clear (p->m); \ - Safefree (p); \ - assert_support (type##_count--); \ - TRACE_ACTIVE (); \ - assert (type##_count >= 0); \ - } while (0) - -#define free_mpz(z) FREE_MPX_FREELIST (z, mpz) -#define free_mpq(q) FREE_MPX_FREELIST (q, mpq) - - -/* Return a new mortal SV holding the given mpx_ptr pointer. - class_hv should be one of mpz_class_hv etc. */ -#define MPX_NEWMORTAL(mpx_ptr, class_hv) \ - sv_bless (sv_setref_pv (sv_newmortal(), NULL, mpx_ptr), class_hv) - -/* Aliases for use in typemaps */ -typedef char *malloced_string; -typedef const char *const_string; -typedef const char *const_string_assume; -typedef char *string; -typedef SV *order_noswap; -typedef SV *dummy; -typedef SV *SV_copy_0; -typedef unsigned long ulong_coerce; -typedef __gmp_randstate_struct *randstate; -typedef UV gmp_UV; - -#define SvMPX(s,type) ((type) SvIV((SV*) SvRV(s))) -#define SvMPZ(s) SvMPX(s,mpz) -#define SvMPQ(s) SvMPX(s,mpq) -#define SvMPF(s) SvMPX(s,mpf) -#define SvRANDSTATE(s) SvMPX(s,randstate) - -#define MPX_ASSUME(x,sv,type) \ - do { \ - assert (sv_derived_from (sv, type##_class)); \ - x = SvMPX(sv,type); \ - } while (0) - -#define MPZ_ASSUME(z,sv) MPX_ASSUME(z,sv,mpz) -#define MPQ_ASSUME(q,sv) MPX_ASSUME(q,sv,mpq) -#define MPF_ASSUME(f,sv) MPX_ASSUME(f,sv,mpf) - -#define numberof(x) (sizeof (x) / sizeof ((x)[0])) -#define SGN(x) ((x)<0 ? -1 : (x) != 0) -#define ABS(x) ((x)>=0 ? (x) : -(x)) -#define double_integer_p(d) (floor (d) == (d)) - -#define x_mpq_integer_p(q) \ - (mpz_cmp_ui (mpq_denref(q), 1L) == 0) - -#define assert_table(ix) assert (ix >= 0 && ix < numberof (table)) - -#define SV_PTR_SWAP(x,y) \ - do { SV *__tmp = (x); (x) = (y); (y) = __tmp; } while (0) -#define MPF_PTR_SWAP(x,y) \ - do { mpf_ptr __tmp = (x); (x) = (y); (y) = __tmp; } while (0) - - -static void -class_or_croak (SV *sv, classconst char *cl) -{ - if (! sv_derived_from (sv, cl)) - croak("not type %s", cl); -} - - -/* These are macros, wrap them in functions. */ -static int -x_mpz_odd_p (mpz_srcptr z) -{ - return mpz_odd_p (z); -} -static int -x_mpz_even_p (mpz_srcptr z) -{ - return mpz_even_p (z); -} - -static void -x_mpq_pow_ui (mpq_ptr r, mpq_srcptr b, unsigned long e) -{ - mpz_pow_ui (mpq_numref(r), mpq_numref(b), e); - mpz_pow_ui (mpq_denref(r), mpq_denref(b), e); -} - - -static void * -my_gmp_alloc (size_t n) -{ - void *p; - TRACE (printf ("my_gmp_alloc %u\n", n)); - New (GMP_MALLOC_ID, p, n, char); - TRACE (printf (" p=%p\n", p)); - return p; -} - -static void * -my_gmp_realloc (void *p, size_t oldsize, size_t newsize) -{ - TRACE (printf ("my_gmp_realloc %p, %u to %u\n", p, oldsize, newsize)); - Renew (p, newsize, char); - TRACE (printf (" p=%p\n", p)); - return p; -} - -static void -my_gmp_free (void *p, size_t n) -{ - TRACE (printf ("my_gmp_free %p %u\n", p, n)); - Safefree (p); -} - - -#define my_mpx_set_svstr(type) \ - static void \ - my_##type##_set_svstr (type##_ptr x, SV *sv) \ - { \ - const char *str; \ - STRLEN len; \ - TRACE (printf (" my_" #type "_set_svstr\n")); \ - assert (SvPOK(sv) || SvPOKp(sv)); \ - str = SvPV (sv, len); \ - TRACE (printf (" str \"%s\"\n", str)); \ - if (type##_set_str (x, str, 0) != 0) \ - croak ("%s: invalid string: %s", type##_class, str); \ - } - -my_mpx_set_svstr(mpz) -my_mpx_set_svstr(mpq) -my_mpx_set_svstr(mpf) - - -/* very slack */ -static int -x_mpq_cmp_si (mpq_srcptr x, long yn, unsigned long yd) -{ - mpq y; - int ret; - y = new_mpq (); - mpq_set_si (y->m, yn, yd); - ret = mpq_cmp (x, y->m); - free_mpq (y); - return ret; -} - -static int -x_mpq_fits_slong_p (mpq_srcptr q) -{ - return x_mpq_cmp_si (q, LONG_MIN, 1L) >= 0 - && mpq_cmp_ui (q, LONG_MAX, 1L) <= 0; -} - -static int -x_mpz_cmp_q (mpz_ptr x, mpq_srcptr y) -{ - int ret; - mpz_set_ui (mpq_denref(tmp_mpq_0), 1L); - mpz_swap (mpq_numref(tmp_mpq_0), x); - ret = mpq_cmp (tmp_mpq_0, y); - mpz_swap (mpq_numref(tmp_mpq_0), x); - return ret; -} - -static int -x_mpz_cmp_f (mpz_srcptr x, mpf_srcptr y) -{ - tmp_mpf_set_prec (tmp_mpf_0, mpz_sizeinbase (x, 2)); - mpf_set_z (tmp_mpf_0->m, x); - return mpf_cmp (tmp_mpf_0->m, y); -} - - -#define USE_UNKNOWN 0 -#define USE_IVX 1 -#define USE_UVX 2 -#define USE_NVX 3 -#define USE_PVX 4 -#define USE_MPZ 5 -#define USE_MPQ 6 -#define USE_MPF 7 - -/* mg_get is called every time we get a value, even if the private flags are - still set from a previous such call. This is the same as as SvIV and - friends do. - - When POK, we use the PV, even if there's an IV or NV available. This is - because it's hard to be sure there wasn't any rounding in establishing - the IV and/or NV. Cases of overflow, where the PV should definitely be - used, are easy enough to spot, but rounding is hard. So although IV or - NV would be more efficient, we must use the PV to be sure of getting all - the data. Applications should convert once to mpz, mpq or mpf when using - a value repeatedly. - - Zany dual-type scalars like $! where the IV is an error code and the PV - is an error description string won't work with this preference for PV, - but that's too bad. Such scalars should be rare, and unlikely to be used - in bignum calculations. - - When IOK and NOK are both set, we would prefer to use the IV since it can - be converted more efficiently, and because on a 64-bit system the NV may - have less bits than the IV. The following rules are applied, - - - If the NV is not an integer, then we must use that NV, since clearly - the IV was merely established by rounding and is not the full value. - - - In perl prior to 5.8, an NV too big for an IV leaves an overflow value - 0xFFFFFFFF. If the NV is too big to fit an IV then clearly it's the NV - which is the true value and must be used. - - - In perl 5.8 and up, such an overflow doesn't set IOK, so that test is - unnecessary. However when coming from get-magic, IOKp _is_ set, and we - must check for overflow the same as in older perl. - - FIXME: - - We'd like to call mg_get just once, but unfortunately sv_derived_from() - will call it for each of our checks. We could do a string compare like - sv_isa ourselves, but that only tests the exact class, it doesn't - recognise subclassing. There doesn't seem to be a public interface to - the subclassing tests (in the internal isa_lookup() function). */ - -int -use_sv (SV *sv) -{ - double d; - - if (SvGMAGICAL(sv)) - { - mg_get(sv); - - if (SvPOKp(sv)) - return USE_PVX; - - if (SvIOKp(sv)) - { - if (SvIsUV(sv)) - { - if (SvNOKp(sv)) - goto u_or_n; - return USE_UVX; - } - else - { - if (SvNOKp(sv)) - goto i_or_n; - return USE_IVX; - } - } - - if (SvNOKp(sv)) - return USE_NVX; - - goto rok_or_unknown; - } - - if (SvPOK(sv)) - return USE_PVX; - - if (SvIOK(sv)) - { - if (SvIsUV(sv)) - { - if (SvNOK(sv)) - { - if (PERL_LT (5, 8)) - { - u_or_n: - d = SvNVX(sv); - if (d >= ULONG_MAX_P1_AS_DOUBLE || d < 0.0) - return USE_NVX; - } - d = SvNVX(sv); - if (d != floor (d)) - return USE_NVX; - } - return USE_UVX; - } - else - { - if (SvNOK(sv)) - { - if (PERL_LT (5, 8)) - { - i_or_n: - d = SvNVX(sv); - if (d >= LONG_MAX_P1_AS_DOUBLE || d < (double) LONG_MIN) - return USE_NVX; - } - d = SvNVX(sv); - if (d != floor (d)) - return USE_NVX; - } - return USE_IVX; - } - } - - if (SvNOK(sv)) - return USE_NVX; - - rok_or_unknown: - if (SvROK(sv)) - { - if (sv_derived_from (sv, mpz_class)) - return USE_MPZ; - if (sv_derived_from (sv, mpq_class)) - return USE_MPQ; - if (sv_derived_from (sv, mpf_class)) - return USE_MPF; - } - - return USE_UNKNOWN; -} - - -/* Coerce sv to an mpz. Use tmp to hold the converted value if sv isn't - already an mpz (or an mpq of which the numerator can be used). Return - the chosen mpz (tmp or the contents of sv). */ - -static mpz_ptr -coerce_mpz_using (mpz_ptr tmp, SV *sv, int use) -{ - switch (use) { - case USE_IVX: - mpz_set_si (tmp, SvIVX(sv)); - return tmp; - - case USE_UVX: - mpz_set_ui (tmp, SvUVX(sv)); - return tmp; - - case USE_NVX: - { - double d; - d = SvNVX(sv); - if (! double_integer_p (d)) - croak ("cannot coerce non-integer double to mpz"); - mpz_set_d (tmp, d); - return tmp; - } - - case USE_PVX: - my_mpz_set_svstr (tmp, sv); - return tmp; - - case USE_MPZ: - return SvMPZ(sv)->m; - - case USE_MPQ: - { - mpq q = SvMPQ(sv); - if (! x_mpq_integer_p (q->m)) - croak ("cannot coerce non-integer mpq to mpz"); - return mpq_numref(q->m); - } - - case USE_MPF: - { - mpf f = SvMPF(sv); - if (! mpf_integer_p (f)) - croak ("cannot coerce non-integer mpf to mpz"); - mpz_set_f (tmp, f); - return tmp; - } - - default: - croak ("cannot coerce to mpz"); - } -} -static mpz_ptr -coerce_mpz (mpz_ptr tmp, SV *sv) -{ - return coerce_mpz_using (tmp, sv, use_sv (sv)); -} - - -/* Coerce sv to an mpq. If sv is an mpq then just return that, otherwise - use tmp to hold the converted value and return that. */ - -static mpq_ptr -coerce_mpq_using (mpq_ptr tmp, SV *sv, int use) -{ - TRACE (printf ("coerce_mpq_using %p %d\n", tmp, use)); - switch (use) { - case USE_IVX: - mpq_set_si (tmp, SvIVX(sv), 1L); - return tmp; - - case USE_UVX: - mpq_set_ui (tmp, SvUVX(sv), 1L); - return tmp; - - case USE_NVX: - mpq_set_d (tmp, SvNVX(sv)); - return tmp; - - case USE_PVX: - my_mpq_set_svstr (tmp, sv); - return tmp; - - case USE_MPZ: - mpq_set_z (tmp, SvMPZ(sv)->m); - return tmp; - - case USE_MPQ: - return SvMPQ(sv)->m; - - case USE_MPF: - mpq_set_f (tmp, SvMPF(sv)); - return tmp; - - default: - croak ("cannot coerce to mpq"); - } -} -static mpq_ptr -coerce_mpq (mpq_ptr tmp, SV *sv) -{ - return coerce_mpq_using (tmp, sv, use_sv (sv)); -} - - -static void -my_mpf_set_sv_using (mpf_ptr f, SV *sv, int use) -{ - switch (use) { - case USE_IVX: - mpf_set_si (f, SvIVX(sv)); - break; - - case USE_UVX: - mpf_set_ui (f, SvUVX(sv)); - break; - - case USE_NVX: - mpf_set_d (f, SvNVX(sv)); - break; - - case USE_PVX: - my_mpf_set_svstr (f, sv); - break; - - case USE_MPZ: - mpf_set_z (f, SvMPZ(sv)->m); - break; - - case USE_MPQ: - mpf_set_q (f, SvMPQ(sv)->m); - break; - - case USE_MPF: - mpf_set (f, SvMPF(sv)); - break; - - default: - croak ("cannot coerce to mpf"); - } -} - -/* Coerce sv to an mpf. If sv is an mpf then just return that, otherwise - use tmp to hold the converted value (with prec precision). */ -static mpf_ptr -coerce_mpf_using (tmp_mpf_ptr tmp, SV *sv, unsigned long prec, int use) -{ - if (use == USE_MPF) - return SvMPF(sv); - - tmp_mpf_set_prec (tmp, prec); - my_mpf_set_sv_using (tmp->m, sv, use); - return tmp->m; -} -static mpf_ptr -coerce_mpf (tmp_mpf_ptr tmp, SV *sv, unsigned long prec) -{ - return coerce_mpf_using (tmp, sv, prec, use_sv (sv)); -} - - -/* Coerce xv to an mpf and store the pointer in x, ditto for yv to x. If - one of xv or yv is an mpf then use it for the precision, otherwise use - the default precision. */ -unsigned long -coerce_mpf_pair (mpf *xp, SV *xv, mpf *yp, SV *yv) -{ - int x_use = use_sv (xv); - int y_use = use_sv (yv); - unsigned long prec; - mpf x, y; - - if (x_use == USE_MPF) - { - x = SvMPF(xv); - prec = mpf_get_prec (x); - y = coerce_mpf_using (tmp_mpf_0, yv, prec, y_use); - } - else - { - y = coerce_mpf_using (tmp_mpf_0, yv, mpf_get_default_prec(), y_use); - prec = mpf_get_prec (y); - x = coerce_mpf_using (tmp_mpf_1, xv, prec, x_use); - } - *xp = x; - *yp = y; - return prec; -} - - -/* Note that SvUV is not used, since it merely treats the signed IV as if it - was unsigned. We get an IV and check its sign. */ -static unsigned long -coerce_ulong (SV *sv) -{ - long n; - - switch (use_sv (sv)) { - case USE_IVX: - n = SvIVX(sv); - negative_check: - if (n < 0) - goto range_error; - return n; - - case USE_UVX: - return SvUVX(sv); - - case USE_NVX: - { - double d; - d = SvNVX(sv); - if (! double_integer_p (d)) - goto integer_error; - n = SvIV(sv); - } - goto negative_check; - - case USE_PVX: - /* FIXME: Check the string is an integer. */ - n = SvIV(sv); - goto negative_check; - - case USE_MPZ: - { - mpz z = SvMPZ(sv); - if (! mpz_fits_ulong_p (z->m)) - goto range_error; - return mpz_get_ui (z->m); - } - - case USE_MPQ: - { - mpq q = SvMPQ(sv); - if (! x_mpq_integer_p (q->m)) - goto integer_error; - if (! mpz_fits_ulong_p (mpq_numref (q->m))) - goto range_error; - return mpz_get_ui (mpq_numref (q->m)); - } - - case USE_MPF: - { - mpf f = SvMPF(sv); - if (! mpf_integer_p (f)) - goto integer_error; - if (! mpf_fits_ulong_p (f)) - goto range_error; - return mpf_get_ui (f); - } - - default: - croak ("cannot coerce to ulong"); - } - - integer_error: - croak ("not an integer"); - - range_error: - croak ("out of range for ulong"); -} - - -static long -coerce_long (SV *sv) -{ - switch (use_sv (sv)) { - case USE_IVX: - return SvIVX(sv); - - case USE_UVX: - { - UV u = SvUVX(sv); - if (u > (UV) LONG_MAX) - goto range_error; - return u; - } - - case USE_NVX: - { - double d = SvNVX(sv); - if (! double_integer_p (d)) - goto integer_error; - return SvIV(sv); - } - - case USE_PVX: - /* FIXME: Check the string is an integer. */ - return SvIV(sv); - - case USE_MPZ: - { - mpz z = SvMPZ(sv); - if (! mpz_fits_slong_p (z->m)) - goto range_error; - return mpz_get_si (z->m); - } - - case USE_MPQ: - { - mpq q = SvMPQ(sv); - if (! x_mpq_integer_p (q->m)) - goto integer_error; - if (! mpz_fits_slong_p (mpq_numref (q->m))) - goto range_error; - return mpz_get_si (mpq_numref (q->m)); - } - - case USE_MPF: - { - mpf f = SvMPF(sv); - if (! mpf_integer_p (f)) - goto integer_error; - if (! mpf_fits_slong_p (f)) - goto range_error; - return mpf_get_si (f); - } - - default: - croak ("cannot coerce to long"); - } - - integer_error: - croak ("not an integer"); - - range_error: - croak ("out of range for ulong"); -} - - -/* ------------------------------------------------------------------------- */ - -MODULE = GMP PACKAGE = GMP - -BOOT: - TRACE (printf ("GMP boot\n")); - mp_set_memory_functions (my_gmp_alloc, my_gmp_realloc, my_gmp_free); - mpz_init (tmp_mpz_0); - mpz_init (tmp_mpz_1); - mpz_init (tmp_mpz_2); - mpq_init (tmp_mpq_0); - mpq_init (tmp_mpq_1); - tmp_mpf_init (tmp_mpf_0); - tmp_mpf_init (tmp_mpf_1); - mpz_class_hv = gv_stashpv (mpz_class, 1); - mpq_class_hv = gv_stashpv (mpq_class, 1); - mpf_class_hv = gv_stashpv (mpf_class, 1); - - -void -END() -CODE: - TRACE (printf ("GMP end\n")); - TRACE_ACTIVE (); - /* These are not always true, see Bugs at the top of the file. */ - /* assert (mpz_count == 0); */ - /* assert (mpq_count == 0); */ - /* assert (mpf_count == 0); */ - /* assert (rand_count == 0); */ - - -const_string -version() -CODE: - RETVAL = gmp_version; -OUTPUT: - RETVAL - - -bool -fits_slong_p (sv) - SV *sv -CODE: - switch (use_sv (sv)) { - case USE_IVX: - RETVAL = 1; - break; - - case USE_UVX: - { - UV u = SvUVX(sv); - RETVAL = (u <= LONG_MAX); - } - break; - - case USE_NVX: - { - double d = SvNVX(sv); - RETVAL = (d >= (double) LONG_MIN && d < LONG_MAX_P1_AS_DOUBLE); - } - break; - - case USE_PVX: - { - STRLEN len; - const char *str = SvPV (sv, len); - if (mpq_set_str (tmp_mpq_0, str, 0) == 0) - RETVAL = x_mpq_fits_slong_p (tmp_mpq_0); - else - { - /* enough precision for a long */ - tmp_mpf_set_prec (tmp_mpf_0, 2*mp_bits_per_limb); - if (mpf_set_str (tmp_mpf_0->m, str, 10) != 0) - croak ("GMP::fits_slong_p invalid string format"); - RETVAL = mpf_fits_slong_p (tmp_mpf_0->m); - } - } - break; - - case USE_MPZ: - RETVAL = mpz_fits_slong_p (SvMPZ(sv)->m); - break; - - case USE_MPQ: - RETVAL = x_mpq_fits_slong_p (SvMPQ(sv)->m); - break; - - case USE_MPF: - RETVAL = mpf_fits_slong_p (SvMPF(sv)); - break; - - default: - croak ("GMP::fits_slong_p invalid argument"); - } -OUTPUT: - RETVAL - - -double -get_d (sv) - SV *sv -CODE: - switch (use_sv (sv)) { - case USE_IVX: - RETVAL = (double) SvIVX(sv); - break; - - case USE_UVX: - RETVAL = (double) SvUVX(sv); - break; - - case USE_NVX: - RETVAL = SvNVX(sv); - break; - - case USE_PVX: - { - STRLEN len; - RETVAL = atof(SvPV(sv, len)); - } - break; - - case USE_MPZ: - RETVAL = mpz_get_d (SvMPZ(sv)->m); - break; - - case USE_MPQ: - RETVAL = mpq_get_d (SvMPQ(sv)->m); - break; - - case USE_MPF: - RETVAL = mpf_get_d (SvMPF(sv)); - break; - - default: - croak ("GMP::get_d invalid argument"); - } -OUTPUT: - RETVAL - - -void -get_d_2exp (sv) - SV *sv -PREINIT: - double ret; - long exp; -PPCODE: - switch (use_sv (sv)) { - case USE_IVX: - ret = (double) SvIVX(sv); - goto use_frexp; - - case USE_UVX: - ret = (double) SvUVX(sv); - goto use_frexp; - - case USE_NVX: - { - int i_exp; - ret = SvNVX(sv); - use_frexp: - ret = frexp (ret, &i_exp); - exp = i_exp; - } - break; - - case USE_PVX: - /* put strings through mpf to give full exp range */ - tmp_mpf_set_prec (tmp_mpf_0, DBL_MANT_DIG); - my_mpf_set_svstr (tmp_mpf_0->m, sv); - ret = mpf_get_d_2exp (&exp, tmp_mpf_0->m); - break; - - case USE_MPZ: - ret = mpz_get_d_2exp (&exp, SvMPZ(sv)->m); - break; - - case USE_MPQ: - tmp_mpf_set_prec (tmp_mpf_0, DBL_MANT_DIG); - mpf_set_q (tmp_mpf_0->m, SvMPQ(sv)->m); - ret = mpf_get_d_2exp (&exp, tmp_mpf_0->m); - break; - - case USE_MPF: - ret = mpf_get_d_2exp (&exp, SvMPF(sv)); - break; - - default: - croak ("GMP::get_d_2exp invalid argument"); - } - PUSHs (sv_2mortal (newSVnv (ret))); - PUSHs (sv_2mortal (newSViv (exp))); - - -long -get_si (sv) - SV *sv -CODE: - switch (use_sv (sv)) { - case USE_IVX: - RETVAL = SvIVX(sv); - break; - - case USE_UVX: - RETVAL = SvUVX(sv); - break; - - case USE_NVX: - RETVAL = (long) SvNVX(sv); - break; - - case USE_PVX: - RETVAL = SvIV(sv); - break; - - case USE_MPZ: - RETVAL = mpz_get_si (SvMPZ(sv)->m); - break; - - case USE_MPQ: - mpz_set_q (tmp_mpz_0, SvMPQ(sv)->m); - RETVAL = mpz_get_si (tmp_mpz_0); - break; - - case USE_MPF: - RETVAL = mpf_get_si (SvMPF(sv)); - break; - - default: - croak ("GMP::get_si invalid argument"); - } -OUTPUT: - RETVAL - - -void -get_str (sv, ...) - SV *sv -PREINIT: - char *str; - mp_exp_t exp; - mpz_ptr z; - mpq_ptr q; - mpf f; - int base; - int ndigits; -PPCODE: - TRACE (printf ("GMP::get_str\n")); - - if (items >= 2) - base = coerce_long (ST(1)); - else - base = 10; - TRACE (printf (" base=%d\n", base)); - - if (items >= 3) - ndigits = coerce_long (ST(2)); - else - ndigits = 10; - TRACE (printf (" ndigits=%d\n", ndigits)); - - EXTEND (SP, 2); - - switch (use_sv (sv)) { - case USE_IVX: - mpz_set_si (tmp_mpz_0, SvIVX(sv)); - get_tmp_mpz_0: - z = tmp_mpz_0; - goto get_mpz; - - case USE_UVX: - mpz_set_ui (tmp_mpz_0, SvUVX(sv)); - goto get_tmp_mpz_0; - - case USE_NVX: - /* only digits in the original double, not in the coerced form */ - if (ndigits == 0) - ndigits = DBL_DIG; - mpf_set_d (tmp_mpf_0->m, SvNVX(sv)); - f = tmp_mpf_0->m; - goto get_mpf; - - case USE_PVX: - { - /* get_str on a string is not much more than a base conversion */ - STRLEN len; - str = SvPV (sv, len); - if (mpz_set_str (tmp_mpz_0, str, 0) == 0) - { - z = tmp_mpz_0; - goto get_mpz; - } - else if (mpq_set_str (tmp_mpq_0, str, 0) == 0) - { - q = tmp_mpq_0; - goto get_mpq; - } - else - { - /* FIXME: Would like perhaps a precision equivalent to the - number of significant digits of the string, in its given - base. */ - tmp_mpf_set_prec (tmp_mpf_0, strlen(str)); - if (mpf_set_str (tmp_mpf_0->m, str, 10) == 0) - { - f = tmp_mpf_0->m; - goto get_mpf; - } - else - croak ("GMP::get_str invalid string format"); - } - } - break; - - case USE_MPZ: - z = SvMPZ(sv)->m; - get_mpz: - str = mpz_get_str (NULL, base, z); - push_str: - PUSHs (sv_2mortal (newSVpv (str, 0))); - break; - - case USE_MPQ: - q = SvMPQ(sv)->m; - get_mpq: - str = mpq_get_str (NULL, base, q); - goto push_str; - - case USE_MPF: - f = SvMPF(sv); - get_mpf: - str = mpf_get_str (NULL, &exp, base, 0, f); - PUSHs (sv_2mortal (newSVpv (str, 0))); - PUSHs (sv_2mortal (newSViv (exp))); - break; - - default: - croak ("GMP::get_str invalid argument"); - } - - -bool -integer_p (sv) - SV *sv -CODE: - switch (use_sv (sv)) { - case USE_IVX: - case USE_UVX: - RETVAL = 1; - break; - - case USE_NVX: - RETVAL = double_integer_p (SvNVX(sv)); - break; - - case USE_PVX: - { - /* FIXME: Maybe this should be done by parsing the string, not by an - actual conversion. */ - STRLEN len; - const char *str = SvPV (sv, len); - if (mpq_set_str (tmp_mpq_0, str, 0) == 0) - RETVAL = x_mpq_integer_p (tmp_mpq_0); - else - { - /* enough for all digits of the string */ - tmp_mpf_set_prec (tmp_mpf_0, strlen(str)+64); - if (mpf_set_str (tmp_mpf_0->m, str, 10) == 0) - RETVAL = mpf_integer_p (tmp_mpf_0->m); - else - croak ("GMP::integer_p invalid string format"); - } - } - break; - - case USE_MPZ: - RETVAL = 1; - break; - - case USE_MPQ: - RETVAL = x_mpq_integer_p (SvMPQ(sv)->m); - break; - - case USE_MPF: - RETVAL = mpf_integer_p (SvMPF(sv)); - break; - - default: - croak ("GMP::integer_p invalid argument"); - } -OUTPUT: - RETVAL - - -int -sgn (sv) - SV *sv -CODE: - switch (use_sv (sv)) { - case USE_IVX: - RETVAL = SGN (SvIVX(sv)); - break; - - case USE_UVX: - RETVAL = (SvUVX(sv) > 0); - break; - - case USE_NVX: - RETVAL = SGN (SvNVX(sv)); - break; - - case USE_PVX: - { - /* FIXME: Maybe this should be done by parsing the string, not by an - actual conversion. */ - STRLEN len; - const char *str = SvPV (sv, len); - if (mpq_set_str (tmp_mpq_0, str, 0) == 0) - RETVAL = mpq_sgn (tmp_mpq_0); - else - { - /* enough for all digits of the string */ - tmp_mpf_set_prec (tmp_mpf_0, strlen(str)+64); - if (mpf_set_str (tmp_mpf_0->m, str, 10) == 0) - RETVAL = mpf_sgn (tmp_mpf_0->m); - else - croak ("GMP::sgn invalid string format"); - } - } - break; - - case USE_MPZ: - RETVAL = mpz_sgn (SvMPZ(sv)->m); - break; - - case USE_MPQ: - RETVAL = mpq_sgn (SvMPQ(sv)->m); - break; - - case USE_MPF: - RETVAL = mpf_sgn (SvMPF(sv)); - break; - - default: - croak ("GMP::sgn invalid argument"); - } -OUTPUT: - RETVAL - - -# currently undocumented -void -shrink () -CODE: -#define x_mpz_shrink(z) \ - mpz_set_ui (z, 0L); _mpz_realloc (z, 1) -#define x_mpq_shrink(q) \ - x_mpz_shrink (mpq_numref(q)); x_mpz_shrink (mpq_denref(q)) - - x_mpz_shrink (tmp_mpz_0); - x_mpz_shrink (tmp_mpz_1); - x_mpz_shrink (tmp_mpz_2); - x_mpq_shrink (tmp_mpq_0); - x_mpq_shrink (tmp_mpq_1); - tmp_mpf_shrink (tmp_mpf_0); - tmp_mpf_shrink (tmp_mpf_1); - - - -malloced_string -sprintf_internal (fmt, sv) - const_string fmt - SV *sv -CODE: - assert (strlen (fmt) >= 3); - assert (SvROK(sv)); - assert ((sv_derived_from (sv, mpz_class) && fmt[strlen(fmt)-2] == 'Z') - || (sv_derived_from (sv, mpq_class) && fmt[strlen(fmt)-2] == 'Q') - || (sv_derived_from (sv, mpf_class) && fmt[strlen(fmt)-2] == 'F')); - TRACE (printf ("GMP::sprintf_internal\n"); - printf (" fmt |%s|\n", fmt); - printf (" sv |%p|\n", SvMPZ(sv))); - - /* cheat a bit here, SvMPZ works for mpq and mpf too */ - gmp_asprintf (&RETVAL, fmt, SvMPZ(sv)); - - TRACE (printf (" result |%s|\n", RETVAL)); -OUTPUT: - RETVAL - - - -#------------------------------------------------------------------------------ - -MODULE = GMP PACKAGE = GMP::Mpz - -mpz -mpz (...) -ALIAS: - GMP::Mpz::new = 1 -PREINIT: - SV *sv; -CODE: - TRACE (printf ("%s new, ix=%ld, items=%d\n", mpz_class, ix, (int) items)); - RETVAL = new_mpz(); - - switch (items) { - case 0: - mpz_set_ui (RETVAL->m, 0L); - break; - - case 1: - sv = ST(0); - TRACE (printf (" use %d\n", use_sv (sv))); - switch (use_sv (sv)) { - case USE_IVX: - mpz_set_si (RETVAL->m, SvIVX(sv)); - break; - - case USE_UVX: - mpz_set_ui (RETVAL->m, SvUVX(sv)); - break; - - case USE_NVX: - mpz_set_d (RETVAL->m, SvNVX(sv)); - break; - - case USE_PVX: - my_mpz_set_svstr (RETVAL->m, sv); - break; - - case USE_MPZ: - mpz_set (RETVAL->m, SvMPZ(sv)->m); - break; - - case USE_MPQ: - mpz_set_q (RETVAL->m, SvMPQ(sv)->m); - break; - - case USE_MPF: - mpz_set_f (RETVAL->m, SvMPF(sv)); - break; - - default: - goto invalid; - } - break; - - default: - invalid: - croak ("%s new: invalid arguments", mpz_class); - } -OUTPUT: - RETVAL - - -void -overload_constant (str, pv, d1, ...) - const_string_assume str - SV *pv - dummy d1 -PREINIT: - mpz z; -PPCODE: - TRACE (printf ("%s constant: %s\n", mpz_class, str)); - z = new_mpz(); - if (mpz_set_str (z->m, str, 0) == 0) - { - PUSHs (MPX_NEWMORTAL (z, mpz_class_hv)); - } - else - { - free_mpz (z); - PUSHs(pv); - } - - -mpz -overload_copy (z, d1, d2) - mpz_assume z - dummy d1 - dummy d2 -CODE: - RETVAL = new_mpz(); - mpz_set (RETVAL->m, z->m); -OUTPUT: - RETVAL - - -void -DESTROY (z) - mpz_assume z -CODE: - TRACE (printf ("%s DESTROY %p\n", mpz_class, z)); - free_mpz (z); - - -malloced_string -overload_string (z, d1, d2) - mpz_assume z - dummy d1 - dummy d2 -CODE: - TRACE (printf ("%s overload_string %p\n", mpz_class, z)); - RETVAL = mpz_get_str (NULL, 10, z->m); -OUTPUT: - RETVAL - - -mpz -overload_add (xv, yv, order) - SV *xv - SV *yv - SV *order -ALIAS: - GMP::Mpz::overload_sub = 1 - GMP::Mpz::overload_mul = 2 - GMP::Mpz::overload_div = 3 - GMP::Mpz::overload_rem = 4 - GMP::Mpz::overload_and = 5 - GMP::Mpz::overload_ior = 6 - GMP::Mpz::overload_xor = 7 -PREINIT: - static_functable const struct { - void (*op) (mpz_ptr, mpz_srcptr, mpz_srcptr); - } table[] = { - { mpz_add }, /* 0 */ - { mpz_sub }, /* 1 */ - { mpz_mul }, /* 2 */ - { mpz_tdiv_q }, /* 3 */ - { mpz_tdiv_r }, /* 4 */ - { mpz_and }, /* 5 */ - { mpz_ior }, /* 6 */ - { mpz_xor }, /* 7 */ - }; -CODE: - assert_table (ix); - if (order == &PL_sv_yes) - SV_PTR_SWAP (xv, yv); - RETVAL = new_mpz(); - (*table[ix].op) (RETVAL->m, - coerce_mpz (tmp_mpz_0, xv), - coerce_mpz (tmp_mpz_1, yv)); -OUTPUT: - RETVAL - - -void -overload_addeq (x, y, o) - mpz_assume x - mpz_coerce y - order_noswap o -ALIAS: - GMP::Mpz::overload_subeq = 1 - GMP::Mpz::overload_muleq = 2 - GMP::Mpz::overload_diveq = 3 - GMP::Mpz::overload_remeq = 4 - GMP::Mpz::overload_andeq = 5 - GMP::Mpz::overload_ioreq = 6 - GMP::Mpz::overload_xoreq = 7 -PREINIT: - static_functable const struct { - void (*op) (mpz_ptr, mpz_srcptr, mpz_srcptr); - } table[] = { - { mpz_add }, /* 0 */ - { mpz_sub }, /* 1 */ - { mpz_mul }, /* 2 */ - { mpz_tdiv_q }, /* 3 */ - { mpz_tdiv_r }, /* 4 */ - { mpz_and }, /* 5 */ - { mpz_ior }, /* 6 */ - { mpz_xor }, /* 7 */ - }; -PPCODE: - assert_table (ix); - (*table[ix].op) (x->m, x->m, y); - XPUSHs (ST(0)); - - -mpz -overload_lshift (zv, nv, order) - SV *zv - SV *nv - SV *order -ALIAS: - GMP::Mpz::overload_rshift = 1 - GMP::Mpz::overload_pow = 2 -PREINIT: - static_functable const struct { - void (*op) (mpz_ptr, mpz_srcptr, unsigned long); - } table[] = { - { mpz_mul_2exp }, /* 0 */ - { mpz_fdiv_q_2exp }, /* 1 */ - { mpz_pow_ui }, /* 2 */ - }; -CODE: - assert_table (ix); - if (order == &PL_sv_yes) - SV_PTR_SWAP (zv, nv); - RETVAL = new_mpz(); - (*table[ix].op) (RETVAL->m, coerce_mpz (RETVAL->m, zv), coerce_ulong (nv)); -OUTPUT: - RETVAL - - -void -overload_lshifteq (z, n, o) - mpz_assume z - ulong_coerce n - order_noswap o -ALIAS: - GMP::Mpz::overload_rshifteq = 1 - GMP::Mpz::overload_poweq = 2 -PREINIT: - static_functable const struct { - void (*op) (mpz_ptr, mpz_srcptr, unsigned long); - } table[] = { - { mpz_mul_2exp }, /* 0 */ - { mpz_fdiv_q_2exp }, /* 1 */ - { mpz_pow_ui }, /* 2 */ - }; -PPCODE: - assert_table (ix); - (*table[ix].op) (z->m, z->m, n); - XPUSHs(ST(0)); - - -mpz -overload_abs (z, d1, d2) - mpz_assume z - dummy d1 - dummy d2 -ALIAS: - GMP::Mpz::overload_neg = 1 - GMP::Mpz::overload_com = 2 - GMP::Mpz::overload_sqrt = 3 -PREINIT: - static_functable const struct { - void (*op) (mpz_ptr w, mpz_srcptr x); - } table[] = { - { mpz_abs }, /* 0 */ - { mpz_neg }, /* 1 */ - { mpz_com }, /* 2 */ - { mpz_sqrt }, /* 3 */ - }; -CODE: - assert_table (ix); - RETVAL = new_mpz(); - (*table[ix].op) (RETVAL->m, z->m); -OUTPUT: - RETVAL - - -void -overload_inc (z, d1, d2) - mpz_assume z - dummy d1 - dummy d2 -ALIAS: - GMP::Mpz::overload_dec = 1 -PREINIT: - static_functable const struct { - void (*op) (mpz_ptr w, mpz_srcptr x, unsigned long y); - } table[] = { - { mpz_add_ui }, /* 0 */ - { mpz_sub_ui }, /* 1 */ - }; -CODE: - assert_table (ix); - (*table[ix].op) (z->m, z->m, 1L); - - -int -overload_spaceship (xv, yv, order) - SV *xv - SV *yv - SV *order -PREINIT: - mpz x; -CODE: - TRACE (printf ("%s overload_spaceship\n", mpz_class)); - MPZ_ASSUME (x, xv); - switch (use_sv (yv)) { - case USE_IVX: - RETVAL = mpz_cmp_si (x->m, SvIVX(yv)); - break; - case USE_UVX: - RETVAL = mpz_cmp_ui (x->m, SvUVX(yv)); - break; - case USE_PVX: - RETVAL = mpz_cmp (x->m, coerce_mpz (tmp_mpz_0, yv)); - break; - case USE_NVX: - RETVAL = mpz_cmp_d (x->m, SvNVX(yv)); - break; - case USE_MPZ: - RETVAL = mpz_cmp (x->m, SvMPZ(yv)->m); - break; - case USE_MPQ: - RETVAL = x_mpz_cmp_q (x->m, SvMPQ(yv)->m); - break; - case USE_MPF: - RETVAL = x_mpz_cmp_f (x->m, SvMPF(yv)); - break; - default: - croak ("%s <=>: invalid operand", mpz_class); - } - RETVAL = SGN (RETVAL); - if (order == &PL_sv_yes) - RETVAL = -RETVAL; -OUTPUT: - RETVAL - - -bool -overload_bool (z, d1, d2) - mpz_assume z - dummy d1 - dummy d2 -ALIAS: - GMP::Mpz::overload_not = 1 -CODE: - RETVAL = (mpz_sgn (z->m) != 0) ^ ix; -OUTPUT: - RETVAL - - -mpz -bin (n, k) - mpz_coerce n - ulong_coerce k -ALIAS: - GMP::Mpz::root = 1 -PREINIT: - /* mpz_root returns an int, hence the cast */ - static_functable const struct { - void (*op) (mpz_ptr, mpz_srcptr, unsigned long); - } table[] = { - { mpz_bin_ui }, /* 0 */ - { (void (*)(mpz_ptr, mpz_srcptr, unsigned long)) mpz_root }, /* 1 */ - }; -CODE: - assert_table (ix); - RETVAL = new_mpz(); - (*table[ix].op) (RETVAL->m, n, k); -OUTPUT: - RETVAL - - -void -cdiv (a, d) - mpz_coerce a - mpz_coerce d -ALIAS: - GMP::Mpz::fdiv = 1 - GMP::Mpz::tdiv = 2 -PREINIT: - static_functable const struct { - void (*op) (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - } table[] = { - { mpz_cdiv_qr }, /* 0 */ - { mpz_fdiv_qr }, /* 1 */ - { mpz_tdiv_qr }, /* 2 */ - }; - mpz q, r; -PPCODE: - assert_table (ix); - q = new_mpz(); - r = new_mpz(); - (*table[ix].op) (q->m, r->m, a, d); - EXTEND (SP, 2); - PUSHs (MPX_NEWMORTAL (q, mpz_class_hv)); - PUSHs (MPX_NEWMORTAL (r, mpz_class_hv)); - - -void -cdiv_2exp (a, d) - mpz_coerce a - ulong_coerce d -ALIAS: - GMP::Mpz::fdiv_2exp = 1 - GMP::Mpz::tdiv_2exp = 2 -PREINIT: - static_functable const struct { - void (*q) (mpz_ptr, mpz_srcptr, unsigned long); - void (*r) (mpz_ptr, mpz_srcptr, unsigned long); - } table[] = { - { mpz_cdiv_q_2exp, mpz_cdiv_r_2exp }, /* 0 */ - { mpz_fdiv_q_2exp, mpz_fdiv_r_2exp }, /* 1 */ - { mpz_tdiv_q_2exp, mpz_tdiv_r_2exp }, /* 2 */ - }; - mpz q, r; -PPCODE: - assert_table (ix); - q = new_mpz(); - r = new_mpz(); - (*table[ix].q) (q->m, a, d); - (*table[ix].r) (r->m, a, d); - EXTEND (SP, 2); - PUSHs (MPX_NEWMORTAL (q, mpz_class_hv)); - PUSHs (MPX_NEWMORTAL (r, mpz_class_hv)); - - -bool -congruent_p (a, c, d) - mpz_coerce a - mpz_coerce c - mpz_coerce d -PREINIT: -CODE: - RETVAL = mpz_congruent_p (a, c, d); -OUTPUT: - RETVAL - - -bool -congruent_2exp_p (a, c, d) - mpz_coerce a - mpz_coerce c - ulong_coerce d -PREINIT: -CODE: - RETVAL = mpz_congruent_2exp_p (a, c, d); -OUTPUT: - RETVAL - - -mpz -divexact (a, d) - mpz_coerce a - mpz_coerce d -ALIAS: - GMP::Mpz::mod = 1 -PREINIT: - static_functable const struct { - void (*op) (mpz_ptr, mpz_srcptr, mpz_srcptr); - } table[] = { - { mpz_divexact }, /* 0 */ - { mpz_mod }, /* 1 */ - }; -CODE: - assert_table (ix); - RETVAL = new_mpz(); - (*table[ix].op) (RETVAL->m, a, d); -OUTPUT: - RETVAL - - -bool -divisible_p (a, d) - mpz_coerce a - mpz_coerce d -CODE: - RETVAL = mpz_divisible_p (a, d); -OUTPUT: - RETVAL - - -bool -divisible_2exp_p (a, d) - mpz_coerce a - ulong_coerce d -CODE: - RETVAL = mpz_divisible_2exp_p (a, d); -OUTPUT: - RETVAL - - -bool -even_p (z) - mpz_coerce z -ALIAS: - GMP::Mpz::odd_p = 1 - GMP::Mpz::perfect_square_p = 2 - GMP::Mpz::perfect_power_p = 3 -PREINIT: - static_functable const struct { - int (*op) (mpz_srcptr z); - } table[] = { - { x_mpz_even_p }, /* 0 */ - { x_mpz_odd_p }, /* 1 */ - { mpz_perfect_square_p }, /* 2 */ - { mpz_perfect_power_p }, /* 3 */ - }; -CODE: - assert_table (ix); - RETVAL = (*table[ix].op) (z); -OUTPUT: - RETVAL - - -mpz -fac (n) - ulong_coerce n -ALIAS: - GMP::Mpz::fib = 1 - GMP::Mpz::lucnum = 2 -PREINIT: - static_functable const struct { - void (*op) (mpz_ptr r, unsigned long n); - } table[] = { - { mpz_fac_ui }, /* 0 */ - { mpz_fib_ui }, /* 1 */ - { mpz_lucnum_ui }, /* 2 */ - }; -CODE: - assert_table (ix); - RETVAL = new_mpz(); - (*table[ix].op) (RETVAL->m, n); -OUTPUT: - RETVAL - - -void -fib2 (n) - ulong_coerce n -ALIAS: - GMP::Mpz::lucnum2 = 1 -PREINIT: - static_functable const struct { - void (*op) (mpz_ptr r, mpz_ptr r2, unsigned long n); - } table[] = { - { mpz_fib2_ui }, /* 0 */ - { mpz_lucnum2_ui }, /* 1 */ - }; - mpz r, r2; -PPCODE: - assert_table (ix); - r = new_mpz(); - r2 = new_mpz(); - (*table[ix].op) (r->m, r2->m, n); - EXTEND (SP, 2); - PUSHs (MPX_NEWMORTAL (r, mpz_class_hv)); - PUSHs (MPX_NEWMORTAL (r2, mpz_class_hv)); - - -mpz -gcd (x, ...) - mpz_coerce x -ALIAS: - GMP::Mpz::lcm = 1 -PREINIT: - static_functable const struct { - void (*op) (mpz_ptr w, mpz_srcptr x, mpz_srcptr y); - void (*op_ui) (mpz_ptr w, mpz_srcptr x, unsigned long y); - } table[] = { - /* cast to ignore ulong return from mpz_gcd_ui */ - { mpz_gcd, - (void (*) (mpz_ptr, mpz_srcptr, unsigned long)) mpz_gcd_ui }, /* 0 */ - { mpz_lcm, mpz_lcm_ui }, /* 1 */ - }; - int i; - SV *yv; -CODE: - assert_table (ix); - RETVAL = new_mpz(); - if (items == 1) - mpz_set (RETVAL->m, x); - else - { - for (i = 1; i < items; i++) - { - yv = ST(i); - if (SvIOK(yv)) - (*table[ix].op_ui) (RETVAL->m, x, ABS(SvIVX(yv))); - else - (*table[ix].op) (RETVAL->m, x, coerce_mpz (tmp_mpz_1, yv)); - x = RETVAL->m; - } - } -OUTPUT: - RETVAL - - -void -gcdext (a, b) - mpz_coerce a - mpz_coerce b -PREINIT: - mpz g, x, y; - SV *sv; -PPCODE: - g = new_mpz(); - x = new_mpz(); - y = new_mpz(); - mpz_gcdext (g->m, x->m, y->m, a, b); - EXTEND (SP, 3); - PUSHs (MPX_NEWMORTAL (g, mpz_class_hv)); - PUSHs (MPX_NEWMORTAL (x, mpz_class_hv)); - PUSHs (MPX_NEWMORTAL (y, mpz_class_hv)); - - -unsigned long -hamdist (x, y) - mpz_coerce x - mpz_coerce y -CODE: - RETVAL = mpz_hamdist (x, y); -OUTPUT: - RETVAL - - -mpz -invert (a, m) - mpz_coerce a - mpz_coerce m -CODE: - RETVAL = new_mpz(); - if (! mpz_invert (RETVAL->m, a, m)) - { - free_mpz (RETVAL); - XSRETURN_UNDEF; - } -OUTPUT: - RETVAL - - -int -jacobi (a, b) - mpz_coerce a - mpz_coerce b -CODE: - RETVAL = mpz_jacobi (a, b); -OUTPUT: - RETVAL - - -int -kronecker (a, b) - SV *a - SV *b -CODE: - if (SvIOK(b)) - RETVAL = mpz_kronecker_si (coerce_mpz(tmp_mpz_0,a), SvIVX(b)); - else if (SvIOK(a)) - RETVAL = mpz_si_kronecker (SvIVX(a), coerce_mpz(tmp_mpz_0,b)); - else - RETVAL = mpz_kronecker (coerce_mpz(tmp_mpz_0,a), - coerce_mpz(tmp_mpz_1,b)); -OUTPUT: - RETVAL - - -void -mpz_export (order, size, endian, nails, z) - int order - size_t size - int endian - size_t nails - mpz_coerce z -PREINIT: - size_t numb, count, bytes, actual_count; - char *data; - SV *sv; -PPCODE: - numb = 8*size - nails; - count = (mpz_sizeinbase (z, 2) + numb-1) / numb; - bytes = count * size; - New (GMP_MALLOC_ID, data, bytes+1, char); - mpz_export (data, &actual_count, order, size, endian, nails, z); - assert (count == actual_count); - data[bytes] = '\0'; - sv = sv_newmortal(); sv_usepvn_mg (sv, data, bytes); PUSHs(sv); - - -mpz -mpz_import (order, size, endian, nails, sv) - int order - size_t size - int endian - size_t nails - SV *sv -PREINIT: - size_t count; - const char *data; - STRLEN len; -CODE: - data = SvPV (sv, len); - if ((len % size) != 0) - croak ("%s mpz_import: string not a multiple of the given size", - mpz_class); - count = len / size; - RETVAL = new_mpz(); - mpz_import (RETVAL->m, count, order, size, endian, nails, data); -OUTPUT: - RETVAL - - -mpz -nextprime (z) - mpz_coerce z -CODE: - RETVAL = new_mpz(); - mpz_nextprime (RETVAL->m, z); -OUTPUT: - RETVAL - - -unsigned long -popcount (x) - mpz_coerce x -CODE: - RETVAL = mpz_popcount (x); -OUTPUT: - RETVAL - - -mpz -powm (b, e, m) - mpz_coerce b - mpz_coerce e - mpz_coerce m -CODE: - RETVAL = new_mpz(); - mpz_powm (RETVAL->m, b, e, m); -OUTPUT: - RETVAL - - -bool -probab_prime_p (z, n) - mpz_coerce z - ulong_coerce n -CODE: - RETVAL = mpz_probab_prime_p (z, n); -OUTPUT: - RETVAL - - -# No attempt to coerce here, only an mpz makes sense. -void -realloc (z, limbs) - mpz z - int limbs -CODE: - _mpz_realloc (z->m, limbs); - - -void -remove (z, f) - mpz_coerce z - mpz_coerce f -PREINIT: - SV *sv; - mpz rem; - unsigned long mult; -PPCODE: - rem = new_mpz(); - mult = mpz_remove (rem->m, z, f); - EXTEND (SP, 2); - PUSHs (MPX_NEWMORTAL (rem, mpz_class_hv)); - PUSHs (sv_2mortal (newSViv (mult))); - - -void -roote (z, n) - mpz_coerce z - ulong_coerce n -PREINIT: - SV *sv; - mpz root; - int exact; -PPCODE: - root = new_mpz(); - exact = mpz_root (root->m, z, n); - EXTEND (SP, 2); - PUSHs (MPX_NEWMORTAL (root, mpz_class_hv)); - sv = (exact ? &PL_sv_yes : &PL_sv_no); sv_2mortal(sv); PUSHs(sv); - - -void -rootrem (z, n) - mpz_coerce z - ulong_coerce n -PREINIT: - SV *sv; - mpz root; - mpz rem; -PPCODE: - root = new_mpz(); - rem = new_mpz(); - mpz_rootrem (root->m, rem->m, z, n); - EXTEND (SP, 2); - PUSHs (MPX_NEWMORTAL (root, mpz_class_hv)); - PUSHs (MPX_NEWMORTAL (rem, mpz_class_hv)); - - -# In the past scan0 and scan1 were described as returning ULONG_MAX which -# could be obtained in perl with ~0. That wasn't true on 64-bit systems -# (eg. alpha) with perl 5.005, since in that version IV and UV were still -# 32-bits. -# -# We changed in gmp 4.2 to just say ~0 for the not-found return. It's -# likely most people have used ~0 rather than POSIX::ULONG_MAX(), so this -# change should match existing usage. It only actually makes a difference -# in old perl, since recent versions have gone to 64-bits for IV and UV, the -# same as a ulong. -# -# In perl 5.005 we explicitly mask the mpz return down to 32-bits to get ~0. -# UV_MAX is no good, it reflects the size of the UV type (64-bits), rather -# than the size of the values one ought to be storing in an SV (32-bits). - -gmp_UV -scan0 (z, start) - mpz_coerce z - ulong_coerce start -ALIAS: - GMP::Mpz::scan1 = 1 -PREINIT: - static_functable const struct { - unsigned long (*op) (mpz_srcptr, unsigned long); - } table[] = { - { mpz_scan0 }, /* 0 */ - { mpz_scan1 }, /* 1 */ - }; -CODE: - assert_table (ix); - RETVAL = (*table[ix].op) (z, start); - if (PERL_LT (5,6)) - RETVAL &= 0xFFFFFFFF; -OUTPUT: - RETVAL - - -void -setbit (sv, bit) - SV *sv - ulong_coerce bit -ALIAS: - GMP::Mpz::clrbit = 1 - GMP::Mpz::combit = 2 -PREINIT: - static_functable const struct { - void (*op) (mpz_ptr, unsigned long); - } table[] = { - { mpz_setbit }, /* 0 */ - { mpz_clrbit }, /* 1 */ - { mpz_combit }, /* 2 */ - }; - int use; - mpz z; -CODE: - use = use_sv (sv); - if (use == USE_MPZ && SvREFCNT(SvRV(sv)) == 1 && ! SvSMAGICAL(sv)) - { - /* our operand is a non-magical mpz with a reference count of 1, so - we can just modify it */ - (*table[ix].op) (SvMPZ(sv)->m, bit); - } - else - { - /* otherwise we need to make a new mpz, from whatever we have, and - operate on that, possibly invoking magic when storing back */ - SV *new_sv; - mpz z = new_mpz (); - mpz_ptr coerce_ptr = coerce_mpz_using (z->m, sv, use); - if (coerce_ptr != z->m) - mpz_set (z->m, coerce_ptr); - (*table[ix].op) (z->m, bit); - new_sv = sv_bless (sv_setref_pv (sv_newmortal(), NULL, z), - mpz_class_hv); - SvSetMagicSV (sv, new_sv); - } - - -void -sqrtrem (z) - mpz_coerce z -PREINIT: - SV *sv; - mpz root; - mpz rem; -PPCODE: - root = new_mpz(); - rem = new_mpz(); - mpz_sqrtrem (root->m, rem->m, z); - EXTEND (SP, 2); - PUSHs (MPX_NEWMORTAL (root, mpz_class_hv)); - PUSHs (MPX_NEWMORTAL (rem, mpz_class_hv)); - - -size_t -sizeinbase (z, base) - mpz_coerce z - int base -CODE: - RETVAL = mpz_sizeinbase (z, base); -OUTPUT: - RETVAL - - -int -tstbit (z, bit) - mpz_coerce z - ulong_coerce bit -CODE: - RETVAL = mpz_tstbit (z, bit); -OUTPUT: - RETVAL - - - -#------------------------------------------------------------------------------ - -MODULE = GMP PACKAGE = GMP::Mpq - - -mpq -mpq (...) -ALIAS: - GMP::Mpq::new = 1 -CODE: - TRACE (printf ("%s new, ix=%ld, items=%d\n", mpq_class, ix, (int) items)); - RETVAL = new_mpq(); - switch (items) { - case 0: - mpq_set_ui (RETVAL->m, 0L, 1L); - break; - case 1: - { - mpq_ptr rp = RETVAL->m; - mpq_ptr cp = coerce_mpq (rp, ST(0)); - if (cp != rp) - mpq_set (rp, cp); - } - break; - case 2: - { - mpz_ptr rp, cp; - rp = mpq_numref (RETVAL->m); - cp = coerce_mpz (rp, ST(0)); - if (cp != rp) - mpz_set (rp, cp); - rp = mpq_denref (RETVAL->m); - cp = coerce_mpz (rp, ST(1)); - if (cp != rp) - mpz_set (rp, cp); - } - break; - default: - croak ("%s new: invalid arguments", mpq_class); - } -OUTPUT: - RETVAL - - -void -overload_constant (str, pv, d1, ...) - const_string_assume str - SV *pv - dummy d1 -PREINIT: - SV *sv; - mpq q; -PPCODE: - TRACE (printf ("%s constant: %s\n", mpq_class, str)); - q = new_mpq(); - if (mpq_set_str (q->m, str, 0) == 0) - { sv = sv_bless (sv_setref_pv (sv_newmortal(), NULL, q), mpq_class_hv); } - else - { free_mpq (q); sv = pv; } - XPUSHs(sv); - - -mpq -overload_copy (q, d1, d2) - mpq_assume q - dummy d1 - dummy d2 -CODE: - RETVAL = new_mpq(); - mpq_set (RETVAL->m, q->m); -OUTPUT: - RETVAL - - -void -DESTROY (q) - mpq_assume q -CODE: - TRACE (printf ("%s DESTROY %p\n", mpq_class, q)); - free_mpq (q); - - -malloced_string -overload_string (q, d1, d2) - mpq_assume q - dummy d1 - dummy d2 -CODE: - TRACE (printf ("%s overload_string %p\n", mpq_class, q)); - RETVAL = mpq_get_str (NULL, 10, q->m); -OUTPUT: - RETVAL - - -mpq -overload_add (xv, yv, order) - SV *xv - SV *yv - SV *order -ALIAS: - GMP::Mpq::overload_sub = 1 - GMP::Mpq::overload_mul = 2 - GMP::Mpq::overload_div = 3 -PREINIT: - static_functable const struct { - void (*op) (mpq_ptr, mpq_srcptr, mpq_srcptr); - } table[] = { - { mpq_add }, /* 0 */ - { mpq_sub }, /* 1 */ - { mpq_mul }, /* 2 */ - { mpq_div }, /* 3 */ - }; -CODE: - TRACE (printf ("%s binary\n", mpf_class)); - assert_table (ix); - if (order == &PL_sv_yes) - SV_PTR_SWAP (xv, yv); - RETVAL = new_mpq(); - (*table[ix].op) (RETVAL->m, - coerce_mpq (tmp_mpq_0, xv), - coerce_mpq (tmp_mpq_1, yv)); -OUTPUT: - RETVAL - - -void -overload_addeq (x, y, o) - mpq_assume x - mpq_coerce y - order_noswap o -ALIAS: - GMP::Mpq::overload_subeq = 1 - GMP::Mpq::overload_muleq = 2 - GMP::Mpq::overload_diveq = 3 -PREINIT: - static_functable const struct { - void (*op) (mpq_ptr, mpq_srcptr, mpq_srcptr); - } table[] = { - { mpq_add }, /* 0 */ - { mpq_sub }, /* 1 */ - { mpq_mul }, /* 2 */ - { mpq_div }, /* 3 */ - }; -PPCODE: - assert_table (ix); - (*table[ix].op) (x->m, x->m, y); - XPUSHs(ST(0)); - - -mpq -overload_lshift (qv, nv, order) - SV *qv - SV *nv - SV *order -ALIAS: - GMP::Mpq::overload_rshift = 1 - GMP::Mpq::overload_pow = 2 -PREINIT: - static_functable const struct { - void (*op) (mpq_ptr, mpq_srcptr, unsigned long); - } table[] = { - { mpq_mul_2exp }, /* 0 */ - { mpq_div_2exp }, /* 1 */ - { x_mpq_pow_ui }, /* 2 */ - }; -CODE: - assert_table (ix); - if (order == &PL_sv_yes) - SV_PTR_SWAP (qv, nv); - RETVAL = new_mpq(); - (*table[ix].op) (RETVAL->m, coerce_mpq (RETVAL->m, qv), coerce_ulong (nv)); -OUTPUT: - RETVAL - - -void -overload_lshifteq (q, n, o) - mpq_assume q - ulong_coerce n - order_noswap o -ALIAS: - GMP::Mpq::overload_rshifteq = 1 - GMP::Mpq::overload_poweq = 2 -PREINIT: - static_functable const struct { - void (*op) (mpq_ptr, mpq_srcptr, unsigned long); - } table[] = { - { mpq_mul_2exp }, /* 0 */ - { mpq_div_2exp }, /* 1 */ - { x_mpq_pow_ui }, /* 2 */ - }; -PPCODE: - assert_table (ix); - (*table[ix].op) (q->m, q->m, n); - XPUSHs(ST(0)); - - -void -overload_inc (q, d1, d2) - mpq_assume q - dummy d1 - dummy d2 -ALIAS: - GMP::Mpq::overload_dec = 1 -PREINIT: - static_functable const struct { - void (*op) (mpz_ptr, mpz_srcptr, mpz_srcptr); - } table[] = { - { mpz_add }, /* 0 */ - { mpz_sub }, /* 1 */ - }; -CODE: - assert_table (ix); - (*table[ix].op) (mpq_numref(q->m), mpq_numref(q->m), mpq_denref(q->m)); - - -mpq -overload_abs (q, d1, d2) - mpq_assume q - dummy d1 - dummy d2 -ALIAS: - GMP::Mpq::overload_neg = 1 -PREINIT: - static_functable const struct { - void (*op) (mpq_ptr w, mpq_srcptr x); - } table[] = { - { mpq_abs }, /* 0 */ - { mpq_neg }, /* 1 */ - }; -CODE: - assert_table (ix); - RETVAL = new_mpq(); - (*table[ix].op) (RETVAL->m, q->m); -OUTPUT: - RETVAL - - -int -overload_spaceship (x, y, order) - mpq_assume x - mpq_coerce y - SV *order -CODE: - RETVAL = mpq_cmp (x->m, y); - RETVAL = SGN (RETVAL); - if (order == &PL_sv_yes) - RETVAL = -RETVAL; -OUTPUT: - RETVAL - - -bool -overload_bool (q, d1, d2) - mpq_assume q - dummy d1 - dummy d2 -ALIAS: - GMP::Mpq::overload_not = 1 -CODE: - RETVAL = (mpq_sgn (q->m) != 0) ^ ix; -OUTPUT: - RETVAL - - -bool -overload_eq (x, yv, d) - mpq_assume x - SV *yv - dummy d -ALIAS: - GMP::Mpq::overload_ne = 1 -PREINIT: - int use; -CODE: - use = use_sv (yv); - switch (use) { - case USE_IVX: - case USE_UVX: - case USE_MPZ: - RETVAL = 0; - if (x_mpq_integer_p (x->m)) - { - switch (use) { - case USE_IVX: - RETVAL = (mpz_cmp_si (mpq_numref(x->m), SvIVX(yv)) == 0); - break; - case USE_UVX: - RETVAL = (mpz_cmp_ui (mpq_numref(x->m), SvUVX(yv)) == 0); - break; - case USE_MPZ: - RETVAL = (mpz_cmp (mpq_numref(x->m), SvMPZ(yv)->m) == 0); - break; - } - } - break; - - case USE_MPQ: - RETVAL = (mpq_equal (x->m, SvMPQ(yv)->m) != 0); - break; - - default: - RETVAL = (mpq_equal (x->m, coerce_mpq_using (tmp_mpq_0, yv, use)) != 0); - break; - } - RETVAL ^= ix; -OUTPUT: - RETVAL - - -void -canonicalize (q) - mpq q -CODE: - mpq_canonicalize (q->m); - - -mpq -inv (q) - mpq_coerce q -CODE: - RETVAL = new_mpq(); - mpq_inv (RETVAL->m, q); -OUTPUT: - RETVAL - - -mpz -num (q) - mpq q -ALIAS: - GMP::Mpq::den = 1 -CODE: - RETVAL = new_mpz(); - mpz_set (RETVAL->m, (ix == 0 ? mpq_numref(q->m) : mpq_denref(q->m))); -OUTPUT: - RETVAL - - - -#------------------------------------------------------------------------------ - -MODULE = GMP PACKAGE = GMP::Mpf - - -mpf -mpf (...) -ALIAS: - GMP::Mpf::new = 1 -PREINIT: - unsigned long prec; -CODE: - TRACE (printf ("%s new\n", mpf_class)); - if (items > 2) - croak ("%s new: invalid arguments", mpf_class); - prec = (items == 2 ? coerce_ulong (ST(1)) : mpf_get_default_prec()); - RETVAL = new_mpf (prec); - if (items >= 1) - { - SV *sv = ST(0); - my_mpf_set_sv_using (RETVAL, sv, use_sv(sv)); - } -OUTPUT: - RETVAL - - -mpf -overload_constant (sv, d1, d2, ...) - SV *sv - dummy d1 - dummy d2 -CODE: - assert (SvPOK (sv)); - TRACE (printf ("%s constant: %s\n", mpq_class, SvPVX(sv))); - RETVAL = new_mpf (mpf_get_default_prec()); - my_mpf_set_svstr (RETVAL, sv); -OUTPUT: - RETVAL - - -mpf -overload_copy (f, d1, d2) - mpf_assume f - dummy d1 - dummy d2 -CODE: - TRACE (printf ("%s copy\n", mpf_class)); - RETVAL = new_mpf (mpf_get_prec (f)); - mpf_set (RETVAL, f); -OUTPUT: - RETVAL - - -void -DESTROY (f) - mpf_assume f -CODE: - TRACE (printf ("%s DESTROY %p\n", mpf_class, f)); - mpf_clear (f); - Safefree (f); - assert_support (mpf_count--); - TRACE_ACTIVE (); - - -mpf -overload_add (x, y, order) - mpf_assume x - mpf_coerce_st0 y - SV *order -ALIAS: - GMP::Mpf::overload_sub = 1 - GMP::Mpf::overload_mul = 2 - GMP::Mpf::overload_div = 3 -PREINIT: - static_functable const struct { - void (*op) (mpf_ptr, mpf_srcptr, mpf_srcptr); - } table[] = { - { mpf_add }, /* 0 */ - { mpf_sub }, /* 1 */ - { mpf_mul }, /* 2 */ - { mpf_div }, /* 3 */ - }; -CODE: - assert_table (ix); - RETVAL = new_mpf (mpf_get_prec (x)); - if (order == &PL_sv_yes) - MPF_PTR_SWAP (x, y); - (*table[ix].op) (RETVAL, x, y); -OUTPUT: - RETVAL - - -void -overload_addeq (x, y, o) - mpf_assume x - mpf_coerce_st0 y - order_noswap o -ALIAS: - GMP::Mpf::overload_subeq = 1 - GMP::Mpf::overload_muleq = 2 - GMP::Mpf::overload_diveq = 3 -PREINIT: - static_functable const struct { - void (*op) (mpf_ptr, mpf_srcptr, mpf_srcptr); - } table[] = { - { mpf_add }, /* 0 */ - { mpf_sub }, /* 1 */ - { mpf_mul }, /* 2 */ - { mpf_div }, /* 3 */ - }; -PPCODE: - assert_table (ix); - (*table[ix].op) (x, x, y); - XPUSHs(ST(0)); - - -mpf -overload_lshift (fv, nv, order) - SV *fv - SV *nv - SV *order -ALIAS: - GMP::Mpf::overload_rshift = 1 - GMP::Mpf::overload_pow = 2 -PREINIT: - static_functable const struct { - void (*op) (mpf_ptr, mpf_srcptr, unsigned long); - } table[] = { - { mpf_mul_2exp }, /* 0 */ - { mpf_div_2exp }, /* 1 */ - { mpf_pow_ui }, /* 2 */ - }; - mpf f; - unsigned long prec; -CODE: - assert_table (ix); - MPF_ASSUME (f, fv); - prec = mpf_get_prec (f); - if (order == &PL_sv_yes) - SV_PTR_SWAP (fv, nv); - f = coerce_mpf (tmp_mpf_0, fv, prec); - RETVAL = new_mpf (prec); - (*table[ix].op) (RETVAL, f, coerce_ulong (nv)); -OUTPUT: - RETVAL - - -void -overload_lshifteq (f, n, o) - mpf_assume f - ulong_coerce n - order_noswap o -ALIAS: - GMP::Mpf::overload_rshifteq = 1 - GMP::Mpf::overload_poweq = 2 -PREINIT: - static_functable const struct { - void (*op) (mpf_ptr, mpf_srcptr, unsigned long); - } table[] = { - { mpf_mul_2exp }, /* 0 */ - { mpf_div_2exp }, /* 1 */ - { mpf_pow_ui }, /* 2 */ - }; -PPCODE: - assert_table (ix); - (*table[ix].op) (f, f, n); - XPUSHs(ST(0)); - - -mpf -overload_abs (f, d1, d2) - mpf_assume f - dummy d1 - dummy d2 -ALIAS: - GMP::Mpf::overload_neg = 1 - GMP::Mpf::overload_sqrt = 2 -PREINIT: - static_functable const struct { - void (*op) (mpf_ptr w, mpf_srcptr x); - } table[] = { - { mpf_abs }, /* 0 */ - { mpf_neg }, /* 1 */ - { mpf_sqrt }, /* 2 */ - }; -CODE: - assert_table (ix); - RETVAL = new_mpf (mpf_get_prec (f)); - (*table[ix].op) (RETVAL, f); -OUTPUT: - RETVAL - - -void -overload_inc (f, d1, d2) - mpf_assume f - dummy d1 - dummy d2 -ALIAS: - GMP::Mpf::overload_dec = 1 -PREINIT: - static_functable const struct { - void (*op) (mpf_ptr w, mpf_srcptr x, unsigned long y); - } table[] = { - { mpf_add_ui }, /* 0 */ - { mpf_sub_ui }, /* 1 */ - }; -CODE: - assert_table (ix); - (*table[ix].op) (f, f, 1L); - - -int -overload_spaceship (xv, yv, order) - SV *xv - SV *yv - SV *order -PREINIT: - mpf x; -CODE: - MPF_ASSUME (x, xv); - switch (use_sv (yv)) { - case USE_IVX: - RETVAL = mpf_cmp_si (x, SvIVX(yv)); - break; - case USE_UVX: - RETVAL = mpf_cmp_ui (x, SvUVX(yv)); - break; - case USE_NVX: - RETVAL = mpf_cmp_d (x, SvNVX(yv)); - break; - case USE_PVX: - { - STRLEN len; - const char *str = SvPV (yv, len); - /* enough for all digits of the string */ - tmp_mpf_set_prec (tmp_mpf_0, strlen(str)+64); - if (mpf_set_str (tmp_mpf_0->m, str, 10) != 0) - croak ("%s <=>: invalid string format", mpf_class); - RETVAL = mpf_cmp (x, tmp_mpf_0->m); - } - break; - case USE_MPZ: - RETVAL = - x_mpz_cmp_f (SvMPZ(yv)->m, x); - break; - case USE_MPF: - RETVAL = mpf_cmp (x, SvMPF(yv)); - break; - default: - RETVAL = mpq_cmp (coerce_mpq (tmp_mpq_0, xv), - coerce_mpq (tmp_mpq_1, yv)); - break; - } - RETVAL = SGN (RETVAL); - if (order == &PL_sv_yes) - RETVAL = -RETVAL; -OUTPUT: - RETVAL - - -bool -overload_bool (f, d1, d2) - mpf_assume f - dummy d1 - dummy d2 -ALIAS: - GMP::Mpf::overload_not = 1 -CODE: - RETVAL = (mpf_sgn (f) != 0) ^ ix; -OUTPUT: - RETVAL - - -mpf -ceil (f) - mpf_coerce_def f -ALIAS: - GMP::Mpf::floor = 1 - GMP::Mpf::trunc = 2 -PREINIT: - static_functable const struct { - void (*op) (mpf_ptr w, mpf_srcptr x); - } table[] = { - { mpf_ceil }, /* 0 */ - { mpf_floor }, /* 1 */ - { mpf_trunc }, /* 2 */ - }; -CODE: - assert_table (ix); - RETVAL = new_mpf (mpf_get_prec (f)); - (*table[ix].op) (RETVAL, f); -OUTPUT: - RETVAL - - -unsigned long -get_default_prec () -CODE: - RETVAL = mpf_get_default_prec(); -OUTPUT: - RETVAL - - -unsigned long -get_prec (f) - mpf_coerce_def f -CODE: - RETVAL = mpf_get_prec (f); -OUTPUT: - RETVAL - - -bool -mpf_eq (xv, yv, bits) - SV *xv - SV *yv - ulong_coerce bits -PREINIT: - mpf x, y; -CODE: - TRACE (printf ("%s eq\n", mpf_class)); - coerce_mpf_pair (&x,xv, &y,yv); - RETVAL = mpf_eq (x, y, bits); -OUTPUT: - RETVAL - - -mpf -reldiff (xv, yv) - SV *xv - SV *yv -PREINIT: - mpf x, y; - unsigned long prec; -CODE: - TRACE (printf ("%s reldiff\n", mpf_class)); - prec = coerce_mpf_pair (&x,xv, &y,yv); - RETVAL = new_mpf (prec); - mpf_reldiff (RETVAL, x, y); -OUTPUT: - RETVAL - - -void -set_default_prec (prec) - ulong_coerce prec -CODE: - TRACE (printf ("%s set_default_prec %lu\n", mpf_class, prec)); - mpf_set_default_prec (prec); - - -void -set_prec (sv, prec) - SV *sv - ulong_coerce prec -PREINIT: - mpf_ptr old_f, new_f; - int use; -CODE: - TRACE (printf ("%s set_prec to %lu\n", mpf_class, prec)); - use = use_sv (sv); - if (use == USE_MPF) - { - old_f = SvMPF(sv); - if (SvREFCNT(SvRV(sv)) == 1) - mpf_set_prec (old_f, prec); - else - { - TRACE (printf (" fork new mpf\n")); - new_f = new_mpf (prec); - mpf_set (new_f, old_f); - goto setref; - } - } - else - { - TRACE (printf (" coerce to mpf\n")); - new_f = new_mpf (prec); - my_mpf_set_sv_using (new_f, sv, use); - setref: - sv_bless (sv_setref_pv (sv, NULL, new_f), mpf_class_hv); - } - - - -#------------------------------------------------------------------------------ - -MODULE = GMP PACKAGE = GMP::Rand - -randstate -new (...) -ALIAS: - GMP::Rand::randstate = 1 -CODE: - TRACE (printf ("%s new\n", rand_class)); - New (GMP_MALLOC_ID, RETVAL, 1, __gmp_randstate_struct); - TRACE (printf (" RETVAL %p\n", RETVAL)); - assert_support (rand_count++); - TRACE_ACTIVE (); - - if (items == 0) - { - gmp_randinit_default (RETVAL); - } - else - { - if (SvROK (ST(0)) && sv_derived_from (ST(0), rand_class)) - { - if (items != 1) - goto invalid; - gmp_randinit_set (RETVAL, SvRANDSTATE (ST(0))); - } - else - { - STRLEN len; - const char *method = SvPV (ST(0), len); - assert (len == strlen (method)); - if (strcmp (method, "lc_2exp") == 0) - { - if (items != 4) - goto invalid; - gmp_randinit_lc_2exp (RETVAL, - coerce_mpz (tmp_mpz_0, ST(1)), - coerce_ulong (ST(2)), - coerce_ulong (ST(3))); - } - else if (strcmp (method, "lc_2exp_size") == 0) - { - if (items != 2) - goto invalid; - if (! gmp_randinit_lc_2exp_size (RETVAL, coerce_ulong (ST(1)))) - { - Safefree (RETVAL); - XSRETURN_UNDEF; - } - } - else if (strcmp (method, "mt") == 0) - { - if (items != 1) - goto invalid; - gmp_randinit_mt (RETVAL); - } - else - { - invalid: - croak ("%s new: invalid arguments", rand_class); - } - } - } -OUTPUT: - RETVAL - - -void -DESTROY (r) - randstate r -CODE: - TRACE (printf ("%s DESTROY\n", rand_class)); - gmp_randclear (r); - Safefree (r); - assert_support (rand_count--); - TRACE_ACTIVE (); - - -void -seed (r, z) - randstate r - mpz_coerce z -CODE: - gmp_randseed (r, z); - - -mpz -mpz_urandomb (r, bits) - randstate r - ulong_coerce bits -ALIAS: - GMP::Rand::mpz_rrandomb = 1 -PREINIT: - static_functable const struct { - void (*fun) (mpz_ptr, gmp_randstate_t r, unsigned long bits); - } table[] = { - { mpz_urandomb }, /* 0 */ - { mpz_rrandomb }, /* 1 */ - }; -CODE: - assert_table (ix); - RETVAL = new_mpz(); - (*table[ix].fun) (RETVAL->m, r, bits); -OUTPUT: - RETVAL - - -mpz -mpz_urandomm (r, m) - randstate r - mpz_coerce m -CODE: - RETVAL = new_mpz(); - mpz_urandomm (RETVAL->m, r, m); -OUTPUT: - RETVAL - - -mpf -mpf_urandomb (r, bits) - randstate r - ulong_coerce bits -CODE: - RETVAL = new_mpf (bits); - mpf_urandomb (RETVAL, r, bits); -OUTPUT: - RETVAL - - -unsigned long -gmp_urandomb_ui (r, bits) - randstate r - ulong_coerce bits -ALIAS: - GMP::Rand::gmp_urandomm_ui = 1 -PREINIT: - static_functable const struct { - unsigned long (*fun) (gmp_randstate_t r, unsigned long bits); - } table[] = { - { gmp_urandomb_ui }, /* 0 */ - { gmp_urandomm_ui }, /* 1 */ - }; -CODE: - assert_table (ix); - RETVAL = (*table[ix].fun) (r, bits); -OUTPUT: - RETVAL diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP/Mpf.pm b/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP/Mpf.pm deleted file mode 100644 index 4c0dec6ceac..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP/Mpf.pm +++ /dev/null @@ -1,106 +0,0 @@ -# GMP mpf module. - -# Copyright 2001, 2003 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. - - -package GMP::Mpf; - -require GMP; -require Exporter; -@ISA = qw(GMP Exporter); -@EXPORT = qw(); -@EXPORT_OK = qw(); -%EXPORT_TAGS = ('all' => [qw( - ceil floor get_default_prec get_prec mpf mpf_eq - reldiff set_default_prec set_prec trunc)], - 'constants' => [@EXPORT], - 'noconstants' => [@EXPORT]); -Exporter::export_ok_tags('all'); - -use overload - '+' => \&overload_add, '+=' => \&overload_addeq, - '-' => \&overload_sub, '-=' => \&overload_subeq, - '*' => \&overload_mul, '*=' => \&overload_muleq, - '/' => \&overload_div, '/=' => \&overload_diveq, - '**' => \&overload_pow, '**=' => \&overload_poweq, - '<<' => \&overload_lshift, '<<=' => \&overload_lshifteq, - '>>' => \&overload_rshift, '>>=' => \&overload_rshifteq, - - 'bool' => \&overload_bool, - 'not' => \&overload_not, - '!' => \&overload_not, - '<=>' => \&overload_spaceship, - '++' => \&overload_inc, - '--' => \&overload_dec, - 'abs' => \&overload_abs, - 'neg' => \&overload_neg, - 'sqrt' => \&overload_sqrt, - '=' => \&overload_copy, - '""' => \&overload_string; - -sub import { - foreach (@_) { - if ($_ eq ':constants') { - overload::constant ('integer' => \&overload_constant, - 'binary' => \&overload_constant, - 'float' => \&overload_constant); - } elsif ($_ eq ':noconstants') { - overload::remove_constant ('integer' => \&overload_constant, - 'binary' => \&overload_constant, - 'float' => \&overload_constant); - } - } - goto &Exporter::import; -} - - -sub overload_string { - my $fmt; - BEGIN { $^W = 0; } - if (defined ($#)) { - $fmt = $#; - BEGIN { $^W = 1; } - # protect against calling sprintf_internal with a bad format - if ($fmt !~ /^((%%|[^%])*%[-+ .\d]*)([eEfgG](%%|[^%])*)$/) { - die "GMP::Mpf: invalid \$# format: $#\n"; - } - $fmt = $1 . 'F' . $3; - } else { - $fmt = '%.Fg'; - } - GMP::sprintf_internal ($fmt, $_[0]); -} - -1; -__END__ - - -# Local variables: -# perl-indent-level: 2 -# End: diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP/Mpq.pm b/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP/Mpq.pm deleted file mode 100644 index fe010849e0b..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP/Mpq.pm +++ /dev/null @@ -1,89 +0,0 @@ -# GMP mpq module. - -# Copyright 2001 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. - - -package GMP::Mpq; - -require GMP; -require Exporter; -@ISA = qw(GMP Exporter); -@EXPORT = qw(); -@EXPORT_OK = qw(); -%EXPORT_TAGS = ('all' => [qw(canonicalize den inv mpq num)], - 'constants' => [@EXPORT], - 'noconstants' => [@EXPORT] ); -Exporter::export_ok_tags('all'); - -use overload - '+' => \&overload_add, '+=' => \&overload_addeq, - '-' => \&overload_sub, '-=' => \&overload_subeq, - '*' => \&overload_mul, '*=' => \&overload_muleq, - '/' => \&overload_div, '/=' => \&overload_diveq, - '**' => \&overload_pow, '**=' => \&overload_poweq, - '<<' => \&overload_lshift, '<<=' => \&overload_lshifteq, - '>>' => \&overload_rshift, '>>=' => \&overload_rshifteq, - - 'bool' => \&overload_bool, - 'not' => \&overload_not, - '!' => \&overload_not, - '==' => \&overload_eq, - '!=' => \&overload_ne, - '<=>' => \&overload_spaceship, - '++' => \&overload_inc, - '--' => \&overload_dec, - 'abs' => \&overload_abs, - 'neg' => \&overload_neg, - '=' => \&overload_copy, - '""' => \&overload_string; - -my $constants = { }; - -sub import { - foreach (@_) { - if ($_ eq ':constants') { - overload::constant ('integer' => \&overload_constant, - 'binary' => \&overload_constant, - 'float' => \&overload_constant); - } elsif ($_ eq ':noconstants') { - overload::remove_constant ('integer' => \&overload_constant, - 'binary' => \&overload_constant, - 'float' => \&overload_constant); - } - } - goto &Exporter::import; -} - -1; -__END__ - - -# Local variables: -# perl-indent-level: 2 -# End: diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP/Mpz.pm b/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP/Mpz.pm deleted file mode 100644 index 27e6336775d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP/Mpz.pm +++ /dev/null @@ -1,101 +0,0 @@ -# GMP mpz module. - -# Copyright 2001-2003 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. - - -package GMP::Mpz; - -require GMP; -require Exporter; -@ISA = qw(GMP Exporter); -@EXPORT = qw(); -@EXPORT_OK = qw(); -%EXPORT_TAGS = ('all' => [qw( - bin cdiv cdiv_2exp clrbit combit congruent_p - congruent_2exp_p divexact divisible_p - divisible_2exp_p even_p fac fdiv fdiv_2exp fib - fib2 gcd gcdext hamdist invert jacobi kronecker - lcm lucnum lucnum2 mod mpz mpz_export - mpz_import nextprime odd_p perfect_power_p - perfect_square_p popcount powm probab_prime_p - realloc remove root roote rootrem scan0 scan1 - setbit sizeinbase sqrtrem tdiv tdiv_2exp - tstbit)], - 'constants' => [@EXPORT], - 'noconstants' => [@EXPORT]); -Exporter::export_ok_tags('all'); - -use overload - '+' => \&overload_add, '+=' => \&overload_addeq, - '-' => \&overload_sub, '-=' => \&overload_subeq, - '*' => \&overload_mul, '*=' => \&overload_muleq, - '/' => \&overload_div, '/=' => \&overload_diveq, - '%' => \&overload_rem, '%=' => \&overload_remeq, - '<<' => \&overload_lshift, '<<=' => \&overload_lshifteq, - '>>' => \&overload_rshift, '>>=' => \&overload_rshifteq, - '**' => \&overload_pow, '**=' => \&overload_poweq, - '&' => \&overload_and, '&=' => \&overload_andeq, - '|' => \&overload_ior, '|=' => \&overload_ioreq, - '^' => \&overload_xor, '^=' => \&overload_xoreq, - - 'bool' => \&overload_bool, - 'not' => \&overload_not, - '!' => \&overload_not, - '~' => \&overload_com, - '<=>' => \&overload_spaceship, - '++' => \&overload_inc, - '--' => \&overload_dec, - '=' => \&overload_copy, - 'abs' => \&overload_abs, - 'neg' => \&overload_neg, - 'sqrt' => \&overload_sqrt, - '""' => \&overload_string; - -sub import { - foreach (@_) { - if ($_ eq ':constants') { - overload::constant ('integer' => \&overload_constant, - 'binary' => \&overload_constant, - 'float' => \&overload_constant); - } elsif ($_ eq ':noconstants') { - overload::remove_constant ('integer' => \&overload_constant, - 'binary' => \&overload_constant, - 'float' => \&overload_constant); - } - } - goto &Exporter::import; -} - -1; -__END__ - - -# Local variables: -# perl-indent-level: 2 -# End: diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP/Rand.pm b/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP/Rand.pm deleted file mode 100644 index 9f7d763dd52..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/perl/GMP/Rand.pm +++ /dev/null @@ -1,44 +0,0 @@ -# GMP random numbers module. - -# Copyright 2001, 2003 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. - - -package GMP::Rand; - -require GMP; -require Exporter; -@ISA = qw(GMP Exporter); -@EXPORT = qw(); -%EXPORT_TAGS = ('all' => [qw( - randstate mpf_urandomb mpz_rrandomb - mpz_urandomb mpz_urandomm gmp_urandomb_ui - gmp_urandomm_ui)]); -Exporter::export_ok_tags('all'); -1; -__END__ diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/perl/INSTALL b/src/plugins/e-acsl/contrib/libgmp/demos/perl/INSTALL deleted file mode 100644 index f3d7c53b1c2..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/perl/INSTALL +++ /dev/null @@ -1,88 +0,0 @@ -Copyright 2001, 2003, 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any - later version. - -or both in parallel, as here. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. - - - - - - GMP PERL MODULE INSTALLATION - - -This module can be compiled within the GMP source directory or moved -elsewhere and compiled. An installed GMP can be used, or a specified -GMP build tree. Both static and shared GMP builds will work. - -The simplest case is when GMP has been installed to a standard system -location - - perl Makefile.PL - make - -If not yet installed then the top-level GMP build directory must be -specified - - perl Makefile.PL GMP_BUILDDIR=/my/gmp/build - make - -In any case, with the module built, the sample program provided can be -run - - perl -Iblib/arch sample.pl - -If you built a shared version of libgmp but haven't yet installed it, -then it might be necessary to add a run-time path to it. For example - - LD_LIBRARY_PATH=/my/gmp/build/.libs perl -Iblib/arch sample.pl - -Documentation is provided in pod format in GMP.pm, and will have been -"man"-ified in the module build - - man -l blib/man3/GMP.3pm -or - man -M`pwd`/blib GMP - -A test script is provided, running a large number of more or less -trivial checks - - make test - -The module and its documentation can be installed in the usual way - - make install - -This will be into /usr/local or wherever the perl Config module -directs, but that can be controlled back at the Makefile.PL stage with -the usual ExtUtils::MakeMaker options. - -Once installed, programs using the GMP module become simply - - perl sample.pl - -And the documentation read directly too - - man GMP diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/perl/Makefile.PL b/src/plugins/e-acsl/contrib/libgmp/demos/perl/Makefile.PL deleted file mode 100644 index a676710c1c4..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/perl/Makefile.PL +++ /dev/null @@ -1,82 +0,0 @@ -# Makefile for GMP perl module. - -# Copyright 2001, 2003, 2004 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. - - -# Bugs: -# -# When the generated Makefile re-runs "perl Makefile.PL" the GMP_BUILDDIR -# parameter is lost. - - -use ExtUtils::MakeMaker; - - -# Find and remove our parameters -@ARGV = map { - if (/^GMP_BUILDDIR=(.*)/) { - $GMP_BUILDDIR=$1; (); - } else { - $_; - } -} (@ARGV); - -$INC = ""; -$LIBS = "-lgmp"; -$OBJECT = "GMP.o"; - -if (defined $GMP_BUILDDIR) { - if (! -f "$GMP_BUILDDIR/libgmp.la") { - die "$GMP_BUILDDIR doesn't contain libgmp.la\n" . - "if it's really a gmp build directory then go there and run \"make libgmp.la\"\n"; - } - $INC = "-I$GMP_BUILDDIR $INC"; - $LIBS = "-L$GMP_BUILDDIR/.libs $LIBS"; -} - -WriteMakefile( - NAME => 'GMP', - VERSION => '2.00', - LIBS => [$LIBS], - OBJECT => $OBJECT, - INC => $INC, - clean => { FILES => 'test.tmp' }, - PM => { - 'GMP.pm' => '$(INST_LIBDIR)/GMP.pm', - 'GMP/Mpz.pm' => '$(INST_LIBDIR)/GMP/Mpz.pm', - 'GMP/Mpq.pm' => '$(INST_LIBDIR)/GMP/Mpq.pm', - 'GMP/Mpf.pm' => '$(INST_LIBDIR)/GMP/Mpf.pm', - 'GMP/Rand.pm' => '$(INST_LIBDIR)/GMP/Rand.pm', - } - ); - - -# Local variables: -# perl-indent-level: 2 -# End: diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/perl/sample.pl b/src/plugins/e-acsl/contrib/libgmp/demos/perl/sample.pl deleted file mode 100644 index 8a10ee1ebb2..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/perl/sample.pl +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/perl -w - -# Some sample GMP module operations - -# Copyright 2001, 2004 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. - -use strict; - - -use GMP; -print "using GMP module $GMP::VERSION and GMP library ",GMP::version(),"\n"; - - -use GMP::Mpz qw(:all); -print "the 200th fibonacci number is ", fib(200), "\n"; -print "next prime after 10**30 is (probably) ", nextprime(mpz(10)**30), "\n"; - - -use GMP::Mpq qw(:constants); -print "the 7th harmonic number is ", 1+1/2+1/3+1/4+1/5+1/6+1/7, "\n"; -use GMP::Mpq qw(:noconstants); - - -use GMP::Mpf qw(mpf); -my $f = mpf(1,180); -$f >>= 180; -$f += 1; -print "a sample mpf is $f\n"; diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/perl/test.pl b/src/plugins/e-acsl/contrib/libgmp/demos/perl/test.pl deleted file mode 100644 index 2b540891650..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/perl/test.pl +++ /dev/null @@ -1,2179 +0,0 @@ -#!/usr/bin/perl -w - -# GMP perl module tests - -# Copyright 2001-2003 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. - - -# These tests aim to exercise the many possible combinations of operands -# etc, and to run all functions at least once, which if nothing else will -# check everything intended is in the :all list. -# -# Use the following in .emacs to match test failure messages. -# -# ;; perl "Test" module error messages -# (eval-after-load "compile" -# '(add-to-list -# 'compilation-error-regexp-alist -# '("^.*Failed test [0-9]+ in \\([^ ]+\\) at line \\([0-9]+\\)" 1 2))) - - -use strict; -use Test; - -BEGIN { - plan tests => 123, - onfail => sub { print "there were failures\n" }, -} - -use GMP qw(:all); -use GMP::Mpz qw(:all); -use GMP::Mpq qw(:all); -use GMP::Mpf qw(:all); -use GMP::Rand qw(:all); - -use GMP::Mpz qw(:constants); -use GMP::Mpz qw(:noconstants); -use GMP::Mpq qw(:constants); -use GMP::Mpq qw(:noconstants); -use GMP::Mpf qw(:constants); -use GMP::Mpf qw(:noconstants); - -package Mytie; -use Exporter; -use vars qw($val $fetched $stored); -$val = 0; -$fetched = 0; -$stored = 0; -sub TIESCALAR { - my ($class, $newval) = @_; - my $var = 'mytie dummy refed var'; - $val = $newval; - $fetched = 0; - $stored = 0; - return bless \$var, $class; -} -sub FETCH { - my ($self) = @_; - $fetched++; - return $val; -} -sub STORE { - my ($self, $newval) = @_; - $val = $newval; - $stored++; -} -package main; - -# check Mytie does what it should -{ tie my $t, 'Mytie', 123; - ok ($Mytie::val == 123); - $Mytie::val = 456; - ok ($t == 456); - $t = 789; - ok ($Mytie::val == 789); -} - - -# Usage: str(x) -# Return x forced to a string, not a PVIV. -# -sub str { - my $s = "$_[0]" . ""; - return $s; -} - -my $ivnv_2p128 = 65536.0 * 65536.0 * 65536.0 * 65536.0 - * 65536.0 * 65536.0 * 65536.0 * 65536.0; -kill (0, $ivnv_2p128); -my $str_2p128 = '340282366920938463463374607431768211456'; - -my $uv_max = ~ 0; -my $uv_max_str = ~ 0; -$uv_max_str = "$uv_max_str"; -$uv_max_str = "" . "$uv_max_str"; - - -#------------------------------------------------------------------------------ -# GMP::version - -use GMP qw(version); -print '$GMP::VERSION ',$GMP::VERSION,' GMP::version() ',version(),"\n"; - - -#------------------------------------------------------------------------------ -# GMP::Mpz::new - -ok (mpz(0) == 0); -ok (mpz('0') == 0); -ok (mpz(substr('101',1,1)) == 0); -ok (mpz(0.0) == 0); -ok (mpz(mpz(0)) == 0); -ok (mpz(mpq(0)) == 0); -ok (mpz(mpf(0)) == 0); - -{ tie my $t, 'Mytie', 0; - ok (mpz($t) == 0); - ok ($Mytie::fetched > 0); -} -{ tie my $t, 'Mytie', '0'; - ok (mpz($t) == 0); - ok ($Mytie::fetched > 0); -} -{ tie my $t, 'Mytie', substr('101',1,1); ok (mpz($t) == 0); } -{ tie my $t, 'Mytie', 0.0; ok (mpz($t) == 0); } -{ tie my $t, 'Mytie', mpz(0); ok (mpz($t) == 0); } -{ tie my $t, 'Mytie', mpq(0); ok (mpz($t) == 0); } -{ tie my $t, 'Mytie', mpf(0); ok (mpz($t) == 0); } - -ok (mpz(-123) == -123); -ok (mpz('-123') == -123); -ok (mpz(substr('1-1231',1,4)) == -123); -ok (mpz(-123.0) == -123); -ok (mpz(mpz(-123)) == -123); -ok (mpz(mpq(-123)) == -123); -ok (mpz(mpf(-123)) == -123); - -{ tie my $t, 'Mytie', -123; ok (mpz($t) == -123); } -{ tie my $t, 'Mytie', '-123'; ok (mpz($t) == -123); } -{ tie my $t, 'Mytie', substr('1-1231',1,4); ok (mpz($t) == -123); } -{ tie my $t, 'Mytie', -123.0; ok (mpz($t) == -123); } -{ tie my $t, 'Mytie', mpz(-123); ok (mpz($t) == -123); } -{ tie my $t, 'Mytie', mpq(-123); ok (mpz($t) == -123); } -{ tie my $t, 'Mytie', mpf(-123); ok (mpz($t) == -123); } - -ok (mpz($ivnv_2p128) == $str_2p128); -{ tie my $t, 'Mytie', $ivnv_2p128; ok (mpz($t) == $str_2p128); } - -ok (mpz($uv_max) > 0); -ok (mpz($uv_max) == mpz($uv_max_str)); -{ tie my $t, 'Mytie', $uv_max; ok (mpz($t) > 0); } -{ tie my $t, 'Mytie', $uv_max; ok (mpz($t) == mpz($uv_max_str)); } - -{ my $s = '999999999999999999999999999999'; - kill (0, $s); - ok (mpz($s) == '999999999999999999999999999999'); - tie my $t, 'Mytie', $s; - ok (mpz($t) == '999999999999999999999999999999'); -} - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_abs - -ok (abs(mpz(0)) == 0); -ok (abs(mpz(123)) == 123); -ok (abs(mpz(-123)) == 123); - -{ my $x = mpz(-123); $x = abs($x); ok ($x == 123); } -{ my $x = mpz(0); $x = abs($x); ok ($x == 0); } -{ my $x = mpz(123); $x = abs($x); ok ($x == 123); } - -{ tie my $t, 'Mytie', mpz(0); ok (abs($t) == 0); } -{ tie my $t, 'Mytie', mpz(123); ok (abs($t) == 123); } -{ tie my $t, 'Mytie', mpz(-123); ok (abs($t) == 123); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_add - -ok (mpz(0) + 1 == 1); -ok (mpz(-1) + 1 == 0); -ok (1 + mpz(0) == 1); -ok (1 + mpz(-1) == 0); - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_addeq - -{ my $a = mpz(7); $a += 1; ok ($a == 8); } -{ my $a = mpz(7); my $b = $a; $a += 1; ok ($a == 8); ok ($b == 7); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_and - -ok ((mpz(3) & 1) == 1); -ok ((mpz(3) & 4) == 0); - -{ my $a = mpz(3); $a &= 1; ok ($a == 1); } -{ my $a = mpz(3); $a &= 4; ok ($a == 0); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_bool - -if (mpz(0)) { ok (0); } else { ok (1); } -if (mpz(123)) { ok (1); } else { ok (0); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_com - -ok (~ mpz(0) == -1); -ok (~ mpz(1) == -2); -ok (~ mpz(-2) == 1); -ok (~ mpz(0xFF) == -0x100); -ok (~ mpz(-0x100) == 0xFF); - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_dec - -{ my $a = mpz(0); ok ($a-- == 0); ok ($a == -1); } -{ my $a = mpz(0); ok (--$a == -1); } - -{ my $a = mpz(0); my $b = $a; $a--; ok ($a == -1); ok ($b == 0); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_div - -ok (mpz(6) / 2 == 3); -ok (mpz(-6) / 2 == -3); -ok (mpz(6) / -2 == -3); -ok (mpz(-6) / -2 == 3); - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_diveq - -{ my $a = mpz(21); $a /= 3; ok ($a == 7); } -{ my $a = mpz(21); my $b = $a; $a /= 3; ok ($a == 7); ok ($b == 21); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_eq - -{ my $a = mpz(0); - my $b = $a; - $a = mpz(1); - ok ($a == 1); - ok ($b == 0); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_inc - -{ my $a = mpz(0); ok ($a++ == 0); ok ($a == 1); } -{ my $a = mpz(0); ok (++$a == 1); } - -{ my $a = mpz(0); my $b = $a; $a++; ok ($a == 1); ok ($b == 0); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_ior - -ok ((mpz(3) | 1) == 3); -ok ((mpz(3) | 4) == 7); - -{ my $a = mpz(3); $a |= 1; ok ($a == 3); } -{ my $a = mpz(3); $a |= 4; ok ($a == 7); } - -ok ((mpz("0xAA") | mpz("0x55")) == mpz("0xFF")); - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_lshift - -{ my $a = mpz(7) << 1; ok ($a == 14); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_lshifteq - -{ my $a = mpz(7); $a <<= 1; ok ($a == 14); } -{ my $a = mpz(7); my $b = $a; $a <<= 1; ok ($a == 14); ok ($b == 7); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_mul - -ok (mpz(2) * 3 == 6); - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_muleq - -{ my $a = mpz(7); $a *= 3; ok ($a == 21); } -{ my $a = mpz(7); my $b = $a; $a *= 3; ok ($a == 21); ok ($b == 7); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_neg - -ok (- mpz(0) == 0); -ok (- mpz(123) == -123); -ok (- mpz(-123) == 123); - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_not - -if (not mpz(0)) { ok (1); } else { ok (0); } -if (not mpz(123)) { ok (0); } else { ok (1); } - -ok ((! mpz(0)) == 1); -ok ((! mpz(123)) == 0); - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_pow - -ok (mpz(0) ** 1 == 0); -ok (mpz(1) ** 1 == 1); -ok (mpz(2) ** 0 == 1); -ok (mpz(2) ** 1 == 2); -ok (mpz(2) ** 2 == 4); -ok (mpz(2) ** 3 == 8); -ok (mpz(2) ** 4 == 16); - -ok (mpz(0) ** mpz(1) == 0); -ok (mpz(1) ** mpz(1) == 1); -ok (mpz(2) ** mpz(0) == 1); -ok (mpz(2) ** mpz(1) == 2); -ok (mpz(2) ** mpz(2) == 4); -ok (mpz(2) ** mpz(3) == 8); -ok (mpz(2) ** mpz(4) == 16); - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_poweq - -{ my $a = mpz(3); $a **= 4; ok ($a == 81); } -{ my $a = mpz(3); my $b = $a; $a **= 4; ok ($a == 81); ok ($b == 3); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_rem - -ok (mpz(-8) % 3 == -2); -ok (mpz(-7) % 3 == -1); -ok (mpz(-6) % 3 == 0); -ok (mpz(6) % 3 == 0); -ok (mpz(7) % 3 == 1); -ok (mpz(8) % 3 == 2); - -{ my $a = mpz(24); $a %= 7; ok ($a == 3); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_rshift - -{ my $a = mpz(32) >> 1; ok ($a == 16); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_rshifteq - -{ my $a = mpz(32); $a >>= 1; ok ($a == 16); } -{ my $a = mpz(32); my $b = $a; $a >>= 1; ok ($a == 16); ok ($b == 32); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_spaceship - -ok (mpz(0) < 1); -ok (mpz(0) > -1); - -ok (mpz(0) != 1); -ok (mpz(0) != -1); -ok (mpz(1) != 0); -ok (mpz(1) != -1); -ok (mpz(-1) != 0); -ok (mpz(-1) != 1); - -ok (mpz(0) < 1.0); -ok (mpz(0) < '1'); -ok (mpz(0) < substr('-1',1,1)); -ok (mpz(0) < mpz(1)); -ok (mpz(0) < mpq(1)); -ok (mpz(0) < mpf(1)); -ok (mpz(0) < $uv_max); - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_sqrt - -ok (sqrt(mpz(0)) == 0); -ok (sqrt(mpz(1)) == 1); -ok (sqrt(mpz(4)) == 2); -ok (sqrt(mpz(81)) == 9); - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_string - -{ my $x = mpz(0); ok("$x" eq "0"); } -{ my $x = mpz(123); ok("$x" eq "123"); } -{ my $x = mpz(-123); ok("$x" eq "-123"); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_sub - -ok (mpz(0) - 1 == -1); -ok (mpz(1) - 1 == 0); -ok (1 - mpz(0) == 1); -ok (1 - mpz(1) == 0); - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_subeq - -{ my $a = mpz(7); $a -= 1; ok ($a == 6); } -{ my $a = mpz(7); my $b = $a; $a -= 1; ok ($a == 6); ok ($b == 7); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::overload_xor - -ok ((mpz(3) ^ 1) == 2); -ok ((mpz(3) ^ 4) == 7); - -{ my $a = mpz(3); $a ^= 1; ok ($a == 2); } -{ my $a = mpz(3); $a ^= 4; ok ($a == 7); } - - -#------------------------------------------------------------------------------ -# GMP::Mpz::bin - -ok (bin(2,0) == 1); -ok (bin(2,1) == 2); -ok (bin(2,2) == 1); - -ok (bin(3,0) == 1); -ok (bin(3,1) == 3); -ok (bin(3,2) == 3); -ok (bin(3,3) == 1); - - -#------------------------------------------------------------------------------ -# GMP::Mpz::cdiv - -{ my ($q, $r); - ($q, $r) = cdiv (16, 3); - ok ($q == 6); - ok ($r == -2); - ($q, $r) = cdiv (16, -3); - ok ($q == -5); - ok ($r == 1); - ($q, $r) = cdiv (-16, 3); - ok ($q == -5); - ok ($r == -1); - ($q, $r) = cdiv (-16, -3); - ok ($q == 6); - ok ($r == 2); -} - - -#------------------------------------------------------------------------------ -# GMP::Mpz::cdiv_2exp - -{ my ($q, $r); - ($q, $r) = cdiv_2exp (23, 2); - ok ($q == 6); - ok ($r == -1); - ($q, $r) = cdiv_2exp (-23, 2); - ok ($q == -5); - ok ($r == -3); -} - - -#------------------------------------------------------------------------------ -# GMP::Mpz::clrbit - -{ my $a = mpz(3); clrbit ($a, 1); ok ($a == 1); - ok (UNIVERSAL::isa($a,"GMP::Mpz")); } -{ my $a = mpz(3); clrbit ($a, 2); ok ($a == 3); - ok (UNIVERSAL::isa($a,"GMP::Mpz")); } - -{ my $a = 3; clrbit ($a, 1); ok ($a == 1); - ok (UNIVERSAL::isa($a,"GMP::Mpz")); } -{ my $a = 3; clrbit ($a, 2); ok ($a == 3); - ok (UNIVERSAL::isa($a,"GMP::Mpz")); } - -# mutate only given variable -{ my $a = mpz(3); - my $b = $a; - clrbit ($a, 0); - ok ($a == 2); - ok ($b == 3); -} -{ my $a = 3; - my $b = $a; - clrbit ($a, 0); - ok ($a == 2); - ok ($b == 3); -} - -{ tie my $a, 'Mytie', mpz(3); - clrbit ($a, 1); - ok ($Mytie::fetched > 0); # used fetch - ok ($Mytie::stored > 0); # used store - ok ($a == 1); # expected result - ok (UNIVERSAL::isa($a,"GMP::Mpz")); - ok (tied($a)); # still tied -} -{ tie my $a, 'Mytie', 3; - clrbit ($a, 1); - ok ($Mytie::fetched > 0); # used fetch - ok ($Mytie::stored > 0); # used store - ok ($a == 1); # expected result - ok (UNIVERSAL::isa($a,"GMP::Mpz")); - ok (tied($a)); # still tied -} - -{ my $b = mpz(3); - tie my $a, 'Mytie', $b; - clrbit ($a, 0); - ok ($a == 2); - ok ($b == 3); - ok (tied($a)); -} -{ my $b = 3; - tie my $a, 'Mytie', $b; - clrbit ($a, 0); - ok ($a == 2); - ok ($b == 3); - ok (tied($a)); -} - -#------------------------------------------------------------------------------ -# GMP::Mpz::combit - -{ my $a = mpz(3); combit ($a, 1); ok ($a == 1); - ok (UNIVERSAL::isa($a,"GMP::Mpz")); } -{ my $a = mpz(3); combit ($a, 2); ok ($a == 7); - ok (UNIVERSAL::isa($a,"GMP::Mpz")); } - -{ my $a = 3; combit ($a, 1); ok ($a == 1); - ok (UNIVERSAL::isa($a,"GMP::Mpz")); } -{ my $a = 3; combit ($a, 2); ok ($a == 7); - ok (UNIVERSAL::isa($a,"GMP::Mpz")); } - -# mutate only given variable -{ my $a = mpz(3); - my $b = $a; - combit ($a, 0); - ok ($a == 2); - ok ($b == 3); -} -{ my $a = 3; - my $b = $a; - combit ($a, 0); - ok ($a == 2); - ok ($b == 3); -} - -{ tie my $a, 'Mytie', mpz(3); - combit ($a, 2); - ok ($Mytie::fetched > 0); # used fetch - ok ($Mytie::stored > 0); # used store - ok ($a == 7); # expected result - ok (UNIVERSAL::isa($a,"GMP::Mpz")); - ok (tied($a)); # still tied -} -{ tie my $a, 'Mytie', 3; - combit ($a, 2); - ok ($Mytie::fetched > 0); # used fetch - ok ($Mytie::stored > 0); # used store - ok ($a == 7); # expected result - ok (UNIVERSAL::isa($a,"GMP::Mpz")); - ok (tied($a)); # still tied -} - -{ my $b = mpz(3); - tie my $a, 'Mytie', $b; - combit ($a, 0); - ok ($a == 2); - ok ($b == 3); - ok (tied($a)); -} -{ my $b = 3; - tie my $a, 'Mytie', $b; - combit ($a, 0); - ok ($a == 2); - ok ($b == 3); - ok (tied($a)); -} - -#------------------------------------------------------------------------------ -# GMP::Mpz::congruent_p - -ok ( congruent_p (21, 0, 7)); -ok (! congruent_p (21, 1, 7)); -ok ( congruent_p (21, 5, 8)); -ok (! congruent_p (21, 6, 8)); - - -#------------------------------------------------------------------------------ -# GMP::Mpz::congruent_2exp_p - -ok ( congruent_2exp_p (20, 0, 2)); -ok (! congruent_2exp_p (21, 0, 2)); -ok (! congruent_2exp_p (20, 1, 2)); - -#------------------------------------------------------------------------------ -# GMP::Mpz::divexact - -ok (divexact(27,3) == 9); -ok (divexact(27,-3) == -9); -ok (divexact(-27,3) == -9); -ok (divexact(-27,-3) == 9); - -#------------------------------------------------------------------------------ -# GMP::Mpz::divisible_p - -ok ( divisible_p (21, 7)); -ok (! divisible_p (21, 8)); - -#------------------------------------------------------------------------------ -# GMP::Mpz::divisible_2exp_p - -ok ( divisible_2exp_p (20, 2)); -ok (! divisible_2exp_p (21, 2)); - -#------------------------------------------------------------------------------ -# GMP::Mpz::even_p - -ok (! even_p(mpz(-3))); -ok ( even_p(mpz(-2))); -ok (! even_p(mpz(-1))); -ok ( even_p(mpz(0))); -ok (! even_p(mpz(1))); -ok ( even_p(mpz(2))); -ok (! even_p(mpz(3))); - -#------------------------------------------------------------------------------ -# GMP::Mpz::export - -{ my $s = mpz_export (1, 2, 1, 0, "0x61626364"); - ok ($s eq 'abcd'); } -{ my $s = mpz_export (-1, 2, 1, 0, "0x61626364"); - ok ($s eq 'cdab'); } -{ my $s = mpz_export (1, 2, -1, 0, "0x61626364"); - ok ($s eq 'badc'); } -{ my $s = mpz_export (-1, 2, -1, 0, "0x61626364"); - ok ($s eq 'dcba'); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::fac - -ok (fac(0) == 1); -ok (fac(1) == 1); -ok (fac(2) == 2); -ok (fac(3) == 6); -ok (fac(4) == 24); -ok (fac(5) == 120); - -#------------------------------------------------------------------------------ -# GMP::Mpz::fdiv - -{ my ($q, $r); - ($q, $r) = fdiv (16, 3); - ok ($q == 5); - ok ($r == 1); - ($q, $r) = fdiv (16, -3); - ok ($q == -6); - ok ($r == -2); - ($q, $r) = fdiv (-16, 3); - ok ($q == -6); - ok ($r == 2); - ($q, $r) = fdiv (-16, -3); - ok ($q == 5); - ok ($r == -1); -} - -#------------------------------------------------------------------------------ -# GMP::Mpz::fdiv_2exp - -{ my ($q, $r); - ($q, $r) = fdiv_2exp (23, 2); - ok ($q == 5); - ok ($r == 3); - ($q, $r) = fdiv_2exp (-23, 2); - ok ($q == -6); - ok ($r == 1); -} - -#------------------------------------------------------------------------------ -# GMP::Mpz::fib - -ok (fib(0) == 0); -ok (fib(1) == 1); -ok (fib(2) == 1); -ok (fib(3) == 2); -ok (fib(4) == 3); -ok (fib(5) == 5); -ok (fib(6) == 8); - -#------------------------------------------------------------------------------ -# GMP::Mpz::fib2 - -{ my ($a, $b) = fib2(0); ok($a==0); ok($b==1); } -{ my ($a, $b) = fib2(1); ok($a==1); ok($b==0); } -{ my ($a, $b) = fib2(2); ok($a==1); ok($b==1); } -{ my ($a, $b) = fib2(3); ok($a==2); ok($b==1); } -{ my ($a, $b) = fib2(4); ok($a==3); ok($b==2); } -{ my ($a, $b) = fib2(5); ok($a==5); ok($b==3); } -{ my ($a, $b) = fib2(6); ok($a==8); ok($b==5); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::gcd - -ok (gcd (21) == 21); -ok (gcd (21,15) == 3); -ok (gcd (21,15,30,57) == 3); -ok (gcd (21,-15) == 3); -ok (gcd (-21,15) == 3); -ok (gcd (-21,-15) == 3); - -#------------------------------------------------------------------------------ -# GMP::Mpz::gcdext - -{ - my ($g, $x, $y) = gcdext (3,5); - ok ($g == 1); - ok ($x == 2); - ok ($y == -1); -} - -#------------------------------------------------------------------------------ -# GMP::Mpz::hamdist - -ok (hamdist(5,7) == 1); - -#------------------------------------------------------------------------------ -# GMP::Mpz::import - -{ my $z = mpz_import (1, 2, 1, 0, 'abcd'); - ok ($z == 0x61626364); } -{ my $z = mpz_import (-1, 2, 1, 0, 'abcd'); - ok ($z == 0x63646162); } -{ my $z = mpz_import (1, 2, -1, 0, 'abcd'); - ok ($z == 0x62616463); } -{ my $z = mpz_import (-1, 2, -1, 0, 'abcd'); - ok ($z == 0x64636261); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::invert - -ok (invert(1,123) == 1); -ok (invert(6,7) == 6); -ok (! defined invert(2,8)); - -#------------------------------------------------------------------------------ -# GMP::Mpz::jacobi, GMP::Mpz::kronecker - -foreach my $i ([ 1, 19, 1 ], - [ 4, 19, 1 ], - [ 5, 19, 1 ], - [ 6, 19, 1 ], - [ 7, 19, 1 ], - [ 9, 19, 1 ], - [ 11, 19, 1 ], - [ 16, 19, 1 ], - [ 17, 19, 1 ], - [ 2, 19, -1 ], - [ 3, 19, -1 ], - [ 8, 19, -1 ], - [ 10, 19, -1 ], - [ 12, 19, -1 ], - [ 13, 19, -1 ], - [ 14, 19, -1 ], - [ 15, 19, -1 ], - [ 18, 19, -1 ]) { - foreach my $fun (\&jacobi, \&kronecker) { - ok (&$fun ($$i[0], $$i[1]) == $$i[2]); - - ok (&$fun ($$i[0], str($$i[1])) == $$i[2]); - ok (&$fun (str($$i[0]), $$i[1]) == $$i[2]); - ok (&$fun (str($$i[0]), str($$i[1])) == $$i[2]); - - ok (&$fun ($$i[0], mpz($$i[1])) == $$i[2]); - ok (&$fun (mpz($$i[0]), $$i[1]) == $$i[2]); - ok (&$fun (mpz($$i[0]), mpz($$i[1])) == $$i[2]); - } -} - -#------------------------------------------------------------------------------ -# GMP::Mpz::lcm - -ok (lcm (2) == 2); -ok (lcm (0) == 0); -ok (lcm (0,0) == 0); -ok (lcm (0,0,0) == 0); -ok (lcm (0,0,0,0) == 0); -ok (lcm (2,0) == 0); -ok (lcm (-2,0) == 0); -ok (lcm (2,3) == 6); -ok (lcm (2,3,4) == 12); -ok (lcm (2,-3) == 6); -ok (lcm (-2,3) == 6); -ok (lcm (-2,-3) == 6); -ok (lcm (mpz(2)**512,1) == mpz(2)**512); -ok (lcm (mpz(2)**512,-1) == mpz(2)**512); -ok (lcm (-mpz(2)**512,1) == mpz(2)**512); -ok (lcm (-mpz(2)**512,-1) == mpz(2)**512); -ok (lcm (mpz(2)**512,mpz(2)**512) == mpz(2)**512); -ok (lcm (mpz(2)**512,-mpz(2)**512) == mpz(2)**512); -ok (lcm (-mpz(2)**512,mpz(2)**512) == mpz(2)**512); -ok (lcm (-mpz(2)**512,-mpz(2)**512) == mpz(2)**512); - -#------------------------------------------------------------------------------ -# GMP::Mpz::lucnum - -ok (lucnum(0) == 2); -ok (lucnum(1) == 1); -ok (lucnum(2) == 3); -ok (lucnum(3) == 4); -ok (lucnum(4) == 7); -ok (lucnum(5) == 11); -ok (lucnum(6) == 18); - -#------------------------------------------------------------------------------ -# GMP::Mpz::lucnum2 - -{ my ($a, $b) = lucnum2(0); ok($a==2); ok($b==-1); } -{ my ($a, $b) = lucnum2(1); ok($a==1); ok($b==2); } -{ my ($a, $b) = lucnum2(2); ok($a==3); ok($b==1); } -{ my ($a, $b) = lucnum2(3); ok($a==4); ok($b==3); } -{ my ($a, $b) = lucnum2(4); ok($a==7); ok($b==4); } -{ my ($a, $b) = lucnum2(5); ok($a==11); ok($b==7); } -{ my ($a, $b) = lucnum2(6); ok($a==18); ok($b==11); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::nextprime - -ok (nextprime(2) == 3); -ok (nextprime(3) == 5); -ok (nextprime(5) == 7); -ok (nextprime(7) == 11); -ok (nextprime(11) == 13); - -#------------------------------------------------------------------------------ -# GMP::Mpz::perfect_power_p - -# ok ( perfect_power_p(mpz(-27))); -# ok (! perfect_power_p(mpz(-9))); -# ok (! perfect_power_p(mpz(-1))); -ok ( perfect_power_p(mpz(0))); -ok ( perfect_power_p(mpz(1))); -ok (! perfect_power_p(mpz(2))); -ok (! perfect_power_p(mpz(3))); -ok ( perfect_power_p(mpz(4))); -ok ( perfect_power_p(mpz(9))); -ok ( perfect_power_p(mpz(27))); -ok ( perfect_power_p(mpz(81))); - -#------------------------------------------------------------------------------ -# GMP::Mpz::perfect_square_p - -ok (! perfect_square_p(mpz(-9))); -ok (! perfect_square_p(mpz(-1))); -ok ( perfect_square_p(mpz(0))); -ok ( perfect_square_p(mpz(1))); -ok (! perfect_square_p(mpz(2))); -ok (! perfect_square_p(mpz(3))); -ok ( perfect_square_p(mpz(4))); -ok ( perfect_square_p(mpz(9))); -ok (! perfect_square_p(mpz(27))); -ok ( perfect_square_p(mpz(81))); - -#------------------------------------------------------------------------------ -# GMP::Mpz::popcount - -ok (popcount(7) == 3); - -#------------------------------------------------------------------------------ -# GMP::Mpz::powm - -ok (powm (3,2,8) == 1); - -#------------------------------------------------------------------------------ -# GMP::Mpz::probab_prime_p - -ok ( probab_prime_p(89,1)); -ok (! probab_prime_p(81,1)); - -#------------------------------------------------------------------------------ -# GMP::Mpz::realloc - -{ my $z = mpz(123); - realloc ($z, 512); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::remove - -{ - my ($rem, $mult); - ($rem, $mult) = remove(12,3); - ok ($rem == 4); - ok ($mult == 1); - ($rem, $mult) = remove(12,2); - ok ($rem == 3); - ok ($mult == 2); -} - -#------------------------------------------------------------------------------ -# GMP::Mpz::root - -ok (root(0,2) == 0); -ok (root(8,3) == 2); -ok (root(-8,3) == -2); -ok (root(81,4) == 3); -ok (root(243,5) == 3); - -#------------------------------------------------------------------------------ -# GMP::Mpz::roote - -{ my ($r,$e); - ($r, $e) = roote(0,2); - ok ($r == 0); - ok ($e); - ($r, $e) = roote(81,4); - ok ($r == 3); - ok ($e); - ($r, $e) = roote(85,4); - ok ($r == 3); - ok (! $e); -} - -#------------------------------------------------------------------------------ -# GMP::Mpz::rootrem - -{ my ($root, $rem) = rootrem (mpz(0), 1); - ok ($root == 0); ok ($rem == 0); } -{ my ($root, $rem) = rootrem (mpz(0), 2); - ok ($root == 0); ok ($rem == 0); } -{ my ($root, $rem) = rootrem (mpz(64), 2); - ok ($root == 8); ok ($rem == 0); } -{ my ($root, $rem) = rootrem (mpz(64), 3); - ok ($root == 4); ok ($rem == 0); } -{ my ($root, $rem) = rootrem (mpz(65), 3); - ok ($root == 4); ok ($rem == 1); } - -#------------------------------------------------------------------------------ -# GMP::Mpz::scan0 - -ok (scan0 (0, 0) == 0); -ok (scan0 (1, 0) == 1); -ok (scan0 (3, 0) == 2); -ok (scan0 (-1, 0) == ~0); -ok (scan0 (-2, 1) == ~0); - -#------------------------------------------------------------------------------ -# GMP::Mpz::scan1 - -ok (scan1 (1, 0) == 0); -ok (scan1 (2, 0) == 1); -ok (scan1 (4, 0) == 2); -ok (scan1 (0, 0) == ~0); -ok (scan1 (3, 2) == ~0); - -#------------------------------------------------------------------------------ -# GMP::Mpz::setbit - -{ my $a = mpz(3); setbit ($a, 1); ok ($a == 3); } -{ my $a = mpz(3); setbit ($a, 2); ok ($a == 7); } - -{ my $a = 3; setbit ($a, 1); ok ($a == 3); } -{ my $a = 3; setbit ($a, 2); ok ($a == 7); } - -# mutate only given variable -{ my $a = mpz(0); - my $b = $a; - setbit ($a, 0); - ok ($a == 1); - ok ($b == 0); -} -{ my $a = 0; - my $b = $a; - setbit ($a, 0); - ok ($a == 1); - ok ($b == 0); -} - -{ tie my $a, 'Mytie', mpz(3); - setbit ($a, 2); - ok ($Mytie::fetched > 0); # used fetch - ok ($Mytie::stored > 0); # used store - ok ($a == 7); # expected result - ok (UNIVERSAL::isa($a,"GMP::Mpz")); - ok (tied($a)); # still tied -} -{ tie my $a, 'Mytie', 3; - setbit ($a, 2); - ok ($Mytie::fetched > 0); # used fetch - ok ($Mytie::stored > 0); # used store - ok ($a == 7); # expected result - ok (UNIVERSAL::isa($a,"GMP::Mpz")); - ok (tied($a)); # still tied -} - -{ my $b = mpz(2); - tie my $a, 'Mytie', $b; - setbit ($a, 0); - ok ($a == 3); - ok ($b == 2); - ok (tied($a)); -} -{ my $b = 2; - tie my $a, 'Mytie', $b; - setbit ($a, 0); - ok ($a == 3); - ok ($b == 2); - ok (tied($a)); -} - -#------------------------------------------------------------------------------ -# GMP::Mpz::sizeinbase - -ok (sizeinbase(1,10) == 1); -ok (sizeinbase(100,10) == 3); -ok (sizeinbase(9999,10) == 5); - -#------------------------------------------------------------------------------ -# GMP::Mpz::sqrtrem - -{ - my ($root, $rem) = sqrtrem(mpz(0)); - ok ($root == 0); - ok ($rem == 0); -} -{ - my ($root, $rem) = sqrtrem(mpz(1)); - ok ($root == 1); - ok ($rem == 0); -} -{ - my ($root, $rem) = sqrtrem(mpz(2)); - ok ($root == 1); - ok ($rem == 1); -} -{ - my ($root, $rem) = sqrtrem(mpz(9)); - ok ($root == 3); - ok ($rem == 0); -} -{ - my ($root, $rem) = sqrtrem(mpz(35)); - ok ($root == 5); - ok ($rem == 10); -} -{ - my ($root, $rem) = sqrtrem(mpz(0)); - ok ($root == 0); - ok ($rem == 0); -} - -#------------------------------------------------------------------------------ -# GMP::Mpz::tdiv - -{ my ($q, $r); - ($q, $r) = tdiv (16, 3); - ok ($q == 5); - ok ($r == 1); - ($q, $r) = tdiv (16, -3); - ok ($q == -5); - ok ($r == 1); - ($q, $r) = tdiv (-16, 3); - ok ($q == -5); - ok ($r == -1); - ($q, $r) = tdiv (-16, -3); - ok ($q == 5); - ok ($r == -1); -} - -#------------------------------------------------------------------------------ -# GMP::Mpz::tdiv_2exp - -{ my ($q, $r); - ($q, $r) = tdiv_2exp (23, 2); - ok ($q == 5); - ok ($r == 3); - ($q, $r) = tdiv_2exp (-23, 2); - ok ($q == -5); - ok ($r == -3); -} - -#------------------------------------------------------------------------------ -# GMP::Mpz::tstbit - -ok (tstbit (6, 0) == 0); -ok (tstbit (6, 1) == 1); -ok (tstbit (6, 2) == 1); -ok (tstbit (6, 3) == 0); - - - - -#------------------------------------------------------------------------------ -# GMP::Mpq - -#------------------------------------------------------------------------------ -# GMP::Mpq::new - -ok (mpq(0) == 0); -ok (mpq('0') == 0); -ok (mpq(substr('101',1,1)) == 0); -ok (mpq(0.0) == 0); -ok (mpq(mpz(0)) == 0); -ok (mpq(mpq(0)) == 0); -ok (mpq(mpf(0)) == 0); - -{ tie my $t, 'Mytie', 0; ok (mpq($t) == 0); } -{ tie my $t, 'Mytie', '0'; ok (mpq($t) == 0); } -{ tie my $t, 'Mytie', substr('101',1,1); ok (mpq($t) == 0); } -{ tie my $t, 'Mytie', 0.0; ok (mpq($t) == 0); } -{ tie my $t, 'Mytie', mpz(0); ok (mpq($t) == 0); } -{ tie my $t, 'Mytie', mpq(0); ok (mpq($t) == 0); } -{ tie my $t, 'Mytie', mpf(0); ok (mpq($t) == 0); } - -ok (mpq(-123) == -123); -ok (mpq('-123') == -123); -ok (mpq(substr('1-1231',1,4)) == -123); -ok (mpq(-123.0) == -123); -ok (mpq(mpz(-123)) == -123); -ok (mpq(mpq(-123)) == -123); -ok (mpq(mpf(-123)) == -123); - -{ tie my $t, 'Mytie', -123; ok (mpq($t) == -123); } -{ tie my $t, 'Mytie', '-123'; ok (mpq($t) == -123); } -{ tie my $t, 'Mytie', substr('1-1231',1,4); ok (mpq($t) == -123); } -{ tie my $t, 'Mytie', -123.0; ok (mpq($t) == -123); } -{ tie my $t, 'Mytie', mpz(-123); ok (mpq($t) == -123); } -{ tie my $t, 'Mytie', mpq(-123); ok (mpq($t) == -123); } -{ tie my $t, 'Mytie', mpf(-123); ok (mpq($t) == -123); } - -ok (mpq($ivnv_2p128) == $str_2p128); -{ tie my $t, 'Mytie', $ivnv_2p128; ok (mpq($t) == $str_2p128); } - -ok (mpq('3/2') == mpq(3,2)); -ok (mpq('3/1') == mpq(3,1)); -ok (mpq('-3/2') == mpq(-3,2)); -ok (mpq('-3/1') == mpq(-3,1)); -ok (mpq('0x3') == mpq(3,1)); -ok (mpq('0b111') == mpq(7,1)); -ok (mpq('0b0') == mpq(0,1)); - -ok (mpq($uv_max) > 0); -ok (mpq($uv_max) == mpq($uv_max_str)); -{ tie my $t, 'Mytie', $uv_max; ok (mpq($t) > 0); } -{ tie my $t, 'Mytie', $uv_max; ok (mpq($t) == mpq($uv_max_str)); } - -{ my $x = 123.5; - kill (0, $x); - ok (mpq($x) == 123.5); - tie my $t, 'Mytie', $x; - ok (mpq($t) == 123.5); -} - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_abs - -ok (abs(mpq(0)) == 0); -ok (abs(mpq(123)) == 123); -ok (abs(mpq(-123)) == 123); - -{ my $x = mpq(-123); $x = abs($x); ok ($x == 123); } -{ my $x = mpq(0); $x = abs($x); ok ($x == 0); } -{ my $x = mpq(123); $x = abs($x); ok ($x == 123); } - -{ tie my $t, 'Mytie', mpq(0); ok (abs($t) == 0); } -{ tie my $t, 'Mytie', mpq(123); ok (abs($t) == 123); } -{ tie my $t, 'Mytie', mpq(-123); ok (abs($t) == 123); } - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_add - -ok (mpq(0) + 1 == 1); -ok (mpq(-1) + 1 == 0); -ok (1 + mpq(0) == 1); -ok (1 + mpq(-1) == 0); - -ok (mpq(1,2)+mpq(1,3) == mpq(5,6)); -ok (mpq(1,2)+mpq(-1,3) == mpq(1,6)); -ok (mpq(-1,2)+mpq(1,3) == mpq(-1,6)); -ok (mpq(-1,2)+mpq(-1,3) == mpq(-5,6)); - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_addeq - -{ my $a = mpq(7); $a += 1; ok ($a == 8); } -{ my $a = mpq(7); my $b = $a; $a += 1; ok ($a == 8); ok ($b == 7); } - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_bool - -if (mpq(0)) { ok (0); } else { ok (1); } -if (mpq(123)) { ok (1); } else { ok (0); } - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_dec - -{ my $a = mpq(0); ok ($a-- == 0); ok ($a == -1); } -{ my $a = mpq(0); ok (--$a == -1); } - -{ my $a = mpq(0); my $b = $a; $a--; ok ($a == -1); ok ($b == 0); } - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_div - -ok (mpq(6) / 2 == 3); -ok (mpq(-6) / 2 == -3); -ok (mpq(6) / -2 == -3); -ok (mpq(-6) / -2 == 3); - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_diveq - -{ my $a = mpq(21); $a /= 3; ok ($a == 7); } -{ my $a = mpq(21); my $b = $a; $a /= 3; ok ($a == 7); ok ($b == 21); } - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_eq - -{ my $a = mpq(0); - my $b = $a; - $a = mpq(1); - ok ($a == 1); - ok ($b == 0); } - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_inc - -{ my $a = mpq(0); ok ($a++ == 0); ok ($a == 1); } -{ my $a = mpq(0); ok (++$a == 1); } - -{ my $a = mpq(0); my $b = $a; $a++; ok ($a == 1); ok ($b == 0); } - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_lshift - -{ my $a = mpq(7) << 1; ok ($a == 14); } - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_lshifteq - -{ my $a = mpq(7); $a <<= 1; ok ($a == 14); } -{ my $a = mpq(7); my $b = $a; $a <<= 1; ok ($a == 14); ok ($b == 7); } - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_mul - -ok (mpq(2) * 3 == 6); - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_muleq - -{ my $a = mpq(7); $a *= 3; ok ($a == 21); } -{ my $a = mpq(7); my $b = $a; $a *= 3; ok ($a == 21); ok ($b == 7); } - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_neg - -ok (- mpq(0) == 0); -ok (- mpq(123) == -123); -ok (- mpq(-123) == 123); - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_not - -if (not mpq(0)) { ok (1); } else { ok (0); } -if (not mpq(123)) { ok (0); } else { ok (1); } - -ok ((! mpq(0)) == 1); -ok ((! mpq(123)) == 0); - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_pow - -ok (mpq(0) ** 1 == 0); -ok (mpq(1) ** 1 == 1); -ok (mpq(2) ** 0 == 1); -ok (mpq(2) ** 1 == 2); -ok (mpq(2) ** 2 == 4); -ok (mpq(2) ** 3 == 8); -ok (mpq(2) ** 4 == 16); - -ok (mpq(0) ** mpq(1) == 0); -ok (mpq(1) ** mpq(1) == 1); -ok (mpq(2) ** mpq(0) == 1); -ok (mpq(2) ** mpq(1) == 2); -ok (mpq(2) ** mpq(2) == 4); -ok (mpq(2) ** mpq(3) == 8); -ok (mpq(2) ** mpq(4) == 16); - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_poweq - -{ my $a = mpq(3); $a **= 4; ok ($a == 81); } -{ my $a = mpq(3); my $b = $a; $a **= 4; ok ($a == 81); ok ($b == 3); } - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_rshift - -{ my $a = mpq(32) >> 1; ok ($a == 16); } - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_rshifteq - -{ my $a = mpq(32); $a >>= 1; ok ($a == 16); } -{ my $a = mpq(32); my $b = $a; $a >>= 1; ok ($a == 16); ok ($b == 32); } - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_spaceship - -ok (mpq(0) < 1); -ok (mpq(0) > -1); - -ok (mpq(0) != 1); -ok (mpq(0) != -1); -ok (mpq(1) != 0); -ok (mpq(1) != -1); -ok (mpq(-1) != 0); -ok (mpq(-1) != 1); - -ok (mpq(3,2) > 1); -ok (mpq(3,2) < 2); - -ok (mpq(0) < 1.0); -ok (mpq(0) < '1'); -ok (mpq(0) < substr('-1',1,1)); -ok (mpq(0) < mpz(1)); -ok (mpq(0) < mpq(1)); -ok (mpq(0) < mpf(1)); -ok (mpq(0) < $uv_max); - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_string - -{ my $x = mpq(0); ok("$x" eq "0"); } -{ my $x = mpq(123); ok("$x" eq "123"); } -{ my $x = mpq(-123); ok("$x" eq "-123"); } - -{ my $q = mpq(5,7); ok("$q" eq "5/7"); } -{ my $q = mpq(-5,7); ok("$q" eq "-5/7"); } - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_sub - -ok (mpq(0) - 1 == -1); -ok (mpq(1) - 1 == 0); -ok (1 - mpq(0) == 1); -ok (1 - mpq(1) == 0); - -ok (mpq(1,2)-mpq(1,3) == mpq(1,6)); -ok (mpq(1,2)-mpq(-1,3) == mpq(5,6)); -ok (mpq(-1,2)-mpq(1,3) == mpq(-5,6)); -ok (mpq(-1,2)-mpq(-1,3) == mpq(-1,6)); - -#------------------------------------------------------------------------------ -# GMP::Mpq::overload_subeq - -{ my $a = mpq(7); $a -= 1; ok ($a == 6); } -{ my $a = mpq(7); my $b = $a; $a -= 1; ok ($a == 6); ok ($b == 7); } - -#------------------------------------------------------------------------------ -# GMP::Mpq::canonicalize - -{ my $q = mpq(21,15); canonicalize($q); - ok (num($q) == 7); - ok (den($q) == 5); -} - -#------------------------------------------------------------------------------ -# GMP::Mpq::den - -{ my $q = mpq(5,9); ok (den($q) == 9); } - -#------------------------------------------------------------------------------ -# GMP::Mpq::num - -{ my $q = mpq(5,9); ok (num($q) == 5); } - - - - -#------------------------------------------------------------------------------ -# GMP::Mpf - -#------------------------------------------------------------------------------ -# GMP::Mpf::new - -ok (mpf(0) == 0); -ok (mpf('0') == 0); -ok (mpf(substr('101',1,1)) == 0); -ok (mpf(0.0) == 0); -ok (mpf(mpz(0)) == 0); -ok (mpf(mpq(0)) == 0); -ok (mpf(mpf(0)) == 0); - -{ tie my $t, 'Mytie', 0; ok (mpf($t) == 0); } -{ tie my $t, 'Mytie', '0'; ok (mpf($t) == 0); } -{ tie my $t, 'Mytie', substr('101',1,1); ok (mpf($t) == 0); } -{ tie my $t, 'Mytie', 0.0; ok (mpf($t) == 0); } -{ tie my $t, 'Mytie', mpz(0); ok (mpf($t) == 0); } -{ tie my $t, 'Mytie', mpq(0); ok (mpf($t) == 0); } -{ tie my $t, 'Mytie', mpf(0); ok (mpf($t) == 0); } - -ok (mpf(-123) == -123); -ok (mpf('-123') == -123); -ok (mpf(substr('1-1231',1,4)) == -123); -ok (mpf(-123.0) == -123); -ok (mpf(mpz(-123)) == -123); -ok (mpf(mpq(-123)) == -123); -ok (mpf(mpf(-123)) == -123); - -{ tie my $t, 'Mytie', -123; ok (mpf($t) == -123); } -{ tie my $t, 'Mytie', '-123'; ok (mpf($t) == -123); } -{ tie my $t, 'Mytie', substr('1-1231',1,4); ok (mpf($t) == -123); } -{ tie my $t, 'Mytie', -123.0; ok (mpf($t) == -123); } -{ tie my $t, 'Mytie', mpz(-123); ok (mpf($t) == -123); } -{ tie my $t, 'Mytie', mpq(-123); ok (mpf($t) == -123); } -{ tie my $t, 'Mytie', mpf(-123); ok (mpf($t) == -123); } - -ok (mpf($ivnv_2p128) == $str_2p128); -{ tie my $t, 'Mytie', $ivnv_2p128; ok (mpf($t) == $str_2p128); } - -ok (mpf(-1.5) == -1.5); -ok (mpf(-1.0) == -1.0); -ok (mpf(-0.5) == -0.5); -ok (mpf(0) == 0); -ok (mpf(0.5) == 0.5); -ok (mpf(1.0) == 1.0); -ok (mpf(1.5) == 1.5); - -ok (mpf("-1.5") == -1.5); -ok (mpf("-1.0") == -1.0); -ok (mpf("-0.5") == -0.5); -ok (mpf("0") == 0); -ok (mpf("0.5") == 0.5); -ok (mpf("1.0") == 1.0); -ok (mpf("1.5") == 1.5); - -ok (mpf($uv_max) > 0); -ok (mpf($uv_max) == mpf($uv_max_str)); -{ tie my $t, 'Mytie', $uv_max; ok (mpf($t) > 0); } -{ tie my $t, 'Mytie', $uv_max; ok (mpf($t) == mpf($uv_max_str)); } - -{ my $x = 123.5; - kill (0, $x); - ok (mpf($x) == 123.5); - tie my $t, 'Mytie', $x; - ok (mpf($t) == 123.5); -} - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_abs - -ok (abs(mpf(0)) == 0); -ok (abs(mpf(123)) == 123); -ok (abs(mpf(-123)) == 123); - -{ my $x = mpf(-123); $x = abs($x); ok ($x == 123); } -{ my $x = mpf(0); $x = abs($x); ok ($x == 0); } -{ my $x = mpf(123); $x = abs($x); ok ($x == 123); } - -{ tie my $t, 'Mytie', mpf(0); ok (abs($t) == 0); } -{ tie my $t, 'Mytie', mpf(123); ok (abs($t) == 123); } -{ tie my $t, 'Mytie', mpf(-123); ok (abs($t) == 123); } - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_add - -ok (mpf(0) + 1 == 1); -ok (mpf(-1) + 1 == 0); -ok (1 + mpf(0) == 1); -ok (1 + mpf(-1) == 0); - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_addeq - -{ my $a = mpf(7); $a += 1; ok ($a == 8); } -{ my $a = mpf(7); my $b = $a; $a += 1; ok ($a == 8); ok ($b == 7); } - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_bool - -if (mpf(0)) { ok (0); } else { ok (1); } -if (mpf(123)) { ok (1); } else { ok (0); } - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_dec - -{ my $a = mpf(0); ok ($a-- == 0); ok ($a == -1); } -{ my $a = mpf(0); ok (--$a == -1); } - -{ my $a = mpf(0); my $b = $a; $a--; ok ($a == -1); ok ($b == 0); } - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_div - -ok (mpf(6) / 2 == 3); -ok (mpf(-6) / 2 == -3); -ok (mpf(6) / -2 == -3); -ok (mpf(-6) / -2 == 3); - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_diveq - -{ my $a = mpf(21); $a /= 3; ok ($a == 7); } -{ my $a = mpf(21); my $b = $a; $a /= 3; ok ($a == 7); ok ($b == 21); } - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_eq - -{ my $a = mpf(0); - my $b = $a; - $a = mpf(1); - ok ($a == 1); - ok ($b == 0); } - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_inc - -{ my $a = mpf(0); ok ($a++ == 0); ok ($a == 1); } -{ my $a = mpf(0); ok (++$a == 1); } - -{ my $a = mpf(0); my $b = $a; $a++; ok ($a == 1); ok ($b == 0); } - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_lshift - -{ my $a = mpf(7) << 1; ok ($a == 14); } - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_lshifteq - -{ my $a = mpf(7); $a <<= 1; ok ($a == 14); } -{ my $a = mpf(7); my $b = $a; $a <<= 1; ok ($a == 14); ok ($b == 7); } - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_mul - -ok (mpf(2) * 3 == 6); - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_muleq - -{ my $a = mpf(7); $a *= 3; ok ($a == 21); } -{ my $a = mpf(7); my $b = $a; $a *= 3; ok ($a == 21); ok ($b == 7); } - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_neg - -ok (- mpf(0) == 0); -ok (- mpf(123) == -123); -ok (- mpf(-123) == 123); - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_not - -if (not mpf(0)) { ok (1); } else { ok (0); } -if (not mpf(123)) { ok (0); } else { ok (1); } - -ok ((! mpf(0)) == 1); -ok ((! mpf(123)) == 0); - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_pow - -ok (mpf(0) ** 1 == 0); -ok (mpf(1) ** 1 == 1); -ok (mpf(2) ** 0 == 1); -ok (mpf(2) ** 1 == 2); -ok (mpf(2) ** 2 == 4); -ok (mpf(2) ** 3 == 8); -ok (mpf(2) ** 4 == 16); - -ok (mpf(0) ** mpf(1) == 0); -ok (mpf(1) ** mpf(1) == 1); -ok (mpf(2) ** mpf(0) == 1); -ok (mpf(2) ** mpf(1) == 2); -ok (mpf(2) ** mpf(2) == 4); -ok (mpf(2) ** mpf(3) == 8); -ok (mpf(2) ** mpf(4) == 16); - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_poweq - -{ my $a = mpf(3); $a **= 4; ok ($a == 81); } -{ my $a = mpf(3); my $b = $a; $a **= 4; ok ($a == 81); ok ($b == 3); } - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_rshift - -{ my $a = mpf(32) >> 1; ok ($a == 16); } - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_rshifteq - -{ my $a = mpf(32); $a >>= 1; ok ($a == 16); } -{ my $a = mpf(32); my $b = $a; $a >>= 1; ok ($a == 16); ok ($b == 32); } - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_sqrt - -ok (sqrt(mpf(0)) == 0); -ok (sqrt(mpf(1)) == 1); -ok (sqrt(mpf(4)) == 2); -ok (sqrt(mpf(81)) == 9); - -ok (sqrt(mpf(0.25)) == 0.5); - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_spaceship - -ok (mpf(0) < 1); -ok (mpf(0) > -1); - -ok (mpf(0) != 1); -ok (mpf(0) != -1); -ok (mpf(1) != 0); -ok (mpf(1) != -1); -ok (mpf(-1) != 0); -ok (mpf(-1) != 1); - -ok (mpf(0) < 1.0); -ok (mpf(0) < '1'); -ok (mpf(0) < substr('-1',1,1)); -ok (mpf(0) < mpz(1)); -ok (mpf(0) < mpq(1)); -ok (mpf(0) < mpf(1)); -ok (mpf(0) < $uv_max); - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_string - -{ my $x = mpf(0); ok ("$x" eq "0"); } -{ my $x = mpf(123); ok ("$x" eq "123"); } -{ my $x = mpf(-123); ok ("$x" eq "-123"); } - -{ my $f = mpf(0.25); ok ("$f" eq "0.25"); } -{ my $f = mpf(-0.25); ok ("$f" eq "-0.25"); } -{ my $f = mpf(1.25); ok ("$f" eq "1.25"); } -{ my $f = mpf(-1.25); ok ("$f" eq "-1.25"); } -{ my $f = mpf(1000000); ok ("$f" eq "1000000"); } -{ my $f = mpf(-1000000); ok ("$f" eq "-1000000"); } - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_sub - -ok (mpf(0) - 1 == -1); -ok (mpf(1) - 1 == 0); -ok (1 - mpf(0) == 1); -ok (1 - mpf(1) == 0); - -#------------------------------------------------------------------------------ -# GMP::Mpf::overload_subeq - -{ my $a = mpf(7); $a -= 1; ok ($a == 6); } -{ my $a = mpf(7); my $b = $a; $a -= 1; ok ($a == 6); ok ($b == 7); } - - -#------------------------------------------------------------------------------ -# GMP::Mpf::ceil - -ok (ceil (mpf(-7.5)) == -7.0); -ok (ceil (mpf(7.5)) == 8.0); - -#------------------------------------------------------------------------------ -# GMP::Mpf::floor - -ok (floor(mpf(-7.5)) == -8.0); -ok (floor(mpf(7.5)) == 7.0); - -#------------------------------------------------------------------------------ -# GMP::Mpf::mpf_eq - -{ my $old_prec = get_default_prec(); - set_default_prec(128); - - ok ( mpf_eq (mpz("0x10000000000000001"), mpz("0x10000000000000002"), 1)); - ok (! mpf_eq (mpz("0x11"), mpz("0x12"), 128)); - - set_default_prec($old_prec); -} - -#------------------------------------------------------------------------------ -# GMP::Mpf::get_default_prec - -get_default_prec(); - -#------------------------------------------------------------------------------ -# GMP::Mpf::get_prec - -{ my $x = mpf(1.0, 512); - ok (get_prec ($x) == 512); -} - -#------------------------------------------------------------------------------ -# GMP::Mpf::reldiff - -ok (reldiff (2,4) == 1); -ok (reldiff (4,2) == 0.5); - -#------------------------------------------------------------------------------ -# GMP::Mpf::set_default_prec - -{ my $old_prec = get_default_prec(); - - set_default_prec(512); - ok (get_default_prec () == 512); - - set_default_prec($old_prec); -} - -#------------------------------------------------------------------------------ -# GMP::Mpf::set_prec - -{ my $x = mpf(1.0, 512); - my $y = $x; - set_prec ($x, 1024); - ok (get_prec ($x) == 1024); - ok (get_prec ($y) == 512); -} - -#------------------------------------------------------------------------------ -# GMP::Mpf::trunc - -ok (trunc(mpf(-7.5)) == -7.0); -ok (trunc(mpf(7.5)) == 7.0); - - - -#------------------------------------------------------------------------------ -# GMP::Rand - -#------------------------------------------------------------------------------ -# GMP::Rand::new - -{ my $r = randstate(); ok (defined $r); } -{ my $r = randstate('lc_2exp', 1, 2, 3); ok (defined $r); } -{ my $r = randstate('lc_2exp_size', 64); ok (defined $r); } -{ my $r = randstate('lc_2exp_size', 999999999); ok (! defined $r); } -{ my $r = randstate('mt'); ok (defined $r); } - -{ # copying a randstate results in same sequence - my $r1 = randstate('lc_2exp_size', 64); - $r1->seed(123); - my $r2 = randstate($r1); - for (1 .. 20) { - my $z1 = mpz_urandomb($r1, 20); - my $z2 = mpz_urandomb($r2, 20); - ok ($z1 == $z2); - } -} - -#------------------------------------------------------------------------------ -# GMP::Rand::seed - -{ my $r = randstate(); - $r->seed(123); - $r->seed(time()); -} - -#------------------------------------------------------------------------------ -# GMP::Rand::mpf_urandomb - -{ my $r = randstate(); - my $f = mpf_urandomb($r,1024); - ok (UNIVERSAL::isa($f,"GMP::Mpf")); } - -#------------------------------------------------------------------------------ -# GMP::Rand::mpz_urandomb - -{ my $r = randstate(); - my $z = mpz_urandomb($r, 1024); - ok (UNIVERSAL::isa($z,"GMP::Mpz")); } - -#------------------------------------------------------------------------------ -# GMP::Rand::mpz_rrandomb - -{ my $r = randstate(); - my $z = mpz_rrandomb($r, 1024); - ok (UNIVERSAL::isa($z,"GMP::Mpz")); } - -#------------------------------------------------------------------------------ -# GMP::Rand::mpz_urandomm - -{ my $r = randstate(); - my $z = mpz_urandomm($r, mpz(3)**100); - ok (UNIVERSAL::isa($z,"GMP::Mpz")); } - -#------------------------------------------------------------------------------ -# GMP::Rand::mpz_urandomb_ui - -{ my $r = randstate(); - foreach (1 .. 20) { - my $u = gmp_urandomb_ui($r,8); - ok ($u >= 0); - ok ($u < 256); - } -} - -#------------------------------------------------------------------------------ -# GMP::Rand::mpz_urandomm_ui - -{ my $r = randstate(); - foreach (1 .. 20) { - my $u = gmp_urandomm_ui($r,8); - ok ($u >= 0); - ok ($u < 8); - } -} - - - - -#------------------------------------------------------------------------------ -# GMP module - -#------------------------------------------------------------------------------ -# GMP::fits_slong_p - -ok (GMP::fits_slong_p(0)); - -# in perl 5.005 uv_max is only 32-bits on a 64-bit system, so won't exceed a -# long -# ok (! GMP::fits_slong_p($uv_max)); - -ok (GMP::fits_slong_p(0.0)); - -ok (GMP::fits_slong_p('0')); - -ok (GMP::fits_slong_p(substr('999999999999999999999999999999',1,1))); - -ok (! mpz("-9999999999999999999999999999999999999999999")->fits_slong_p()); -ok ( mpz(-123)->fits_slong_p()); -ok ( mpz(0)->fits_slong_p()); -ok ( mpz(123)->fits_slong_p()); -ok (! mpz("9999999999999999999999999999999999999999999")->fits_slong_p()); - -ok (! mpq("-9999999999999999999999999999999999999999999")->fits_slong_p()); -ok ( mpq(-123)->fits_slong_p()); -ok ( mpq(0)->fits_slong_p()); -ok ( mpq(123)->fits_slong_p()); -ok (! mpq("9999999999999999999999999999999999999999999")->fits_slong_p()); - -ok (! mpf("-9999999999999999999999999999999999999999999")->fits_slong_p()); -ok ( mpf(-123)->fits_slong_p()); -ok ( mpf(0)->fits_slong_p()); -ok ( mpf(123)->fits_slong_p()); -ok (! mpf("9999999999999999999999999999999999999999999")->fits_slong_p()); - -#------------------------------------------------------------------------------ -# GMP::get_d - -ok (GMP::get_d(123) == 123.0); - -ok (GMP::get_d($uv_max) > 0); - -ok (GMP::get_d(123.0) == 123.0); - -ok (GMP::get_d('123') == 123.0); - -ok (GMP::get_d(mpz(123)) == 123.0); - -ok (GMP::get_d(mpq(123)) == 123.0); - -ok (GMP::get_d(mpf(123)) == 123.0); - -#------------------------------------------------------------------------------ -# GMP::get_d_2exp - -{ my ($dbl, $exp) = get_d_2exp (0); - ok ($dbl == 0); ok ($exp == 0); } -{ my ($dbl, $exp) = get_d_2exp (1); - ok ($dbl == 0.5); ok ($exp == 1); } - -{ my ($dbl, $exp) = get_d_2exp ($uv_max); - ok ($dbl > 0.0); ok ($exp > 0); } - -{ my ($dbl, $exp) = get_d_2exp (0.5); - ok ($dbl == 0.5); ok ($exp == 0); } -{ my ($dbl, $exp) = get_d_2exp (0.25); - ok ($dbl == 0.5); ok ($exp == -1); } - -{ my ($dbl, $exp) = get_d_2exp ("1.0"); - ok ($dbl == 0.5); ok ($exp == 1); } - -{ my ($dbl, $exp) = get_d_2exp (mpz ("256")); - ok ($dbl == 0.5); ok ($exp == 9); } - -{ my ($dbl, $exp) = get_d_2exp (mpq ("1/16")); - ok ($dbl == 0.5); ok ($exp == -3); } - -{ my ($dbl, $exp) = get_d_2exp (mpf ("1.5")); - ok ($dbl == 0.75); ok ($exp == 1); } -{ my ($dbl, $exp) = get_d_2exp (mpf ("3.0")); - ok ($dbl == 0.75); ok ($exp == 2); } - -#------------------------------------------------------------------------------ -# GMP::get_str - -ok (get_str(-123) eq '-123'); -ok (get_str('-123') eq '-123'); -ok (get_str(substr('x-123x',1,4)) eq '-123'); -ok (get_str(mpz(-123)) eq '-123'); -ok (get_str(mpq(-123)) eq '-123'); - -ok (get_str(-123,10) eq '-123'); -ok (get_str('-123',10) eq '-123'); -ok (get_str(substr('x-123x',1,4),10) eq '-123'); -ok (get_str(mpz(-123),10) eq '-123'); -ok (get_str(mpq(-123),10) eq '-123'); - -ok (get_str(-123,16) eq '-7b'); -ok (get_str('-123',16) eq '-7b'); -ok (get_str(substr('x-123x',1,4),16) eq '-7b'); -ok (get_str(mpz(-123),16) eq '-7b'); -ok (get_str(mpq(-123),16) eq '-7b'); - -ok (get_str(-123,-16) eq '-7B'); -ok (get_str('-123',-16) eq '-7B'); -ok (get_str(substr('x-123x',1,4),-16) eq '-7B'); -ok (get_str(mpz(-123),-16) eq '-7B'); -ok (get_str(mpq(-123),-16) eq '-7B'); - -# is a float in past versions of perl without UV type -{ my ($str, $exp) = get_str($uv_max); - ok ($str eq $uv_max_str); } - -ok (get_str(mpq(5/8)) eq "5/8"); -ok (get_str(mpq(-5/8)) eq "-5/8"); -ok (get_str(mpq(255/256),16) eq "ff/100"); -ok (get_str(mpq(255/256),-16) eq "FF/100"); -ok (get_str(mpq(-255/256),16) eq "-ff/100"); -ok (get_str(mpq(-255/256),-16) eq "-FF/100"); - -{ my ($s,$e) = get_str(1.5, 10); ok ($s eq '15'); ok ($e == 1); } -{ my ($s,$e) = get_str(mpf(1.5), 10); ok ($s eq '15'); ok ($e == 1); } - -{ my ($s,$e) = get_str(-1.5, 10); ok ($s eq '-15'); ok ($e == 1); } -{ my ($s,$e) = get_str(mpf(-1.5), 10); ok ($s eq '-15'); ok ($e == 1); } - -{ my ($s,$e) = get_str(1.5, 16); ok ($s eq '18'); ok ($e == 1); } -{ my ($s,$e) = get_str(mpf(1.5), 16); ok ($s eq '18'); ok ($e == 1); } - -{ my ($s,$e) = get_str(-1.5, 16); ok ($s eq '-18'); ok ($e == 1); } -{ my ($s,$e) = get_str(mpf(-1.5), 16); ok ($s eq '-18'); ok ($e == 1); } - -{ my ($s,$e) = get_str(65536.0, 16); ok ($s eq '1'); ok ($e == 5); } -{ my ($s,$e) = get_str(mpf(65536.0), 16); ok ($s eq '1'); ok ($e == 5); } - -{ my ($s,$e) = get_str(1.625, 16); ok ($s eq '1a'); ok ($e == 1); } -{ my ($s,$e) = get_str(mpf(1.625), 16); ok ($s eq '1a'); ok ($e == 1); } - -{ my ($s,$e) = get_str(1.625, -16); ok ($s eq '1A'); ok ($e == 1); } -{ my ($s,$e) = get_str(mpf(1.625), -16); ok ($s eq '1A'); ok ($e == 1); } - -{ my ($s, $e) = get_str(255.0,16,0); ok ($s eq "ff"); ok ($e == 2); } -{ my ($s, $e) = get_str(mpf(255.0),16,0); ok ($s eq "ff"); ok ($e == 2); } - -{ my ($s, $e) = get_str(255.0,-16,0); ok ($s eq "FF"); ok ($e == 2); } -{ my ($s, $e) = get_str(mpf(255.0),-16,0); ok ($s eq "FF"); ok ($e == 2); } - -#------------------------------------------------------------------------------ -# GMP::get_si - -ok (GMP::get_si(123) == 123.0); - -# better not assume anything about the relatives sizes of long and UV -ok (GMP::get_si($uv_max) != 0); - -ok (GMP::get_si(123.0) == 123.0); - -ok (GMP::get_si('123') == 123.0); - -ok (GMP::get_si(mpz(123)) == 123.0); - -ok (GMP::get_si(mpq(123)) == 123.0); - -ok (GMP::get_si(mpf(123)) == 123.0); - -#------------------------------------------------------------------------------ -# GMP::integer_p - -ok ( GMP::integer_p (0)); -ok ( GMP::integer_p (123)); -ok ( GMP::integer_p (-123)); - -ok ( GMP::integer_p ($uv_max)); - -ok ( GMP::integer_p (0.0)); -ok ( GMP::integer_p (123.0)); -ok ( GMP::integer_p (-123.0)); -ok (! GMP::integer_p (0.5)); -ok (! GMP::integer_p (123.5)); -ok (! GMP::integer_p (-123.5)); - -ok ( GMP::integer_p ('0')); -ok ( GMP::integer_p ('123')); -ok ( GMP::integer_p ('-123')); -ok (! GMP::integer_p ('0.5')); -ok (! GMP::integer_p ('123.5')); -ok (! GMP::integer_p ('-123.5')); -ok (! GMP::integer_p ('5/8')); - -ok ( GMP::integer_p (mpz(1))); - -ok ( GMP::integer_p (mpq(1))); -ok (! GMP::integer_p (mpq(1,2))); - -ok ( GMP::integer_p (mpf(1.0))); -ok (! GMP::integer_p (mpf(1.5))); - -#------------------------------------------------------------------------------ -# GMP::odd_p - -ok (! odd_p(0)); -ok ( odd_p(1)); -ok (! odd_p(2)); - -ok ( odd_p($uv_max)); - -ok ( odd_p(mpz(-3))); -ok (! odd_p(mpz(-2))); -ok ( odd_p(mpz(-1))); -ok (! odd_p(mpz(0))); -ok ( odd_p(mpz(1))); -ok (! odd_p(mpz(2))); -ok ( odd_p(mpz(3))); - -#------------------------------------------------------------------------------ -# GMP::printf - -GMP::printf ("hello world\n"); - -sub via_printf { - my $s; - open TEMP, ">test.tmp" or die; - GMP::printf TEMP @_; - close TEMP or die; - open TEMP, "<test.tmp" or die; - read (TEMP, $s, 1024); - close TEMP or die; - unlink 'test.tmp'; - return $s; -} - -ok (sprintf ("%d", mpz(123)) eq '123'); -ok (sprintf ("%d %d %d", 456, mpz(123), 789) eq '456 123 789'); -ok (sprintf ("%d", mpq(15,16)) eq '15/16'); -ok (sprintf ("%f", mpf(1.5)) eq '1.500000'); -ok (sprintf ("%.2f", mpf(1.5)) eq '1.50'); - -ok (sprintf ("%*d", 6, 123) eq ' 123'); -ok (sprintf ("%*d", 6, mpz(123)) eq ' 123'); -ok (sprintf ("%*d", 6, mpq(15,16)) eq ' 15/16'); - -ok (sprintf ("%x", 123) eq '7b'); -ok (sprintf ("%x", mpz(123)) eq '7b'); -ok (sprintf ("%X", 123) eq '7B'); -ok (sprintf ("%X", mpz(123)) eq '7B'); -ok (sprintf ("%#x", 123) eq '0x7b'); -ok (sprintf ("%#x", mpz(123)) eq '0x7b'); -ok (sprintf ("%#X", 123) eq '0X7B'); -ok (sprintf ("%#X", mpz(123)) eq '0X7B'); - -ok (sprintf ("%x", mpq(15,16)) eq 'f/10'); -ok (sprintf ("%X", mpq(15,16)) eq 'F/10'); -ok (sprintf ("%#x", mpq(15,16)) eq '0xf/0x10'); -ok (sprintf ("%#X", mpq(15,16)) eq '0XF/0X10'); - -ok (sprintf ("%*.*f", 10, 3, 1.25) eq ' 1.250'); -ok (sprintf ("%*.*f", 10, 3, mpf(1.5)) eq ' 1.500'); - -ok (via_printf ("%d", mpz(123)) eq '123'); -ok (via_printf ("%d %d %d", 456, mpz(123), 789) eq '456 123 789'); -ok (via_printf ("%d", mpq(15,16)) eq '15/16'); -ok (via_printf ("%f", mpf(1.5)) eq '1.500000'); -ok (via_printf ("%.2f", mpf(1.5)) eq '1.50'); - -ok (via_printf ("%*d", 6, 123) eq ' 123'); -ok (via_printf ("%*d", 6, mpz(123)) eq ' 123'); -ok (via_printf ("%*d", 6, mpq(15,16)) eq ' 15/16'); - -ok (via_printf ("%x", 123) eq '7b'); -ok (via_printf ("%x", mpz(123)) eq '7b'); -ok (via_printf ("%X", 123) eq '7B'); -ok (via_printf ("%X", mpz(123)) eq '7B'); -ok (via_printf ("%#x", 123) eq '0x7b'); -ok (via_printf ("%#x", mpz(123)) eq '0x7b'); -ok (via_printf ("%#X", 123) eq '0X7B'); -ok (via_printf ("%#X", mpz(123)) eq '0X7B'); - -ok (via_printf ("%x", mpq(15,16)) eq 'f/10'); -ok (via_printf ("%X", mpq(15,16)) eq 'F/10'); -ok (via_printf ("%#x", mpq(15,16)) eq '0xf/0x10'); -ok (via_printf ("%#X", mpq(15,16)) eq '0XF/0X10'); - -ok (via_printf ("%*.*f", 10, 3, 1.25) eq ' 1.250'); -ok (via_printf ("%*.*f", 10, 3, mpf(1.5)) eq ' 1.500'); - -#------------------------------------------------------------------------------ -# GMP::sgn - -ok (sgn(-123) == -1); -ok (sgn(0) == 0); -ok (sgn(123) == 1); - -ok (sgn($uv_max) == 1); - -ok (sgn(-123.0) == -1); -ok (sgn(0.0) == 0); -ok (sgn(123.0) == 1); - -ok (sgn('-123') == -1); -ok (sgn('0') == 0); -ok (sgn('123') == 1); -ok (sgn('-123.0') == -1); -ok (sgn('0.0') == 0); -ok (sgn('123.0') == 1); - -ok (sgn(substr('x-123x',1,4)) == -1); -ok (sgn(substr('x0x',1,1)) == 0); -ok (sgn(substr('x123x',1,3)) == 1); - -ok (mpz(-123)->sgn() == -1); -ok (mpz(0) ->sgn() == 0); -ok (mpz(123) ->sgn() == 1); - -ok (mpq(-123)->sgn() == -1); -ok (mpq(0) ->sgn() == 0); -ok (mpq(123) ->sgn() == 1); - -ok (mpf(-123)->sgn() == -1); -ok (mpf(0) ->sgn() == 0); -ok (mpf(123) ->sgn() == 1); - - - -#------------------------------------------------------------------------------ -# overloaded constants - -if ($] > 5.00503) { - if (! do 'test2.pl') { - die "Cannot run test2.pl\n"; - } -} - - - - -#------------------------------------------------------------------------------ -# $# stuff -# -# For some reason "local $#" doesn't leave $# back at its default undefined -# state when exiting the block. - -{ local $# = 'hi %.0f there'; - my $f = mpf(123); - ok ("$f" eq 'hi 123 there'); } - - - -# Local variables: -# perl-indent-level: 2 -# End: diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/perl/test2.pl b/src/plugins/e-acsl/contrib/libgmp/demos/perl/test2.pl deleted file mode 100644 index 31a1d6bdd95..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/perl/test2.pl +++ /dev/null @@ -1,75 +0,0 @@ -# GMP perl module tests (part 2) - -# Copyright 2001 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. - - -# The following uses of :constants seem to provoke segvs in perl 5.005_03, -# so they're kept separate file to be run only on suitable perl versions. - - -use GMP::Mpz qw(:constants); -{ - my $a = 123; - ok (UNIVERSAL::isa ($a, "GMP::Mpz")); -} -use GMP::Mpz qw(:noconstants); - -use GMP::Mpq qw(:constants); -{ - my $a = 123; - ok (UNIVERSAL::isa ($a, "GMP::Mpq")); -} -use GMP::Mpq qw(:noconstants); - -use GMP::Mpf qw(:constants); -{ - my $a = 123; - ok (UNIVERSAL::isa ($a, "GMP::Mpf")); -} -use GMP::Mpf qw(:noconstants); - - -# compiled constants unchanged by clrbit etc when re-executed -foreach (0, 1, 2) { - use GMP::Mpz qw(:constants); - my $a = 15; - my $b = 6; - use GMP::Mpz qw(:noconstants); - clrbit ($a, 0); - ok ($a == 14); - setbit ($b, 0); - ok ($b == 7); -} - -1; - - -# Local variables: -# perl-indent-level: 2 -# End: diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/perl/typemap b/src/plugins/e-acsl/contrib/libgmp/demos/perl/typemap deleted file mode 100644 index e863a9c5168..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/perl/typemap +++ /dev/null @@ -1,108 +0,0 @@ -# GMP module external subroutine type mappings. - -# Copyright 2001, 2003 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. - - -TYPEMAP -const_string T_PV -const_string_assume CONST_STRING_ASSUME -mpz MPZ -mpq MPQ -mpf MPF -mpz_assume MPZ_ASSUME -mpq_assume MPQ_ASSUME -mpf_assume MPF_ASSUME -mpz_coerce MPZ_COERCE -mpq_coerce MPQ_COERCE -mpf_coerce_st0 MPF_COERCE_ST0 -mpf_coerce_def MPF_COERCE_DEF -randstate RANDSTATE -ulong_coerce ULONG_COERCE -malloced_string MALLOCED_STRING -order_noswap ORDER_NOSWAP -dummy DUMMY -# perl 5.005 doesn't have UV in its standard typemap, so use this instead -gmp_UV GMP_UV - - -INPUT -MPZ - class_or_croak ($arg, mpz_class); $var = SvMPZ($arg); -MPQ - class_or_croak ($arg, mpq_class); $var = SvMPQ($arg); -MPF - class_or_croak ($arg, mpf_class); $var = SvMPF($arg); -MPZ_ASSUME - MPZ_ASSUME ($var, $arg) -MPQ_ASSUME - MPQ_ASSUME ($var, $arg) -MPF_ASSUME - MPF_ASSUME ($var, $arg) -MPZ_COERCE - $var = coerce_mpz (tmp_mpz_${(my $stnum=$arg)=~s/[^0-9]//g;\$stnum}, $arg) -MPQ_COERCE - $var = coerce_mpq (tmp_mpq_${(my $stnum=$arg)=~s/[^0-9]//g;\$stnum}, $arg) -MPF_COERCE_ST0 - /* precision follows ST(0) */ - assert (sv_derived_from (ST(0), mpf_class)); - $var = coerce_mpf (tmp_mpf_${(my $stnum=$arg)=~s/[^0-9]//g;\$stnum}, - $arg, mpf_get_prec (SvMPF(ST(0)))) -MPF_COERCE_DEF - /* default precision used */ - $var = coerce_mpf (tmp_mpf_${(my $stnum=$arg)=~s/[^0-9]//g;\$stnum}, - $arg, mpf_get_default_prec()) -RANDSTATE - class_or_croak ($arg, rand_class); $var = SvRANDSTATE($arg); -ULONG_COERCE - $var = coerce_ulong ($arg) -ORDER_NOSWAP - assert ($arg != &PL_sv_yes); -DUMMY - /* dummy $var */ -CONST_STRING_ASSUME - /* No need to check for SvPOKp and use SvPV, this mapping is - only used for overload_constant, which always gets literal - strings. */ - assert (SvPOK ($arg)); - $var = SvPVX ($arg); - - -OUTPUT -MPZ - sv_bless (sv_setref_pv ($arg, NULL, $var), mpz_class_hv); -MPQ - sv_bless (sv_setref_pv ($arg, NULL, $var), mpq_class_hv); -MPF - sv_bless (sv_setref_pv ($arg, NULL, $var), mpf_class_hv); -RANDSTATE - sv_setref_pv ($arg, rand_class, $var); -MALLOCED_STRING - sv_usepvn_mg ($arg, $var, strlen($var)); -GMP_UV - sv_setuv ($arg, (UV) ($var)); diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/pexpr-config-h.in b/src/plugins/e-acsl/contrib/libgmp/demos/pexpr-config-h.in deleted file mode 100644 index b3e7f5d46f0..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/pexpr-config-h.in +++ /dev/null @@ -1,45 +0,0 @@ -/* Templates for pexpr program configuration. -*- mode:c -*- - -Copyright 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program. If not, see https://www.gnu.org/licenses/. */ - - -/* Define if you have the <sys/resource.h> header file. */ -#define HAVE_SYS_RESOURCE_H @HAVE_SYS_RESOURCE_H_01@ - -/* Define if you have the `clock' function. */ -#define HAVE_CLOCK @HAVE_CLOCK_01@ - -/* Define if you have the `cputime' function. */ -#define HAVE_CPUTIME @HAVE_CPUTIME_01@ - -/* Define if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE @HAVE_GETRUSAGE_01@ - -/* Define if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY @HAVE_GETTIMEOFDAY_01@ - -/* Define if you have the `sigaction' function. */ -#define HAVE_SIGACTION @HAVE_SIGACTION_01@ - -/* Define if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK @HAVE_SIGALTSTACK_01@ - -/* Define if you have the `sigstack' function. */ -#define HAVE_SIGSTACK @HAVE_SIGSTACK_01@ - -/* Define if the system has the type `stack_t'. */ -#define HAVE_STACK_T @HAVE_STACK_T_01@ diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/pexpr.c b/src/plugins/e-acsl/contrib/libgmp/demos/pexpr.c deleted file mode 100644 index d5009e9ee9c..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/pexpr.c +++ /dev/null @@ -1,1380 +0,0 @@ -/* Program for computing integer expressions using the GNU Multiple Precision - Arithmetic Library. - -Copyright 1997, 1999-2002, 2005, 2008, 2012, 2015 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program. If not, see https://www.gnu.org/licenses/. */ - - -/* This expressions evaluator works by building an expression tree (using a - recursive descent parser) which is then evaluated. The expression tree is - useful since we want to optimize certain expressions (like a^b % c). - - Usage: pexpr [options] expr ... - (Assuming you called the executable `pexpr' of course.) - - Command line options: - - -b print output in binary - -o print output in octal - -d print output in decimal (the default) - -x print output in hexadecimal - -b<NUM> print output in base NUM - -t print timing information - -html output html - -wml output wml - -split split long lines each 80th digit -*/ - -/* Define LIMIT_RESOURCE_USAGE if you want to make sure the program doesn't - use up extensive resources (cpu, memory). Useful for the GMP demo on the - GMP web site, since we cannot load the server too much. */ - -#include "pexpr-config.h" - -#include <string.h> -#include <stdio.h> -#include <stdlib.h> -#include <setjmp.h> -#include <signal.h> -#include <ctype.h> - -#include <time.h> -#include <sys/types.h> -#include <sys/time.h> -#if HAVE_SYS_RESOURCE_H -#include <sys/resource.h> -#endif - -#include "gmp.h" - -/* SunOS 4 and HPUX 9 don't define a canonical SIGSTKSZ, use a default. */ -#ifndef SIGSTKSZ -#define SIGSTKSZ 4096 -#endif - - -#define TIME(t,func) \ - do { int __t0, __tmp; \ - __t0 = cputime (); \ - {func;} \ - __tmp = cputime () - __t0; \ - (t) = __tmp; \ - } while (0) - -/* GMP version 1.x compatibility. */ -#if ! (__GNU_MP_VERSION >= 2) -typedef MP_INT __mpz_struct; -typedef __mpz_struct mpz_t[1]; -typedef __mpz_struct *mpz_ptr; -#define mpz_fdiv_q mpz_div -#define mpz_fdiv_r mpz_mod -#define mpz_tdiv_q_2exp mpz_div_2exp -#define mpz_sgn(Z) ((Z)->size < 0 ? -1 : (Z)->size > 0) -#endif - -/* GMP version 2.0 compatibility. */ -#if ! (__GNU_MP_VERSION > 2 || __GNU_MP_VERSION_MINOR >= 1) -#define mpz_swap(a,b) \ - do { __mpz_struct __t; __t = *a; *a = *b; *b = __t;} while (0) -#endif - -jmp_buf errjmpbuf; - -enum op_t {NOP, LIT, NEG, NOT, PLUS, MINUS, MULT, DIV, MOD, REM, INVMOD, POW, - AND, IOR, XOR, SLL, SRA, POPCNT, HAMDIST, GCD, LCM, SQRT, ROOT, FAC, - LOG, LOG2, FERMAT, MERSENNE, FIBONACCI, RANDOM, NEXTPRIME, BINOM, - TIMING}; - -/* Type for the expression tree. */ -struct expr -{ - enum op_t op; - union - { - struct {struct expr *lhs, *rhs;} ops; - mpz_t val; - } operands; -}; - -typedef struct expr *expr_t; - -void cleanup_and_exit (int); - -char *skipspace (char *); -void makeexp (expr_t *, enum op_t, expr_t, expr_t); -void free_expr (expr_t); -char *expr (char *, expr_t *); -char *term (char *, expr_t *); -char *power (char *, expr_t *); -char *factor (char *, expr_t *); -int match (char *, char *); -int matchp (char *, char *); -int cputime (void); - -void mpz_eval_expr (mpz_ptr, expr_t); -void mpz_eval_mod_expr (mpz_ptr, expr_t, mpz_ptr); - -char *error; -int flag_print = 1; -int print_timing = 0; -int flag_html = 0; -int flag_wml = 0; -int flag_splitup_output = 0; -char *newline = ""; -gmp_randstate_t rstate; - - - -/* cputime() returns user CPU time measured in milliseconds. */ -#if ! HAVE_CPUTIME -#if HAVE_GETRUSAGE -int -cputime (void) -{ - struct rusage rus; - - getrusage (0, &rus); - return rus.ru_utime.tv_sec * 1000 + rus.ru_utime.tv_usec / 1000; -} -#else -#if HAVE_CLOCK -int -cputime (void) -{ - if (CLOCKS_PER_SEC < 100000) - return clock () * 1000 / CLOCKS_PER_SEC; - return clock () / (CLOCKS_PER_SEC / 1000); -} -#else -int -cputime (void) -{ - return 0; -} -#endif -#endif -#endif - - -int -stack_downwards_helper (char *xp) -{ - char y; - return &y < xp; -} -int -stack_downwards_p (void) -{ - char x; - return stack_downwards_helper (&x); -} - - -void -setup_error_handler (void) -{ -#if HAVE_SIGACTION - struct sigaction act; - act.sa_handler = cleanup_and_exit; - sigemptyset (&(act.sa_mask)); -#define SIGNAL(sig) sigaction (sig, &act, NULL) -#else - struct { int sa_flags; } act; -#define SIGNAL(sig) signal (sig, cleanup_and_exit) -#endif - act.sa_flags = 0; - - /* Set up a stack for signal handling. A typical cause of error is stack - overflow, and in such situation a signal can not be delivered on the - overflown stack. */ -#if HAVE_SIGALTSTACK - { - /* AIX uses stack_t, MacOS uses struct sigaltstack, various other - systems have both. */ -#if HAVE_STACK_T - stack_t s; -#else - struct sigaltstack s; -#endif - s.ss_sp = malloc (SIGSTKSZ); - s.ss_size = SIGSTKSZ; - s.ss_flags = 0; - if (sigaltstack (&s, NULL) != 0) - perror("sigaltstack"); - act.sa_flags = SA_ONSTACK; - } -#else -#if HAVE_SIGSTACK - { - struct sigstack s; - s.ss_sp = malloc (SIGSTKSZ); - if (stack_downwards_p ()) - s.ss_sp += SIGSTKSZ; - s.ss_onstack = 0; - if (sigstack (&s, NULL) != 0) - perror("sigstack"); - act.sa_flags = SA_ONSTACK; - } -#else -#endif -#endif - -#ifdef LIMIT_RESOURCE_USAGE - { - struct rlimit limit; - - limit.rlim_cur = limit.rlim_max = 0; - setrlimit (RLIMIT_CORE, &limit); - - limit.rlim_cur = 3; - limit.rlim_max = 4; - setrlimit (RLIMIT_CPU, &limit); - - limit.rlim_cur = limit.rlim_max = 16 * 1024 * 1024; - setrlimit (RLIMIT_DATA, &limit); - - getrlimit (RLIMIT_STACK, &limit); - limit.rlim_cur = 4 * 1024 * 1024; - setrlimit (RLIMIT_STACK, &limit); - - SIGNAL (SIGXCPU); - } -#endif /* LIMIT_RESOURCE_USAGE */ - - SIGNAL (SIGILL); - SIGNAL (SIGSEGV); -#ifdef SIGBUS /* not in mingw */ - SIGNAL (SIGBUS); -#endif - SIGNAL (SIGFPE); - SIGNAL (SIGABRT); -} - -int -main (int argc, char **argv) -{ - struct expr *e; - int i; - mpz_t r; - int errcode = 0; - char *str; - int base = 10; - - setup_error_handler (); - - gmp_randinit (rstate, GMP_RAND_ALG_LC, 128); - - { -#if HAVE_GETTIMEOFDAY - struct timeval tv; - gettimeofday (&tv, NULL); - gmp_randseed_ui (rstate, tv.tv_sec + tv.tv_usec); -#else - time_t t; - time (&t); - gmp_randseed_ui (rstate, t); -#endif - } - - mpz_init (r); - - while (argc > 1 && argv[1][0] == '-') - { - char *arg = argv[1]; - - if (arg[1] >= '0' && arg[1] <= '9') - break; - - if (arg[1] == 't') - print_timing = 1; - else if (arg[1] == 'b' && arg[2] >= '0' && arg[2] <= '9') - { - base = atoi (arg + 2); - if (base < 2 || base > 62) - { - fprintf (stderr, "error: invalid output base\n"); - exit (-1); - } - } - else if (arg[1] == 'b' && arg[2] == 0) - base = 2; - else if (arg[1] == 'x' && arg[2] == 0) - base = 16; - else if (arg[1] == 'X' && arg[2] == 0) - base = -16; - else if (arg[1] == 'o' && arg[2] == 0) - base = 8; - else if (arg[1] == 'd' && arg[2] == 0) - base = 10; - else if (arg[1] == 'v' && arg[2] == 0) - { - printf ("pexpr linked to gmp %s\n", __gmp_version); - } - else if (strcmp (arg, "-html") == 0) - { - flag_html = 1; - newline = "<br>"; - } - else if (strcmp (arg, "-wml") == 0) - { - flag_wml = 1; - newline = "<br/>"; - } - else if (strcmp (arg, "-split") == 0) - { - flag_splitup_output = 1; - } - else if (strcmp (arg, "-noprint") == 0) - { - flag_print = 0; - } - else - { - fprintf (stderr, "error: unknown option `%s'\n", arg); - exit (-1); - } - argv++; - argc--; - } - - for (i = 1; i < argc; i++) - { - int s; - int jmpval; - - /* Set up error handler for parsing expression. */ - jmpval = setjmp (errjmpbuf); - if (jmpval != 0) - { - fprintf (stderr, "error: %s%s\n", error, newline); - fprintf (stderr, " %s%s\n", argv[i], newline); - if (! flag_html) - { - /* ??? Dunno how to align expression position with arrow in - HTML ??? */ - fprintf (stderr, " "); - for (s = jmpval - (long) argv[i]; --s >= 0; ) - putc (' ', stderr); - fprintf (stderr, "^\n"); - } - - errcode |= 1; - continue; - } - - str = expr (argv[i], &e); - - if (str[0] != 0) - { - fprintf (stderr, - "error: garbage where end of expression expected%s\n", - newline); - fprintf (stderr, " %s%s\n", argv[i], newline); - if (! flag_html) - { - /* ??? Dunno how to align expression position with arrow in - HTML ??? */ - fprintf (stderr, " "); - for (s = str - argv[i]; --s; ) - putc (' ', stderr); - fprintf (stderr, "^\n"); - } - - errcode |= 1; - free_expr (e); - continue; - } - - /* Set up error handler for evaluating expression. */ - if (setjmp (errjmpbuf)) - { - fprintf (stderr, "error: %s%s\n", error, newline); - fprintf (stderr, " %s%s\n", argv[i], newline); - if (! flag_html) - { - /* ??? Dunno how to align expression position with arrow in - HTML ??? */ - fprintf (stderr, " "); - for (s = str - argv[i]; --s >= 0; ) - putc (' ', stderr); - fprintf (stderr, "^\n"); - } - - errcode |= 2; - continue; - } - - if (print_timing) - { - int t; - TIME (t, mpz_eval_expr (r, e)); - printf ("computation took %d ms%s\n", t, newline); - } - else - mpz_eval_expr (r, e); - - if (flag_print) - { - size_t out_len; - char *tmp, *s; - - out_len = mpz_sizeinbase (r, base >= 0 ? base : -base) + 2; -#ifdef LIMIT_RESOURCE_USAGE - if (out_len > 100000) - { - printf ("result is about %ld digits, not printing it%s\n", - (long) out_len - 3, newline); - exit (-2); - } -#endif - tmp = malloc (out_len); - - if (print_timing) - { - int t; - printf ("output conversion "); - TIME (t, mpz_get_str (tmp, base, r)); - printf ("took %d ms%s\n", t, newline); - } - else - mpz_get_str (tmp, base, r); - - out_len = strlen (tmp); - if (flag_splitup_output) - { - for (s = tmp; out_len > 80; s += 80) - { - fwrite (s, 1, 80, stdout); - printf ("%s\n", newline); - out_len -= 80; - } - - fwrite (s, 1, out_len, stdout); - } - else - { - fwrite (tmp, 1, out_len, stdout); - } - - free (tmp); - printf ("%s\n", newline); - } - else - { - printf ("result is approximately %ld digits%s\n", - (long) mpz_sizeinbase (r, base >= 0 ? base : -base), - newline); - } - - free_expr (e); - } - - mpz_clear (r); - - exit (errcode); -} - -char * -expr (char *str, expr_t *e) -{ - expr_t e2; - - str = skipspace (str); - if (str[0] == '+') - { - str = term (str + 1, e); - } - else if (str[0] == '-') - { - str = term (str + 1, e); - makeexp (e, NEG, *e, NULL); - } - else if (str[0] == '~') - { - str = term (str + 1, e); - makeexp (e, NOT, *e, NULL); - } - else - { - str = term (str, e); - } - - for (;;) - { - str = skipspace (str); - switch (str[0]) - { - case 'p': - if (match ("plus", str)) - { - str = term (str + 4, &e2); - makeexp (e, PLUS, *e, e2); - } - else - return str; - break; - case 'm': - if (match ("minus", str)) - { - str = term (str + 5, &e2); - makeexp (e, MINUS, *e, e2); - } - else - return str; - break; - case '+': - str = term (str + 1, &e2); - makeexp (e, PLUS, *e, e2); - break; - case '-': - str = term (str + 1, &e2); - makeexp (e, MINUS, *e, e2); - break; - default: - return str; - } - } -} - -char * -term (char *str, expr_t *e) -{ - expr_t e2; - - str = power (str, e); - for (;;) - { - str = skipspace (str); - switch (str[0]) - { - case 'm': - if (match ("mul", str)) - { - str = power (str + 3, &e2); - makeexp (e, MULT, *e, e2); - break; - } - if (match ("mod", str)) - { - str = power (str + 3, &e2); - makeexp (e, MOD, *e, e2); - break; - } - return str; - case 'd': - if (match ("div", str)) - { - str = power (str + 3, &e2); - makeexp (e, DIV, *e, e2); - break; - } - return str; - case 'r': - if (match ("rem", str)) - { - str = power (str + 3, &e2); - makeexp (e, REM, *e, e2); - break; - } - return str; - case 'i': - if (match ("invmod", str)) - { - str = power (str + 6, &e2); - makeexp (e, REM, *e, e2); - break; - } - return str; - case 't': - if (match ("times", str)) - { - str = power (str + 5, &e2); - makeexp (e, MULT, *e, e2); - break; - } - if (match ("thru", str)) - { - str = power (str + 4, &e2); - makeexp (e, DIV, *e, e2); - break; - } - if (match ("through", str)) - { - str = power (str + 7, &e2); - makeexp (e, DIV, *e, e2); - break; - } - return str; - case '*': - str = power (str + 1, &e2); - makeexp (e, MULT, *e, e2); - break; - case '/': - str = power (str + 1, &e2); - makeexp (e, DIV, *e, e2); - break; - case '%': - str = power (str + 1, &e2); - makeexp (e, MOD, *e, e2); - break; - default: - return str; - } - } -} - -char * -power (char *str, expr_t *e) -{ - expr_t e2; - - str = factor (str, e); - while (str[0] == '!') - { - str++; - makeexp (e, FAC, *e, NULL); - } - str = skipspace (str); - if (str[0] == '^') - { - str = power (str + 1, &e2); - makeexp (e, POW, *e, e2); - } - return str; -} - -int -match (char *s, char *str) -{ - char *ostr = str; - int i; - - for (i = 0; s[i] != 0; i++) - { - if (str[i] != s[i]) - return 0; - } - str = skipspace (str + i); - return str - ostr; -} - -int -matchp (char *s, char *str) -{ - char *ostr = str; - int i; - - for (i = 0; s[i] != 0; i++) - { - if (str[i] != s[i]) - return 0; - } - str = skipspace (str + i); - if (str[0] == '(') - return str - ostr + 1; - return 0; -} - -struct functions -{ - char *spelling; - enum op_t op; - int arity; /* 1 or 2 means real arity; 0 means arbitrary. */ -}; - -struct functions fns[] = -{ - {"sqrt", SQRT, 1}, -#if __GNU_MP_VERSION >= 2 - {"root", ROOT, 2}, - {"popc", POPCNT, 1}, - {"hamdist", HAMDIST, 2}, -#endif - {"gcd", GCD, 0}, -#if __GNU_MP_VERSION > 2 || __GNU_MP_VERSION_MINOR >= 1 - {"lcm", LCM, 0}, -#endif - {"and", AND, 0}, - {"ior", IOR, 0}, -#if __GNU_MP_VERSION > 2 || __GNU_MP_VERSION_MINOR >= 1 - {"xor", XOR, 0}, -#endif - {"plus", PLUS, 0}, - {"pow", POW, 2}, - {"minus", MINUS, 2}, - {"mul", MULT, 0}, - {"div", DIV, 2}, - {"mod", MOD, 2}, - {"rem", REM, 2}, -#if __GNU_MP_VERSION >= 2 - {"invmod", INVMOD, 2}, -#endif - {"log", LOG, 2}, - {"log2", LOG2, 1}, - {"F", FERMAT, 1}, - {"M", MERSENNE, 1}, - {"fib", FIBONACCI, 1}, - {"Fib", FIBONACCI, 1}, - {"random", RANDOM, 1}, - {"nextprime", NEXTPRIME, 1}, - {"binom", BINOM, 2}, - {"binomial", BINOM, 2}, - {"fac", FAC, 1}, - {"fact", FAC, 1}, - {"factorial", FAC, 1}, - {"time", TIMING, 1}, - {"", NOP, 0} -}; - -char * -factor (char *str, expr_t *e) -{ - expr_t e1, e2; - - str = skipspace (str); - - if (isalpha (str[0])) - { - int i; - int cnt; - - for (i = 0; fns[i].op != NOP; i++) - { - if (fns[i].arity == 1) - { - cnt = matchp (fns[i].spelling, str); - if (cnt != 0) - { - str = expr (str + cnt, &e1); - str = skipspace (str); - if (str[0] != ')') - { - error = "expected `)'"; - longjmp (errjmpbuf, (int) (long) str); - } - makeexp (e, fns[i].op, e1, NULL); - return str + 1; - } - } - } - - for (i = 0; fns[i].op != NOP; i++) - { - if (fns[i].arity != 1) - { - cnt = matchp (fns[i].spelling, str); - if (cnt != 0) - { - str = expr (str + cnt, &e1); - str = skipspace (str); - - if (str[0] != ',') - { - error = "expected `,' and another operand"; - longjmp (errjmpbuf, (int) (long) str); - } - - str = skipspace (str + 1); - str = expr (str, &e2); - str = skipspace (str); - - if (fns[i].arity == 0) - { - while (str[0] == ',') - { - makeexp (&e1, fns[i].op, e1, e2); - str = skipspace (str + 1); - str = expr (str, &e2); - str = skipspace (str); - } - } - - if (str[0] != ')') - { - error = "expected `)'"; - longjmp (errjmpbuf, (int) (long) str); - } - - makeexp (e, fns[i].op, e1, e2); - return str + 1; - } - } - } - } - - if (str[0] == '(') - { - str = expr (str + 1, e); - str = skipspace (str); - if (str[0] != ')') - { - error = "expected `)'"; - longjmp (errjmpbuf, (int) (long) str); - } - str++; - } - else if (str[0] >= '0' && str[0] <= '9') - { - expr_t res; - char *s, *sc; - - res = malloc (sizeof (struct expr)); - res -> op = LIT; - mpz_init (res->operands.val); - - s = str; - while (isalnum (str[0])) - str++; - sc = malloc (str - s + 1); - memcpy (sc, s, str - s); - sc[str - s] = 0; - - mpz_set_str (res->operands.val, sc, 0); - *e = res; - free (sc); - } - else - { - error = "operand expected"; - longjmp (errjmpbuf, (int) (long) str); - } - return str; -} - -char * -skipspace (char *str) -{ - while (str[0] == ' ') - str++; - return str; -} - -/* Make a new expression with operation OP and right hand side - RHS and left hand side lhs. Put the result in R. */ -void -makeexp (expr_t *r, enum op_t op, expr_t lhs, expr_t rhs) -{ - expr_t res; - res = malloc (sizeof (struct expr)); - res -> op = op; - res -> operands.ops.lhs = lhs; - res -> operands.ops.rhs = rhs; - *r = res; - return; -} - -/* Free the memory used by expression E. */ -void -free_expr (expr_t e) -{ - if (e->op != LIT) - { - free_expr (e->operands.ops.lhs); - if (e->operands.ops.rhs != NULL) - free_expr (e->operands.ops.rhs); - } - else - { - mpz_clear (e->operands.val); - } -} - -/* Evaluate the expression E and put the result in R. */ -void -mpz_eval_expr (mpz_ptr r, expr_t e) -{ - mpz_t lhs, rhs; - - switch (e->op) - { - case LIT: - mpz_set (r, e->operands.val); - return; - case PLUS: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - mpz_add (r, lhs, rhs); - mpz_clear (lhs); mpz_clear (rhs); - return; - case MINUS: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - mpz_sub (r, lhs, rhs); - mpz_clear (lhs); mpz_clear (rhs); - return; - case MULT: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - mpz_mul (r, lhs, rhs); - mpz_clear (lhs); mpz_clear (rhs); - return; - case DIV: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - mpz_fdiv_q (r, lhs, rhs); - mpz_clear (lhs); mpz_clear (rhs); - return; - case MOD: - mpz_init (rhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - mpz_abs (rhs, rhs); - mpz_eval_mod_expr (r, e->operands.ops.lhs, rhs); - mpz_clear (rhs); - return; - case REM: - /* Check if lhs operand is POW expression and optimize for that case. */ - if (e->operands.ops.lhs->op == POW) - { - mpz_t powlhs, powrhs; - mpz_init (powlhs); - mpz_init (powrhs); - mpz_init (rhs); - mpz_eval_expr (powlhs, e->operands.ops.lhs->operands.ops.lhs); - mpz_eval_expr (powrhs, e->operands.ops.lhs->operands.ops.rhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - mpz_powm (r, powlhs, powrhs, rhs); - if (mpz_cmp_si (rhs, 0L) < 0) - mpz_neg (r, r); - mpz_clear (powlhs); - mpz_clear (powrhs); - mpz_clear (rhs); - return; - } - - mpz_init (lhs); mpz_init (rhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - mpz_fdiv_r (r, lhs, rhs); - mpz_clear (lhs); mpz_clear (rhs); - return; -#if __GNU_MP_VERSION >= 2 - case INVMOD: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - mpz_invert (r, lhs, rhs); - mpz_clear (lhs); mpz_clear (rhs); - return; -#endif - case POW: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - if (mpz_cmpabs_ui (lhs, 1) <= 0) - { - /* For 0^rhs and 1^rhs, we just need to verify that - rhs is well-defined. For (-1)^rhs we need to - determine (rhs mod 2). For simplicity, compute - (rhs mod 2) for all three cases. */ - expr_t two, et; - two = malloc (sizeof (struct expr)); - two -> op = LIT; - mpz_init_set_ui (two->operands.val, 2L); - makeexp (&et, MOD, e->operands.ops.rhs, two); - e->operands.ops.rhs = et; - } - - mpz_eval_expr (rhs, e->operands.ops.rhs); - if (mpz_cmp_si (rhs, 0L) == 0) - /* x^0 is 1 */ - mpz_set_ui (r, 1L); - else if (mpz_cmp_si (lhs, 0L) == 0) - /* 0^y (where y != 0) is 0 */ - mpz_set_ui (r, 0L); - else if (mpz_cmp_ui (lhs, 1L) == 0) - /* 1^y is 1 */ - mpz_set_ui (r, 1L); - else if (mpz_cmp_si (lhs, -1L) == 0) - /* (-1)^y just depends on whether y is even or odd */ - mpz_set_si (r, (mpz_get_ui (rhs) & 1) ? -1L : 1L); - else if (mpz_cmp_si (rhs, 0L) < 0) - /* x^(-n) is 0 */ - mpz_set_ui (r, 0L); - else - { - unsigned long int cnt; - unsigned long int y; - /* error if exponent does not fit into an unsigned long int. */ - if (mpz_cmp_ui (rhs, ~(unsigned long int) 0) > 0) - goto pow_err; - - y = mpz_get_ui (rhs); - /* x^y == (x/(2^c))^y * 2^(c*y) */ -#if __GNU_MP_VERSION >= 2 - cnt = mpz_scan1 (lhs, 0); -#else - cnt = 0; -#endif - if (cnt != 0) - { - if (y * cnt / cnt != y) - goto pow_err; - mpz_tdiv_q_2exp (lhs, lhs, cnt); - mpz_pow_ui (r, lhs, y); - mpz_mul_2exp (r, r, y * cnt); - } - else - mpz_pow_ui (r, lhs, y); - } - mpz_clear (lhs); mpz_clear (rhs); - return; - pow_err: - error = "result of `pow' operator too large"; - mpz_clear (lhs); mpz_clear (rhs); - longjmp (errjmpbuf, 1); - case GCD: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - mpz_gcd (r, lhs, rhs); - mpz_clear (lhs); mpz_clear (rhs); - return; -#if __GNU_MP_VERSION > 2 || __GNU_MP_VERSION_MINOR >= 1 - case LCM: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - mpz_lcm (r, lhs, rhs); - mpz_clear (lhs); mpz_clear (rhs); - return; -#endif - case AND: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - mpz_and (r, lhs, rhs); - mpz_clear (lhs); mpz_clear (rhs); - return; - case IOR: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - mpz_ior (r, lhs, rhs); - mpz_clear (lhs); mpz_clear (rhs); - return; -#if __GNU_MP_VERSION > 2 || __GNU_MP_VERSION_MINOR >= 1 - case XOR: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - mpz_xor (r, lhs, rhs); - mpz_clear (lhs); mpz_clear (rhs); - return; -#endif - case NEG: - mpz_eval_expr (r, e->operands.ops.lhs); - mpz_neg (r, r); - return; - case NOT: - mpz_eval_expr (r, e->operands.ops.lhs); - mpz_com (r, r); - return; - case SQRT: - mpz_init (lhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - if (mpz_sgn (lhs) < 0) - { - error = "cannot take square root of negative numbers"; - mpz_clear (lhs); - longjmp (errjmpbuf, 1); - } - mpz_sqrt (r, lhs); - return; -#if __GNU_MP_VERSION > 2 || __GNU_MP_VERSION_MINOR >= 1 - case ROOT: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - if (mpz_sgn (rhs) <= 0) - { - error = "cannot take non-positive root orders"; - mpz_clear (lhs); mpz_clear (rhs); - longjmp (errjmpbuf, 1); - } - if (mpz_sgn (lhs) < 0 && (mpz_get_ui (rhs) & 1) == 0) - { - error = "cannot take even root orders of negative numbers"; - mpz_clear (lhs); mpz_clear (rhs); - longjmp (errjmpbuf, 1); - } - - { - unsigned long int nth = mpz_get_ui (rhs); - if (mpz_cmp_ui (rhs, ~(unsigned long int) 0) > 0) - { - /* If we are asked to take an awfully large root order, cheat and - ask for the largest order we can pass to mpz_root. This saves - some error prone special cases. */ - nth = ~(unsigned long int) 0; - } - mpz_root (r, lhs, nth); - } - mpz_clear (lhs); mpz_clear (rhs); - return; -#endif - case FAC: - mpz_eval_expr (r, e->operands.ops.lhs); - if (mpz_size (r) > 1) - { - error = "result of `!' operator too large"; - longjmp (errjmpbuf, 1); - } - mpz_fac_ui (r, mpz_get_ui (r)); - return; -#if __GNU_MP_VERSION >= 2 - case POPCNT: - mpz_eval_expr (r, e->operands.ops.lhs); - { long int cnt; - cnt = mpz_popcount (r); - mpz_set_si (r, cnt); - } - return; - case HAMDIST: - { long int cnt; - mpz_init (lhs); mpz_init (rhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - cnt = mpz_hamdist (lhs, rhs); - mpz_clear (lhs); mpz_clear (rhs); - mpz_set_si (r, cnt); - } - return; -#endif - case LOG2: - mpz_eval_expr (r, e->operands.ops.lhs); - { unsigned long int cnt; - if (mpz_sgn (r) <= 0) - { - error = "logarithm of non-positive number"; - longjmp (errjmpbuf, 1); - } - cnt = mpz_sizeinbase (r, 2); - mpz_set_ui (r, cnt - 1); - } - return; - case LOG: - { unsigned long int cnt; - mpz_init (lhs); mpz_init (rhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - if (mpz_sgn (lhs) <= 0) - { - error = "logarithm of non-positive number"; - mpz_clear (lhs); mpz_clear (rhs); - longjmp (errjmpbuf, 1); - } - if (mpz_cmp_ui (rhs, 256) >= 0) - { - error = "logarithm base too large"; - mpz_clear (lhs); mpz_clear (rhs); - longjmp (errjmpbuf, 1); - } - cnt = mpz_sizeinbase (lhs, mpz_get_ui (rhs)); - mpz_set_ui (r, cnt - 1); - mpz_clear (lhs); mpz_clear (rhs); - } - return; - case FERMAT: - { - unsigned long int t; - mpz_init (lhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - t = (unsigned long int) 1 << mpz_get_ui (lhs); - if (mpz_cmp_ui (lhs, ~(unsigned long int) 0) > 0 || t == 0) - { - error = "too large Mersenne number index"; - mpz_clear (lhs); - longjmp (errjmpbuf, 1); - } - mpz_set_ui (r, 1); - mpz_mul_2exp (r, r, t); - mpz_add_ui (r, r, 1); - mpz_clear (lhs); - } - return; - case MERSENNE: - mpz_init (lhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - if (mpz_cmp_ui (lhs, ~(unsigned long int) 0) > 0) - { - error = "too large Mersenne number index"; - mpz_clear (lhs); - longjmp (errjmpbuf, 1); - } - mpz_set_ui (r, 1); - mpz_mul_2exp (r, r, mpz_get_ui (lhs)); - mpz_sub_ui (r, r, 1); - mpz_clear (lhs); - return; - case FIBONACCI: - { mpz_t t; - unsigned long int n, i; - mpz_init (lhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - if (mpz_sgn (lhs) <= 0 || mpz_cmp_si (lhs, 1000000000) > 0) - { - error = "Fibonacci index out of range"; - mpz_clear (lhs); - longjmp (errjmpbuf, 1); - } - n = mpz_get_ui (lhs); - mpz_clear (lhs); - -#if __GNU_MP_VERSION > 2 || __GNU_MP_VERSION_MINOR >= 1 - mpz_fib_ui (r, n); -#else - mpz_init_set_ui (t, 1); - mpz_set_ui (r, 1); - - if (n <= 2) - mpz_set_ui (r, 1); - else - { - for (i = 3; i <= n; i++) - { - mpz_add (t, t, r); - mpz_swap (t, r); - } - } - mpz_clear (t); -#endif - } - return; - case RANDOM: - { - unsigned long int n; - mpz_init (lhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - if (mpz_sgn (lhs) <= 0 || mpz_cmp_si (lhs, 1000000000) > 0) - { - error = "random number size out of range"; - mpz_clear (lhs); - longjmp (errjmpbuf, 1); - } - n = mpz_get_ui (lhs); - mpz_clear (lhs); - mpz_urandomb (r, rstate, n); - } - return; - case NEXTPRIME: - { - mpz_eval_expr (r, e->operands.ops.lhs); - mpz_nextprime (r, r); - } - return; - case BINOM: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_expr (lhs, e->operands.ops.lhs); - mpz_eval_expr (rhs, e->operands.ops.rhs); - { - unsigned long int k; - if (mpz_cmp_ui (rhs, ~(unsigned long int) 0) > 0) - { - error = "k too large in (n over k) expression"; - mpz_clear (lhs); mpz_clear (rhs); - longjmp (errjmpbuf, 1); - } - k = mpz_get_ui (rhs); - mpz_bin_ui (r, lhs, k); - } - mpz_clear (lhs); mpz_clear (rhs); - return; - case TIMING: - { - int t0; - t0 = cputime (); - mpz_eval_expr (r, e->operands.ops.lhs); - printf ("time: %d\n", cputime () - t0); - } - return; - default: - abort (); - } -} - -/* Evaluate the expression E modulo MOD and put the result in R. */ -void -mpz_eval_mod_expr (mpz_ptr r, expr_t e, mpz_ptr mod) -{ - mpz_t lhs, rhs; - - switch (e->op) - { - case POW: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_mod_expr (lhs, e->operands.ops.lhs, mod); - mpz_eval_expr (rhs, e->operands.ops.rhs); - mpz_powm (r, lhs, rhs, mod); - mpz_clear (lhs); mpz_clear (rhs); - return; - case PLUS: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_mod_expr (lhs, e->operands.ops.lhs, mod); - mpz_eval_mod_expr (rhs, e->operands.ops.rhs, mod); - mpz_add (r, lhs, rhs); - if (mpz_cmp_si (r, 0L) < 0) - mpz_add (r, r, mod); - else if (mpz_cmp (r, mod) >= 0) - mpz_sub (r, r, mod); - mpz_clear (lhs); mpz_clear (rhs); - return; - case MINUS: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_mod_expr (lhs, e->operands.ops.lhs, mod); - mpz_eval_mod_expr (rhs, e->operands.ops.rhs, mod); - mpz_sub (r, lhs, rhs); - if (mpz_cmp_si (r, 0L) < 0) - mpz_add (r, r, mod); - else if (mpz_cmp (r, mod) >= 0) - mpz_sub (r, r, mod); - mpz_clear (lhs); mpz_clear (rhs); - return; - case MULT: - mpz_init (lhs); mpz_init (rhs); - mpz_eval_mod_expr (lhs, e->operands.ops.lhs, mod); - mpz_eval_mod_expr (rhs, e->operands.ops.rhs, mod); - mpz_mul (r, lhs, rhs); - mpz_mod (r, r, mod); - mpz_clear (lhs); mpz_clear (rhs); - return; - default: - mpz_init (lhs); - mpz_eval_expr (lhs, e); - mpz_mod (r, lhs, mod); - mpz_clear (lhs); - return; - } -} - -void -cleanup_and_exit (int sig) -{ - switch (sig) { -#ifdef LIMIT_RESOURCE_USAGE - case SIGXCPU: - printf ("expression took too long to evaluate%s\n", newline); - break; -#endif - case SIGFPE: - printf ("divide by zero%s\n", newline); - break; - default: - printf ("expression required too much memory to evaluate%s\n", newline); - break; - } - exit (-2); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/primes.c b/src/plugins/e-acsl/contrib/libgmp/demos/primes.c deleted file mode 100644 index 3cb32e2e253..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/primes.c +++ /dev/null @@ -1,387 +0,0 @@ -/* List and count primes. - Written by tege while on holiday in Rodupp, August 2001. - Between 10 and 500 times faster than previous program. - -Copyright 2001, 2002, 2006, 2012 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program. If not, see https://www.gnu.org/licenses/. */ - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <math.h> -#include <assert.h> - -/* IDEAS: - * Do not fill primes[] with real primes when the range [fr,to] is small, - when fr,to are relatively large. Fill primes[] with odd numbers instead. - [Probably a bad idea, since the primes[] array would become very large.] - * Separate small primes and large primes when sieving. Either the Montgomery - way (i.e., having a large array a multiple of L1 cache size), or just - separate loops for primes <= S and primes > S. The latter primes do not - require an inner loop, since they will touch the sieving array at most once. - * Pre-fill sieving array with an appropriately aligned ...00100100... pattern, - then omit 3 from primes array. (May require similar special handling of 3 - as we now have for 2.) - * A large SIEVE_LIMIT currently implies very large memory usage, mainly due - to the sieving array in make_primelist, but also because of the primes[] - array. We might want to stage the program, using sieve_region/find_primes - to build primes[]. Make report() a function pointer, as part of achieving - this. - * Store primes[] as two arrays, one array with primes represented as delta - values using just 8 bits (if gaps are too big, store bogus primes!) - and one array with "rem" values. The latter needs 32-bit values. - * A new entry point, mpz_probab_prime_likely_p, would be useful. - * Improve command line syntax and versatility. "primes -f FROM -t TO", - allow either to be omitted for open interval. (But disallow - "primes -c -f FROM" since that would be infinity.) Allow printing a - limited *number* of primes using syntax like "primes -f FROM -n NUMBER". - * When looking for maxgaps, we should not perform any primality testing until - we find possible record gaps. Should speed up the searches tremendously. - */ - -#include "gmp.h" - -struct primes -{ - unsigned int prime; - int rem; -}; - -struct primes *primes; -unsigned long n_primes; - -void find_primes (unsigned char *, mpz_t, unsigned long, mpz_t); -void sieve_region (unsigned char *, mpz_t, unsigned long); -void make_primelist (unsigned long); - -int flag_print = 1; -int flag_count = 0; -int flag_maxgap = 0; -unsigned long maxgap = 0; -unsigned long total_primes = 0; - -void -report (mpz_t prime) -{ - total_primes += 1; - if (flag_print) - { - mpz_out_str (stdout, 10, prime); - printf ("\n"); - } - if (flag_maxgap) - { - static unsigned long prev_prime_low = 0; - unsigned long gap; - if (prev_prime_low != 0) - { - gap = mpz_get_ui (prime) - prev_prime_low; - if (maxgap < gap) - maxgap = gap; - } - prev_prime_low = mpz_get_ui (prime); - } -} - -int -main (int argc, char *argv[]) -{ - char *progname = argv[0]; - mpz_t fr, to; - mpz_t fr2, to2; - unsigned long sieve_lim; - unsigned long est_n_primes; - unsigned char *s; - mpz_t tmp; - mpz_t siev_sqr_lim; - - while (argc != 1) - { - if (strcmp (argv[1], "-c") == 0) - { - flag_count = 1; - argv++; - argc--; - } - else if (strcmp (argv[1], "-p") == 0) - { - flag_print = 2; - argv++; - argc--; - } - else if (strcmp (argv[1], "-g") == 0) - { - flag_maxgap = 1; - argv++; - argc--; - } - else - break; - } - - if (flag_count || flag_maxgap) - flag_print--; /* clear unless an explicit -p */ - - mpz_init (fr); - mpz_init (to); - mpz_init (fr2); - mpz_init (to2); - - if (argc == 3) - { - mpz_set_str (fr, argv[1], 0); - if (argv[2][0] == '+') - { - mpz_set_str (to, argv[2] + 1, 0); - mpz_add (to, to, fr); - } - else - mpz_set_str (to, argv[2], 0); - } - else if (argc == 2) - { - mpz_set_ui (fr, 0); - mpz_set_str (to, argv[1], 0); - } - else - { - fprintf (stderr, "usage: %s [-c] [-p] [-g] [from [+]]to\n", progname); - exit (1); - } - - mpz_set (fr2, fr); - if (mpz_cmp_ui (fr2, 3) < 0) - { - mpz_set_ui (fr2, 2); - report (fr2); - mpz_set_ui (fr2, 3); - } - mpz_setbit (fr2, 0); /* make odd */ - mpz_sub_ui (to2, to, 1); - mpz_setbit (to2, 0); /* make odd */ - - mpz_init (tmp); - mpz_init (siev_sqr_lim); - - mpz_sqrt (tmp, to2); -#define SIEVE_LIMIT 10000000 - if (mpz_cmp_ui (tmp, SIEVE_LIMIT) < 0) - { - sieve_lim = mpz_get_ui (tmp); - } - else - { - sieve_lim = SIEVE_LIMIT; - mpz_sub (tmp, to2, fr2); - if (mpz_cmp_ui (tmp, sieve_lim) < 0) - sieve_lim = mpz_get_ui (tmp); /* limit sieving for small ranges */ - } - mpz_set_ui (siev_sqr_lim, sieve_lim + 1); - mpz_mul_ui (siev_sqr_lim, siev_sqr_lim, sieve_lim + 1); - - est_n_primes = (size_t) (sieve_lim / log((double) sieve_lim) * 1.13) + 10; - primes = malloc (est_n_primes * sizeof primes[0]); - make_primelist (sieve_lim); - assert (est_n_primes >= n_primes); - -#if DEBUG - printf ("sieve_lim = %lu\n", sieve_lim); - printf ("n_primes = %lu (3..%u)\n", - n_primes, primes[n_primes - 1].prime); -#endif - -#define S (1 << 15) /* FIXME: Figure out L1 cache size */ - s = malloc (S/2); - while (mpz_cmp (fr2, to2) <= 0) - { - unsigned long rsize; - rsize = S; - mpz_add_ui (tmp, fr2, rsize); - if (mpz_cmp (tmp, to2) > 0) - { - mpz_sub (tmp, to2, fr2); - rsize = mpz_get_ui (tmp) + 2; - } -#if DEBUG - printf ("Sieving region ["); mpz_out_str (stdout, 10, fr2); - printf (","); mpz_add_ui (tmp, fr2, rsize - 2); - mpz_out_str (stdout, 10, tmp); printf ("]\n"); -#endif - sieve_region (s, fr2, rsize); - find_primes (s, fr2, rsize / 2, siev_sqr_lim); - - mpz_add_ui (fr2, fr2, S); - } - free (s); - - if (flag_count) - printf ("Pi(interval) = %lu\n", total_primes); - - if (flag_maxgap) - printf ("max gap: %lu\n", maxgap); - - return 0; -} - -/* Find primes in region [fr,fr+rsize). Requires that fr is odd and that - rsize is even. The sieving array s should be aligned for "long int" and - have rsize/2 entries, rounded up to the nearest multiple of "long int". */ -void -sieve_region (unsigned char *s, mpz_t fr, unsigned long rsize) -{ - unsigned long ssize = rsize / 2; - unsigned long start, start2, prime; - unsigned long i; - mpz_t tmp; - - mpz_init (tmp); - -#if 0 - /* initialize sieving array */ - for (ii = 0; ii < (ssize + sizeof (long) - 1) / sizeof (long); ii++) - ((long *) s) [ii] = ~0L; -#else - { - long k; - long *se = (long *) (s + ((ssize + sizeof (long) - 1) & -sizeof (long))); - for (k = -((ssize + sizeof (long) - 1) / sizeof (long)); k < 0; k++) - se[k] = ~0L; - } -#endif - - for (i = 0; i < n_primes; i++) - { - prime = primes[i].prime; - - if (primes[i].rem >= 0) - { - start2 = primes[i].rem; - } - else - { - mpz_set_ui (tmp, prime); - mpz_mul_ui (tmp, tmp, prime); - if (mpz_cmp (fr, tmp) <= 0) - { - mpz_sub (tmp, tmp, fr); - if (mpz_cmp_ui (tmp, 2 * ssize) > 0) - break; /* avoid overflow at next line, also speedup */ - start = mpz_get_ui (tmp); - } - else - { - start = (prime - mpz_tdiv_ui (fr, prime)) % prime; - if (start % 2 != 0) - start += prime; /* adjust if even divisible */ - } - start2 = start / 2; - } - -#if 0 - for (ii = start2; ii < ssize; ii += prime) - s[ii] = 0; - primes[i].rem = ii - ssize; -#else - { - long k; - unsigned char *se = s + ssize; /* point just beyond sieving range */ - for (k = start2 - ssize; k < 0; k += prime) - se[k] = 0; - primes[i].rem = k; - } -#endif - } - mpz_clear (tmp); -} - -/* Find primes in region [fr,fr+rsize), using the previously sieved s[]. */ -void -find_primes (unsigned char *s, mpz_t fr, unsigned long ssize, - mpz_t siev_sqr_lim) -{ - unsigned long j, ij; - mpz_t tmp; - - mpz_init (tmp); - for (j = 0; j < (ssize + sizeof (long) - 1) / sizeof (long); j++) - { - if (((long *) s) [j] != 0) - { - for (ij = 0; ij < sizeof (long); ij++) - { - if (s[j * sizeof (long) + ij] != 0) - { - if (j * sizeof (long) + ij >= ssize) - goto out; - mpz_add_ui (tmp, fr, (j * sizeof (long) + ij) * 2); - if (mpz_cmp (tmp, siev_sqr_lim) < 0 || - mpz_probab_prime_p (tmp, 10)) - report (tmp); - } - } - } - } - out: - mpz_clear (tmp); -} - -/* Generate a list of primes and store in the global array primes[]. */ -void -make_primelist (unsigned long maxprime) -{ -#if 1 - unsigned char *s; - unsigned long ssize = maxprime / 2; - unsigned long i, ii, j; - - s = malloc (ssize); - memset (s, ~0, ssize); - for (i = 3; ; i += 2) - { - unsigned long isqr = i * i; - if (isqr >= maxprime) - break; - if (s[i * i / 2 - 1] == 0) - continue; /* only sieve with primes */ - for (ii = i * i / 2 - 1; ii < ssize; ii += i) - s[ii] = 0; - } - n_primes = 0; - for (j = 0; j < ssize; j++) - { - if (s[j] != 0) - { - primes[n_primes].prime = j * 2 + 3; - primes[n_primes].rem = -1; - n_primes++; - } - } - /* FIXME: This should not be needed if fencepost errors were fixed... */ - if (primes[n_primes - 1].prime > maxprime) - n_primes--; - free (s); -#else - unsigned long i; - n_primes = 0; - for (i = 3; i <= maxprime; i += 2) - { - if (i < 7 || (i % 3 != 0 && i % 5 != 0 && i % 7 != 0)) - { - primes[n_primes].prime = i; - primes[n_primes].rem = -1; - n_primes++; - } - } -#endif -} diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/primes.h b/src/plugins/e-acsl/contrib/libgmp/demos/primes.h deleted file mode 100644 index b85c7e1ff25..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/primes.h +++ /dev/null @@ -1,552 +0,0 @@ -P( 1, 0xaaaaaaaaaaaaaaabUL, 0x5555555555555555UL) /* 3 */ -P( 2, 0xcccccccccccccccdUL, 0x3333333333333333UL) /* 5 */ -P( 2, 0x6db6db6db6db6db7UL, 0x2492492492492492UL) /* 7 */ -P( 4, 0x2e8ba2e8ba2e8ba3UL, 0x1745d1745d1745d1UL) /* 11 */ -P( 2, 0x4ec4ec4ec4ec4ec5UL, 0x13b13b13b13b13b1UL) /* 13 */ -P( 4, 0xf0f0f0f0f0f0f0f1UL, 0x0f0f0f0f0f0f0f0fUL) /* 17 */ -P( 2, 0x86bca1af286bca1bUL, 0x0d79435e50d79435UL) /* 19 */ -P( 4, 0xd37a6f4de9bd37a7UL, 0x0b21642c8590b216UL) /* 23 */ -P( 6, 0x34f72c234f72c235UL, 0x08d3dcb08d3dcb08UL) /* 29 */ -P( 2, 0xef7bdef7bdef7bdfUL, 0x0842108421084210UL) /* 31 */ -P( 6, 0x14c1bacf914c1badUL, 0x06eb3e45306eb3e4UL) /* 37 */ -P( 4, 0x8f9c18f9c18f9c19UL, 0x063e7063e7063e70UL) /* 41 */ -P( 2, 0x82fa0be82fa0be83UL, 0x05f417d05f417d05UL) /* 43 */ -P( 4, 0x51b3bea3677d46cfUL, 0x0572620ae4c415c9UL) /* 47 */ -P( 6, 0x21cfb2b78c13521dUL, 0x04d4873ecade304dUL) /* 53 */ -P( 6, 0xcbeea4e1a08ad8f3UL, 0x0456c797dd49c341UL) /* 59 */ -P( 2, 0x4fbcda3ac10c9715UL, 0x04325c53ef368eb0UL) /* 61 */ -P( 6, 0xf0b7672a07a44c6bUL, 0x03d226357e16ece5UL) /* 67 */ -P( 4, 0x193d4bb7e327a977UL, 0x039b0ad12073615aUL) /* 71 */ -P( 2, 0x7e3f1f8fc7e3f1f9UL, 0x0381c0e070381c0eUL) /* 73 */ -P( 6, 0x9b8b577e613716afUL, 0x033d91d2a2067b23UL) /* 79 */ -P( 4, 0xa3784a062b2e43dbUL, 0x03159721ed7e7534UL) /* 83 */ -P( 6, 0xf47e8fd1fa3f47e9UL, 0x02e05c0b81702e05UL) /* 89 */ -P( 8, 0xa3a0fd5c5f02a3a1UL, 0x02a3a0fd5c5f02a3UL) /* 97 */ -P( 4, 0x3a4c0a237c32b16dUL, 0x0288df0cac5b3f5dUL) /* 101 */ -P( 2, 0xdab7ec1dd3431b57UL, 0x027c45979c95204fUL) /* 103 */ -P( 4, 0x77a04c8f8d28ac43UL, 0x02647c69456217ecUL) /* 107 */ -P( 2, 0xa6c0964fda6c0965UL, 0x02593f69b02593f6UL) /* 109 */ -P( 4, 0x90fdbc090fdbc091UL, 0x0243f6f0243f6f02UL) /* 113 */ -P(14, 0x7efdfbf7efdfbf7fUL, 0x0204081020408102UL) /* 127 */ -P( 4, 0x03e88cb3c9484e2bUL, 0x01f44659e4a42715UL) /* 131 */ -P( 6, 0xe21a291c077975b9UL, 0x01de5d6e3f8868a4UL) /* 137 */ -P( 2, 0x3aef6ca970586723UL, 0x01d77b654b82c339UL) /* 139 */ -P(10, 0xdf5b0f768ce2cabdUL, 0x01b7d6c3dda338b2UL) /* 149 */ -P( 2, 0x6fe4dfc9bf937f27UL, 0x01b2036406c80d90UL) /* 151 */ -P( 6, 0x5b4fe5e92c0685b5UL, 0x01a16d3f97a4b01aUL) /* 157 */ -P( 6, 0x1f693a1c451ab30bUL, 0x01920fb49d0e228dUL) /* 163 */ -P( 4, 0x8d07aa27db35a717UL, 0x01886e5f0abb0499UL) /* 167 */ -P( 6, 0x882383b30d516325UL, 0x017ad2208e0ecc35UL) /* 173 */ -P( 6, 0xed6866f8d962ae7bUL, 0x016e1f76b4337c6cUL) /* 179 */ -P( 2, 0x3454dca410f8ed9dUL, 0x016a13cd15372904UL) /* 181 */ -P(10, 0x1d7ca632ee936f3fUL, 0x01571ed3c506b39aUL) /* 191 */ -P( 2, 0x70bf015390948f41UL, 0x015390948f40feacUL) /* 193 */ -P( 4, 0xc96bdb9d3d137e0dUL, 0x014cab88725af6e7UL) /* 197 */ -P( 2, 0x2697cc8aef46c0f7UL, 0x0149539e3b2d066eUL) /* 199 */ -P(12, 0xc0e8f2a76e68575bUL, 0x013698df3de07479UL) /* 211 */ -P(12, 0x687763dfdb43bb1fUL, 0x0125e22708092f11UL) /* 223 */ -P( 4, 0x1b10ea929ba144cbUL, 0x0120b470c67c0d88UL) /* 227 */ -P( 2, 0x1d10c4c0478bbcedUL, 0x011e2ef3b3fb8744UL) /* 229 */ -P( 4, 0x63fb9aeb1fdcd759UL, 0x0119453808ca29c0UL) /* 233 */ -P( 6, 0x64afaa4f437b2e0fUL, 0x0112358e75d30336UL) /* 239 */ -P( 2, 0xf010fef010fef011UL, 0x010fef010fef010fUL) /* 241 */ -P(10, 0x28cbfbeb9a020a33UL, 0x0105197f7d734041UL) /* 251 */ -P( 6, 0xff00ff00ff00ff01UL, 0x00ff00ff00ff00ffUL) /* 257 */ -P( 6, 0xd624fd1470e99cb7UL, 0x00f92fb2211855a8UL) /* 263 */ -P( 6, 0x8fb3ddbd6205b5c5UL, 0x00f3a0d52cba8723UL) /* 269 */ -P( 2, 0xd57da36ca27acdefUL, 0x00f1d48bcee0d399UL) /* 271 */ -P( 6, 0xee70c03b25e4463dUL, 0x00ec979118f3fc4dUL) /* 277 */ -P( 4, 0xc5b1a6b80749cb29UL, 0x00e939651fe2d8d3UL) /* 281 */ -P( 2, 0x47768073c9b97113UL, 0x00e79372e225fe30UL) /* 283 */ -P(10, 0x2591e94884ce32adUL, 0x00dfac1f74346c57UL) /* 293 */ -P(14, 0xf02806abc74be1fbUL, 0x00d578e97c3f5fe5UL) /* 307 */ -P( 4, 0x7ec3e8f3a7198487UL, 0x00d2ba083b445250UL) /* 311 */ -P( 2, 0x58550f8a39409d09UL, 0x00d161543e28e502UL) /* 313 */ -P( 4, 0xec9e48ae6f71de15UL, 0x00cebcf8bb5b4169UL) /* 317 */ -P(14, 0x2ff3a018bfce8063UL, 0x00c5fe740317f9d0UL) /* 331 */ -P( 6, 0x7f9ec3fcf61fe7b1UL, 0x00c2780613c0309eUL) /* 337 */ -P(10, 0x89f5abe570e046d3UL, 0x00bcdd535db1cc5bUL) /* 347 */ -P( 2, 0xda971b23f1545af5UL, 0x00bbc8408cd63069UL) /* 349 */ -P( 4, 0x79d5f00b9a7862a1UL, 0x00b9a7862a0ff465UL) /* 353 */ -P( 6, 0x4dba1df32a128a57UL, 0x00b68d31340e4307UL) /* 359 */ -P( 8, 0x87530217b7747d8fUL, 0x00b2927c29da5519UL) /* 367 */ -P( 6, 0x30baae53bb5e06ddUL, 0x00afb321a1496fdfUL) /* 373 */ -P( 6, 0xee70206c12e9b5b3UL, 0x00aceb0f891e6551UL) /* 379 */ -P( 4, 0xcdde9462ec9dbe7fUL, 0x00ab1cbdd3e2970fUL) /* 383 */ -P( 6, 0xafb64b05ec41cf4dUL, 0x00a87917088e262bUL) /* 389 */ -P( 8, 0x02944ff5aec02945UL, 0x00a513fd6bb00a51UL) /* 397 */ -P( 4, 0x2cb033128382df71UL, 0x00a36e71a2cb0331UL) /* 401 */ -P( 8, 0x1ccacc0c84b1c2a9UL, 0x00a03c1688732b30UL) /* 409 */ -P(10, 0x19a93db575eb3a0bUL, 0x009c69169b30446dUL) /* 419 */ -P( 2, 0xcebeef94fa86fe2dUL, 0x009baade8e4a2f6eUL) /* 421 */ -P(10, 0x6faa77fb3f8df54fUL, 0x00980e4156201301UL) /* 431 */ -P( 2, 0x68a58af00975a751UL, 0x00975a750ff68a58UL) /* 433 */ -P( 6, 0xd56e36d0c3efac07UL, 0x009548e4979e0829UL) /* 439 */ -P( 4, 0xd8b44c47a8299b73UL, 0x0093efd1c50e726bUL) /* 443 */ -P( 6, 0x02d9ccaf9ba70e41UL, 0x0091f5bcb8bb02d9UL) /* 449 */ -P( 8, 0x0985e1c023d9e879UL, 0x008f67a1e3fdc261UL) /* 457 */ -P( 4, 0x2a343316c494d305UL, 0x008e2917e0e702c6UL) /* 461 */ -P( 2, 0x70cb7916ab67652fUL, 0x008d8be33f95d715UL) /* 463 */ -P( 4, 0xd398f132fb10fe5bUL, 0x008c55841c815ed5UL) /* 467 */ -P(12, 0x6f2a38a6bf54fa1fUL, 0x0088d180cd3a4133UL) /* 479 */ -P( 8, 0x211df689b98f81d7UL, 0x00869222b1acf1ceUL) /* 487 */ -P( 4, 0x0e994983e90f1ec3UL, 0x0085797b917765abUL) /* 491 */ -P( 8, 0xad671e44bed87f3bUL, 0x008355ace3c897dbUL) /* 499 */ -P( 4, 0xf9623a0516e70fc7UL, 0x00824a4e60b3262bUL) /* 503 */ -P( 6, 0x4b7129be9dece355UL, 0x0080c121b28bd1baUL) /* 509 */ -P(12, 0x190f3b7473f62c39UL, 0x007dc9f3397d4c29UL) /* 521 */ -P( 2, 0x63dacc9aad46f9a3UL, 0x007d4ece8fe88139UL) /* 523 */ -P(18, 0xc1108fda24e8d035UL, 0x0079237d65bcce50UL) /* 541 */ -P( 6, 0xb77578472319bd8bUL, 0x0077cf53c5f7936cUL) /* 547 */ -P(10, 0x473d20a1c7ed9da5UL, 0x0075a8accfbdd11eUL) /* 557 */ -P( 6, 0xfbe85af0fea2c8fbUL, 0x007467ac557c228eUL) /* 563 */ -P( 6, 0x58a1f7e6ce0f4c09UL, 0x00732d70ed8db8e9UL) /* 569 */ -P( 2, 0x1a00e58c544986f3UL, 0x0072c62a24c3797fUL) /* 571 */ -P( 6, 0x7194a17f55a10dc1UL, 0x007194a17f55a10dUL) /* 577 */ -P(10, 0x7084944785e33763UL, 0x006fa549b41da7e7UL) /* 587 */ -P( 6, 0xba10679bd84886b1UL, 0x006e8419e6f61221UL) /* 593 */ -P( 6, 0xebe9c6bb31260967UL, 0x006d68b5356c207bUL) /* 599 */ -P( 2, 0x97a3fe4bd1ff25e9UL, 0x006d0b803685c01bUL) /* 601 */ -P( 6, 0x6c6388395b84d99fUL, 0x006bf790a8b2d207UL) /* 607 */ -P( 6, 0x8c51da6a1335df6dUL, 0x006ae907ef4b96c2UL) /* 613 */ -P( 4, 0x46f3234475d5add9UL, 0x006a37991a23aeadUL) /* 617 */ -P( 2, 0x905605ca3c619a43UL, 0x0069dfbdd4295b66UL) /* 619 */ -P(12, 0xcee8dff304767747UL, 0x0067dc4c45c8033eUL) /* 631 */ -P(10, 0xff99c27f00663d81UL, 0x00663d80ff99c27fUL) /* 641 */ -P( 2, 0xacca407f671ddc2bUL, 0x0065ec17e3559948UL) /* 643 */ -P( 4, 0xe71298bac1e12337UL, 0x00654ac835cfba5cUL) /* 647 */ -P( 6, 0xfa1e94309cd09045UL, 0x00645c854ae10772UL) /* 653 */ -P( 6, 0xbebccb8e91496b9bUL, 0x006372990e5f901fUL) /* 659 */ -P( 2, 0x312fa30cc7d7b8bdUL, 0x006325913c07beefUL) /* 661 */ -P(12, 0x6160ff9e9f006161UL, 0x006160ff9e9f0061UL) /* 673 */ -P( 4, 0x6b03673b5e28152dUL, 0x0060cdb520e5e88eUL) /* 677 */ -P( 6, 0xfe802ffa00bfe803UL, 0x005ff4017fd005ffUL) /* 683 */ -P( 8, 0xe66fe25c9e907c7bUL, 0x005ed79e31a4dccdUL) /* 691 */ -P(10, 0x3f8b236c76528895UL, 0x005d7d42d48ac5efUL) /* 701 */ -P( 8, 0xf6f923bf01ce2c0dUL, 0x005c6f35ccba5028UL) /* 709 */ -P(10, 0x6c3d3d98bed7c42fUL, 0x005b2618ec6ad0a5UL) /* 719 */ -P( 8, 0x30981efcd4b010e7UL, 0x005a2553748e42e7UL) /* 727 */ -P( 6, 0x6f691fc81ebbe575UL, 0x0059686cf744cd5bUL) /* 733 */ -P( 6, 0xb10480ddb47b52cbUL, 0x0058ae97bab79976UL) /* 739 */ -P( 4, 0x74cd59ed64f3f0d7UL, 0x0058345f1876865fUL) /* 743 */ -P( 8, 0x0105cb81316d6c0fUL, 0x005743d5bb24795aUL) /* 751 */ -P( 6, 0x9be64c6d91c1195dUL, 0x005692c4d1ab74abUL) /* 757 */ -P( 4, 0x71b3f945a27b1f49UL, 0x00561e46a4d5f337UL) /* 761 */ -P( 8, 0x77d80d50e508fd01UL, 0x005538ed06533997UL) /* 769 */ -P( 4, 0xa5eb778e133551cdUL, 0x0054c807f2c0bec2UL) /* 773 */ -P(14, 0x18657d3c2d8a3f1bUL, 0x005345efbc572d36UL) /* 787 */ -P(10, 0x2e40e220c34ad735UL, 0x00523a758f941345UL) /* 797 */ -P(12, 0xa76593c70a714919UL, 0x005102370f816c89UL) /* 809 */ -P( 2, 0x1eef452124eea383UL, 0x0050cf129fb94acfUL) /* 811 */ -P(10, 0x38206dc242ba771dUL, 0x004fd31941cafdd1UL) /* 821 */ -P( 2, 0x4cd4c35807772287UL, 0x004fa1704aa75945UL) /* 823 */ -P( 4, 0x83de917d5e69ddf3UL, 0x004f3ed6d45a63adUL) /* 827 */ -P( 2, 0x882ef0403b4a6c15UL, 0x004f0de57154ebedUL) /* 829 */ -P(10, 0xf8fb6c51c606b677UL, 0x004e1cae8815f811UL) /* 839 */ -P(14, 0xb4abaac446d3e1fdUL, 0x004cd47ba5f6ff19UL) /* 853 */ -P( 4, 0xa9f83bbe484a14e9UL, 0x004c78ae734df709UL) /* 857 */ -P( 2, 0x0bebbc0d1ce874d3UL, 0x004c4b19ed85cfb8UL) /* 859 */ -P( 4, 0xbd418eaf0473189fUL, 0x004bf093221d1218UL) /* 863 */ -P(14, 0x44e3af6f372b7e65UL, 0x004aba3c21dc633fUL) /* 877 */ -P( 4, 0xc87fdace4f9e5d91UL, 0x004a6360c344de00UL) /* 881 */ -P( 2, 0xec93479c446bd9bbUL, 0x004a383e9f74d68aUL) /* 883 */ -P( 4, 0xdac4d592e777c647UL, 0x0049e28fbabb9940UL) /* 887 */ -P(20, 0xa63ea8c8f61f0c23UL, 0x0048417b57c78cd7UL) /* 907 */ -P( 4, 0xe476062ea5cbbb6fUL, 0x0047f043713f3a2bUL) /* 911 */ -P( 8, 0xdf68761c69daac27UL, 0x00474ff2a10281cfUL) /* 919 */ -P(10, 0xb813d737637aa061UL, 0x00468b6f9a978f91UL) /* 929 */ -P( 8, 0xa3a77aac1fb15099UL, 0x0045f13f1caff2e2UL) /* 937 */ -P( 4, 0x17f0c3e0712c5825UL, 0x0045a5228cec23e9UL) /* 941 */ -P( 6, 0xfd912a70ff30637bUL, 0x0045342c556c66b9UL) /* 947 */ -P( 6, 0xfbb3b5dc01131289UL, 0x0044c4a23feeced7UL) /* 953 */ -P(14, 0x856d560a0f5acdf7UL, 0x0043c5c20d3c9fe6UL) /* 967 */ -P( 4, 0x96472f314d3f89e3UL, 0x00437e494b239798UL) /* 971 */ -P( 6, 0xa76f5c7ed2253531UL, 0x0043142d118e47cbUL) /* 977 */ -P( 6, 0x816eae7c7bf69fe7UL, 0x0042ab5c73a13458UL) /* 983 */ -P( 8, 0xb6a2bea4cfb1781fUL, 0x004221950db0f3dbUL) /* 991 */ -P( 6, 0xa3900c53318e81edUL, 0x0041bbb2f80a4553UL) /* 997 */ -P(12, 0x60aa7f5d9f148d11UL, 0x0040f391612c6680UL) /* 1009 */ -P( 4, 0x6be8c0102c7a505dUL, 0x0040b1e94173fefdUL) /* 1013 */ -P( 6, 0x8ff3f0ed28728f33UL, 0x004050647d9d0445UL) /* 1019 */ -P( 2, 0x680e0a87e5ec7155UL, 0x004030241b144f3bUL) /* 1021 */ -P(10, 0xbbf70fa49fe829b7UL, 0x003f90c2ab542cb1UL) /* 1031 */ -P( 2, 0xd69d1e7b6a50ca39UL, 0x003f71412d59f597UL) /* 1033 */ -P( 6, 0x1a1e0f46b6d26aefUL, 0x003f137701b98841UL) /* 1039 */ -P(10, 0x7429f9a7a8251829UL, 0x003e79886b60e278UL) /* 1049 */ -P( 2, 0xd9c2219d1b863613UL, 0x003e5b1916a7181dUL) /* 1051 */ -P(10, 0x91406c1820d077adUL, 0x003dc4a50968f524UL) /* 1061 */ -P( 2, 0x521f4ec02e3d2b97UL, 0x003da6e4c9550321UL) /* 1063 */ -P( 6, 0xbb8283b63dc8eba5UL, 0x003d4e4f06f1def3UL) /* 1069 */ -P(18, 0x431eda153229ebbfUL, 0x003c4a6bdd24f9a4UL) /* 1087 */ -P( 4, 0xaf0bf78d7e01686bUL, 0x003c11d54b525c73UL) /* 1091 */ -P( 2, 0xa9ced0742c086e8dUL, 0x003bf5b1c5721065UL) /* 1093 */ -P( 4, 0xc26458ad9f632df9UL, 0x003bbdb9862f23b4UL) /* 1097 */ -P( 6, 0xbbff1255dff892afUL, 0x003b6a8801db5440UL) /* 1103 */ -P( 6, 0xcbd49a333f04d8fdUL, 0x003b183cf0fed886UL) /* 1109 */ -P( 8, 0xec84ed6f9cfdeff5UL, 0x003aabe394bdc3f4UL) /* 1117 */ -P( 6, 0x97980cc40bda9d4bUL, 0x003a5ba3e76156daUL) /* 1123 */ -P( 6, 0x777f34d524f5cbd9UL, 0x003a0c3e953378dbUL) /* 1129 */ -P(22, 0x2797051d94cbbb7fUL, 0x0038f03561320b1eUL) /* 1151 */ -P( 2, 0xea769051b4f43b81UL, 0x0038d6ecaef5908aUL) /* 1153 */ -P(10, 0xce7910f3034d4323UL, 0x003859cf221e6069UL) /* 1163 */ -P( 8, 0x92791d1374f5b99bUL, 0x0037f7415dc9588aUL) /* 1171 */ -P(10, 0x89a5645cc68ea1b5UL, 0x00377df0d3902626UL) /* 1181 */ -P( 6, 0x5f8aacf796c0cf0bUL, 0x00373622136907faUL) /* 1187 */ -P( 6, 0xf2e90a15e33edf99UL, 0x0036ef0c3b39b92fUL) /* 1193 */ -P( 8, 0x8e99e5feb897c451UL, 0x0036915f47d55e6dUL) /* 1201 */ -P(12, 0xaca2eda38fb91695UL, 0x0036072cf3f866fdUL) /* 1213 */ -P( 4, 0x5d9b737be5ea8b41UL, 0x0035d9b737be5ea8UL) /* 1217 */ -P( 6, 0x4aefe1db93fd7cf7UL, 0x0035961559cc81c7UL) /* 1223 */ -P( 6, 0xa0994ef20b3f8805UL, 0x0035531c897a4592UL) /* 1229 */ -P( 2, 0x103890bda912822fUL, 0x00353ceebd3e98a4UL) /* 1231 */ -P( 6, 0xb441659d13a9147dUL, 0x0034fad381585e5eUL) /* 1237 */ -P(12, 0x1e2134440c4c3f21UL, 0x00347884d1103130UL) /* 1249 */ -P(10, 0x263a27727a6883c3UL, 0x00340dd3ac39bf56UL) /* 1259 */ -P(18, 0x78e221472ab33855UL, 0x003351fdfecc140cUL) /* 1277 */ -P( 2, 0x95eac88e82e6faffUL, 0x00333d72b089b524UL) /* 1279 */ -P( 4, 0xf66c258317be8dabUL, 0x0033148d44d6b261UL) /* 1283 */ -P( 6, 0x09ee202c7cb91939UL, 0x0032d7aef8412458UL) /* 1289 */ -P( 2, 0x8d2fca1042a09ea3UL, 0x0032c3850e79c0f1UL) /* 1291 */ -P( 6, 0x82779c856d8b8bf1UL, 0x00328766d59048a2UL) /* 1297 */ -P( 4, 0x3879361cba8a223dUL, 0x00325fa18cb11833UL) /* 1301 */ -P( 2, 0xf23f43639c3182a7UL, 0x00324bd659327e22UL) /* 1303 */ -P( 4, 0xa03868fc474bcd13UL, 0x0032246e784360f4UL) /* 1307 */ -P(12, 0x651e78b8c5311a97UL, 0x0031afa5f1a33a08UL) /* 1319 */ -P( 2, 0x8ffce639c00c6719UL, 0x00319c63ff398e70UL) /* 1321 */ -P( 6, 0xf7b460754b0b61cfUL, 0x003162f7519a86a7UL) /* 1327 */ -P(34, 0x7b03f3359b8e63b1UL, 0x0030271fc9d3fc3cUL) /* 1361 */ -P( 6, 0xa55c5326041eb667UL, 0x002ff104ae89750bUL) /* 1367 */ -P( 6, 0x647f88ab896a76f5UL, 0x002fbb62a236d133UL) /* 1373 */ -P( 8, 0x8fd971434a55a46dUL, 0x002f74997d2070b4UL) /* 1381 */ -P(18, 0x9fbf969958046447UL, 0x002ed84aa8b6fce3UL) /* 1399 */ -P(10, 0x9986feba69be3a81UL, 0x002e832df7a46dbdUL) /* 1409 */ -P(14, 0xa668b3e6d053796fUL, 0x002e0e0846857cabUL) /* 1423 */ -P( 4, 0x97694e6589f4e09bUL, 0x002decfbdfb55ee6UL) /* 1427 */ -P( 2, 0x37890c00b7721dbdUL, 0x002ddc876f3ff488UL) /* 1429 */ -P( 4, 0x5ac094a235f37ea9UL, 0x002dbbc1d4c482c4UL) /* 1433 */ -P( 6, 0x31cff775f2d5d65fUL, 0x002d8af0e0de0556UL) /* 1439 */ -P( 8, 0xddad8e6b36505217UL, 0x002d4a7b7d14b30aUL) /* 1447 */ -P( 4, 0x5a27df897062cd03UL, 0x002d2a85073bcf4eUL) /* 1451 */ -P( 2, 0xe2396fe0fdb5a625UL, 0x002d1a9ab13e8be4UL) /* 1453 */ -P( 6, 0xb352a4957e82317bUL, 0x002ceb1eb4b9fd8bUL) /* 1459 */ -P(12, 0xd8ab3f2c60c2ea3fUL, 0x002c8d503a79794cUL) /* 1471 */ -P(10, 0x6893f702f0452479UL, 0x002c404d708784edUL) /* 1481 */ -P( 2, 0x9686fdc182acf7e3UL, 0x002c31066315ec52UL) /* 1483 */ -P( 4, 0x6854037173dce12fUL, 0x002c1297d80f2664UL) /* 1487 */ -P( 2, 0x7f0ded1685c27331UL, 0x002c037044c55f6bUL) /* 1489 */ -P( 4, 0xeeda72e1fe490b7dUL, 0x002be5404cd13086UL) /* 1493 */ -P( 6, 0x9e7bfc959a8e6e53UL, 0x002bb845adaf0cceUL) /* 1499 */ -P(12, 0x49b314d6d4753dd7UL, 0x002b5f62c639f16dUL) /* 1511 */ -P(12, 0x2e8f8c5ac4aa1b3bUL, 0x002b07e6734f2b88UL) /* 1523 */ -P( 8, 0xb8ef723481163d33UL, 0x002ace569d8342b7UL) /* 1531 */ -P(12, 0x6a2ec96a594287b7UL, 0x002a791d5dbd4dcfUL) /* 1543 */ -P( 6, 0xdba41c6d13aab8c5UL, 0x002a4eff8113017cUL) /* 1549 */ -P( 4, 0xc2adbe648dc3aaf1UL, 0x002a3319e156df32UL) /* 1553 */ -P( 6, 0x87a2bade565f91a7UL, 0x002a0986286526eaUL) /* 1559 */ -P( 8, 0x4d6fe8798c01f5dfUL, 0x0029d29551d91e39UL) /* 1567 */ -P( 4, 0x3791310c8c23d98bUL, 0x0029b7529e109f0aUL) /* 1571 */ -P( 8, 0xf80e446b01228883UL, 0x00298137491ea465UL) /* 1579 */ -P( 4, 0x9aed1436fbf500cfUL, 0x0029665e1eb9f9daUL) /* 1583 */ -P(14, 0x7839b54cc8b24115UL, 0x002909752e019a5eUL) /* 1597 */ -P( 4, 0xc128c646ad0309c1UL, 0x0028ef35e2e5efb0UL) /* 1601 */ -P( 6, 0x14de631624a3c377UL, 0x0028c815aa4b8278UL) /* 1607 */ -P( 2, 0x3f7b9fe68b0ecbf9UL, 0x0028bb1b867199daUL) /* 1609 */ -P( 4, 0x284ffd75ec00a285UL, 0x0028a13ff5d7b002UL) /* 1613 */ -P( 6, 0x37803cb80dea2ddbUL, 0x00287ab3f173e755UL) /* 1619 */ -P( 2, 0x86b63f7c9ac4c6fdUL, 0x00286dead67713bdUL) /* 1621 */ -P( 6, 0x8b6851d1bd99b9d3UL, 0x002847bfcda6503eUL) /* 1627 */ -P(10, 0xb62fda77ca343b6dUL, 0x002808c1ea6b4777UL) /* 1637 */ -P(20, 0x1f0dc009e34383c9UL, 0x00278d0e0f23ff61UL) /* 1657 */ -P( 6, 0x496dc21ddd35b97fUL, 0x002768863c093c7fUL) /* 1663 */ -P( 4, 0xb0e96ce17090f82bUL, 0x0027505115a73ca8UL) /* 1667 */ -P( 2, 0xaadf05acdd7d024dUL, 0x00274441a61dc1b9UL) /* 1669 */ -P(24, 0xcb138196746eafb5UL, 0x0026b5c166113cf0UL) /* 1693 */ -P( 4, 0x347f523736755d61UL, 0x00269e65ad07b18eUL) /* 1697 */ -P( 2, 0xd14a48a051f7dd0bUL, 0x002692c25f877560UL) /* 1699 */ -P(10, 0x474d71b1ce914d25UL, 0x002658fa7523cd11UL) /* 1709 */ -P(12, 0x386063f5e28c1f89UL, 0x0026148710cf0f9eUL) /* 1721 */ -P( 2, 0x1db7325e32d04e73UL, 0x002609363b22524fUL) /* 1723 */ -P(10, 0xfef748d3893b880dUL, 0x0025d1065a1c1122UL) /* 1733 */ -P( 8, 0x2f3351506e935605UL, 0x0025a48a382b863fUL) /* 1741 */ -P( 6, 0x7a3637fa2376415bUL, 0x0025837190eccdbcUL) /* 1747 */ -P( 6, 0x4ac525d2baa21969UL, 0x00256292e95d510cUL) /* 1753 */ -P( 6, 0x3a11c16b42cd351fUL, 0x002541eda98d068cUL) /* 1759 */ -P(18, 0x6c7abde0049c2a11UL, 0x0024e15087fed8f5UL) /* 1777 */ -P( 6, 0x54dad0303e069ac7UL, 0x0024c18b20979e5dUL) /* 1783 */ -P( 4, 0xebf1ac9fdfe91433UL, 0x0024ac7b336de0c5UL) /* 1787 */ -P( 2, 0xfafdda8237cec655UL, 0x0024a1fc478c60bbUL) /* 1789 */ -P(12, 0xdce3ff6e71ffb739UL, 0x002463801231c009UL) /* 1801 */ -P(10, 0xbed5737d6286db1bUL, 0x0024300fd506ed33UL) /* 1811 */ -P(12, 0xe479e431fe08b4dfUL, 0x0023f314a494da81UL) /* 1823 */ -P( 8, 0x9dd9b0dd7742f897UL, 0x0023cadedd2fad3aUL) /* 1831 */ -P(16, 0x8f09d7402c5a5e87UL, 0x00237b7ed2664a03UL) /* 1847 */ -P(14, 0x9216d5c4d958738dUL, 0x0023372967dbaf1dUL) /* 1861 */ -P( 6, 0xb3139ba11d34ca63UL, 0x00231a308a371f20UL) /* 1867 */ -P( 4, 0x47d54f7ed644afafUL, 0x002306fa63e1e600UL) /* 1871 */ -P( 2, 0x92a81d85cf11a1b1UL, 0x0022fd6731575684UL) /* 1873 */ -P( 4, 0x754b26533253bdfdUL, 0x0022ea507805749cUL) /* 1877 */ -P( 2, 0xbbe0efc980bfd467UL, 0x0022e0cce8b3d720UL) /* 1879 */ -P(10, 0xc0d8d594f024dca1UL, 0x0022b1887857d161UL) /* 1889 */ -P(12, 0x8238d43bcaac1a65UL, 0x00227977fcc49cc0UL) /* 1901 */ -P( 6, 0x27779c1fae6175bbUL, 0x00225db37b5e5f4fUL) /* 1907 */ -P( 6, 0xa746ca9af708b2c9UL, 0x0022421b91322ed6UL) /* 1913 */ -P(18, 0x93f3cd9f389be823UL, 0x0021f05b35f52102UL) /* 1931 */ -P( 2, 0x5cb4a4c04c489345UL, 0x0021e75de5c70d60UL) /* 1933 */ -P(16, 0xbf6047743e85b6b5UL, 0x0021a01d6c19be96UL) /* 1949 */ -P( 2, 0x61c147831563545fUL, 0x0021974a6615c81aUL) /* 1951 */ -P(22, 0xedb47c0ae62dee9dUL, 0x00213767697cf36aUL) /* 1973 */ -P( 6, 0x0a3824386673a573UL, 0x00211d9f7fad35f1UL) /* 1979 */ -P( 8, 0xa4a77d19e575a0ebUL, 0x0020fb7d9dd36c18UL) /* 1987 */ -P( 6, 0xa2bee045e066c279UL, 0x0020e2123d661e0eUL) /* 1993 */ -P( 4, 0xc23618de8ab43d05UL, 0x0020d135b66ae990UL) /* 1997 */ -P( 2, 0x266b515216cb9f2fUL, 0x0020c8cded4d7a8eUL) /* 1999 */ -P( 4, 0xe279edd9e9c2e85bUL, 0x0020b80b3f43ddbfUL) /* 2003 */ -P( 8, 0xd0c591c221dc9c53UL, 0x002096b9180f46a6UL) /* 2011 */ -P( 6, 0x06da8ee9c9ee7c21UL, 0x00207de7e28de5daUL) /* 2017 */ -P(10, 0x9dfebcaf4c27e8c3UL, 0x002054dec8cf1fb3UL) /* 2027 */ -P( 2, 0x49aeff9f19dd6de5UL, 0x00204cb630b3aab5UL) /* 2029 */ -P(10, 0x86976a57a296e9c7UL, 0x00202428adc37bebUL) /* 2039 */ -P(14, 0xa3b9abf4872b84cdUL, 0x001fec0c7834def4UL) /* 2053 */ -P(10, 0x34fca6483895e6efUL, 0x001fc46fae98a1d0UL) /* 2063 */ -P( 6, 0x34b5a333988f873dUL, 0x001facda430ff619UL) /* 2069 */ -P(12, 0xd9dd4f19b5f17be1UL, 0x001f7e17dd8e15e5UL) /* 2081 */ -P( 2, 0xb935b507fd0ce78bUL, 0x001f765a3556a4eeUL) /* 2083 */ -P( 4, 0xb450f5540660e797UL, 0x001f66ea49d802f1UL) /* 2087 */ -P( 2, 0x63ff82831ffc1419UL, 0x001f5f3800faf9c0UL) /* 2089 */ -P(10, 0x8992f718c22a32fbUL, 0x001f38f4e6c0f1f9UL) /* 2099 */ -P(12, 0x5f3253ad0d37e7bfUL, 0x001f0b8546752578UL) /* 2111 */ -P( 2, 0x007c0ffe0fc007c1UL, 0x001f03ff83f001f0UL) /* 2113 */ -P(16, 0x4d8ebadc0c0640b1UL, 0x001ec853b0a3883cUL) /* 2129 */ -P( 2, 0xe2729af831037bdbUL, 0x001ec0ee573723ebUL) /* 2131 */ -P( 6, 0xb8f64bf30feebfe9UL, 0x001eaad38e6f6894UL) /* 2137 */ -P( 4, 0xda93124b544c0bf5UL, 0x001e9c28a765fe53UL) /* 2141 */ -P( 2, 0x9cf7ff0b593c539fUL, 0x001e94d8758c2003UL) /* 2143 */ -P(10, 0xd6bd8861fa0e07d9UL, 0x001e707ba8f65e68UL) /* 2153 */ -P( 8, 0x5cfe75c0bd8ab891UL, 0x001e53a2a68f574eUL) /* 2161 */ -P(18, 0x43e808757c2e862bUL, 0x001e1380a56b438dUL) /* 2179 */ -P(24, 0x90caa96d595c9d93UL, 0x001dbf9f513a3802UL) /* 2203 */ -P( 4, 0x8fd550625d07135fUL, 0x001db1d1d58bc600UL) /* 2207 */ -P( 6, 0x76b010a86e209f2dUL, 0x001d9d358f53de38UL) /* 2213 */ -P( 8, 0xecc0426447769b25UL, 0x001d81e6df6165c7UL) /* 2221 */ -P(16, 0xe381339caabe3295UL, 0x001d4bdf7fd40e30UL) /* 2237 */ -P( 2, 0xd1b190a2d0c7673fUL, 0x001d452c7a1c958dUL) /* 2239 */ -P( 4, 0xc3bce3cf26b0e7ebUL, 0x001d37cf9b902659UL) /* 2243 */ -P( 8, 0x5f87e76f56c61ce3UL, 0x001d1d3a5791e97bUL) /* 2251 */ -P(16, 0xc06c6857a124b353UL, 0x001ce89fe6b47416UL) /* 2267 */ -P( 2, 0x38c040fcba630f75UL, 0x001ce219f3235071UL) /* 2269 */ -P( 4, 0xd078bc4fbd533b21UL, 0x001cd516dcf92139UL) /* 2273 */ -P( 8, 0xde8e15c5dd354f59UL, 0x001cbb33bd1c2b8bUL) /* 2281 */ -P( 6, 0xca61d53d7414260fUL, 0x001ca7e7d2546688UL) /* 2287 */ -P( 6, 0xb56bf5ba8eae635dUL, 0x001c94b5c1b3dbd3UL) /* 2293 */ -P( 4, 0x44a72cb0fb6e3949UL, 0x001c87f7f9c241c1UL) /* 2297 */ -P(12, 0x879839a714f45bcdUL, 0x001c6202706c35a9UL) /* 2309 */ -P( 2, 0x02a8994fde5314b7UL, 0x001c5bb8a9437632UL) /* 2311 */ -P(22, 0xb971920cf2b90135UL, 0x001c174343b4111eUL) /* 2333 */ -P( 6, 0x8a8fd0b7df9a6e8bUL, 0x001c04d0d3e46b42UL) /* 2339 */ -P( 2, 0xb31f9a84c1c6eaadUL, 0x001bfeb00fbf4308UL) /* 2341 */ -P( 6, 0x92293b02823c6d83UL, 0x001bec5dce0b202dUL) /* 2347 */ -P( 4, 0xeee77ff20fe5ddcfUL, 0x001be03444620037UL) /* 2351 */ -P( 6, 0x0e1ea0f6c496c11dUL, 0x001bce09c66f6fc3UL) /* 2357 */ -P(14, 0xfdf2d3d6f88ccb6bUL, 0x001ba40228d02b30UL) /* 2371 */ -P( 6, 0xfa9d74a3457738f9UL, 0x001b9225b1cf8919UL) /* 2377 */ -P( 4, 0xefc3ca3db71a5785UL, 0x001b864a2ff3f53fUL) /* 2381 */ -P( 2, 0x8e2071718d0d6dafUL, 0x001b80604150e49bUL) /* 2383 */ -P( 6, 0xbc0fdbfeb6cfabfdUL, 0x001b6eb1aaeaacf3UL) /* 2389 */ -P( 4, 0x1eeab613e5e5aee9UL, 0x001b62f48da3c8ccUL) /* 2393 */ -P( 6, 0x2d2388e90e9e929fUL, 0x001b516babe96092UL) /* 2399 */ -P(12, 0x81dbafba588ddb43UL, 0x001b2e9cef1e0c87UL) /* 2411 */ -P( 6, 0x52eebc51c4799791UL, 0x001b1d56bedc849bUL) /* 2417 */ -P( 6, 0x1c6bc4693b45a047UL, 0x001b0c267546aec0UL) /* 2423 */ -P(14, 0x06eee0974498874dUL, 0x001ae45f62024fa0UL) /* 2437 */ -P( 4, 0xd85b7377a9953cb9UL, 0x001ad917631b5f54UL) /* 2441 */ -P( 6, 0x4b6df412d4caf56fUL, 0x001ac83d18cb608fUL) /* 2447 */ -P(12, 0x6b8afbbb4a053493UL, 0x001aa6c7ad8c063fUL) /* 2459 */ -P( 8, 0xcc5299c96ac7720bUL, 0x001a90a7b1228e2aUL) /* 2467 */ -P( 6, 0xadce84b5c710aa99UL, 0x001a8027c03ba059UL) /* 2473 */ -P( 4, 0x9d673f5aa3804225UL, 0x001a7533289deb89UL) /* 2477 */ -P(26, 0xe6541268efbce7f7UL, 0x001a2ed7ce16b49fUL) /* 2503 */ -P(18, 0xfcf41e76cf5be669UL, 0x0019fefc0a279a73UL) /* 2521 */ -P(10, 0x5c3eb5dc31c383cbUL, 0x0019e4b0cd873b5fUL) /* 2531 */ -P( 8, 0x301832d11d8ad6c3UL, 0x0019cfcdfd60e514UL) /* 2539 */ -P( 4, 0x2e9c0942f1ce450fUL, 0x0019c56932d66c85UL) /* 2543 */ -P( 6, 0x97f3f2be37a39a5dUL, 0x0019b5e1ab6fc7c2UL) /* 2549 */ -P( 2, 0xe8b7d8a9654187c7UL, 0x0019b0b8a62f2a73UL) /* 2551 */ -P( 6, 0xb5d024d7da5b1b55UL, 0x0019a149fc98942cUL) /* 2557 */ -P(22, 0xb8ba9d6e7ae3501bUL, 0x001969517ec25b85UL) /* 2579 */ -P(12, 0xf50865f71b90f1dfUL, 0x00194b3083360ba8UL) /* 2591 */ -P( 2, 0x739c1682847df9e1UL, 0x00194631f4bebdc1UL) /* 2593 */ -P(16, 0xc470a4d842b90ed1UL, 0x00191e84127268fdUL) /* 2609 */ -P( 8, 0x1fb1be11698cc409UL, 0x00190adbb543984fUL) /* 2617 */ -P( 4, 0xd8d5512a7cd35d15UL, 0x001901130bd18200UL) /* 2621 */ -P(12, 0xa5496821723e07f9UL, 0x0018e3e6b889ac94UL) /* 2633 */ -P(14, 0xbcc8c6d7abaa8167UL, 0x0018c233420e1ec1UL) /* 2647 */ -P(10, 0x52c396c95eb619a1UL, 0x0018aa5872d92bd6UL) /* 2657 */ -P( 2, 0x6eb7e380878ec74bUL, 0x0018a5989945ccf9UL) /* 2659 */ -P( 4, 0x3d5513b504537157UL, 0x00189c1e60b57f60UL) /* 2663 */ -P( 8, 0x314391f8862e948fUL, 0x0018893fbc8690b9UL) /* 2671 */ -P( 6, 0xdc0b17cfcd81f5ddUL, 0x00187b2bb3e1041cUL) /* 2677 */ -P( 6, 0x2f6bea3ec89044b3UL, 0x00186d27c9cdcfb8UL) /* 2683 */ -P( 4, 0xce13a05869f1b57fUL, 0x001863d8bf4f2c1cUL) /* 2687 */ -P( 2, 0x7593474e8ace3581UL, 0x00185f33e2ad7593UL) /* 2689 */ -P( 4, 0x07fc329295a05e4dUL, 0x001855ef75973e13UL) /* 2693 */ -P( 6, 0xb05377cba4908d23UL, 0x001848160153f134UL) /* 2699 */ -P( 8, 0xe7b2131a628aa39bUL, 0x001835b72e6f0656UL) /* 2707 */ -P( 4, 0x9031dbed7de01527UL, 0x00182c922d83eb39UL) /* 2711 */ -P( 2, 0x76844b1c670aa9a9UL, 0x0018280243c0365aUL) /* 2713 */ -P( 6, 0x6a03f4533b08915fUL, 0x00181a5cd5898e73UL) /* 2719 */ -P(10, 0x1dbca579db0a3999UL, 0x001803c0961773aaUL) /* 2729 */ -P( 2, 0x002ffe800bffa003UL, 0x0017ff4005ffd001UL) /* 2731 */ -P(10, 0x478ab1a3e936139dUL, 0x0017e8d670433edbUL) /* 2741 */ -P( 8, 0x66e722bc4c5cc095UL, 0x0017d7066cf4bb5dUL) /* 2749 */ -P( 4, 0x7a8f63c717278541UL, 0x0017ce285b806b1fUL) /* 2753 */ -P(14, 0xdf6eee24d292bc2fUL, 0x0017af52cdf27e02UL) /* 2767 */ -P(10, 0x9fc20d17237dd569UL, 0x0017997d47d01039UL) /* 2777 */ -P(12, 0xcdf9932356bda2edUL, 0x00177f7ec2c6d0baUL) /* 2789 */ -P( 2, 0x97b5e332e80f68d7UL, 0x00177b2f3cd00756UL) /* 2791 */ -P( 6, 0x46eee26fd875e2e5UL, 0x00176e4a22f692a0UL) /* 2797 */ -P( 4, 0x3548a8e65157a611UL, 0x001765b94271e11bUL) /* 2801 */ -P( 2, 0xc288d03be9b71e3bUL, 0x001761732b044ae4UL) /* 2803 */ -P(16, 0x8151186db38937abUL, 0x00173f7a5300a2bcUL) /* 2819 */ -P(14, 0x7800b910895a45f1UL, 0x001722112b48be1fUL) /* 2833 */ -P( 4, 0xaee0b024182eec3dUL, 0x001719b7a16eb843UL) /* 2837 */ -P( 6, 0x96323eda173b5713UL, 0x00170d3c99cc5052UL) /* 2843 */ -P( 8, 0x0ed0dbd03ae77c8bUL, 0x0016fcad7aed3bb6UL) /* 2851 */ -P( 6, 0xf73800b7828dc119UL, 0x0016f051b8231ffdUL) /* 2857 */ -P( 4, 0x1b61715ec22b7ca5UL, 0x0016e81beae20643UL) /* 2861 */ -P(18, 0xa8533a991ead64bfUL, 0x0016c3721584c1d8UL) /* 2879 */ -P( 8, 0x7f6c7290e46c2e77UL, 0x0016b34c2ba09663UL) /* 2887 */ -P(10, 0x6325e8d907b01db1UL, 0x00169f3ce292ddcdUL) /* 2897 */ -P( 6, 0x28909f70152a1067UL, 0x00169344b2220a0dUL) /* 2903 */ -P( 6, 0xea7077af0997a0f5UL, 0x001687592593c1b1UL) /* 2909 */ -P( 8, 0x7e605cad10c32e6dUL, 0x00167787f1418ec9UL) /* 2917 */ -P(10, 0x471b33570635b38fUL, 0x001663e190395ff2UL) /* 2927 */ -P(12, 0xab559fa997a61bb3UL, 0x00164c7a4b6eb5b3UL) /* 2939 */ -P(14, 0xad4bdae562bddab9UL, 0x0016316a061182fdUL) /* 2953 */ -P( 4, 0x055e1b2f2ed62f45UL, 0x001629ba914584e4UL) /* 2957 */ -P( 6, 0x03cd328b1a2dca9bUL, 0x00161e3d57de21b2UL) /* 2963 */ -P( 6, 0xd28f4e08733218a9UL, 0x001612cc01b977f0UL) /* 2969 */ -P( 2, 0xb6800b077f186293UL, 0x00160efe30c525ffUL) /* 2971 */ -P(28, 0x6fbd138c3fd9c207UL, 0x0015da45249ec5deUL) /* 2999 */ -P( 2, 0xb117ccd12ae88a89UL, 0x0015d68ab4acff92UL) /* 3001 */ -P(10, 0x2f1a1a044046bcebUL, 0x0015c3f989d1eb15UL) /* 3011 */ -P( 8, 0x548aba0b060541e3UL, 0x0015b535ad11b8f0UL) /* 3019 */ -P( 4, 0xcf4e808cea111b2fUL, 0x0015addb3f424ec1UL) /* 3023 */ -P(14, 0xdbec1b4fa855a475UL, 0x00159445cb91be6bUL) /* 3037 */ -P( 4, 0xe3f794eb600d7821UL, 0x00158d0199771e63UL) /* 3041 */ -P( 8, 0x34fae0d9a11f7c59UL, 0x00157e87d9b69e04UL) /* 3049 */ -P(12, 0xf006b0ccbbac085dUL, 0x001568f58bc01ac3UL) /* 3061 */ -P( 6, 0x3f45076dc3114733UL, 0x00155e3c993fda9bUL) /* 3067 */ -P(12, 0xeef49bfa58a1a1b7UL, 0x001548eacc5e1e6eUL) /* 3079 */ -P( 4, 0x12c4218bea691fa3UL, 0x001541d8f91ba6a7UL) /* 3083 */ -P( 6, 0xbc7504e3bd5e64f1UL, 0x00153747060cc340UL) /* 3089 */ -P(20, 0x4ee21c292bb92fadUL, 0x001514569f93f7c4UL) /* 3109 */ -P(10, 0x34338b7327a4bacfUL, 0x00150309705d3d79UL) /* 3119 */ -P( 2, 0x3fe5c0833d6fccd1UL, 0x0014ff97020cf5bfUL) /* 3121 */ -P(16, 0xb1e70743535203c1UL, 0x0014e42c114cf47eUL) /* 3137 */ -P(26, 0xefbb5dcdfb4e43d3UL, 0x0014b835bdcb6447UL) /* 3163 */ -P( 4, 0xca68467ca5394f9fUL, 0x0014b182b53a9ab7UL) /* 3167 */ -P( 2, 0x8c51c081408b97a1UL, 0x0014ae2ad094a3d3UL) /* 3169 */ -P(12, 0x3275a899dfa5dd65UL, 0x00149a320ea59f96UL) /* 3181 */ -P( 6, 0x9e674cb62e1b78bbUL, 0x001490441de1a2fbUL) /* 3187 */ -P( 4, 0xa37ff5bb2a998d47UL, 0x001489aacce57200UL) /* 3191 */ -P(12, 0x792a999db131a22bUL, 0x001475f82ad6ff99UL) /* 3203 */ -P( 6, 0x1b48841bc30d29b9UL, 0x00146c2cfe53204fUL) /* 3209 */ -P( 8, 0xf06721d2011d3471UL, 0x00145f2ca490d4a1UL) /* 3217 */ -P( 4, 0x93fd2386dff85ebdUL, 0x001458b2aae0ec87UL) /* 3221 */ -P( 8, 0x4ce72f54c07ed9b5UL, 0x00144bcb0a3a3150UL) /* 3229 */ -P(22, 0xd6d0fd3e71dd827bUL, 0x001428a1e65441d4UL) /* 3251 */ -P( 2, 0x856405fb1eed819dUL, 0x00142575a6c210d7UL) /* 3253 */ -P( 4, 0x8ea8aceb7c443989UL, 0x00141f2025ba5c46UL) /* 3257 */ -P( 2, 0x34a13026f62e5873UL, 0x00141bf6e35420fdUL) /* 3259 */ -P(12, 0x1eea0208ec0af4f7UL, 0x001409141d1d313aUL) /* 3271 */ -P(28, 0x63679853cea598cbUL, 0x0013dd8bc19c3513UL) /* 3299 */ -P( 2, 0xc30b3ebd61f2d0edUL, 0x0013da76f714dc8fUL) /* 3301 */ -P( 6, 0x7eb9037bc7f43bc3UL, 0x0013d13e50f8f49eUL) /* 3307 */ -P( 6, 0xa583e6f6ce016411UL, 0x0013c80e37ca3819UL) /* 3313 */ -P( 6, 0xf1938d895f1a74c7UL, 0x0013bee69fa99ccfUL) /* 3319 */ -P( 4, 0x80cf1491c1e81e33UL, 0x0013b8d0ede55835UL) /* 3323 */ -P( 6, 0x3c0f12886ba8f301UL, 0x0013afb7680bb054UL) /* 3329 */ -P( 2, 0x0e4b786e0dfcc5abUL, 0x0013acb0c3841c96UL) /* 3331 */ -P(12, 0x672684c93f2d41efUL, 0x00139a9c5f434fdeUL) /* 3343 */ -P( 4, 0xe00757badb35c51bUL, 0x0013949cf33a0d9dUL) /* 3347 */ -P(12, 0xd6d84afe66472edfUL, 0x001382b4a00c31b0UL) /* 3359 */ -P( 2, 0xfbbc0eedcbbfb6e1UL, 0x00137fbbc0eedcbbUL) /* 3361 */ -P(10, 0x250f43aa08a84983UL, 0x001370ecf047b069UL) /* 3371 */ -P( 2, 0x04400e927b1acaa5UL, 0x00136df9790e3155UL) /* 3373 */ -P(16, 0x56572be34b9d3215UL, 0x0013567dd8defd5bUL) /* 3389 */ -P( 2, 0x87964ef7781c62bfUL, 0x0013539261fdbc34UL) /* 3391 */ -P(16, 0x29ed84051c06e9afUL, 0x00133c564292d28aUL) /* 3407 */ -P( 6, 0xb00acd11ed3f87fdUL, 0x001333ae178d6388UL) /* 3413 */ -P(20, 0x06307881744152d9UL, 0x0013170ad00d1fd7UL) /* 3433 */ -P(16, 0x7a786459f5c1ccc9UL, 0x0013005f01db0947UL) /* 3449 */ -P( 8, 0x1308125d74563281UL, 0x0012f51d40342210UL) /* 3457 */ -P( 4, 0x395310a480b3e34dUL, 0x0012ef815e4ed950UL) /* 3461 */ -P( 2, 0x35985baa8b202837UL, 0x0012ecb4abccd827UL) /* 3463 */ -P( 4, 0x96304a6e052b3223UL, 0x0012e71dc1d3d820UL) /* 3467 */ -P( 2, 0xbd8265fc9af8fd45UL, 0x0012e45389a16495UL) /* 3469 */ -P(22, 0x1b6d0b383ec58e0bUL, 0x0012c5d9226476ccUL) /* 3491 */ -P( 8, 0xc21a7c3b68b28503UL, 0x0012badc391156fdUL) /* 3499 */ -P(12, 0x236fa180fbfd6007UL, 0x0012aa78e412f522UL) /* 3511 */ -P( 6, 0xc42accd440ed9595UL, 0x0012a251f5f47fd1UL) /* 3517 */ -P(10, 0x7acf7128236ba3f7UL, 0x001294cb85c53534UL) /* 3527 */ -P( 2, 0xf909367a987b9c79UL, 0x0012921963beb65eUL) /* 3529 */ -P( 4, 0xb64efb252bfba705UL, 0x00128cb777c69ca8UL) /* 3533 */ -P( 6, 0x980d4f5a7e4cd25bUL, 0x001284aa6cf07294UL) /* 3539 */ -P( 2, 0xe1ecc4ef27b0c37dUL, 0x001281fcf6ac7f87UL) /* 3541 */ -P( 6, 0x9111aebb81d72653UL, 0x001279f937367db9UL) /* 3547 */ -P(10, 0x8951f985cb2c67edUL, 0x00126cad0488be94UL) /* 3557 */ -P( 2, 0xc439d4fc54e0b5d7UL, 0x00126a06794646a2UL) /* 3559 */ -P(12, 0xe857bf31896d533bUL, 0x00125a2f2bcd3e95UL) /* 3571 */ -P(10, 0xb614bb4cb5023755UL, 0x00124d108389e6b1UL) /* 3581 */ -P( 2, 0x938a89e5473bf1ffUL, 0x00124a73083771acUL) /* 3583 */ -P(10, 0xeac481aca34de039UL, 0x00123d6acda0620aUL) /* 3593 */ -P(14, 0x14b961badf4809a7UL, 0x00122b4b2917eafdUL) /* 3607 */ -P( 6, 0x76784fecba352435UL, 0x00122391bfce1e2fUL) /* 3613 */ -P( 4, 0xefa689bb58aef5e1UL, 0x00121e6f1ea579f2UL) /* 3617 */ -P( 6, 0xb2b2c4db9c3a8197UL, 0x001216c09e471568UL) /* 3623 */ -P( 8, 0x2503bc992279f8cfUL, 0x00120c8cb9d93909UL) /* 3631 */ -P( 6, 0xd2ab9aec5ca1541dUL, 0x001204ed58e64ef9UL) /* 3637 */ -P( 6, 0x3e78ba1460f99af3UL, 0x0011fd546578f00cUL) /* 3643 */ -P(16, 0x0a01426572cfcb63UL, 0x0011e9310b8b4c9cUL) /* 3659 */ -P(12, 0xbea857968f3cbd67UL, 0x0011da3405db9911UL) /* 3671 */ -P( 2, 0x78db213eefe659e9UL, 0x0011d7b6f4eb055dUL) /* 3673 */ -P( 4, 0x963e8541a74d35f5UL, 0x0011d2bee748c145UL) /* 3677 */ -P(14, 0x9e22d152776f2e43UL, 0x0011c1706ddce7a7UL) /* 3691 */ -P( 6, 0x05d10d39d1e1f291UL, 0x0011ba0fed2a4f14UL) /* 3697 */ -P( 4, 0x374468dccaced1ddUL, 0x0011b528538ed64aUL) /* 3701 */ -P( 8, 0x8d145c7d110c5ad5UL, 0x0011ab61404242acUL) /* 3709 */ -P(10, 0x3251a39f5acb5737UL, 0x00119f378ce81d2fUL) /* 3719 */ -P( 8, 0xa66e50171443506fUL, 0x001195889ece79daUL) /* 3727 */ -P( 6, 0x124f69ad91dd4cbdUL, 0x00118e4c65387077UL) /* 3733 */ -P( 6, 0xec24f8f2a61a2793UL, 0x001187161d70e725UL) /* 3739 */ -P(22, 0xb472148e656b7a51UL, 0x00116cd6d1c85239UL) /* 3761 */ -P( 6, 0x0adf9570e1142f07UL, 0x001165bbe7ce86b1UL) /* 3767 */ -P( 2, 0x89bf33b065119789UL, 0x0011635ee344ce36UL) /* 3769 */ -P(10, 0x8f0149803cb291ebUL, 0x0011579767b6d679UL) /* 3779 */ -P(14, 0x8334b63afd190a31UL, 0x00114734711e2b54UL) /* 3793 */ -P( 4, 0x920908d50d6aba7dUL, 0x0011428b90147f05UL) /* 3797 */ -P( 6, 0x57d8b018c5a33d53UL, 0x00113b92f3021636UL) /* 3803 */ -P(18, 0xea1773092dc27ee5UL, 0x001126cabc886884UL) /* 3821 */ -P( 2, 0xcae5f38b7bf2e00fUL, 0x0011247eb1b85976UL) /* 3823 */ -P(10, 0x2bd02df34f695349UL, 0x0011190bb01efd65UL) /* 3833 */ -P(14, 0xddfecd5be62e2eb7UL, 0x0011091de0fd679cUL) /* 3847 */ -P( 4, 0xdbf849ebec96c4a3UL, 0x001104963c7e4e0bUL) /* 3851 */ -P( 2, 0xda31d4d0187357c5UL, 0x00110253516420b0UL) /* 3853 */ -P(10, 0xe34e21cc2d5418a7UL, 0x0010f70db7c41797UL) /* 3863 */ -P(14, 0x68ca5137a9e574adUL, 0x0010e75ee2bf9ecdUL) /* 3877 */ -P( 4, 0x3eaa0d0f804bfd19UL, 0x0010e2e91c6e0676UL) /* 3881 */ -P( 8, 0x554fb753cc20e9d1UL, 0x0010da049b9d428dUL) /* 3889 */ -P(18, 0x797afcca1300756bUL, 0x0010c6248fe3b1a2UL) /* 3907 */ -P( 4, 0x8b8d950b52eeea77UL, 0x0010c1c03ed690ebUL) /* 3911 */ -P( 6, 0xfb6cd166acabc185UL, 0x0010bb2e1379e3a2UL) /* 3917 */ -P( 2, 0x4eb6c5ed9437a7afUL, 0x0010b8fe7f61228eUL) /* 3919 */ -P( 4, 0xd1eddbd91b790cdbUL, 0x0010b4a10d60a4f7UL) /* 3923 */ -P( 6, 0x93d714ea4d8948e9UL, 0x0010ae192681ec0fUL) /* 3929 */ -P( 2, 0x3ca13ed8145188d3UL, 0x0010abecfbe5b0aeUL) /* 3931 */ -P(12, 0x829086016da89c57UL, 0x00109eefd568b96dUL) /* 3943 */ -P( 4, 0xd7da1f432124a543UL, 0x00109a9ff178b40cUL) /* 3947 */ -P(20, 0x7ead5581632fb07fUL, 0x00108531e22f9ff9UL) /* 3967 */ -P(22, 0x35443837f63ec3bdUL, 0x00106ddec1af4417UL) /* 3989 */ - -#undef FIRST_OMITTED_PRIME -#define FIRST_OMITTED_PRIME 4001 diff --git a/src/plugins/e-acsl/contrib/libgmp/demos/qcn.c b/src/plugins/e-acsl/contrib/libgmp/demos/qcn.c deleted file mode 100644 index 9d764468047..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/demos/qcn.c +++ /dev/null @@ -1,172 +0,0 @@ -/* Use mpz_kronecker_ui() to calculate an estimate for the quadratic - class number h(d), for a given negative fundamental discriminant, using - Dirichlet's analytic formula. - -Copyright 1999-2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -more details. - -You should have received a copy of the GNU General Public License along with -this program. If not, see https://www.gnu.org/licenses/. */ - - -/* Usage: qcn [-p limit] <discriminant>... - - A fundamental discriminant means one of the form D or 4*D with D - square-free. Each argument is checked to see it's congruent to 0 or 1 - mod 4 (as all discriminants must be), and that it's negative, but there's - no check on D being square-free. - - This program is a bit of a toy, there are better methods for calculating - the class number and class group structure. - - Reference: - - Daniel Shanks, "Class Number, A Theory of Factorization, and Genera", - Proc. Symp. Pure Math., vol 20, 1970, pages 415-440. - -*/ - -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "gmp.h" - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - - -/* A simple but slow primality test. */ -int -prime_p (unsigned long n) -{ - unsigned long i, limit; - - if (n == 2) - return 1; - if (n < 2 || !(n&1)) - return 0; - - limit = (unsigned long) floor (sqrt ((double) n)); - for (i = 3; i <= limit; i+=2) - if ((n % i) == 0) - return 0; - - return 1; -} - - -/* The formula is as follows, with d < 0. - - w * sqrt(-d) inf p - h(d) = ------------ * product -------- - 2 * pi p=2 p - (d/p) - - - (d/p) is the Kronecker symbol and the product is over primes p. w is 6 - when d=-3, 4 when d=-4, or 2 otherwise. - - Calculating the product up to p=infinity would take a long time, so for - the estimate primes up to 132,000 are used. Shanks found this giving an - accuracy of about 1 part in 1000, in normal cases. */ - -unsigned long p_limit = 132000; - -double -qcn_estimate (mpz_t d) -{ - double h; - unsigned long p; - - /* p=2 */ - h = sqrt (-mpz_get_d (d)) / M_PI - * 2.0 / (2.0 - mpz_kronecker_ui (d, 2)); - - if (mpz_cmp_si (d, -3) == 0) h *= 3; - else if (mpz_cmp_si (d, -4) == 0) h *= 2; - - for (p = 3; p <= p_limit; p += 2) - if (prime_p (p)) - h *= (double) p / (double) (p - mpz_kronecker_ui (d, p)); - - return h; -} - - -void -qcn_str (char *num) -{ - mpz_t z; - - mpz_init_set_str (z, num, 0); - - if (mpz_sgn (z) >= 0) - { - mpz_out_str (stdout, 0, z); - printf (" is not supported (negatives only)\n"); - } - else if (mpz_fdiv_ui (z, 4) != 0 && mpz_fdiv_ui (z, 4) != 1) - { - mpz_out_str (stdout, 0, z); - printf (" is not a discriminant (must == 0 or 1 mod 4)\n"); - } - else - { - printf ("h("); - mpz_out_str (stdout, 0, z); - printf (") approx %.1f\n", qcn_estimate (z)); - } - mpz_clear (z); -} - - -int -main (int argc, char *argv[]) -{ - int i; - int saw_number = 0; - - for (i = 1; i < argc; i++) - { - if (strcmp (argv[i], "-p") == 0) - { - i++; - if (i >= argc) - { - fprintf (stderr, "Missing argument to -p\n"); - exit (1); - } - p_limit = atoi (argv[i]); - } - else - { - qcn_str (argv[i]); - saw_number = 1; - } - } - - if (! saw_number) - { - /* some default output */ - qcn_str ("-85702502803"); /* is 16259 */ - qcn_str ("-328878692999"); /* is 1499699 */ - qcn_str ("-928185925902146563"); /* is 52739552 */ - qcn_str ("-84148631888752647283"); /* is 496652272 */ - return 0; - } - - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/Makefile b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/Makefile deleted file mode 100644 index fe052a02f7b..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# Note: Requires GNU make - -# Copyright 2011, 2012, 2014 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. - -srcdir=. -MINI_GMP_DIR=.. - -CC = gcc -EXTRA_CFLAGS = -O -Wall -g -CFLAGS = $(EXTRA_CFLAGS) -I$(MINI_GMP_DIR) -LDFLAGS = - -LIBS = -lgmp -lm -lmcheck - -CHECK_PROGRAMS = t-add t-sub t-mul t-invert t-div t-div_2exp \ - t-double t-cmp_d t-gcd t-lcm t-import t-comb t-signed \ - t-sqrt t-root t-powm t-logops t-bitops t-scan t-str \ - t-reuse t-aorsmul t-limbs t-cong t-pprime_p - -MISC_OBJS = hex-random.o mini-random.o testutils.o - -all: - -clean: - rm -f *.o $(CHECK_PROGRAMS) - -%: %.c -.c: - -# Keep object files -.PRECIOUS: %.o - -%.o: %.c $(MINI_GMP_DIR)/mini-gmp.h hex-random.h mini-random.h - $(CC) $(CFLAGS) -c $< -o $@ - -testutils.o: $(MINI_GMP_DIR)/mini-gmp.c - -%: %.o $(MISC_OBJS) - $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ - -# Missing tests include: -# mpz_cmp_d, mpz_popcount, mpz_hamdist, mpz_ui_pow_ui - -check: $(CHECK_PROGRAMS) - $(srcdir)/run-tests $(CHECK_PROGRAMS) diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/hex-random.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/hex-random.c deleted file mode 100644 index eb8d3f84ecc..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/hex-random.c +++ /dev/null @@ -1,434 +0,0 @@ -/* - -Copyright 2011, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include <time.h> -#include <unistd.h> - -#include "gmp.h" - -#include "hex-random.h" - -static gmp_randstate_t state; - -void -hex_random_init (void) -{ - unsigned long seed; - char *env_seed; - - env_seed = getenv("GMP_CHECK_RANDOMIZE"); - if (env_seed && env_seed[0]) - { - seed = strtoul (env_seed, NULL, 0); - if (seed) - printf ("Re-seeding with GMP_CHECK_RANDOMIZE=%lu\n", seed); - else - { - seed = time(NULL) + getpid(); - printf ("Seed GMP_CHECK_RANDOMIZE=%lu (include this in bug reports)\n", seed); - } - } - else - seed = 4711; - - gmp_randinit_default (state); - gmp_randseed_ui (state, seed); -} - -char * -hex_urandomb (unsigned long bits) -{ - char *res; - mpz_t x; - - mpz_init (x); - mpz_urandomb (x, state, bits); - gmp_asprintf (&res, "%Zx", x); - mpz_clear (x); - return res; -} - -char * -hex_rrandomb (unsigned long bits) -{ - char *res; - mpz_t x; - - mpz_init (x); - mpz_rrandomb (x, state, bits); - gmp_asprintf (&res, "%Zx", x); - mpz_clear (x); - return res; -} - -char * -hex_rrandomb_export (void *dst, size_t *countp, - int order, size_t size, int endian, unsigned long bits) -{ - char *res; - mpz_t x; - mpz_init (x); - mpz_rrandomb (x, state, bits); - gmp_asprintf (&res, "%Zx", x); - mpz_export (dst, countp, order, size, endian, 0, x); - mpz_clear (x); - return res; -} - -void hex_random_op2 (enum hex_random_op op, unsigned long maxbits, - char **ap, char **rp) -{ - mpz_t a, r; - unsigned long abits; - unsigned signs; - - mpz_init (a); - mpz_init (r); - - abits = gmp_urandomb_ui (state, 32) % maxbits; - - mpz_rrandomb (a, state, abits); - - signs = gmp_urandomb_ui (state, 1); - if (signs & 1) - mpz_neg (a, a); - - switch (op) - { - default: - abort (); - case OP_SQR: - mpz_mul (r, a, a); - break; - } - - gmp_asprintf (ap, "%Zx", a); - gmp_asprintf (rp, "%Zx", r); - - mpz_clear (a); - mpz_clear (r); -} - -void -hex_random_op3 (enum hex_random_op op, unsigned long maxbits, - char **ap, char **bp, char **rp) -{ - mpz_t a, b, r; - unsigned long abits, bbits; - unsigned signs; - - mpz_init (a); - mpz_init (b); - mpz_init (r); - - abits = gmp_urandomb_ui (state, 32) % maxbits; - bbits = gmp_urandomb_ui (state, 32) % maxbits; - - mpz_rrandomb (a, state, abits); - mpz_rrandomb (b, state, bbits); - - signs = gmp_urandomb_ui (state, 3); - if (signs & 1) - mpz_neg (a, a); - if (signs & 2) - mpz_neg (b, b); - - switch (op) - { - default: - abort (); - case OP_ADD: - mpz_add (r, a, b); - break; - case OP_SUB: - mpz_sub (r, a, b); - break; - case OP_MUL: - mpz_mul (r, a, b); - break; - case OP_GCD: - if (signs & 4) - { - /* Produce a large gcd */ - unsigned long gbits = gmp_urandomb_ui (state, 32) % maxbits; - mpz_rrandomb (r, state, gbits); - mpz_mul (a, a, r); - mpz_mul (b, b, r); - } - mpz_gcd (r, a, b); - break; - case OP_LCM: - if (signs & 4) - { - /* Produce a large gcd */ - unsigned long gbits = gmp_urandomb_ui (state, 32) % maxbits; - mpz_rrandomb (r, state, gbits); - mpz_mul (a, a, r); - mpz_mul (b, b, r); - } - mpz_lcm (r, a, b); - break; - case OP_AND: - mpz_and (r, a, b); - break; - case OP_IOR: - mpz_ior (r, a, b); - break; - case OP_XOR: - mpz_xor (r, a, b); - break; - } - - gmp_asprintf (ap, "%Zx", a); - gmp_asprintf (bp, "%Zx", b); - gmp_asprintf (rp, "%Zx", r); - - mpz_clear (a); - mpz_clear (b); - mpz_clear (r); -} - -void -hex_random_op4 (enum hex_random_op op, unsigned long maxbits, - char **ap, char **bp, char **cp, char **dp) -{ - mpz_t a, b, c, d; - unsigned long abits, bbits; - unsigned signs; - - mpz_init (a); - mpz_init (b); - mpz_init (c); - mpz_init (d); - - if (op == OP_POWM) - { - unsigned long cbits; - abits = gmp_urandomb_ui (state, 32) % maxbits; - bbits = 1 + gmp_urandomb_ui (state, 32) % maxbits; - cbits = 2 + gmp_urandomb_ui (state, 32) % maxbits; - - mpz_rrandomb (a, state, abits); - mpz_rrandomb (b, state, bbits); - mpz_rrandomb (c, state, cbits); - - signs = gmp_urandomb_ui (state, 3); - if (signs & 1) - mpz_neg (a, a); - if (signs & 2) - { - mpz_t g; - - /* If we negate the exponent, must make sure that gcd(a, c) = 1 */ - if (mpz_sgn (a) == 0) - mpz_set_ui (a, 1); - else - { - mpz_init (g); - - for (;;) - { - mpz_gcd (g, a, c); - if (mpz_cmp_ui (g, 1) == 0) - break; - mpz_divexact (a, a, g); - } - mpz_clear (g); - } - mpz_neg (b, b); - } - if (signs & 4) - mpz_neg (c, c); - - mpz_powm (d, a, b, c); - } - else - { - unsigned long qbits; - bbits = 1 + gmp_urandomb_ui (state, 32) % maxbits; - qbits = gmp_urandomb_ui (state, 32) % maxbits; - abits = bbits + qbits; - if (abits > 30) - abits -= 30; - else - abits = 0; - - mpz_rrandomb (a, state, abits); - mpz_rrandomb (b, state, bbits); - - signs = gmp_urandomb_ui (state, 2); - if (signs & 1) - mpz_neg (a, a); - if (signs & 2) - mpz_neg (b, b); - - switch (op) - { - default: - abort (); - case OP_CDIV: - mpz_cdiv_qr (c, d, a, b); - break; - case OP_FDIV: - mpz_fdiv_qr (c, d, a, b); - break; - case OP_TDIV: - mpz_tdiv_qr (c, d, a, b); - break; - } - } - gmp_asprintf (ap, "%Zx", a); - gmp_asprintf (bp, "%Zx", b); - gmp_asprintf (cp, "%Zx", c); - gmp_asprintf (dp, "%Zx", d); - - mpz_clear (a); - mpz_clear (b); - mpz_clear (c); - mpz_clear (d); -} - -void -hex_random_bit_op (enum hex_random_op op, unsigned long maxbits, - char **ap, unsigned long *b, char **rp) -{ - mpz_t a, r; - unsigned long abits, bbits; - unsigned signs; - - mpz_init (a); - mpz_init (r); - - abits = gmp_urandomb_ui (state, 32) % maxbits; - bbits = gmp_urandomb_ui (state, 32) % (maxbits + 100); - - mpz_rrandomb (a, state, abits); - - signs = gmp_urandomb_ui (state, 1); - if (signs & 1) - mpz_neg (a, a); - - switch (op) - { - default: - abort (); - - case OP_SETBIT: - mpz_set (r, a); - mpz_setbit (r, bbits); - break; - case OP_CLRBIT: - mpz_set (r, a); - mpz_clrbit (r, bbits); - break; - case OP_COMBIT: - mpz_set (r, a); - mpz_combit (r, bbits); - break; - case OP_CDIV_Q_2: - mpz_cdiv_q_2exp (r, a, bbits); - break; - case OP_CDIV_R_2: - mpz_cdiv_r_2exp (r, a, bbits); - break; - case OP_FDIV_Q_2: - mpz_fdiv_q_2exp (r, a, bbits); - break; - case OP_FDIV_R_2: - mpz_fdiv_r_2exp (r, a, bbits); - break; - case OP_TDIV_Q_2: - mpz_tdiv_q_2exp (r, a, bbits); - break; - case OP_TDIV_R_2: - mpz_tdiv_r_2exp (r, a, bbits); - break; - } - - gmp_asprintf (ap, "%Zx", a); - *b = bbits; - gmp_asprintf (rp, "%Zx", r); - - mpz_clear (a); - mpz_clear (r); -} - -void -hex_random_scan_op (enum hex_random_op op, unsigned long maxbits, - char **ap, unsigned long *b, unsigned long *r) -{ - mpz_t a; - unsigned long abits, bbits; - unsigned signs; - - mpz_init (a); - - abits = gmp_urandomb_ui (state, 32) % maxbits; - bbits = gmp_urandomb_ui (state, 32) % (maxbits + 100); - - mpz_rrandomb (a, state, abits); - - signs = gmp_urandomb_ui (state, 1); - if (signs & 1) - mpz_neg (a, a); - - switch (op) - { - default: - abort (); - - case OP_SCAN0: - *r = mpz_scan0 (a, bbits); - break; - case OP_SCAN1: - *r = mpz_scan1 (a, bbits); - break; - } - gmp_asprintf (ap, "%Zx", a); - *b = bbits; - - mpz_clear (a); -} - -void -hex_random_str_op (unsigned long maxbits, - int base, char **ap, char **rp) -{ - mpz_t a; - unsigned long abits; - unsigned signs; - - mpz_init (a); - - abits = gmp_urandomb_ui (state, 32) % maxbits; - - mpz_rrandomb (a, state, abits); - - signs = gmp_urandomb_ui (state, 2); - if (signs & 1) - mpz_neg (a, a); - - *ap = mpz_get_str (NULL, 16, a); - *rp = mpz_get_str (NULL, base, a); - - mpz_clear (a); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/hex-random.h b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/hex-random.h deleted file mode 100644 index 7a3913a0bc6..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/hex-random.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - -Copyright 2011, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -enum hex_random_op - { - OP_ADD, OP_SUB, OP_MUL, OP_SQR, - OP_CDIV, OP_FDIV, OP_TDIV, - OP_CDIV_Q_2, OP_CDIV_R_2, - OP_FDIV_Q_2, OP_FDIV_R_2, - OP_TDIV_Q_2, OP_TDIV_R_2, - OP_GCD, OP_LCM, OP_POWM, OP_AND, OP_IOR, OP_XOR, - OP_SETBIT, OP_CLRBIT, OP_COMBIT, - OP_SCAN0, OP_SCAN1, - }; - -void hex_random_init (void); -char *hex_urandomb (unsigned long bits); -char *hex_rrandomb (unsigned long bits); -char *hex_rrandomb_export (void *dst, size_t *countp, - int order, size_t size, int endian, - unsigned long bits); - -void hex_random_op2 (enum hex_random_op op, unsigned long maxbits, - char **ap, char **rp); -void hex_random_op3 (enum hex_random_op op, unsigned long maxbits, - char **ap, char **bp, char **rp); -void hex_random_op4 (enum hex_random_op op, unsigned long maxbits, - char **ap, char **bp, char **rp, char **qp); -void hex_random_bit_op (enum hex_random_op op, unsigned long maxbits, - char **ap, unsigned long *b, char **rp); -void hex_random_scan_op (enum hex_random_op op, unsigned long maxbits, - char **ap, unsigned long *b, unsigned long *r); -void hex_random_str_op (unsigned long maxbits, - int base, char **ap, char **rp); diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/mini-random.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/mini-random.c deleted file mode 100644 index 300d386b2cb..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/mini-random.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - -Copyright 2011, 2013, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "mini-random.h" - -static void -set_str (mpz_t r, const char *s) -{ - if (mpz_set_str (r, s, 16) != 0) - { - fprintf (stderr, "mpz_set_str failed on input %s\n", s); - abort (); - } -} - -void -mini_urandomb (mpz_t r, unsigned long bits) -{ - char *s; - s = hex_urandomb (bits); - set_str (r, s); - free (s); -} - -void -mini_rrandomb (mpz_t r, unsigned long bits) -{ - char *s; - s = hex_rrandomb (bits); - set_str (r, s); - free (s); -} - -void -mini_rrandomb_export (mpz_t r, void *dst, size_t *countp, - int order, size_t size, int endian, unsigned long bits) -{ - char *s; - s = hex_rrandomb_export (dst, countp, order, size, endian, bits); - set_str (r, s); - free (s); -} - -void -mini_random_op2 (enum hex_random_op op, unsigned long maxbits, - mpz_t a, mpz_t r) -{ - char *ap; - char *rp; - - hex_random_op2 (op, maxbits, &ap, &rp); - set_str (a, ap); - set_str (r, rp); - - free (ap); - free (rp); -} - -void -mini_random_op3 (enum hex_random_op op, unsigned long maxbits, - mpz_t a, mpz_t b, mpz_t r) -{ - char *ap; - char *bp; - char *rp; - - hex_random_op3 (op, maxbits, &ap, &bp, &rp); - set_str (a, ap); - set_str (b, bp); - set_str (r, rp); - - free (ap); - free (bp); - free (rp); -} - -void -mini_random_op4 (enum hex_random_op op, unsigned long maxbits, - mpz_t a, mpz_t b, mpz_t c, mpz_t d) -{ - char *ap; - char *bp; - char *cp; - char *dp; - - hex_random_op4 (op, maxbits, &ap, &bp, &cp, &dp); - set_str (a, ap); - set_str (b, bp); - set_str (c, cp); - set_str (d, dp); - - free (ap); - free (bp); - free (cp); - free (dp); -} - -void -mini_random_bit_op (enum hex_random_op op, unsigned long maxbits, - mpz_t a, mp_bitcnt_t *b, mpz_t r) -{ - char *ap; - char *rp; - - hex_random_bit_op (op, maxbits, &ap, b, &rp); - set_str (a, ap); - set_str (r, rp); - - free (ap); - free (rp); -} - -void -mini_random_scan_op (enum hex_random_op op, unsigned long maxbits, - mpz_t a, mp_bitcnt_t *b, mp_bitcnt_t *r) -{ - char *ap; - - hex_random_scan_op (op, maxbits, &ap, b, r); - set_str (a, ap); - - free (ap); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/mini-random.h b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/mini-random.h deleted file mode 100644 index f36c56fc822..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/mini-random.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - -Copyright 2011, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "mini-gmp.h" -#include "hex-random.h" - -void mini_urandomb (mpz_t, unsigned long); -void mini_rrandomb (mpz_t, unsigned long); -void mini_rrandomb_export (mpz_t r, void *dst, size_t *countp, - int order, size_t size, int endian, - unsigned long bits); - -void mini_random_op2 (enum hex_random_op, unsigned long, mpz_t, mpz_t); -void mini_random_op3 (enum hex_random_op, unsigned long, mpz_t, mpz_t, mpz_t); -void mini_random_op4 (enum hex_random_op, unsigned long, mpz_t, mpz_t, mpz_t, mpz_t); -void mini_random_scan_op (enum hex_random_op, unsigned long, mpz_t, mp_bitcnt_t *, mp_bitcnt_t *); -void mini_random_bit_op (enum hex_random_op, unsigned long, mpz_t, mp_bitcnt_t *, mpz_t); diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/run-tests b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/run-tests deleted file mode 100755 index 5fc2952d76a..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/run-tests +++ /dev/null @@ -1,123 +0,0 @@ -#! /bin/sh - -# Copyright (C) 2000-2002, 2004, 2005, 2011, 2012 Niels Möller -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -failed=0 -all=0 - -debug='no' -testflags='' - -if [ -z "$srcdir" ] ; then - srcdir=`pwd` -fi - -export srcdir - -# When used in make rules, we sometimes get the filenames VPATH -# expanded, but usually not. -find_program () { - case "$1" in - */*) - echo "$1" - ;; - *) - if [ -x "$1" ] ; then - echo "./$1" - else - echo "$srcdir/$1" - fi - ;; - esac -} - -env_program () { - if [ -x "$1" ] ; then - if "$1"; then : ; else - echo FAIL: $1 - exit 1 - fi - fi -} - -test_program () { - testname=`basename "$1" .exe` - testname=`basename "$testname" -test` - if [ -z "$EMULATOR" ] || head -1 "$1" | grep '^#!' > /dev/null; then - "$1" $testflags - else - $EMULATOR "$1" $testflags - fi - case "$?" in - 0) - echo PASS: $testname - all=`expr $all + 1` - ;; - 77) - echo SKIP: $testname - ;; - *) - echo FAIL: $testname - failed=`expr $failed + 1` - all=`expr $all + 1` - ;; - esac -} - -env_program `find_program setup-env` - -while test $# != 0 -do - case "$1" in - --debug) - debug=yes - ;; - -v) - testflags='-v' - ;; - -*) - echo >&2 'Unknown option `'"$1'" - exit 1 - ;; - *) - break - ;; - esac - shift -done - -if [ $# -eq 0 ] ; then - for f in *-test; do test_program "./$f"; done -else - for f in "$@" ; do test_program `find_program "$f"`; done -fi - -if [ $failed -eq 0 ] ; then - banner="All $all tests passed" -else - banner="$failed of $all tests failed" -fi -dashes=`echo "$banner" | sed s/./=/g` -echo "$dashes" -echo "$banner" -echo "$dashes" - -if [ "x$debug" = xno ] ; then - env_program `find_program teardown-env` -fi - -[ "$failed" -eq 0 ] diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-add.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-add.c deleted file mode 100644 index 0a093efd90a..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-add.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - -Copyright 2012, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdlib.h> -#include <stdio.h> - -#include "testutils.h" - -#define MAXBITS 400 -#define COUNT 10000 - -void -testmain (int argc, char **argv) -{ - unsigned i; - mpz_t a, b, res, ref; - - mpz_init (a); - mpz_init (b); - mpz_init (res); - mpz_init (ref); - - for (i = 0; i < COUNT; i++) - { - mini_random_op3 (OP_ADD, MAXBITS, a, b, ref); - mpz_add (res, a, b); - if (mpz_cmp (res, ref)) - { - fprintf (stderr, "mpz_add failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r", res); - dump ("ref", ref); - abort (); - } - } - mpz_clear (a); - mpz_clear (b); - mpz_clear (res); - mpz_clear (ref); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-aorsmul.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-aorsmul.c deleted file mode 100644 index eb275a80880..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-aorsmul.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - -Copyright 2012, 2014, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#include "testutils.h" - -#define MAXBITS 400 -#define COUNT 10000 - -#define GMP_LIMB_BITS (sizeof(mp_limb_t) * CHAR_BIT) -#define MAXLIMBS ((MAXBITS + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS) - -void -testmain (int argc, char **argv) -{ - unsigned i; - mpz_t a, b, res, ref; - - mpz_init (a); - mpz_init (b); - mpz_init_set_ui (res, 5); - mpz_init (ref); - - for (i = 0; i < COUNT; i++) - { - mini_random_op3 (OP_MUL, MAXBITS, a, b, ref); - if (i & 1) { - mpz_add (ref, ref, res); - if (mpz_fits_ulong_p (b)) - mpz_addmul_ui (res, a, mpz_get_ui (b)); - else - mpz_addmul (res, a, b); - } else { - mpz_sub (ref, res, ref); - if (mpz_fits_ulong_p (b)) - mpz_submul_ui (res, a, mpz_get_ui (b)); - else - mpz_submul (res, a, b); - } - if (mpz_cmp (res, ref)) - { - if (i & 1) - fprintf (stderr, "mpz_addmul failed:\n"); - else - fprintf (stderr, "mpz_submul failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r", res); - dump ("ref", ref); - abort (); - } - } - mpz_clear (a); - mpz_clear (b); - mpz_clear (res); - mpz_clear (ref); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-bitops.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-bitops.c deleted file mode 100644 index 7e1688e6621..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-bitops.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - -Copyright 2012, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> - -#include "testutils.h" - -#define MAXBITS 400 -#define COUNT 10000 - -void -testmain (int argc, char **argv) -{ - unsigned i; - mpz_t a, res, ref; - mp_bitcnt_t b; - - mpz_init (a); - mpz_init (res); - mpz_init (ref); - - for (i = 0; i < COUNT; i++) - { - mini_random_bit_op (OP_SETBIT, MAXBITS, a, &b, ref); - mpz_set (res, a); - mpz_setbit (res, b); - if (mpz_cmp (res, ref)) - { - fprintf (stderr, "mpz_setbit failed:\n"); - dump ("a", a); - fprintf (stderr, "b: %lu\n", b); - dump ("r", res); - dump ("ref", ref); - abort (); - } - if (!mpz_tstbit (res, b)) - { - fprintf (stderr, "mpz_tstbit failed (after mpz_setbit):\n"); - dump ("res", a); - fprintf (stderr, "b: %lu\n", b); - abort (); - } - mini_random_bit_op (OP_CLRBIT, MAXBITS, a, &b, ref); - mpz_set (res, a); - mpz_clrbit (res, b); - if (mpz_cmp (res, ref)) - { - fprintf (stderr, "mpz_clrbit failed:\n"); - dump ("a", a); - fprintf (stderr, "b: %lu\n", b); - dump ("r", res); - dump ("ref", ref); - abort (); - } - if (mpz_tstbit (res, b)) - { - fprintf (stderr, "mpz_tstbit failed (after mpz_clrbit):\n"); - dump ("res", a); - fprintf (stderr, "b: %lu\n", b); - abort (); - } - mini_random_bit_op (OP_COMBIT, MAXBITS, a, &b, ref); - mpz_set (res, a); - mpz_combit (res, b); - if (mpz_cmp (res, ref)) - { - fprintf (stderr, "mpz_combit failed:\n"); - dump ("a", a); - fprintf (stderr, "b: %lu\n", b); - dump ("r", res); - dump ("ref", ref); - abort (); - } - if (mpz_tstbit (res, b) == mpz_tstbit (a, b)) - { - fprintf (stderr, "mpz_tstbit failed (after mpz_combit):\n"); - dump ("res", a); - fprintf (stderr, "b: %lu\n", b); - abort (); - } - } - mpz_clear (a); - mpz_clear (res); - mpz_clear (ref); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-cmp_d.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-cmp_d.c deleted file mode 100644 index 4eab2785273..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-cmp_d.c +++ /dev/null @@ -1,283 +0,0 @@ -/* Test mpz_cmp_d and mpz_cmpabs_d. - -Copyright 2001-2003, 2005, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <math.h> - -#include "testutils.h" - -/* FIXME: Not sure if the tests here are exhaustive. Ought to try to get - each possible exit from mpz_cmp_d (and mpz_cmpabs_d) exercised. */ - - -#define SGN(n) ((n) > 0 ? 1 : (n) < 0 ? -1 : 0) - - -void -check_one (const char *name, mpz_srcptr x, double y, int cmp, int cmpabs) -{ - int got; - - got = mpz_cmp_d (x, y); - if (SGN(got) != cmp) - { - int i; - printf ("mpz_cmp_d wrong (from %s)\n", name); - printf (" got %d\n", got); - printf (" want %d\n", cmp); - fail: - printf (" x="); - mpz_out_str (stdout, 10, x); - printf ("\n y %g\n", y); - printf (" x=0x"); - mpz_out_str (stdout, -16, x); - printf ("\n y %g\n", y); - printf (" y"); - for (i = 0; i < sizeof(y); i++) - printf (" %02X", (unsigned) ((unsigned char *) &y)[i]); - printf ("\n"); - abort (); - } - - got = mpz_cmpabs_d (x, y); - if (SGN(got) != cmpabs) - { - printf ("mpz_cmpabs_d wrong\n"); - printf (" got %d\n", got); - printf (" want %d\n", cmpabs); - goto fail; - } -} - -void -check_data (void) -{ - static const struct { - const char *x; - double y; - int cmp, cmpabs; - - } data[] = { - - { "0", 0.0, 0, 0 }, - - { "1", 0.0, 1, 1 }, - { "-1", 0.0, -1, 1 }, - - { "1", 0.5, 1, 1 }, - { "-1", -0.5, -1, 1 }, - - { "0", 1.0, -1, -1 }, - { "0", -1.0, 1, -1 }, - - { "0x1000000000000000000000000000000000000000000000000", 1.0, 1, 1 }, - { "-0x1000000000000000000000000000000000000000000000000", 1.0, -1, 1 }, - - { "0", 1e100, -1, -1 }, - { "0", -1e100, 1, -1 }, - - { "2", 1.5, 1, 1 }, - { "2", -1.5, 1, 1 }, - { "-2", 1.5, -1, 1 }, - { "-2", -1.5, -1, 1 }, - }; - - mpz_t x; - int i; - - mpz_init (x); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (x, data[i].x, 0); - check_one ("check_data", x, data[i].y, data[i].cmp, data[i].cmpabs); - } - - mpz_clear (x); -} - - -/* Equality of integers with up to 53 bits */ -void -check_onebits (void) -{ - mpz_t x, x2; - double y; - int i; - - mpz_init_set_ui (x, 0L); - mpz_init (x2); - - for (i = 0; i < 512; i++) - { - mpz_mul_2exp (x, x, 1); - mpz_add_ui (x, x, 1L); - - y = mpz_get_d (x); - mpz_set_d (x2, y); - - /* stop if any truncation is occurring */ - if (mpz_cmp (x, x2) != 0) - break; - - check_one ("check_onebits", x, y, 0, 0); - check_one ("check_onebits", x, -y, 1, 0); - mpz_neg (x, x); - check_one ("check_onebits", x, y, -1, 0); - check_one ("check_onebits", x, -y, 0, 0); - mpz_neg (x, x); - } - - mpz_clear (x); - mpz_clear (x2); -} - - -/* With the mpz differing by 1, in a limb position possibly below the double */ -void -check_low_z_one (void) -{ - mpz_t x; - double y; - unsigned long i; - - mpz_init (x); - - /* FIXME: It'd be better to base this on the float format. */ -#if defined (__vax) || defined (__vax__) -#define LIM 127 /* vax fp numbers have limited range */ -#else -#define LIM 512 -#endif - - for (i = 1; i < LIM; i++) - { - mpz_set_ui (x, 1L); - mpz_mul_2exp (x, x, i); - y = mpz_get_d (x); - - check_one ("check_low_z_one", x, y, 0, 0); - check_one ("check_low_z_one", x, -y, 1, 0); - mpz_neg (x, x); - check_one ("check_low_z_one", x, y, -1, 0); - check_one ("check_low_z_one", x, -y, 0, 0); - mpz_neg (x, x); - - mpz_sub_ui (x, x, 1); - - check_one ("check_low_z_one", x, y, -1, -1); - check_one ("check_low_z_one", x, -y, 1, -1); - mpz_neg (x, x); - check_one ("check_low_z_one", x, y, -1, -1); - check_one ("check_low_z_one", x, -y, 1, -1); - mpz_neg (x, x); - - mpz_add_ui (x, x, 2); - - check_one ("check_low_z_one", x, y, 1, 1); - check_one ("check_low_z_one", x, -y, 1, 1); - mpz_neg (x, x); - check_one ("check_low_z_one", x, y, -1, 1); - check_one ("check_low_z_one", x, -y, -1, 1); - mpz_neg (x, x); - } - - mpz_clear (x); -} - -/* Comparing 1 and 1+2^-n. "y" is volatile to make gcc store and fetch it, - which forces it to a 64-bit double, whereas on x86 it would otherwise - remain on the float stack as an 80-bit long double. */ -void -check_one_2exp (void) -{ - double e; - mpz_t x; - volatile double y; - int i; - - mpz_init (x); - - e = 1.0; - for (i = 0; i < 128; i++) - { - e /= 2.0; - y = 1.0 + e; - if (y == 1.0) - break; - - mpz_set_ui (x, 1L); - check_one ("check_one_2exp", x, y, -1, -1); - check_one ("check_one_2exp", x, -y, 1, -1); - - mpz_set_si (x, -1L); - check_one ("check_one_2exp", x, y, -1, -1); - check_one ("check_one_2exp", x, -y, 1, -1); - } - - mpz_clear (x); -} - -void -check_infinity (void) -{ - mpz_t x; - double y = HUGE_VAL; - if (y != 2*y) - return; - - mpz_init (x); - - /* 0 cmp inf */ - mpz_set_ui (x, 0L); - check_one ("check_infinity", x, y, -1, -1); - check_one ("check_infinity", x, -y, 1, -1); - - /* 123 cmp inf */ - mpz_set_ui (x, 123L); - check_one ("check_infinity", x, y, -1, -1); - check_one ("check_infinity", x, -y, 1, -1); - - /* -123 cmp inf */ - mpz_set_si (x, -123L); - check_one ("check_infinity", x, y, -1, -1); - check_one ("check_infinity", x, -y, 1, -1); - - /* 2^5000 cmp inf */ - mpz_set_ui (x, 1L); - mpz_mul_2exp (x, x, 5000L); - check_one ("check_infinity", x, y, -1, -1); - check_one ("check_infinity", x, -y, 1, -1); - - /* -2^5000 cmp inf */ - mpz_neg (x, x); - check_one ("check_infinity", x, y, -1, -1); - check_one ("check_infinity", x, -y, 1, -1); - - mpz_clear (x); -} - -void -testmain (int argc, char *argv[]) -{ - check_data (); - check_onebits (); - check_low_z_one (); - check_one_2exp (); - check_infinity (); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-comb.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-comb.c deleted file mode 100644 index 31ee5a6ad66..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-comb.c +++ /dev/null @@ -1,164 +0,0 @@ -/* Exercise mpz_fac_ui and mpz_bin_uiui. - -Copyright 2000-2002, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "testutils.h" - -/* Usage: t-fac_ui [x|num] - - With no arguments testing goes up to the initial value of "limit" below. - With a number argument tests are carried that far, or with a literal "x" - tests are continued without limit (this being meant only for development - purposes). */ - -void -try_mpz_bin_uiui (mpz_srcptr want, unsigned long n, unsigned long k) -{ - mpz_t got; - - mpz_init (got); - mpz_bin_uiui (got, n, k); - if (mpz_cmp (got, want) != 0) - { - printf ("mpz_bin_uiui wrong\n"); - printf (" n=%lu\n", n); - printf (" k=%lu\n", k); - printf (" got="); mpz_out_str (stdout, 10, got); printf ("\n"); - printf (" want="); mpz_out_str (stdout, 10, want); printf ("\n"); - abort(); - } - mpz_clear (got); -} - -/* Test all bin(n,k) cases, with 0 <= k <= n + 1 <= count. */ -void -bin_smallexaustive (unsigned int count) -{ - mpz_t want; - unsigned long n, k; - - mpz_init (want); - - for (n = 0; n < count; n++) - { - mpz_set_ui (want, 1); - for (k = 0; k <= n; k++) - { - try_mpz_bin_uiui (want, n, k); - mpz_mul_ui (want, want, n - k); - mpz_fdiv_q_ui (want, want, k + 1); - } - try_mpz_bin_uiui (want, n, k); - } - - mpz_clear (want); -} - -/* Test all fac(n) cases, with 0 <= n <= limit. */ -void -fac_smallexaustive (unsigned int limit) -{ - mpz_t f, r; - unsigned long n; - mpz_init_set_si (f, 1); /* 0! = 1 */ - mpz_init (r); - - for (n = 0; n < limit; n++) - { - mpz_fac_ui (r, n); - - if (mpz_cmp (f, r) != 0) - { - printf ("mpz_fac_ui(%lu) wrong\n", n); - printf (" got "); mpz_out_str (stdout, 10, r); printf("\n"); - printf (" want "); mpz_out_str (stdout, 10, f); printf("\n"); - abort (); - } - - mpz_mul_ui (f, f, n+1); /* (n+1)! = n! * (n+1) */ - } - - mpz_clear (f); - mpz_clear (r); -} - -void checkWilson (mpz_t f, unsigned long n) -{ - unsigned long m; - - mpz_fac_ui (f, n - 1); - m = mpz_fdiv_ui (f, n); - if ( m != n - 1) - { - printf ("mpz_fac_ui(%lu) wrong\n", n - 1); - printf (" Wilson's theorem not verified: got %lu, expected %lu.\n",m ,n - 1); - abort (); - } -} - -void -checkprimes (unsigned long p1, unsigned long p2, unsigned long p3) -{ - mpz_t b, f; - - if (p1 - 1 != p2 - 1 + p3 - 1) - { - printf ("checkprimes(%lu, %lu, %lu) wrong\n", p1, p2, p3); - printf (" %lu - 1 != %lu - 1 + %lu - 1 \n", p1, p2, p3); - abort (); - } - - mpz_init (b); - mpz_init (f); - - checkWilson (b, p1); /* b = (p1-1)! */ - checkWilson (f, p2); /* f = (p2-1)! */ - mpz_divexact (b, b, f); - checkWilson (f, p3); /* f = (p3-1)! */ - mpz_divexact (b, b, f); /* b = (p1-1)!/((p2-1)!(p3-1)!) */ - mpz_bin_uiui (f, p1 - 1, p2 - 1); - if (mpz_cmp (f, b) != 0) - { - printf ("checkprimes(%lu, %lu, %lu) wrong\n", p1, p2, p3); - printf (" got "); mpz_out_str (stdout, 10, b); printf("\n"); - printf (" want "); mpz_out_str (stdout, 10, f); printf("\n"); - abort (); - } - - mpz_clear (b); - mpz_clear (f); - -} - -void -testmain (int argc, char *argv[]) -{ - unsigned long limit = 128; - - if (argc > 1 && argv[1][0] == 'x') - limit = ~ limit; - else if (argc > 1) - limit = atoi (argv[1]); - - checkprimes(1009, 733, 277); - fac_smallexaustive (limit); - bin_smallexaustive (limit); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-cong.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-cong.c deleted file mode 100644 index 8ddfe9bf464..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-cong.c +++ /dev/null @@ -1,212 +0,0 @@ -/* test mpz_congruent_p - -Copyright 2001, 2002, 2012, 2014 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "testutils.h" - -#define MPZ_SRCPTR_SWAP(x, y) \ - do { \ - mpz_srcptr __mpz_srcptr_swap__tmp = (x); \ - (x) = (y); \ - (y) = __mpz_srcptr_swap__tmp; \ - } while (0) - -void -check_one (mpz_srcptr a, mpz_srcptr c, mpz_srcptr d, int want) -{ - int got; - int swap; - - for (swap = 0; swap <= 1; swap++) - { - got = (mpz_congruent_p (a, c, d) != 0); - if (want != got) - { - printf ("mpz_congruent_p wrong\n"); - printf (" expected %d got %d\n", want, got); - dump (" a", a); - dump (" c", c); - dump (" d", d); - abort (); - } - -#if 0 - if (mpz_fits_ulong_p (c) && mpz_fits_ulong_p (d)) - { - unsigned long uc = mpz_get_ui (c); - unsigned long ud = mpz_get_ui (d); - got = (mpz_congruent_ui_p (a, uc, ud) != 0); - if (want != got) - { - printf ("mpz_congruent_ui_p wrong\n"); - printf (" expected %d got %d\n", want, got); - dump (" a", a); - printf (" c=%lu\n", uc); - printf (" d=%lu\n", ud); - abort (); - } - } -#endif - MPZ_SRCPTR_SWAP (a, c); - } -} - - -void -check_data (void) -{ - static const struct { - const char *a; - const char *c; - const char *d; - int want; - - } data[] = { - - /* strict equality mod 0 */ - { "0", "0", "0", 1 }, - { "11", "11", "0", 1 }, - { "3", "11", "0", 0 }, - - /* anything congruent mod 1 */ - { "0", "0", "1", 1 }, - { "1", "0", "1", 1 }, - { "0", "1", "1", 1 }, - { "123", "456", "1", 1 }, - { "0x123456789123456789", "0x987654321987654321", "1", 1 }, - - /* csize==1, dsize==2 changing to 1 after stripping 2s */ - { "0x3333333333333333", "0x33333333", - "0x180000000", 1 }, - { "0x33333333333333333333333333333333", "0x3333333333333333", - "0x18000000000000000", 1 }, - - /* another dsize==2 becoming 1, with opposite signs this time */ - { "0x444444441", - "-0x22222221F", - "0x333333330", 1 }, - { "0x44444444444444441", - "-0x2222222222222221F", - "0x33333333333333330", 1 }, - }; - - mpz_t a, c, d; - int i; - - mpz_init (a); - mpz_init (c); - mpz_init (d); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (a, data[i].a, 0); - mpz_set_str_or_abort (c, data[i].c, 0); - mpz_set_str_or_abort (d, data[i].d, 0); - check_one (a, c, d, data[i].want); - } - - mpz_clear (a); - mpz_clear (c); - mpz_clear (d); -} - - -void -check_random (int argc, char *argv[]) -{ - mpz_t a, c, d, ra, rc; - int i; - int want; - int reps = 10000; - mpz_t bs; - unsigned long size_range, size; - - if (argc >= 2) - reps = atoi (argv[1]); - - mpz_init (bs); - - mpz_init (a); - mpz_init (c); - mpz_init (d); - mpz_init (ra); - mpz_init (rc); - - for (i = 0; i < reps; i++) - { - mini_urandomb (bs, 32); - size_range = mpz_get_ui (bs) % 13 + 1; /* 0..8192 bit operands */ - - mini_urandomb (bs, size_range); - size = mpz_get_ui (bs); - mini_rrandomb (a, size); - - mini_urandomb (bs, 32); - size_range = mpz_get_ui (bs) % 13 + 1; /* 0..8192 bit operands */ - - mini_urandomb (bs, size_range); - size = mpz_get_ui (bs); - mini_rrandomb (c, size); - - do - { - mini_urandomb (bs, 32); - size_range = mpz_get_ui (bs) % 13 + 1; /* 0..8192 bit operands */ - - mini_urandomb (bs, size_range); - size = mpz_get_ui (bs); - mini_rrandomb (d, size); - } - while (mpz_sgn(d) == 0); - - mini_urandomb (bs, 3); - if (mpz_tstbit (bs, 0)) - mpz_neg (a, a); - if (mpz_tstbit (bs, 1)) - mpz_neg (c, c); - if (mpz_tstbit (bs, 2)) - mpz_neg (d, d); - - mpz_fdiv_r (ra, a, d); - mpz_fdiv_r (rc, c, d); - - want = (mpz_cmp (ra, rc) == 0); - check_one (a, c, d, want); - - mpz_sub (ra, ra, rc); - mpz_sub (a, a, ra); - check_one (a, c, d, 1); - - } - - mpz_clear (bs); - - mpz_clear (a); - mpz_clear (c); - mpz_clear (d); - mpz_clear (ra); - mpz_clear (rc); -} - - -void -testmain (int argc, char *argv[]) -{ - check_data (); - check_random (argc, argv); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-div.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-div.c deleted file mode 100644 index a114a0f180c..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-div.c +++ /dev/null @@ -1,254 +0,0 @@ -/* - -Copyright 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <assert.h> -#include <stdlib.h> -#include <stdio.h> - -#include "testutils.h" - -#define MAXBITS 400 -#define COUNT 10000 - -typedef void div_qr_func (mpz_t, mpz_t, const mpz_t, const mpz_t); -typedef unsigned long div_qr_ui_func (mpz_t, mpz_t, const mpz_t, unsigned long); -typedef void div_func (mpz_t, const mpz_t, const mpz_t); -typedef unsigned long div_x_ui_func (mpz_t, const mpz_t, unsigned long); -typedef unsigned long div_ui_func (const mpz_t, unsigned long); - -void -testmain (int argc, char **argv) -{ - unsigned i; - mpz_t a, b, q, r, rq, rr; - int div_p; - - mpz_init (a); - mpz_init (b); - mpz_init (r); - mpz_init (q); - mpz_init (rr); - mpz_init (rq); - - for (i = 0; i < COUNT; i++) - { - unsigned j; - for (j = 0; j < 3; j++) - { - static const enum hex_random_op ops[3] = { OP_CDIV, OP_FDIV, OP_TDIV }; - static const char name[3] = { 'c', 'f', 't'}; - static div_qr_func * const div_qr [3] = - { - mpz_cdiv_qr, mpz_fdiv_qr, mpz_tdiv_qr - }; - static div_qr_ui_func *div_qr_ui[3] = - { - mpz_cdiv_qr_ui, mpz_fdiv_qr_ui, mpz_tdiv_qr_ui - }; - static div_func * const div_q [3] = - { - mpz_cdiv_q, mpz_fdiv_q, mpz_tdiv_q - }; - static div_x_ui_func *div_q_ui[3] = - { - mpz_cdiv_q_ui, mpz_fdiv_q_ui, mpz_tdiv_q_ui - }; - static div_func * const div_r [3] = - { - mpz_cdiv_r, mpz_fdiv_r, mpz_tdiv_r - }; - static div_x_ui_func *div_r_ui[3] = - { - mpz_cdiv_r_ui, mpz_fdiv_r_ui, mpz_tdiv_r_ui - }; - static div_ui_func *div_ui[3] = - { - mpz_cdiv_ui, mpz_fdiv_ui, mpz_tdiv_ui - }; - - mini_random_op4 (ops[j], MAXBITS, a, b, rq, rr); - div_qr[j] (q, r, a, b); - if (mpz_cmp (r, rr) || mpz_cmp (q, rq)) - { - fprintf (stderr, "mpz_%cdiv_qr failed:\n", name[j]); - dump ("a", a); - dump ("b", b); - dump ("r ", r); - dump ("rref", rr); - dump ("q ", q); - dump ("qref", rq); - abort (); - } - mpz_set_si (q, -5); - div_q[j] (q, a, b); - if (mpz_cmp (q, rq)) - { - fprintf (stderr, "mpz_%cdiv_q failed:\n", name[j]); - dump ("a", a); - dump ("b", b); - dump ("q ", q); - dump ("qref", rq); - abort (); - } - mpz_set_ui (r, ~5); - div_r[j] (r, a, b); - if (mpz_cmp (r, rr)) - { - fprintf (stderr, "mpz_%cdiv_r failed:\n", name[j]); - dump ("a", a); - dump ("b", b); - dump ("r ", r); - dump ("rref", rr); - abort (); - } - - if (j == 0) /* do this once, not for all roundings */ - { - div_p = mpz_divisible_p (a, b); - if ((mpz_sgn (r) == 0) ^ (div_p != 0)) - { - fprintf (stderr, "mpz_divisible_p failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r ", r); - abort (); - } - } - - if (j == 0 && mpz_sgn (b) < 0) /* ceil, negative divisor */ - { - mpz_mod (r, a, b); - if (mpz_cmp (r, rr)) - { - fprintf (stderr, "mpz_mod failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r ", r); - dump ("rref", rr); - abort (); - } - } - - if (j == 1 && mpz_sgn (b) > 0) /* floor, positive divisor */ - { - mpz_mod (r, a, b); - if (mpz_cmp (r, rr)) - { - fprintf (stderr, "mpz_mod failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r ", r); - dump ("rref", rr); - abort (); - } - } - - if (mpz_fits_ulong_p (b)) - { - mp_limb_t rl; - - rl = div_qr_ui[j] (q, r, a, mpz_get_ui (b)); - if (rl != mpz_get_ui (rr) - || mpz_cmp (r, rr) || mpz_cmp (q, rq)) - { - fprintf (stderr, "mpz_%cdiv_qr_ui failed:\n", name[j]); - dump ("a", a); - dump ("b", b); - fprintf(stderr, "rl = %lx\n", rl); - dump ("r ", r); - dump ("rref", rr); - dump ("q ", q); - dump ("qref", rq); - abort (); - } - - mpz_set_si (q, 3); - rl = div_q_ui[j] (q, a, mpz_get_ui (b)); - if (rl != mpz_get_ui (rr) || mpz_cmp (q, rq)) - { - fprintf (stderr, "mpz_%cdiv_q_ui failed:\n", name[j]); - dump ("a", a); - dump ("b", b); - fprintf(stderr, "rl = %lx\n", rl); - dump ("rref", rr); - dump ("q ", q); - dump ("qref", rq); - abort (); - } - - mpz_set_ui (r, 7); - rl = div_r_ui[j] (r, a, mpz_get_ui (b)); - if (rl != mpz_get_ui (rr) || mpz_cmp (r, rr)) - { - fprintf (stderr, "mpz_%cdiv_qr_ui failed:\n", name[j]); - dump ("a", a); - dump ("b", b); - fprintf(stderr, "rl = %lx\n", rl); - dump ("r ", r); - dump ("rref", rr); - abort (); - } - - rl = div_ui[j] (a, mpz_get_ui (b)); - if (rl != mpz_get_ui (rr)) - { - fprintf (stderr, "mpz_%cdiv_qr_ui failed:\n", name[j]); - dump ("a", a); - dump ("b", b); - fprintf(stderr, "rl = %lx\n", rl); - dump ("rref", rr); - abort (); - } - - if (j == 0) /* do this once, not for all roundings */ - { - div_p = mpz_divisible_ui_p (a, mpz_get_ui (b)); - if ((mpz_sgn (r) == 0) ^ (div_p != 0)) - { - fprintf (stderr, "mpz_divisible_ui_p failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r ", r); - abort (); - } - } - - if (j == 1) /* floor */ - { - mpz_mod_ui (r, a, mpz_get_ui (b)); - if (mpz_cmp (r, rr)) - { - fprintf (stderr, "mpz_mod failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r ", r); - dump ("rref", rr); - abort (); - } - } - } - } - } - mpz_clear (a); - mpz_clear (b); - mpz_clear (r); - mpz_clear (q); - mpz_clear (rr); - mpz_clear (rq); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-div_2exp.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-div_2exp.c deleted file mode 100644 index 53d3f2b84d9..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-div_2exp.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - -Copyright 2012, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <assert.h> -#include <stdlib.h> -#include <stdio.h> - -#include "testutils.h" - -#define MAXBITS 400 -#define COUNT 10000 - -typedef void div_func (mpz_t, const mpz_t, mp_bitcnt_t); - -void -testmain (int argc, char **argv) -{ - unsigned i; - mpz_t a, res, ref; - mp_bitcnt_t b; - - mpz_init (a); - mpz_init (res); - mpz_init (ref); - - for (i = 0; i < COUNT; i++) - { - unsigned j; - for (j = 0; j < 6; j++) - { - static const enum hex_random_op ops[6] = - { - OP_CDIV_Q_2, OP_CDIV_R_2, - OP_FDIV_Q_2, OP_FDIV_R_2, - OP_TDIV_Q_2, OP_TDIV_R_2 - }; - static const char *name[6] = - { - "cdiv_q", "cdiv_r", - "fdiv_q", "fdiv_r", - "tdiv_q", "tdiv_r" - }; - static div_func * const div [6] = - { - mpz_cdiv_q_2exp, mpz_cdiv_r_2exp, - mpz_fdiv_q_2exp, mpz_fdiv_r_2exp, - mpz_tdiv_q_2exp, mpz_tdiv_r_2exp - }; - - mini_random_bit_op (ops[j], MAXBITS, a, &b, ref); - div[j] (res, a, b); - if (mpz_cmp (ref, res)) - { - fprintf (stderr, "mpz_%s_2exp failed:\n", name[j]); - dump ("a", a); - fprintf (stderr, "b: %lu\n", b); - dump ("r", res); - dump ("ref", ref); - abort (); - } - } - } - mpz_clear (a); - mpz_clear (res); - mpz_clear (ref); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-double.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-double.c deleted file mode 100644 index 9e8101ecfd4..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-double.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - -Copyright 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <limits.h> -#include <math.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#include "testutils.h" - -#define GMP_LIMB_BITS (sizeof(mp_limb_t) * CHAR_BIT) - -#define COUNT 10000 - -static const struct -{ - double d; - const char *s; -} values[] = { - { 0.0, "0" }, - { 0.3, "0" }, - { -0.3, "0" }, - { M_PI, "3" }, - { M_PI*1e15, "b29430a256d21" }, - { -M_PI*1e15, "-b29430a256d21" }, - /* 17 * 2^{200} = - 27317946752402834684213355569799764242877450894307478200123392 */ - {0.2731794675240283468421335556979976424288e62, - "1100000000000000000000000000000000000000000000000000" }, - { 0.0, NULL } -}; - -void -testmain (int argc, char **argv) -{ - unsigned i; - mpz_t x; - - for (i = 0; values[i].s; i++) - { - char *s; - mpz_init_set_d (x, values[i].d); - s = mpz_get_str (NULL, 16, x); - if (strcmp (s, values[i].s) != 0) - { - fprintf (stderr, "mpz_set_d failed:\n" - "d = %.20g\n" - "s = %s\n" - "r = %s\n", - values[i].d, s, values[i].s); - abort (); - } - testfree (s); - mpz_clear (x); - } - - mpz_init (x); - - for (i = 0; i < COUNT; i++) - { - /* Use volatile, to avoid extended precision in floating point - registers, e.g., on m68k and 80387. */ - volatile double d, f; - unsigned long m; - int e; - - mini_rrandomb (x, GMP_LIMB_BITS); - m = mpz_get_ui (x); - mini_urandomb (x, 8); - e = mpz_get_ui (x) - 100; - - d = ldexp ((double) m, e); - mpz_set_d (x, d); - f = mpz_get_d (x); - if (f != floor (d)) - { - fprintf (stderr, "mpz_set_d/mpz_get_d failed:\n"); - goto dumperror; - } - if ((f == d) ? (mpz_cmp_d (x, d) != 0) : (mpz_cmp_d (x, d) >= 0)) - { - fprintf (stderr, "mpz_cmp_d (x, d) failed:\n"); - goto dumperror; - } - f = d + 1.0; - if (f > d && ! (mpz_cmp_d (x, f) < 0)) - { - fprintf (stderr, "mpz_cmp_d (x, f) failed:\n"); - goto dumperror; - } - - d = - d; - - mpz_set_d (x, d); - f = mpz_get_d (x); - if (f != ceil (d)) - { - fprintf (stderr, "mpz_set_d/mpz_get_d failed:\n"); - dumperror: - dump ("x", x); - fprintf (stderr, "m = %lx, e = %i\n", m, e); - fprintf (stderr, "d = %.15g\n", d); - fprintf (stderr, "f = %.15g\n", f); - fprintf (stderr, "f - d = %.5g\n", f - d); - abort (); - } - if ((f == d) ? (mpz_cmp_d (x, d) != 0) : (mpz_cmp_d (x, d) <= 0)) - { - fprintf (stderr, "mpz_cmp_d (x, d) failed:\n"); - goto dumperror; - } - f = d - 1.0; - if (f < d && ! (mpz_cmp_d (x, f) > 0)) - { - fprintf (stderr, "mpz_cmp_d (x, f) failed:\n"); - goto dumperror; - } - } - - mpz_clear (x); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-gcd.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-gcd.c deleted file mode 100644 index 1278000296a..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-gcd.c +++ /dev/null @@ -1,176 +0,0 @@ -/* - -Copyright 2012, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> - -#include "testutils.h" - -#define MAXBITS 400 -#define COUNT 10000 - -/* Called when g is supposed to be gcd(a,b), and g = s a + t b. */ -static int -gcdext_valid_p (const mpz_t a, const mpz_t b, - const mpz_t g, const mpz_t s, const mpz_t t) -{ - mpz_t ta, tb, r; - - /* It's not clear that gcd(0,0) is well defined, but we allow it and - require that gcd(0,0) = 0. */ - if (mpz_sgn (g) < 0) - return 0; - - if (mpz_sgn (a) == 0) - { - /* Must have g == abs (b). Any value for s is in some sense "correct", - but it makes sense to require that s == 0. */ - return mpz_cmpabs (g, b) == 0 && mpz_sgn (s) == 0; - } - else if (mpz_sgn (b) == 0) - { - /* Must have g == abs (a), s == sign (a) */ - return mpz_cmpabs (g, a) == 0 && mpz_cmp_si (s, mpz_sgn (a)) == 0; - } - - if (mpz_sgn (g) <= 0) - return 0; - - mpz_init (ta); - mpz_init (tb); - mpz_init (r); - - mpz_mul (ta, s, a); - mpz_mul (tb, t, b); - mpz_add (ta, ta, tb); - - if (mpz_cmp (ta, g) != 0) - { - fail: - mpz_clear (ta); - mpz_clear (tb); - mpz_clear (r); - return 0; - } - mpz_tdiv_qr (ta, r, a, g); - if (mpz_sgn (r) != 0) - goto fail; - - mpz_tdiv_qr (tb, r, b, g); - if (mpz_sgn (r) != 0) - goto fail; - - /* Require that 2 |s| < |b/g|, or |s| == 1. */ - if (mpz_cmpabs_ui (s, 1) > 0) - { - mpz_mul_2exp (r, s, 1); - if (mpz_cmpabs (r, tb) > 0) - goto fail; - } - - /* Require that 2 |t| < |a/g| or |t| == 1*/ - if (mpz_cmpabs_ui (t, 1) > 0) - { - mpz_mul_2exp (r, t, 1); - if (mpz_cmpabs (r, ta) > 0) - return 0; - } - - mpz_clear (ta); - mpz_clear (tb); - mpz_clear (r); - - return 1; -} - -void -testmain (int argc, char **argv) -{ - unsigned i; - mpz_t a, b, g, s, t; - - mpz_init (a); - mpz_init (b); - mpz_init (g); - mpz_init (s); - mpz_init (t); - - for (i = 0; i < COUNT; i++) - { - mini_random_op3 (OP_GCD, MAXBITS, a, b, s); - mpz_gcd (g, a, b); - if (mpz_cmp (g, s)) - { - fprintf (stderr, "mpz_gcd failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r", g); - dump ("ref", s); - abort (); - } - } - - for (i = 0; i < COUNT; i++) - { - unsigned flags; - mini_urandomb (a, 32); - flags = mpz_get_ui (a); - mini_rrandomb (a, MAXBITS); - mini_rrandomb (b, MAXBITS); - - if (flags % 37 == 0) - mpz_mul (a, a, b); - if (flags % 37 == 1) - mpz_mul (b, a, b); - - if (flags & 1) - mpz_neg (a, a); - if (flags & 2) - mpz_neg (b, b); - - mpz_gcdext (g, s, t, a, b); - if (!gcdext_valid_p (a, b, g, s, t)) - { - fprintf (stderr, "mpz_gcdext failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("g", g); - dump ("s", s); - dump ("t", t); - abort (); - } - - mpz_gcd (s, a, b); - if (mpz_cmp (g, s)) - { - fprintf (stderr, "mpz_gcd failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r", g); - dump ("ref", s); - abort (); - } - } - mpz_clear (a); - mpz_clear (b); - mpz_clear (g); - mpz_clear (s); - mpz_clear (t); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-import.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-import.c deleted file mode 100644 index 66c9d5e8d5d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-import.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - -Copyright 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#include "testutils.h" - -#define MAX_WORDS 20 -#define MAX_WORD_SIZE 10 - -static void -dump_bytes (const char *label, const unsigned char *s, size_t n) -{ - size_t i; - fprintf (stderr, "%s:", label); - for (i = 0; i < n; i++) - { - if (i && (i % 16) == 0) - fprintf (stderr, "\n"); - fprintf (stderr, " %02x", s[i]); - } - fprintf (stderr, "\n"); -} - -/* Tests both mpz_import and mpz_export. */ -void -testmain (int argc, char **argv) -{ - unsigned char input[MAX_WORDS * MAX_WORD_SIZE]; - unsigned char output[MAX_WORDS * MAX_WORD_SIZE + 2]; - size_t count, in_count, out_count, size; - int endian, order; - - mpz_t a, res; - - mpz_init (a); - mpz_init (res); - - for (size = 0; size <= MAX_WORD_SIZE; size++) - for (count = 0; count <= MAX_WORDS; count++) - for (endian = -1; endian <= 1; endian++) - for (order = -1; order <= 1; order += 2) - { - mini_rrandomb_export (a, input, &in_count, - order, size, endian, size*count * 8); - mpz_import (res, in_count, order, size, endian, 0, input); - if (mpz_cmp (a, res)) - { - fprintf (stderr, "mpz_import failed:\n" - "in_count %lu, out_count %lu, endian = %d, order = %d\n", - (unsigned long) in_count, (unsigned long) out_count, endian, order); - dump ("a", a); - dump ("res", res); - abort (); - } - output[0] = 17; - output[1+in_count*size] = 17; - - mpz_export (output+1, &out_count, order, size, endian, 0, a); - if (out_count != in_count - || memcmp (output+1, input, in_count * size) - || output[0] != 17 - || output[1+in_count*size] != 17) - { - fprintf (stderr, "mpz_export failed:\n" - "in_count %lu, out_count %lu, endian = %d, order = %d\n", - (unsigned long) in_count, (unsigned long) out_count, endian, order); - dump_bytes ("input", input, in_count * size); - dump_bytes ("output", output+1, out_count * size); - if (output[0] != 17) - fprintf (stderr, "Overwrite at -1, value %02x\n", output[0]); - if (output[1+in_count*size] != 17) - fprintf (stderr, "Overwrite at %lu, value %02x\n", - (unsigned long) (in_count*size), output[1+in_count*size]); - - abort (); - } - } - mpz_clear (a); - mpz_clear (res); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-invert.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-invert.c deleted file mode 100644 index 496e8d4f53c..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-invert.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - -Copyright 2012, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> - -#include "testutils.h" - -#define GMP_LIMB_BITS (sizeof(mp_limb_t) * CHAR_BIT) - -#define COUNT 10000 - -void -testmain (int argc, char **argv) -{ - unsigned i; - mpz_t u, m, p, t; - - mpz_init (u); - mpz_init (m); - mpz_init (p); - mpz_init (t); - - for (i = 0; i < COUNT; i++) - { - mini_urandomb (u, GMP_LIMB_BITS); - mpz_setbit (u, GMP_LIMB_BITS -1); - - mpz_set_ui (m, mpn_invert_limb (u->_mp_d[0])); - mpz_setbit (m, GMP_LIMB_BITS); - - mpz_mul (p, m, u); - - mpz_set_ui (t, 0); - mpz_setbit (t, 2* GMP_LIMB_BITS); - mpz_sub (t, t, p); - - /* Should have 0 < B^2 - m u <= u */ - if (mpz_sgn (t) <= 0 || mpz_cmp (t, u) > 0) - { - fprintf (stderr, "mpn_invert_limb failed:\n"); - dump ("u", u); - dump ("m", m); - dump ("p", p); - dump ("t", t); - abort (); - } - } - - for (i = 0; i < COUNT; i++) - { - mini_urandomb (u, 2*GMP_LIMB_BITS); - mpz_setbit (u, 2*GMP_LIMB_BITS -1); - - mpz_set_ui (m, mpn_invert_3by2 (u->_mp_d[1], u[0]._mp_d[0])); - - mpz_setbit (m, GMP_LIMB_BITS); - - mpz_mul (p, m, u); - - mpz_set_ui (t, 0); - mpz_setbit (t, 3 * GMP_LIMB_BITS); - mpz_sub (t, t, p); - - /* Should have 0 < B^3 - m u <= u */ - if (mpz_sgn (t) <= 0 || mpz_cmp (t, u) > 0) - { - fprintf (stderr, "mpn_invert_3by2 failed:\n"); - dump ("u", u); - dump ("m", m); - dump ("p", p); - dump ("t", t); - abort (); - } - } - - mpz_clear (u); - mpz_clear (m); - mpz_clear (p); - mpz_clear (t); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-lcm.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-lcm.c deleted file mode 100644 index f21a39a66a2..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-lcm.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - -Copyright 2012, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> - -#include "testutils.h" - -#define MAXBITS 400 -#define COUNT 10000 - -void -testmain (int argc, char **argv) -{ - unsigned i; - mpz_t a, b, g, s; - - mpz_init (a); - mpz_init (b); - mpz_init (g); - mpz_init (s); - - for (i = 0; i < COUNT; i++) - { - mini_random_op3 (OP_LCM, MAXBITS, a, b, s); - mpz_lcm (g, a, b); - if (mpz_cmp (g, s)) - { - fprintf (stderr, "mpz_lcm failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r", g); - dump ("ref", s); - abort (); - } - if (mpz_fits_ulong_p (b)) - { - mpz_set_si (g, 0); - mpz_lcm_ui (g, a, mpz_get_ui (b)); - if (mpz_cmp (g, s)) - { - fprintf (stderr, "mpz_lcm_ui failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r", g); - dump ("ref", s); - abort (); - } - } - } - - mpz_clear (a); - mpz_clear (b); - mpz_clear (g); - mpz_clear (s); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-limbs.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-limbs.c deleted file mode 100644 index a8324ec38ea..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-limbs.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - -Copyright 2012, 2014, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#include "testutils.h" - -#define MAXBITS 400 -#define COUNT 100 - -void -my_mpz_mul (mpz_t r, mpz_srcptr a, mpz_srcptr b) -{ - mp_limb_t *tp; - mp_size_t tn, an, bn; - - an = mpz_size (a); - bn = mpz_size (b); - tn = an + bn; - - tp = mpz_limbs_write (r, tn); - if (mpz_sgn (a) * mpz_sgn(b) == 0) - mpn_zero (tp, tn); - else if (an > bn) - mpn_mul (tp, mpz_limbs_read (a), an, mpz_limbs_read (b), bn); - else - mpn_mul (tp, mpz_limbs_read (b), bn, mpz_limbs_read (a), an); - - if (mpz_sgn (a) != mpz_sgn(b)) - tn = - tn; - - mpz_limbs_finish (r, tn); -} - -void -testmain (int argc, char **argv) -{ - unsigned i; - mpz_t a, b, res, ref; - - mpz_init (a); - mpz_init (b); - mpz_init (res); - mpz_init (ref); - - for (i = 0; i < COUNT; i++) - { - mini_random_op3 (OP_MUL, MAXBITS, a, b, ref); - my_mpz_mul (res, a, b); - if (mpz_cmp (res, ref)) - { - fprintf (stderr, "my_mpz_mul failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r", res); - dump ("ref", ref); - abort (); - } - /* The following test exploits a side-effect of my_mpz_mul: res - points to a buffer with at least an+bn limbs, and the limbs - above the result are zeroed. */ - if (mpz_size (b) > 0 && mpz_getlimbn (res, mpz_size(a)) != mpz_limbs_read (res) [mpz_size(a)]) - { - fprintf (stderr, "getlimbn - limbs_read differ.\n"); - abort (); - } - if ((i % 4 == 0) && mpz_size (res) > 1) - { - mpz_realloc2 (res, 1); - if (mpz_cmp_ui (res, 0)) - { - fprintf (stderr, "mpz_realloc2 did not clear res.\n"); - abort (); - } - mpz_limbs_finish (ref, 0); - if (mpz_cmp_d (ref, 0)) - { - fprintf (stderr, "mpz_limbs_finish did not clear res.\n"); - abort (); - } - } - } - mpz_clear (a); - mpz_clear (b); - mpz_clear (res); - mpz_clear (ref); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-logops.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-logops.c deleted file mode 100644 index 7e2d68187ab..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-logops.c +++ /dev/null @@ -1,112 +0,0 @@ -/* - -Copyright 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> - -#include "testutils.h" - -#define MAXBITS 400 -#define COUNT 10000 - -void -testlogops (int count) -{ - unsigned i; - mpz_t a, b, res, ref; - mp_bitcnt_t c; - - mpz_init (a); - mpz_init (b); - mpz_init (res); - mpz_init (ref); - - for (i = 0; i < count; i++) - { - mini_random_op3 (OP_AND, MAXBITS, a, b, ref); - mpz_and (res, a, b); - if (mpz_cmp (res, ref)) - { - fprintf (stderr, "mpz_and failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r", res); - dump ("ref", ref); - abort (); - } - - mini_random_op3 (OP_IOR, MAXBITS, a, b, ref); - mpz_ior (res, a, b); - if (mpz_cmp (res, ref)) - { - fprintf (stderr, "mpz_ior failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r", res); - dump ("ref", ref); - abort (); - } - - mini_random_op3 (OP_XOR, MAXBITS, a, b, ref); - mpz_xor (res, a, b); - if (mpz_cmp (res, ref)) - { - fprintf (stderr, "mpz_xor failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r", res); - dump ("ref", ref); - abort (); - } - - if (i % 8) { - c = 0; - mpz_mul_2exp (res, res, i % 8); - } else if (mpz_sgn (res) >= 0) { - c = mpz_odd_p (res) != 0; - mpz_tdiv_q_2exp (res, res, 1); - } else { - c = (~ (mp_bitcnt_t) 0) - 3; - mpz_set_ui (res, 11 << ((i >> 3)%4)); /* set 3 bits */ - } - - if (mpz_popcount (res) + c != mpz_hamdist (a, b)) - { - fprintf (stderr, "mpz_popcount(r) + %lu and mpz_hamdist(a,b) differ:\n", c); - dump ("a", a); - dump ("b", b); - dump ("r", res); - fprintf (stderr, "mpz_popcount(r) = %lu:\n", mpz_popcount (res)); - fprintf (stderr, "mpz_hamdist(a,b) = %lu:\n", mpz_hamdist (a, b)); - abort (); - } - } - mpz_clear (a); - mpz_clear (b); - mpz_clear (res); - mpz_clear (ref); -} - -void -testmain (int argc, char **argv) -{ - testhalves (COUNT*2/3, testlogops); - testlogops (COUNT/3); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-mul.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-mul.c deleted file mode 100644 index 57ec4ed36cc..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-mul.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - -Copyright 2012, 2014, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#include "testutils.h" - -#define MAXBITS 400 -#define COUNT 10000 - -#define GMP_LIMB_BITS (sizeof(mp_limb_t) * CHAR_BIT) -#define MAXLIMBS ((MAXBITS + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS) - -void -testmain (int argc, char **argv) -{ - unsigned i; - mpz_t a, b, res, res_ui, ref, tz; - mp_limb_t t[2*MAXLIMBS]; - mp_size_t an; - - mpz_init (a); - mpz_init (b); - mpz_init (res); - mpz_init (res_ui); - mpz_init (ref); - - for (i = 0; i < COUNT; i++) - { - mini_random_op3 (OP_MUL, MAXBITS, a, b, ref); - mpz_mul (res, a, b); - if (mpz_cmp (res, ref)) - { - fprintf (stderr, "mpz_mul failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r", res); - dump ("ref", ref); - abort (); - } - if (mpz_size (a) == mpz_size (b)) - { - memset (t, 0x55, sizeof(t)); - an = mpz_size (a); - if (an > 0) - { - mpn_mul_n (t, a->_mp_d, b->_mp_d, an); - - mpz_roinit_n (tz, t, 2*an); - if (mpz_cmpabs (tz, ref)) - { - fprintf (stderr, "mpn_mul_n failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("ref", ref); - abort (); - } - } - } - if (mpz_fits_slong_p (b)) { - mpz_mul_si (res_ui, a, mpz_get_si (b)); - if (mpz_cmp (res_ui, ref)) - { - fprintf (stderr, "mpz_mul_si failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r", res_ui); - dump ("ref", ref); - abort (); - } - } - mini_random_op2 (OP_SQR, MAXBITS, a, ref); - an = mpz_size (a); - if (an > 0) - { - memset (t, 0x33, sizeof(t)); - mpn_sqr (t, mpz_limbs_read (a), an); - - mpz_roinit_n (tz, t, 2*an); - if (mpz_cmp (tz, ref)) - { - fprintf (stderr, "mpn (squaring) failed:\n"); - dump ("a", a); - dump ("ref", ref); - abort (); - } - } - } - mpz_clear (a); - mpz_clear (b); - mpz_clear (res); - mpz_clear (res_ui); - mpz_clear (ref); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-powm.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-powm.c deleted file mode 100644 index d6c108d47a7..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-powm.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - -Copyright 2012, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> - -#include "testutils.h" - -#define MAXBITS 400 -#define COUNT 1000 - -void -testmain (int argc, char **argv) -{ - unsigned i; - mpz_t b, e, m, res, ref; - - mpz_init (b); - mpz_init (e); - mpz_init (m); - mpz_init (res); - mpz_init (ref); - - for (i = 0; i < COUNT; i++) - { - mini_random_op4 (OP_POWM, MAXBITS, b, e, m, ref); - mpz_powm (res, b, e, m); - if (mpz_cmp (res, ref)) - { - fprintf (stderr, "mpz_powm failed:\n"); - dump ("b", b); - dump ("e", e); - dump ("m", m); - dump ("r", res); - dump ("ref", ref); - abort (); - } - } - mpz_clear (b); - mpz_clear (e); - mpz_clear (m); - mpz_clear (res); - mpz_clear (ref); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-pprime_p.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-pprime_p.c deleted file mode 100644 index a7ffcdb758d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-pprime_p.c +++ /dev/null @@ -1,182 +0,0 @@ -/* test mpz_probab_prime_p - -Copyright 2001, 2002, 2004, 2011, 2012, 2014 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "testutils.h" - -static int -isprime (unsigned long int t) -{ - unsigned long int q, r, d; - - if (t < 32) - return (0xa08a28acUL >> t) & 1; - if ((t & 1) == 0) - return 0; - - if (t % 3 == 0) - return 0; - if (t % 5 == 0) - return 0; - if (t % 7 == 0) - return 0; - - for (d = 11;;) - { - q = t / d; - r = t - q * d; - if (q < d) - return 1; - if (r == 0) - break; - d += 2; - q = t / d; - r = t - q * d; - if (q < d) - return 1; - if (r == 0) - break; - d += 4; - } - return 0; -} - -static void -check_one (mpz_srcptr n, int want) -{ - int got; - - got = mpz_probab_prime_p (n, 25); - - /* "definitely prime" is fine if we only wanted "probably prime" */ - if (got == 2 && want == 1) - want = 2; - - if (got != want) - { - printf ("mpz_probab_prime_p\n"); - dump (" n ", n); - printf (" got =%d", got); - printf (" want=%d\n", want); - abort (); - } -} - -static void -check_pn (mpz_ptr n, int want) -{ - check_one (n, want); - mpz_neg (n, n); - check_one (n, want); -} - -static void -check_small (void) -{ - mpz_t n; - long i; - - mpz_init (n); - - for (i = 0; i < 1700; i++) - { - mpz_set_si (n, i); - check_pn (n, isprime (i)); - } - - mpz_clear (n); -} - -void -check_composites (void) -{ - int i; - int reps = 1000; - mpz_t a, b, n, bs; - unsigned long size_range, size; - - mpz_init (a); - mpz_init (b); - mpz_init (n); - mpz_init (bs); - - for (i = 0; i < reps; i++) - { - mini_urandomb (bs, 32); - size_range = mpz_get_ui (bs) % 12 + 1; /* 0..4096 bit operands */ - - mini_urandomb (bs, size_range); - size = mpz_get_ui (bs); - mini_rrandomb (a, size); - - mini_urandomb (bs, 32); - size_range = mpz_get_ui (bs) % 12 + 1; /* 0..4096 bit operands */ - mini_rrandomb (b, size); - - /* Exclude trivial factors */ - if (mpz_cmp_ui (a, 1) == 0) - mpz_set_ui (a, 2); - if (mpz_cmp_ui (b, 1) == 0) - mpz_set_ui (b, 2); - - mpz_mul (n, a, b); - - check_pn (n, 0); - } - mpz_clear (a); - mpz_clear (b); - mpz_clear (n); - mpz_clear (bs); -} - -static void -check_primes (void) -{ - static const char * const primes[] = { - "2", "17", "65537", - /* diffie-hellman-group1-sha1, also "Well known group 2" in RFC - 2412, 2^1024 - 2^960 - 1 + 2^64 * { [2^894 pi] + 129093 } */ - "0xFFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" - "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" - "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" - "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" - "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381" - "FFFFFFFFFFFFFFFF", - NULL - }; - - mpz_t n; - int i; - - mpz_init (n); - - for (i = 0; primes[i]; i++) - { - mpz_set_str_or_abort (n, primes[i], 0); - check_one (n, 1); - } - mpz_clear (n); -} - -void -testmain (int argc, char *argv[]) -{ - check_small (); - check_composites (); - check_primes (); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-reuse.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-reuse.c deleted file mode 100644 index 018f8fd6321..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-reuse.c +++ /dev/null @@ -1,663 +0,0 @@ -/* Test that routines allow reusing a source variable as destination. - -Copyright 1996, 1999-2002, 2009, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#include "testutils.h" - -#define COUNT 100 - -void dump3 (const char *, mpz_t, mpz_t, mpz_t); -void mpz_check_format (const mpz_t); - -typedef void (*dss_func) (mpz_t, const mpz_t, const mpz_t); -typedef void (*dsi_func) (mpz_t, const mpz_t, unsigned long int); -typedef unsigned long int (*dsi_div_func) (mpz_t, const mpz_t, unsigned long int); -typedef unsigned long int (*ddsi_div_func) (mpz_t, mpz_t, const mpz_t, unsigned long int); -typedef void (*ddss_div_func) (mpz_t, mpz_t, const mpz_t, const mpz_t); -typedef void (*ds_func) (mpz_t, const mpz_t); - - -void -mpz_xinvert (mpz_t r, const mpz_t a, const mpz_t b) -{ - int res; - res = mpz_invert (r, a, b); - if (res == 0) - mpz_set_ui (r, 0); -} - -dss_func dss_funcs[] = -{ - mpz_add, mpz_sub, mpz_mul, - mpz_cdiv_q, mpz_cdiv_r, mpz_fdiv_q, mpz_fdiv_r, mpz_tdiv_q, mpz_tdiv_r, - mpz_xinvert, - mpz_gcd, mpz_lcm, mpz_and, mpz_ior, mpz_xor -}; -const char *dss_func_names[] = -{ - "mpz_add", "mpz_sub", "mpz_mul", - "mpz_cdiv_q", "mpz_cdiv_r", "mpz_fdiv_q", "mpz_fdiv_r", "mpz_tdiv_q", "mpz_tdiv_r", - "mpz_xinvert", - "mpz_gcd", "mpz_lcm", "mpz_and", "mpz_ior", "mpz_xor" -}; -char dss_func_division[] = {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0}; - -dsi_func dsi_funcs[] = -{ - /* Don't change order here without changing the code in main(). */ - mpz_add_ui, mpz_mul_ui, mpz_sub_ui, - mpz_fdiv_q_2exp, mpz_fdiv_r_2exp, - mpz_cdiv_q_2exp, mpz_cdiv_r_2exp, - mpz_tdiv_q_2exp, mpz_tdiv_r_2exp, - mpz_mul_2exp, - mpz_pow_ui -}; -const char *dsi_func_names[] = -{ - "mpz_add_ui", "mpz_mul_ui", "mpz_sub_ui", - "mpz_fdiv_q_2exp", "mpz_fdiv_r_2exp", - "mpz_cdiv_q_2exp", "mpz_cdiv_r_2exp", - "mpz_tdiv_q_2exp", "mpz_tdiv_r_2exp", - "mpz_mul_2exp", - "mpz_pow_ui" -}; - -dsi_div_func dsi_div_funcs[] = -{ - mpz_cdiv_q_ui, mpz_cdiv_r_ui, - mpz_fdiv_q_ui, mpz_fdiv_r_ui, - mpz_tdiv_q_ui, mpz_tdiv_r_ui -}; -const char *dsi_div_func_names[] = -{ - "mpz_cdiv_q_ui", "mpz_cdiv_r_ui", - "mpz_fdiv_q_ui", "mpz_fdiv_r_ui", - "mpz_tdiv_q_ui", "mpz_tdiv_r_ui" -}; - -ddsi_div_func ddsi_div_funcs[] = -{ - mpz_cdiv_qr_ui, - mpz_fdiv_qr_ui, - mpz_tdiv_qr_ui -}; -const char *ddsi_div_func_names[] = -{ - "mpz_cdiv_qr_ui", - "mpz_fdiv_qr_ui", - "mpz_tdiv_qr_ui" -}; - -ddss_div_func ddss_div_funcs[] = -{ - mpz_cdiv_qr, - mpz_fdiv_qr, - mpz_tdiv_qr -}; -const char *ddss_div_func_names[] = -{ - "mpz_cdiv_qr", - "mpz_fdiv_qr", - "mpz_tdiv_qr" -}; - -ds_func ds_funcs[] = -{ - mpz_abs, mpz_com, mpz_neg, mpz_sqrt -}; -const char *ds_func_names[] = -{ - "mpz_abs", "mpz_com", "mpz_neg", "mpz_sqrt" -}; - - -#define FAIL(class,indx,op1,op2,op3) \ - do { \ - class##_funcs[indx] = 0; \ - dump3 (class##_func_names[indx], op1, op2, op3); \ - failures++; \ - } while (0) -#define FAIL2(fname,op1,op2,op3) \ - do { \ - dump3 (#fname, op1, op2, op3); \ - failures++; \ - } while (0) - -void -testmain (int argc, char **argv) -{ - int i; - int pass, reps = COUNT; - mpz_t in1, in2, in3; - unsigned long int in2i; - mp_size_t size; - mpz_t res1, res2, res3; - mpz_t ref1, ref2, ref3; - mpz_t t; - unsigned long int r1, r2; - long failures = 0; - mpz_t bs; - unsigned long bsi, size_range; - - mpz_init (bs); - - mpz_init (in1); - mpz_init (in2); - mpz_init (in3); - mpz_init (ref1); - mpz_init (ref2); - mpz_init (ref3); - mpz_init (res1); - mpz_init (res2); - mpz_init (res3); - mpz_init (t); - - for (pass = 1; pass <= reps; pass++) - { - mini_urandomb (bs, 32); - size_range = mpz_get_ui (bs) % 12 + 2; - - mini_urandomb (bs, size_range); - size = mpz_get_ui (bs); - mini_rrandomb (in1, size); - - mini_urandomb (bs, size_range); - size = mpz_get_ui (bs); - mini_rrandomb (in2, size); - - mini_urandomb (bs, size_range); - size = mpz_get_ui (bs); - mini_rrandomb (in3, size); - - mini_urandomb (bs, 3); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - mpz_neg (in1, in1); - if ((bsi & 2) != 0) - mpz_neg (in2, in2); - if ((bsi & 4) != 0) - mpz_neg (in3, in3); - - for (i = 0; i < sizeof (dss_funcs) / sizeof (dss_func); i++) - { - if (dss_funcs[i] == 0) - continue; - if (dss_func_division[i] && mpz_sgn (in2) == 0) - continue; - - (dss_funcs[i]) (ref1, in1, in2); - mpz_check_format (ref1); - - mpz_set (res1, in1); - (dss_funcs[i]) (res1, res1, in2); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL (dss, i, in1, in2, NULL); - - mpz_set (res1, in2); - (dss_funcs[i]) (res1, in1, res1); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL (dss, i, in1, in2, NULL); - } - - for (i = 0; i < sizeof (ddss_div_funcs) / sizeof (ddss_div_func); i++) - { - if (ddss_div_funcs[i] == 0) - continue; - if (mpz_sgn (in2) == 0) - continue; - - (ddss_div_funcs[i]) (ref1, ref2, in1, in2); - mpz_check_format (ref1); - mpz_check_format (ref2); - - mpz_set (res1, in1); - (ddss_div_funcs[i]) (res1, res2, res1, in2); - mpz_check_format (res1); - mpz_check_format (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0) - FAIL (ddss_div, i, in1, in2, NULL); - - mpz_set (res2, in1); - (ddss_div_funcs[i]) (res1, res2, res2, in2); - mpz_check_format (res1); - mpz_check_format (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0) - FAIL (ddss_div, i, in1, in2, NULL); - - mpz_set (res1, in2); - (ddss_div_funcs[i]) (res1, res2, in1, res1); - mpz_check_format (res1); - mpz_check_format (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0) - FAIL (ddss_div, i, in1, in2, NULL); - - mpz_set (res2, in2); - (ddss_div_funcs[i]) (res1, res2, in1, res2); - mpz_check_format (res1); - mpz_check_format (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0) - FAIL (ddss_div, i, in1, in2, NULL); - } - - for (i = 0; i < sizeof (ds_funcs) / sizeof (ds_func); i++) - { - if (ds_funcs[i] == 0) - continue; - if (strcmp (ds_func_names[i], "mpz_sqrt") == 0 - && mpz_sgn (in1) < 0) - continue; - - (ds_funcs[i]) (ref1, in1); - mpz_check_format (ref1); - - mpz_set (res1, in1); - (ds_funcs[i]) (res1, res1); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL (ds, i, in1, in2, NULL); - } - - in2i = mpz_get_ui (in2); - - for (i = 0; i < sizeof (dsi_funcs) / sizeof (dsi_func); i++) - { - if (dsi_funcs[i] == 0) - continue; - if (strcmp (dsi_func_names[i], "mpz_fdiv_q_2exp") == 0) - /* Limit exponent to something reasonable for the division - functions. Without this, we'd normally shift things off - the end and just generate the trivial values 1, 0, -1. */ - in2i %= 0x1000; - if (strcmp (dsi_func_names[i], "mpz_mul_2exp") == 0) - /* Limit exponent more for mpz_mul_2exp to save time. */ - in2i %= 0x100; - if (strcmp (dsi_func_names[i], "mpz_pow_ui") == 0) - /* Limit exponent yet more for mpz_pow_ui to save time. */ - in2i %= 0x10; - - (dsi_funcs[i]) (ref1, in1, in2i); - mpz_check_format (ref1); - - mpz_set (res1, in1); - (dsi_funcs[i]) (res1, res1, in2i); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL (dsi, i, in1, in2, NULL); - } - - if (in2i != 0) /* Don't divide by 0. */ - { - for (i = 0; i < sizeof (dsi_div_funcs) / sizeof (dsi_div_funcs); i++) - { - r1 = (dsi_div_funcs[i]) (ref1, in1, in2i); - mpz_check_format (ref1); - - mpz_set (res1, in1); - r2 = (dsi_div_funcs[i]) (res1, res1, in2i); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0 || r1 != r2) - FAIL (dsi_div, i, in1, in2, NULL); - } - - for (i = 0; i < sizeof (ddsi_div_funcs) / sizeof (ddsi_div_funcs); i++) - { - r1 = (ddsi_div_funcs[i]) (ref1, ref2, in1, in2i); - mpz_check_format (ref1); - - mpz_set (res1, in1); - r2 = (ddsi_div_funcs[i]) (res1, res2, res1, in2i); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 || r1 != r2) - FAIL (ddsi_div, i, in1, in2, NULL); - - mpz_set (res2, in1); - (ddsi_div_funcs[i]) (res1, res2, res2, in2i); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 || r1 != r2) - FAIL (ddsi_div, i, in1, in2, NULL); - } - } - - if (mpz_sgn (in1) >= 0) - { - mpz_sqrtrem (ref1, ref2, in1); - mpz_check_format (ref1); - mpz_check_format (ref2); - - mpz_set (res1, in1); - mpz_sqrtrem (res1, res2, res1); - mpz_check_format (res1); - mpz_check_format (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0) - FAIL2 (mpz_sqrtrem, in1, NULL, NULL); - - mpz_set (res2, in1); - mpz_sqrtrem (res1, res2, res2); - mpz_check_format (res1); - mpz_check_format (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0) - FAIL2 (mpz_sqrtrem, in1, NULL, NULL); - } - - if (mpz_sgn (in1) >= 0) - { - mpz_root (ref1, in1, in2i % 0x1000 + 1); - mpz_check_format (ref1); - - mpz_set (res1, in1); - mpz_root (res1, res1, in2i % 0x1000 + 1); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_root, in1, in2, NULL); - } - - if (mpz_sgn (in1) >= 0) - { - mpz_rootrem (ref1, ref2, in1, in2i % 0x1000 + 1); - mpz_check_format (ref1); - mpz_check_format (ref2); - - mpz_set (res1, in1); - mpz_rootrem (res1, res2, res1, in2i % 0x1000 + 1); - mpz_check_format (res1); - mpz_check_format (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0) - FAIL2 (mpz_rootrem, in1, in2, NULL); - - mpz_set (res2, in1); - mpz_rootrem (res1, res2, res2, in2i % 0x1000 + 1); - mpz_check_format (res1); - mpz_check_format (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0) - FAIL2 (mpz_rootrem, in1, in2, NULL); - } - - if (pass < reps / 2) /* run fewer tests since gcdext lots of time */ - { - mpz_gcdext (ref1, ref2, ref3, in1, in2); - mpz_check_format (ref1); - mpz_check_format (ref2); - mpz_check_format (ref3); - - mpz_set (res1, in1); - mpz_gcdext (res1, res2, res3, res1, in2); - mpz_check_format (res1); - mpz_check_format (res2); - mpz_check_format (res3); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res2, in1); - mpz_gcdext (res1, res2, res3, res2, in2); - mpz_check_format (res1); - mpz_check_format (res2); - mpz_check_format (res3); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res3, in1); - mpz_gcdext (res1, res2, res3, res3, in2); - mpz_check_format (res1); - mpz_check_format (res2); - mpz_check_format (res3); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res1, in2); - mpz_gcdext (res1, res2, res3, in1, res1); - mpz_check_format (res1); - mpz_check_format (res2); - mpz_check_format (res3); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res2, in2); - mpz_gcdext (res1, res2, res3, in1, res2); - mpz_check_format (res1); - mpz_check_format (res2); - mpz_check_format (res3); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res3, in2); - mpz_gcdext (res1, res2, res3, in1, res3); - mpz_check_format (res1); - mpz_check_format (res2); - mpz_check_format (res3); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res1, in1); - mpz_gcdext (res1, res2, NULL, res1, in2); - mpz_check_format (res1); - mpz_check_format (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res2, in1); - mpz_gcdext (res1, res2, NULL, res2, in2); - mpz_check_format (res1); - mpz_check_format (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res1, in2); - mpz_gcdext (res1, res2, NULL, in1, res1); - mpz_check_format (res1); - mpz_check_format (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res2, in2); - mpz_gcdext (res1, res2, NULL, in1, res2); - mpz_check_format (res1); - mpz_check_format (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - } - - /* Don't run mpz_powm for huge exponents or when undefined. */ - if (mpz_sizeinbase (in2, 2) < 250 && mpz_sgn (in3) != 0 - && (mpz_sgn (in2) >= 0 || mpz_invert (t, in1, in3))) - { - mpz_powm (ref1, in1, in2, in3); - mpz_check_format (ref1); - - mpz_set (res1, in1); - mpz_powm (res1, res1, in2, in3); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_powm, in1, in2, in3); - - mpz_set (res1, in2); - mpz_powm (res1, in1, res1, in3); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_powm, in1, in2, in3); - - mpz_set (res1, in3); - mpz_powm (res1, in1, in2, res1); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_powm, in1, in2, in3); - } - - /* Don't run mpz_powm_ui when undefined. */ - if (mpz_sgn (in3) != 0) - { - mpz_powm_ui (ref1, in1, in2i, in3); - mpz_check_format (ref1); - - mpz_set (res1, in1); - mpz_powm_ui (res1, res1, in2i, in3); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_powm_ui, in1, in2, in3); - - mpz_set (res1, in3); - mpz_powm_ui (res1, in1, in2i, res1); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_powm_ui, in1, in2, in3); - } - - { - r1 = mpz_gcd_ui (ref1, in1, in2i); - mpz_check_format (ref1); - - mpz_set (res1, in1); - r2 = mpz_gcd_ui (res1, res1, in2i); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_gcd_ui, in1, in2, NULL); - } -#if 0 - if (mpz_cmp_ui (in2, 1L) > 0 && mpz_sgn (in1) != 0) - { - /* Test mpz_remove */ - mpz_remove (ref1, in1, in2); - mpz_check_format (ref1); - - mpz_set (res1, in1); - mpz_remove (res1, res1, in2); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_remove, in1, in2, NULL); - - mpz_set (res1, in2); - mpz_remove (res1, in1, res1); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_remove, in1, in2, NULL); - } -#endif - if (mpz_sgn (in2) != 0) - { - /* Test mpz_divexact */ - mpz_mul (t, in1, in2); - mpz_divexact (ref1, t, in2); - mpz_check_format (ref1); - - mpz_set (res1, t); - mpz_divexact (res1, res1, in2); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_divexact, t, in2, NULL); - - mpz_set (res1, in2); - mpz_divexact (res1, t, res1); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_divexact, t, in2, NULL); - } - -#if 0 - if (mpz_sgn (in2) > 0) - { - /* Test mpz_divexact_gcd, same as mpz_divexact */ - mpz_mul (t, in1, in2); - mpz_divexact_gcd (ref1, t, in2); - mpz_check_format (ref1); - - mpz_set (res1, t); - mpz_divexact_gcd (res1, res1, in2); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_divexact_gcd, t, in2, NULL); - - mpz_set (res1, in2); - mpz_divexact_gcd (res1, t, res1); - mpz_check_format (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_divexact_gcd, t, in2, NULL); - } -#endif - } - - if (failures != 0) - { - fprintf (stderr, "mpz/reuse: %ld error%s\n", failures, "s" + (failures == 1)); - exit (1); - } - - mpz_clear (bs); - mpz_clear (in1); - mpz_clear (in2); - mpz_clear (in3); - mpz_clear (ref1); - mpz_clear (ref2); - mpz_clear (ref3); - mpz_clear (res1); - mpz_clear (res2); - mpz_clear (res3); - mpz_clear (t); -} - -void -dump3 (const char *name, mpz_t in1, mpz_t in2, mpz_t in3) -{ - printf ("failure in %s (", name); - mpz_out_str (stdout, -16, in1); - if (in2 != NULL) - { - printf (" "); - mpz_out_str (stdout, -16, in2); - } - if (in3 != NULL) - { - printf (" "); - mpz_out_str (stdout, -16, in3); - } - printf (")\n"); -} - -void -mpz_check_format (const mpz_t x) -{ - mp_size_t n = x ->_mp_size; - if (n < 0) - n = - n; - - if (n > x->_mp_alloc) - { - fprintf (stderr, "mpz_t size exceeds allocation!\n"); - abort (); - } - - if (n > 0 && x->_mp_d[n-1] == 0) - { - fprintf (stderr, "Unnormalized mpz_t!\n"); - abort (); - } -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-root.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-root.c deleted file mode 100644 index 1f46c435c0c..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-root.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - -Copyright 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> - -#include "testutils.h" - -#define MAXBITS 400 -#define COUNT 10000 - -/* Called when s is supposed to be floor(root(u,z)), and r = u - s^z */ -static int -rootrem_valid_p (const mpz_t u, const mpz_t s, const mpz_t r, unsigned long z) -{ - mpz_t t; - - mpz_init (t); - if (mpz_fits_ulong_p (s)) - mpz_ui_pow_ui (t, mpz_get_ui (s), z); - else - mpz_pow_ui (t, s, z); - mpz_sub (t, u, t); - if ((mpz_sgn (t) != mpz_sgn(u) && mpz_sgn (t) != 0) || mpz_cmp (t, r) != 0) - { - mpz_clear (t); - return 0; - } - if (mpz_sgn (s) > 0) - mpz_add_ui (t, s, 1); - else - mpz_sub_ui (t, s, 1); - mpz_pow_ui (t, t, z); - if (mpz_cmpabs (t, u) <= 0) - { - mpz_clear (t); - return 0; - } - - mpz_clear (t); - return 1; -} - -void -testmain (int argc, char **argv) -{ - unsigned i; - unsigned long e; - mpz_t u, s, r, bs; - - mpz_init (u); - mpz_init (s); - mpz_init (r); - mpz_init (bs); - - for (i = 0; i < COUNT; i++) - { - mini_rrandomb (u, MAXBITS); - mini_rrandomb (bs, 12); - e = mpz_getlimbn (bs, 0) % mpz_sizeinbase (u, 2) + 1; - if ((e & 1) && (mpz_getlimbn (bs, 0) & (1L<<10))) - mpz_neg (u, u); - mpz_rootrem (s, r, u, e); - - if (!rootrem_valid_p (u, s, r, e)) - { - fprintf (stderr, "mpz_rootrem(%lu-th) failed:\n", e); - dump ("u", u); - dump ("root", s); - dump ("rem", r); - abort (); - } - } - mpz_clear (bs); - mpz_clear (u); - mpz_clear (s); - mpz_clear (r); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-scan.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-scan.c deleted file mode 100644 index 39b1f35cf4e..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-scan.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - -Copyright 2012, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> - -#include "testutils.h" - -#define MAXBITS 400 -#define COUNT 10000 - -void -testmain (int argc, char **argv) -{ - unsigned i; - mpz_t a; - mp_bitcnt_t b, res, ref; - - mpz_init (a); - - for (i = 0; i < COUNT; i++) - { - mini_random_scan_op (OP_SCAN0, MAXBITS, a, &b, &ref); - res = mpz_scan0 (a, b); - if (res != ref) - { - fprintf (stderr, "mpz_scan0 failed:\n"); - dump ("a", a); - fprintf (stderr, "b: %lu\n", b); - fprintf (stderr, "r: %lu\n", res); - fprintf (stderr, "ref: %lu\n", ref); - abort (); - } - if (mpz_sgn (a) > 0 && ref < mpz_sizeinbase (a, 2)) - { - res = mpn_scan0 (a->_mp_d, b); - if (res != ref) - { - fprintf (stderr, "mpn_scan0 failed:\n"); - dump ("a", a); - fprintf (stderr, "b: %lu\n", b); - fprintf (stderr, "r: %lu\n", res); - fprintf (stderr, "ref: %lu\n", ref); - abort (); - } - } - mini_random_scan_op (OP_SCAN1, MAXBITS, a, &b, &ref); - res = mpz_scan1 (a, b); - if (res != ref) - { - fprintf (stderr, "mpz_scan1 failed:\n"); - dump ("a", a); - fprintf (stderr, "b: %lu\n", b); - fprintf (stderr, "r: %lu\n", res); - fprintf (stderr, "ref: %lu\n", ref); - abort (); - } - if (mpz_sgn (a) > 0 && ref != ~ (mp_bitcnt_t) 0) - { - res = mpn_scan1 (a->_mp_d, b); - if (res != ref) - { - fprintf (stderr, "mpn_scan1 failed:\n"); - dump ("a", a); - fprintf (stderr, "b: %lu\n", b); - fprintf (stderr, "r: %lu\n", res); - fprintf (stderr, "ref: %lu\n", ref); - abort (); - } - } - } - mpz_clear (a); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-signed.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-signed.c deleted file mode 100644 index e2502d6e9fd..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-signed.c +++ /dev/null @@ -1,142 +0,0 @@ -/* Exercise some mpz_..._si functions. - -Copyright 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "testutils.h" - -int -check_si (mpz_t sz, mpz_t oz, long si, long oi, int c) -{ - mpz_t t; - int fail; - - if (mpz_cmp_si (sz, oi) != c) - { - printf ("mpz_cmp_si (sz, %ld) != %i.\n", oi, c); - printf (" sz="); mpz_out_str (stdout, 10, sz); printf ("\n"); - abort (); - } - - if ((si < oi ? -1 : si > oi) != c) - return 1; - - mpz_init_set_si (t, si); - - if ((fail = mpz_cmp_si (sz, si)) != 0) - printf ("mpz_cmp_si (sz, %ld) != 0.\n", si); - if (mpz_cmp_si (oz, si) != -c) - printf ("mpz_cmp_si (oz, %ld) != %i.\n", si, -c), fail = 1; - if (! mpz_fits_slong_p (sz)) - printf ("mpz_fits_slong_p (sz) != 1.\n"), fail = 1; - if (mpz_get_si (sz) != si) - printf ("mpz_get_si (sz) != %ld.\n", si), fail = 1; - if (mpz_cmp (t, sz) != 0) - { - printf ("mpz_init_set_si (%ld) failed.\n", si); - printf (" got="); mpz_out_str (stdout, 10, t); printf ("\n"); - fail = 1; - } - - mpz_clear (t); - - if (fail) - { - printf (" sz="); mpz_out_str (stdout, 10, sz); printf ("\n"); - printf (" oz="); mpz_out_str (stdout, 10, oz); printf ("\n"); - printf (" si=%ld\n", si); - abort (); - } - - return 0; -} - -void -try_op_si (int c) -{ - long si, oi; - mpz_t sz, oz; - - si = c; - mpz_init_set_si (sz, si); - - oi = si; - mpz_init_set (oz, sz); - - do { - si *= 2; /* c * 2^k */ - mpz_mul_2exp (sz, sz, 1); - - if (check_si (sz, oz, si, oi, c)) - { - mpz_set (oz, sz); - break; - } - - oi = si + c; /* c * (2^k + 1) */ - if (c == -1) - mpz_sub_ui (oz, sz, 1); - else - mpz_add_ui (oz, sz, 1); - - if (check_si (oz, sz, oi, si, c)) - break; - - oi = (si - c) * 2 + c; /* c * (2^K - 1) */ - mpz_mul_si (oz, sz, 2*c); - if (c == -1) - mpz_ui_sub (oz, 1, oz); /* oz = sz * 2 + 1 */ - else - mpz_sub_ui (oz, oz, 1); /* oz = sz * 2 - 1 */ - } while (check_si (oz, sz, oi, si, c) == 0); - - mpz_clear (sz); - - if (mpz_fits_slong_p (oz)) - { - printf ("Should not fit a signed long any more.\n"); - printf (" oz="); mpz_out_str (stdout, 10, oz); printf ("\n"); - abort (); - } - - if (mpz_cmp_si (oz, -c) != c) - { - printf ("mpz_cmp_si (oz, %i) != %i.\n", c, c); - printf (" oz="); mpz_out_str (stdout, 10, oz); printf ("\n"); - abort (); - } - - mpz_mul_2exp (oz, oz, 1); - if (mpz_cmp_si (oz, -c) != c) - { - printf ("mpz_cmp_si (oz, %i) != %i.\n", c, c); - printf (" oz="); mpz_out_str (stdout, 10, oz); printf ("\n"); - abort (); - } - - mpz_clear (oz); -} - -void -testmain (int argc, char *argv[]) -{ - try_op_si (-1); - try_op_si (1); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-sqrt.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-sqrt.c deleted file mode 100644 index f4ce7cbb4dc..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-sqrt.c +++ /dev/null @@ -1,181 +0,0 @@ -/* - -Copyright 2012, 2014, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> - -#include "testutils.h" - -#define MAXBITS 400 -#define COUNT 9000 - -/* Called when s is supposed to be floor(sqrt(u)), and r = u - s^2 */ -static int -sqrtrem_valid_p (const mpz_t u, const mpz_t s, const mpz_t r) -{ - mpz_t t; - - mpz_init (t); - mpz_mul (t, s, s); - mpz_sub (t, u, t); - if (mpz_sgn (t) < 0 || mpz_cmp (t, r) != 0) - { - mpz_clear (t); - return 0; - } - mpz_add_ui (t, s, 1); - mpz_mul (t, t, t); - if (mpz_cmp (t, u) <= 0) - { - mpz_clear (t); - return 0; - } - - mpz_clear (t); - return 1; -} - -void -mpz_mpn_sqrtrem (mpz_t s, mpz_t r, const mpz_t u) -{ - mp_limb_t *sp, *rp; - mp_size_t un, sn, ret; - - un = mpz_size (u); - - mpz_xor (s, s, u); - sn = (un + 1) / 2; - sp = mpz_limbs_write (s, sn + 1); - sp [sn] = 11; - - if (un & 1) - rp = NULL; /* Exploits the fact that r already is correct. */ - else { - mpz_add (r, u, s); - rp = mpz_limbs_write (r, un + 1); - rp [un] = 19; - } - - ret = mpn_sqrtrem (sp, rp, mpz_limbs_read (u), un); - - if (sp [sn] != 11) - { - fprintf (stderr, "mpn_sqrtrem buffer overrun on sp.\n"); - abort (); - } - if (un & 1) { - if ((ret != 0) != (mpz_size (r) != 0)) { - fprintf (stderr, "mpn_sqrtrem wrong return value with NULL.\n"); - abort (); - } - } else { - mpz_limbs_finish (r, ret); - if (ret != mpz_size (r)) { - fprintf (stderr, "mpn_sqrtrem wrong return value.\n"); - abort (); - } - if (rp [un] != 19) - { - fprintf (stderr, "mpn_sqrtrem buffer overrun on rp.\n"); - abort (); - } - } - - mpz_limbs_finish (s, (un + 1) / 2); -} - -void -testmain (int argc, char **argv) -{ - unsigned i; - mpz_t u, s, r; - - mpz_init (s); - mpz_init (r); - - mpz_init_set_si (u, -1); - if (mpz_perfect_square_p (u)) - { - fprintf (stderr, "mpz_perfect_square_p failed on -1.\n"); - abort (); - } - - if (!mpz_perfect_square_p (s)) - { - fprintf (stderr, "mpz_perfect_square_p failed on 0.\n"); - abort (); - } - - for (i = 0; i < COUNT; i++) - { - mini_rrandomb (u, MAXBITS - (i & 0xFF)); - mpz_sqrtrem (s, r, u); - - if (!sqrtrem_valid_p (u, s, r)) - { - fprintf (stderr, "mpz_sqrtrem failed:\n"); - dump ("u", u); - dump ("sqrt", s); - dump ("rem", r); - abort (); - } - - mpz_mpn_sqrtrem (s, r, u); - - if (!sqrtrem_valid_p (u, s, r)) - { - fprintf (stderr, "mpn_sqrtrem failed:\n"); - dump ("u", u); - dump ("sqrt", s); - dump ("rem", r); - abort (); - } - - if (mpz_sgn (r) == 0) { - mpz_neg (u, u); - mpz_sub_ui (u, u, 1); - } - - if ((mpz_sgn (u) <= 0 || (i & 1)) ? - mpz_perfect_square_p (u) : - mpn_perfect_square_p (mpz_limbs_read (u), mpz_size (u))) - { - fprintf (stderr, "mp%s_perfect_square_p failed on non square:\n", - (mpz_sgn (u) <= 0 || (i & 1)) ? "z" : "n"); - dump ("u", u); - abort (); - } - - mpz_mul (u, s, s); - if (!((mpz_sgn (u) <= 0 || (i & 1)) ? - mpz_perfect_square_p (u) : - mpn_perfect_square_p (mpz_limbs_read (u), mpz_size (u)))) - { - fprintf (stderr, "mp%s_perfect_square_p failed on square:\n", - (mpz_sgn (u) <= 0 || (i & 1)) ? "z" : "n"); - dump ("u", u); - abort (); - } - - } - mpz_clear (u); - mpz_clear (s); - mpz_clear (r); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-str.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-str.c deleted file mode 100644 index 6140baa5cbf..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-str.c +++ /dev/null @@ -1,307 +0,0 @@ -/* - -Copyright 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <assert.h> -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#include "testutils.h" - -#define MAXBITS 400 -#define COUNT 2000 - -#define GMP_LIMB_BITS (sizeof(mp_limb_t) * CHAR_BIT) -#define MAXLIMBS ((MAXBITS + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS) - -static void -test_small (void) -{ - struct { - const char *input; - const char *decimal; - } data[] = { - { "183407", "183407" }, - { " 763959", "763959" }, - { "9 81999", "981999" }, - { "10\t7398", "107398" }, - { "-9585 44", "-00958544" }, - { "-0", "0000" }, - { " -000 ", "0" }, - { "0704436", "231710" }, - { " 02503517", "689999" }, - { "0 1312143", "365667" }, - { "-03 274062", "-882738" }, - { "012\t242", "005282" }, - { "0b11010111110010001111", "883855" }, - { " 0b11001010010100001", "103585" }, - { "-0b101010110011101111", "-175343" }, - { "0b 1111111011011100110", "521958" }, - { "0b1 1111110111001000011", "1044035" }, - { " 0x53dfc", "343548" }, - { "0xfA019", "1024025" }, - { "0x 642d1", "410321" }, - { "0x5 8067", "360551" }, - { "-0xd6Be6", "-879590" }, - { "\t0B1110000100000000011", "460803" }, - { "0B\t1111110010010100101", "517285" }, - { "0B1\t010111101101110100", "359284" }, - { "-0B101\t1001101111111001", "-367609" }, - { "0B10001001010111110000", "562672" }, - { "0Xe4B7e", "936830" }, - { "0X1E4bf", "124095" }, - { "-0Xfdb90", "-1039248" }, - { "0X7fc47", "523335" }, - { "0X8167c", "530044" }, - /* Some invalid inputs */ - { "0ab", NULL }, - { "10x0", NULL }, - { "0xxab", NULL }, - { "ab", NULL }, - { "0%#", NULL }, - { "$foo", NULL }, - { NULL, NULL } - }; - unsigned i; - mpz_t a, b; - mpz_init (b); - - for (i = 0; data[i].input; i++) - { - int res = mpz_init_set_str (a, data[i].input, 0); - if (data[i].decimal) - { - if (res != 0) - { - fprintf (stderr, "mpz_set_str returned -1, input: %s\n", - data[i].input); - abort (); - } - if (mpz_set_str (b, data[i].decimal, 10) != 0) - { - fprintf (stderr, "mpz_set_str returned -1, decimal input: %s\n", - data[i].input); - abort (); - } - if (mpz_cmp (a, b) != 0) - { - fprintf (stderr, "mpz_set_str failed for input: %s\n", - data[i].input); - - dump ("got", a); - dump ("ref", b); - abort (); - } - } - else if (res != -1) - { - fprintf (stderr, "mpz_set_str returned %d, invalid input: %s\n", - res, data[i].input); - abort (); - } - mpz_clear (a); - } - - mpz_clear (b); -} - -void -testmain (int argc, char **argv) -{ - unsigned i; - char *ap; - char *bp; - char *rp; - size_t bn, rn, arn; - - mpz_t a, b; - - FILE *tmp; - - test_small (); - - mpz_init (a); - mpz_init (b); - - tmp = tmpfile (); - if (!tmp) - fprintf (stderr, - "Failed to create temporary file. Skipping mpz_out_str tests.\n"); - - for (i = 0; i < COUNT; i++) - { - int base; - for (base = 0; base <= 36; base += 1 + (base == 0)) - { - hex_random_str_op (MAXBITS, i&1 ? base: -base, &ap, &rp); - if (mpz_set_str (a, ap, 16) != 0) - { - fprintf (stderr, "mpz_set_str failed on input %s\n", ap); - abort (); - } - - rn = strlen (rp); - arn = rn - (rp[0] == '-'); - - bn = mpz_sizeinbase (a, base ? base : 10); - if (bn < arn || bn > (arn + 1)) - { - fprintf (stderr, "mpz_sizeinbase failed:\n"); - dump ("a", a); - fprintf (stderr, "r = %s\n", rp); - fprintf (stderr, " base %d, correct size %u, got %u\n", - base, (unsigned) arn, (unsigned)bn); - abort (); - } - bp = mpz_get_str (NULL, i&1 ? base: -base, a); - if (strcmp (bp, rp)) - { - fprintf (stderr, "mpz_get_str failed:\n"); - dump ("a", a); - fprintf (stderr, "b = %s\n", bp); - fprintf (stderr, " base = %d\n", base); - fprintf (stderr, "r = %s\n", rp); - abort (); - } - - /* Just a few tests with file i/o. */ - if (tmp && i < 20) - { - size_t tn; - rewind (tmp); - tn = mpz_out_str (tmp, i&1 ? base: -base, a); - if (tn != rn) - { - fprintf (stderr, "mpz_out_str, bad return value:\n"); - dump ("a", a); - fprintf (stderr, "r = %s\n", rp); - fprintf (stderr, " base %d, correct size %u, got %u\n", - base, (unsigned) rn, (unsigned)tn); - abort (); - } - rewind (tmp); - memset (bp, 0, rn); - tn = fread (bp, 1, rn, tmp); - if (tn != rn) - { - fprintf (stderr, - "fread failed, expected %lu bytes, got only %lu.\n", - (unsigned long) rn, (unsigned long) tn); - abort (); - } - - if (memcmp (bp, rp, rn) != 0) - { - fprintf (stderr, "mpz_out_str failed:\n"); - dump ("a", a); - fprintf (stderr, "b = %s\n", bp); - fprintf (stderr, " base = %d\n", base); - fprintf (stderr, "r = %s\n", rp); - abort (); - } - } - - mpz_set_str (b, rp, base); - - if (mpz_cmp (a, b)) - { - fprintf (stderr, "mpz_set_str failed:\n"); - fprintf (stderr, "r = %s\n", rp); - fprintf (stderr, " base = %d\n", base); - fprintf (stderr, "r = %s\n", ap); - fprintf (stderr, " base = 16\n"); - dump ("b", b); - dump ("r", a); - abort (); - } - - /* Test mpn interface */ - if (base && mpz_sgn (a)) - { - size_t i; - const char *absr; - mp_limb_t t[MAXLIMBS]; - mp_size_t tn = mpz_size (a); - - assert (tn <= MAXLIMBS); - mpn_copyi (t, a->_mp_d, tn); - - bn = mpn_get_str ((unsigned char *) bp, base, t, tn); - if (bn != arn) - { - fprintf (stderr, "mpn_get_str failed:\n"); - fprintf (stderr, "returned length: %lu (bad)\n", (unsigned long) bn); - fprintf (stderr, "expected: %lu\n", (unsigned long) arn); - fprintf (stderr, " base = %d\n", base); - fprintf (stderr, "r = %s\n", ap); - fprintf (stderr, " base = 16\n"); - dump ("b", b); - dump ("r", a); - abort (); - } - absr = rp + (rp[0] == '-'); - - for (i = 0; i < bn; i++) - { - unsigned char digit = absr[i]; - unsigned value; - if (digit >= '0' && digit <= '9') - value = digit - '0'; - else if (digit >= 'a' && digit <= 'z') - value = digit - 'a' + 10; - else if (digit >= 'A' && digit <= 'Z') - value = digit - 'A' + 10; - else - { - fprintf (stderr, "Internal error in test.\n"); - abort(); - } - if (bp[i] != value) - { - fprintf (stderr, "mpn_get_str failed:\n"); - fprintf (stderr, "digit %lu: %d (bad)\n", (unsigned long) i, bp[i]); - fprintf (stderr, "expected: %d\n", value); - fprintf (stderr, " base = %d\n", base); - fprintf (stderr, "r = %s\n", ap); - fprintf (stderr, " base = 16\n"); - dump ("b", b); - dump ("r", a); - abort (); - } - } - tn = mpn_set_str (t, (unsigned char *) bp, bn, base); - if (tn != mpz_size (a) || mpn_cmp (t, a->_mp_d, tn)) - { - fprintf (stderr, "mpn_set_str failed:\n"); - fprintf (stderr, "r = %s\n", rp); - fprintf (stderr, " base = %d\n", base); - fprintf (stderr, "r = %s\n", ap); - fprintf (stderr, " base = 16\n"); - dump ("r", a); - abort (); - } - } - free (ap); - testfree (bp); - } - } - mpz_clear (a); - mpz_clear (b); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-sub.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-sub.c deleted file mode 100644 index e230fda1fb5..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/t-sub.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - -Copyright 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdlib.h> -#include <stdio.h> - -#include "testutils.h" - -#define MAXBITS 400 -#define COUNT 10000 - -void -testmain (int argc, char **argv) -{ - unsigned i; - mpz_t a, b, res, res_ui, ref; - - mpz_init (a); - mpz_init (b); - mpz_init (res); - mpz_init (res_ui); - mpz_init (ref); - - for (i = 0; i < COUNT; i++) - { - mini_random_op3 (OP_SUB, MAXBITS, a, b, ref); - mpz_sub (res, a, b); - if (mpz_cmp (res, ref)) - { - fprintf (stderr, "mpz_sub failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r", res); - dump ("ref", ref); - abort (); - } - if (mpz_fits_ulong_p (a)) { - mpz_ui_sub (res_ui, mpz_get_ui (a), b); - if (mpz_cmp (res_ui, ref)) - { - fprintf (stderr, "mpz_ui_sub failed:\n"); - dump ("a", a); - dump ("b", b); - dump ("r", res_ui); - dump ("ref", ref); - abort (); - } - } - } - mpz_clear (a); - mpz_clear (b); - mpz_clear (res); - mpz_clear (res_ui); - mpz_clear (ref); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/testutils.c b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/testutils.c deleted file mode 100644 index 5aa06e32790..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/testutils.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - -Copyright 2013, 2014, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "testutils.h" - -/* Include it here, so we we could tweak, e.g., how MPZ_REALLOC - works. */ -#include "../mini-gmp.c" - -static size_t total_alloc = 0; - -/* Custom memory allocation to track memory usage, and add a small red - zone. - - About alignment: In general, getting a block from malloc, and - incrementing it by sizeof(size_t), like we do here, might give a - pointer which is not properly aligned for all types. But the - largest type we allocate space for is unsigned long (mp_limb_t), - which shouldn't have stricter alignment requirements than - size_t. */ - -static char block_end[8] = - { 0x7c, 0x37, 0xd6, 0x12, 0xa8, 0x6c, 0x01, 0xd1 }; - -static void * -block_init (size_t *block, size_t size) -{ - char *p; - *block++ = size; - - p = (char *) block; - memcpy (p + size, block_end, sizeof(block_end)); - - total_alloc += size; - return p; -} - -/* Check small redzone, return pointer to malloced block. */ -static size_t * -block_check (void *p) -{ - size_t *block = (size_t *) p - 1; - size_t size = block[0]; - - if (memcmp ((char *)p + size, block_end, sizeof(block_end)) != 0) - { - fprintf (stderr, "red zone overwritten.\n"); - abort (); - } - total_alloc -= size; - return block; -} - -static void * -tu_alloc (size_t size) -{ - size_t *block = (size_t *) malloc (sizeof(size_t) + size + sizeof(block_end)); - if (!block) - { - fprintf (stderr, "Virtual memory exhausted.\n"); - abort (); - } - - return block_init (block, size); -} - -static void * -tu_realloc (void *p, size_t old_size, size_t new_size) -{ - size_t *block = block_check (p); - block = (size_t *) realloc (block, sizeof(size_t) + new_size + sizeof(block_end)); - if (!block) - { - fprintf (stderr, "Virtual memory exhausted.\n"); - abort (); - } - - return block_init (block, new_size); -} - -static void -tu_free (void *p, size_t old_size) -{ - free (block_check (p)); -} - -/* Free memory allocated via mini-gmp allocation function. */ -void -testfree (void *p) -{ - void (*freefunc) (void *, size_t); - mp_get_memory_functions (NULL, NULL, &freefunc); - - freefunc (p, 0); -} - -int -main (int argc, char **argv) -{ - hex_random_init (); - - mp_set_memory_functions (tu_alloc, tu_realloc, tu_free); - - /* Currently, t-comb seems to be the only program accepting any - arguments. It might make sense to parse common arguments here. */ - testmain (argc, argv); - - if (total_alloc != 0) - { - fprintf (stderr, "Memory leaked: %lu bytes.\n", - (unsigned long) total_alloc); - abort (); - } - return 0; -} - -void -testhalves (int count, void (*tested_fun) (int)) -{ - void (*freefunc) (void *, size_t); - void *(*reallocfunc) (void *, size_t, size_t); - void *(*allocfunc) (size_t); - size_t initial_alloc; - - mp_get_memory_functions (&allocfunc, &reallocfunc, &freefunc); - initial_alloc = total_alloc; - (*tested_fun) (count / 2); - if (initial_alloc != total_alloc) - { - fprintf (stderr, "First half, memory leaked: %lu bytes.\n", - (unsigned long) total_alloc - initial_alloc); - abort (); - } - mp_set_memory_functions (NULL, NULL, NULL); - (*tested_fun) (count / 2); - mp_set_memory_functions (allocfunc, reallocfunc, freefunc); -} - -void -dump (const char *label, const mpz_t x) -{ - char *buf = mpz_get_str (NULL, 16, x); - fprintf (stderr, "%s: %s\n", label, buf); - testfree (buf); -} - -void -mpz_set_str_or_abort (mpz_ptr z, const char *str, int base) -{ - if (mpz_set_str (z, str, base) != 0) - { - fprintf (stderr, "ERROR: mpz_set_str failed\n"); - fprintf (stderr, " str = \"%s\"\n", str); - fprintf (stderr, " base = %d\n", base); - abort(); - } -} diff --git a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/testutils.h b/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/testutils.h deleted file mode 100644 index bc56c06a759..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/mini-gmp/tests/testutils.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - -Copyright 2013, 2014, Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "mini-random.h" - -#define numberof(x) (sizeof (x) / sizeof ((x)[0])) - -void testmain (int argc, char **argv); - -void testhalves (int count, void (*tested_fun) (int)); - -void testfree (void *p); - -void -dump (const char *label, const mpz_t x); - -void -mpz_set_str_or_abort (mpz_ptr z, const char *str, int base); diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/Makefile.am b/src/plugins/e-acsl/contrib/libgmp/tests/Makefile.am deleted file mode 100644 index 937174b4809..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -## Process this file with automake to generate Makefile.in - -# Copyright 2000-2004, 2013 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. - - -SUBDIRS = . devel mpn mpz mpq mpf rand misc cxx - -include ../mpn/Makeasm.am - -AM_CPPFLAGS = -I$(top_srcdir) -LDADD = libtests.la $(top_builddir)/libgmp.la - -check_LTLIBRARIES = libtests.la - -EXTRA_libtests_la_SOURCES = amd64call.asm amd64check.c x86call.asm x86check.c \ - arm32call.asm arm32check.c -libtests_la_SOURCES = tests.h \ - memory.c misc.c refmpf.c refmpn.c refmpq.c refmpz.c spinner.c trace.c -libtests_la_DEPENDENCIES = @CALLING_CONVENTIONS_OBJS@ -libtests_la_LIBADD = $(libtests_la_DEPENDENCIES) $(top_builddir)/libgmp.la - -check_PROGRAMS = t-bswap t-constants t-count_zeros t-hightomask \ - t-modlinv t-popc t-parity t-sub -TESTS = $(check_PROGRAMS) diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/Makefile.in b/src/plugins/e-acsl/contrib/libgmp/tests/Makefile.in deleted file mode 100644 index e3af8fffaab..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/Makefile.in +++ /dev/null @@ -1,1368 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright 2000-2004, 2013 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. - -# Copyright 1996, 1998-2002 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of either: -# -# * the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# or -# -# * the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any -# later version. -# -# or both in parallel, as here. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received copies of the GNU General Public License and the -# GNU Lesser General Public License along with the GNU MP Library. If not, -# see https://www.gnu.org/licenses/. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -check_PROGRAMS = t-bswap$(EXEEXT) t-constants$(EXEEXT) \ - t-count_zeros$(EXEEXT) t-hightomask$(EXEEXT) \ - t-modlinv$(EXEEXT) t-popc$(EXEEXT) t-parity$(EXEEXT) \ - t-sub$(EXEEXT) -subdir = tests -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__DEPENDENCIES_1 = -am_libtests_la_OBJECTS = memory.lo misc.lo refmpf.lo refmpn.lo \ - refmpq.lo refmpz.lo spinner.lo trace.lo -libtests_la_OBJECTS = $(am_libtests_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -t_bswap_SOURCES = t-bswap.c -t_bswap_OBJECTS = t-bswap.$(OBJEXT) -t_bswap_LDADD = $(LDADD) -t_bswap_DEPENDENCIES = libtests.la $(top_builddir)/libgmp.la -t_constants_SOURCES = t-constants.c -t_constants_OBJECTS = t-constants.$(OBJEXT) -t_constants_LDADD = $(LDADD) -t_constants_DEPENDENCIES = libtests.la $(top_builddir)/libgmp.la -t_count_zeros_SOURCES = t-count_zeros.c -t_count_zeros_OBJECTS = t-count_zeros.$(OBJEXT) -t_count_zeros_LDADD = $(LDADD) -t_count_zeros_DEPENDENCIES = libtests.la $(top_builddir)/libgmp.la -t_hightomask_SOURCES = t-hightomask.c -t_hightomask_OBJECTS = t-hightomask.$(OBJEXT) -t_hightomask_LDADD = $(LDADD) -t_hightomask_DEPENDENCIES = libtests.la $(top_builddir)/libgmp.la -t_modlinv_SOURCES = t-modlinv.c -t_modlinv_OBJECTS = t-modlinv.$(OBJEXT) -t_modlinv_LDADD = $(LDADD) -t_modlinv_DEPENDENCIES = libtests.la $(top_builddir)/libgmp.la -t_parity_SOURCES = t-parity.c -t_parity_OBJECTS = t-parity.$(OBJEXT) -t_parity_LDADD = $(LDADD) -t_parity_DEPENDENCIES = libtests.la $(top_builddir)/libgmp.la -t_popc_SOURCES = t-popc.c -t_popc_OBJECTS = t-popc.$(OBJEXT) -t_popc_LDADD = $(LDADD) -t_popc_DEPENDENCIES = libtests.la $(top_builddir)/libgmp.la -t_sub_SOURCES = t-sub.c -t_sub_OBJECTS = t-sub.$(OBJEXT) -t_sub_LDADD = $(LDADD) -t_sub_DEPENDENCIES = libtests.la $(top_builddir)/libgmp.la -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(libtests_la_SOURCES) $(EXTRA_libtests_la_SOURCES) \ - t-bswap.c t-constants.c t-count_zeros.c t-hightomask.c \ - t-modlinv.c t-parity.c t-popc.c t-sub.c -DIST_SOURCES = $(libtests_la_SOURCES) $(EXTRA_libtests_la_SOURCES) \ - t-bswap.c t-constants.c t-count_zeros.c t-hightomask.c \ - t-modlinv.c t-parity.c t-popc.c t-sub.c -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-recursive dvi-recursive html-recursive info-recursive \ - install-data-recursive install-dvi-recursive \ - install-exec-recursive install-html-recursive \ - install-info-recursive install-pdf-recursive \ - install-ps-recursive install-recursive installcheck-recursive \ - installdirs-recursive pdf-recursive ps-recursive \ - tags-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - check recheck distdir -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red='[0;31m'; \ - grn='[0;32m'; \ - lgn='[1;32m'; \ - blu='[1;34m'; \ - mgn='[0;35m'; \ - brg='[1m'; \ - std='[m'; \ - fi; \ -} -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -TEST_SUITE_LOG = test-suite.log -TEST_EXTENSIONS = @EXEEXT@ .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) -DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/../mpn/Makeasm.am $(srcdir)/Makefile.in \ - $(top_srcdir)/test-driver -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ABI = @ABI@ -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -ASMFLAGS = @ASMFLAGS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ -CC = @CC@ -CCAS = @CCAS@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CPP_FOR_BUILD = @CPP_FOR_BUILD@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@ -DEFS = @DEFS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -FGREP = @FGREP@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIMB_BITS = @GMP_LIMB_BITS@ -GMP_NAIL_BITS = @GMP_NAIL_BITS@ -GREP = @GREP@ -HAVE_CLOCK_01 = @HAVE_CLOCK_01@ -HAVE_CPUTIME_01 = @HAVE_CPUTIME_01@ -HAVE_GETRUSAGE_01 = @HAVE_GETRUSAGE_01@ -HAVE_GETTIMEOFDAY_01 = @HAVE_GETTIMEOFDAY_01@ -HAVE_HOST_CPU_FAMILY_power = @HAVE_HOST_CPU_FAMILY_power@ -HAVE_HOST_CPU_FAMILY_powerpc = @HAVE_HOST_CPU_FAMILY_powerpc@ -HAVE_SIGACTION_01 = @HAVE_SIGACTION_01@ -HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@ -HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@ -HAVE_STACK_T_01 = @HAVE_STACK_T_01@ -HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBCURSES = @LIBCURSES@ -LIBGMPXX_LDFLAGS = @LIBGMPXX_LDFLAGS@ -LIBGMP_DLL = @LIBGMP_DLL@ -LIBGMP_LDFLAGS = @LIBGMP_LDFLAGS@ -LIBM = @LIBM@ -LIBM_FOR_BUILD = @LIBM_FOR_BUILD@ -LIBOBJS = @LIBOBJS@ -LIBREADLINE = @LIBREADLINE@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -M4 = @M4@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@ -STRIP = @STRIP@ -TAL_OBJECT = @TAL_OBJECT@ -TUNE_LIBS = @TUNE_LIBS@ -TUNE_SQR_OBJ = @TUNE_SQR_OBJ@ -U_FOR_BUILD = @U_FOR_BUILD@ -VERSION = @VERSION@ -WITH_READLINE_01 = @WITH_READLINE_01@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gmp_srclinks = @gmp_srclinks@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -mpn_objects = @mpn_objects@ -mpn_objs_in_libgmp = @mpn_objs_in_libgmp@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = . devel mpn mpz mpq mpf rand misc cxx - -# COMPILE minus CC. -# -COMPILE_FLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(ASMFLAGS) - - -# Flags used for preprocessing (in ansi2knr rules). -# -PREPROCESS_FLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) - - -# Recent versions of automake (1.5 and up for instance) append automake -# generated suffixes to this $(SUFFIXES) list. This is essential for us, -# since .c must come after .s, .S and .asm. If .c is before .s, for -# instance, then in the mpn directory "make" will see add_n.c mentioned in -# an explicit rule (the ansi2knr stuff) and decide it must have add_n.c, -# even if add_n.c doesn't exist but add_n.s does. See GNU make -# documentation "(make)Implicit Rule Search", part 5c. -# -# On IRIX 6 native make this doesn't work properly though. Somehow .c -# remains ahead of .s, perhaps because .c.s is a builtin rule. .asm works -# fine though, and mpn/mips3 uses this. -# -SUFFIXES = .s .S .asm - -# can be overridden during development, eg. "make RM_TMP=: mul_1.lo" -RM_TMP = rm -f -AM_CPPFLAGS = -I$(top_srcdir) -LDADD = libtests.la $(top_builddir)/libgmp.la -check_LTLIBRARIES = libtests.la -EXTRA_libtests_la_SOURCES = amd64call.asm amd64check.c x86call.asm x86check.c \ - arm32call.asm arm32check.c - -libtests_la_SOURCES = tests.h \ - memory.c misc.c refmpf.c refmpn.c refmpq.c refmpz.c spinner.c trace.c - -libtests_la_DEPENDENCIES = @CALLING_CONVENTIONS_OBJS@ -libtests_la_LIBADD = $(libtests_la_DEPENDENCIES) $(top_builddir)/libgmp.la -TESTS = $(check_PROGRAMS) -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .s .S .asm .c .lo .log .o .obj .test .test$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../mpn/Makeasm.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps tests/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu --ignore-deps tests/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; -$(srcdir)/../mpn/Makeasm.am $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-checkLTLIBRARIES: - -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES) - @list='$(check_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - -libtests.la: $(libtests_la_OBJECTS) $(libtests_la_DEPENDENCIES) $(EXTRA_libtests_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(libtests_la_OBJECTS) $(libtests_la_LIBADD) $(LIBS) - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -t-bswap$(EXEEXT): $(t_bswap_OBJECTS) $(t_bswap_DEPENDENCIES) $(EXTRA_t_bswap_DEPENDENCIES) - @rm -f t-bswap$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_bswap_OBJECTS) $(t_bswap_LDADD) $(LIBS) - -t-constants$(EXEEXT): $(t_constants_OBJECTS) $(t_constants_DEPENDENCIES) $(EXTRA_t_constants_DEPENDENCIES) - @rm -f t-constants$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_constants_OBJECTS) $(t_constants_LDADD) $(LIBS) - -t-count_zeros$(EXEEXT): $(t_count_zeros_OBJECTS) $(t_count_zeros_DEPENDENCIES) $(EXTRA_t_count_zeros_DEPENDENCIES) - @rm -f t-count_zeros$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_count_zeros_OBJECTS) $(t_count_zeros_LDADD) $(LIBS) - -t-hightomask$(EXEEXT): $(t_hightomask_OBJECTS) $(t_hightomask_DEPENDENCIES) $(EXTRA_t_hightomask_DEPENDENCIES) - @rm -f t-hightomask$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_hightomask_OBJECTS) $(t_hightomask_LDADD) $(LIBS) - -t-modlinv$(EXEEXT): $(t_modlinv_OBJECTS) $(t_modlinv_DEPENDENCIES) $(EXTRA_t_modlinv_DEPENDENCIES) - @rm -f t-modlinv$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_modlinv_OBJECTS) $(t_modlinv_LDADD) $(LIBS) - -t-parity$(EXEEXT): $(t_parity_OBJECTS) $(t_parity_DEPENDENCIES) $(EXTRA_t_parity_DEPENDENCIES) - @rm -f t-parity$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_parity_OBJECTS) $(t_parity_LDADD) $(LIBS) - -t-popc$(EXEEXT): $(t_popc_OBJECTS) $(t_popc_DEPENDENCIES) $(EXTRA_t_popc_DEPENDENCIES) - @rm -f t-popc$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_popc_OBJECTS) $(t_popc_LDADD) $(LIBS) - -t-sub$(EXEEXT): $(t_sub_OBJECTS) $(t_sub_DEPENDENCIES) $(EXTRA_t_sub_DEPENDENCIES) - @rm -f t-sub$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_sub_OBJECTS) $(t_sub_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(AM_V_CC)$(COMPILE) -c -o $@ $< - -.c.obj: - $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run 'make' without going through this Makefile. -# To change the values of 'make' variables: instead of editing Makefiles, -# (1) if the variable is set in 'config.status', edit 'config.status' -# (which will cause the Makefiles to be regenerated when you run 'make'); -# (2) otherwise, pass the desired values on the 'make' command line. -$(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-recursive - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -recheck: all $(check_LTLIBRARIES) $(check_PROGRAMS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -t-bswap.log: t-bswap$(EXEEXT) - @p='t-bswap$(EXEEXT)'; \ - b='t-bswap'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-constants.log: t-constants$(EXEEXT) - @p='t-constants$(EXEEXT)'; \ - b='t-constants'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-count_zeros.log: t-count_zeros$(EXEEXT) - @p='t-count_zeros$(EXEEXT)'; \ - b='t-count_zeros'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-hightomask.log: t-hightomask$(EXEEXT) - @p='t-hightomask$(EXEEXT)'; \ - b='t-hightomask'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-modlinv.log: t-modlinv$(EXEEXT) - @p='t-modlinv$(EXEEXT)'; \ - b='t-modlinv'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-popc.log: t-popc$(EXEEXT) - @p='t-popc$(EXEEXT)'; \ - b='t-popc'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-parity.log: t-parity$(EXEEXT) - @p='t-parity$(EXEEXT)'; \ - b='t-parity'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-sub.log: t-sub$(EXEEXT) - @p='t-sub$(EXEEXT)'; \ - b='t-sub'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.test$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \ - clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) check-am install-am install-strip - -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ - check-TESTS check-am clean clean-checkLTLIBRARIES \ - clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# .s assembler, no preprocessing. -# -.s.o: - $(CCAS) $(COMPILE_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$< -.s.obj: - $(CCAS) $(COMPILE_FLAGS) `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` -.s.lo: - $(LIBTOOL) --mode=compile --tag=CC $(CCAS) $(COMPILE_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$< - -# .S assembler, preprocessed with cpp. -# -# It's necessary to run $(CPP) separately, since it seems not all compilers -# recognise .S files, in particular "cc" on HP-UX 10 and 11 doesn't (and -# will silently do nothing if given a .S). -# -# For .lo we need a helper script, as described below for .asm.lo. -# -.S.o: - $(CPP) $(PREPROCESS_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$< | grep -v '^#' >tmp-$*.s - $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@ - $(RM_TMP) tmp-$*.s -.S.obj: - $(CPP) $(PREPROCESS_FLAGS) `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` | grep -v '^#' >tmp-$*.s - $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@ - $(RM_TMP) tmp-$*.s -.S.lo: - $(LIBTOOL) --mode=compile --tag=CC $(top_srcdir)/mpn/cpp-ccas --cpp="$(CPP) $(PREPROCESS_FLAGS)" $(CCAS) $(COMPILE_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$< - -# .asm assembler, preprocessed with m4. -# -# .o and .obj are non-PIC and just need m4 followed by a compile. -# -# .lo is a bit tricky. Libtool (as of version 1.5) has foo.lo as a little -# text file, and .libs/foo.o and foo.o as the PIC and non-PIC objects, -# respectively. It'd be asking for lots of trouble to try to create foo.lo -# ourselves, so instead arrange to invoke libtool like a --mode=compile, but -# with a special m4-ccas script which first m4 preprocesses, then compiles. -# --tag=CC is necessary since foo.asm is otherwise unknown to libtool. -# -# Libtool adds -DPIC when building a shared object and the .asm files look -# for that. But it should be noted that the other PIC flags are on occasion -# important too, in particular FreeBSD 2.2.8 gas 1.92.3 requires -k before -# it accepts PIC constructs like @GOT, and gcc adds that flag only under -# -fPIC. (Later versions of gas are happy to accept PIC stuff any time.) -# -.asm.o: - $(M4) -DOPERATION_$* `test -f '$<' || echo '$(srcdir)/'`$< >tmp-$*.s - $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@ - $(RM_TMP) tmp-$*.s -.asm.obj: - $(M4) -DOPERATION_$* `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` >tmp-$*.s - $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@ - $(RM_TMP) tmp-$*.s -.asm.lo: - $(LIBTOOL) --mode=compile --tag=CC $(top_srcdir)/mpn/m4-ccas --m4="$(M4)" $(CCAS) $(COMPILE_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$< - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/amd64call.asm b/src/plugins/e-acsl/contrib/libgmp/tests/amd64call.asm deleted file mode 100644 index dad77630282..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/amd64call.asm +++ /dev/null @@ -1,167 +0,0 @@ -dnl AMD64 calling conventions checking. - -dnl Copyright 2000, 2003, 2004, 2006, 2007, 2010 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library test suite. - -dnl The GNU MP Library test suite is free software; you can redistribute it -dnl and/or modify it under the terms of the GNU General Public License as -dnl published by the Free Software Foundation; either version 3 of the -dnl License, or (at your option) any later version. - -dnl The GNU MP Library test suite is distributed in the hope that it will be -dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -dnl Public License for more details. - -dnl You should have received a copy of the GNU General Public License along -dnl with the GNU MP Library test suite. If not, see -dnl https://www.gnu.org/licenses/. - - -dnl The current version of the code attempts to keep the call/return -dnl prediction stack valid, but matching calls and returns. - -include(`../config.m4') - - -C void x86_fldcw (unsigned short cw); -C -C Execute an fldcw, setting the x87 control word to cw. - -PROLOGUE(x86_fldcw) - mov %rdi, -8(%rsp) - fldcw -8(%rsp) - ret -EPILOGUE() - - -C unsigned short x86_fstcw (void); -C -C Execute an fstcw, returning the current x87 control word. - -PROLOGUE(x86_fstcw) - movq $0, -8(%rsp) - fstcw -8(%rsp) - mov -8(%rsp), %rax - ret -EPILOGUE() - - -dnl Instrumented profiling won't come out quite right below, since we don't do -dnl an actual "ret". There's only a few instructions here, so there's no -dnl great need to get them separately accounted, just let them get attributed -dnl to the caller. FIXME this comment might no longer be true. - -ifelse(WANT_PROFILING,instrument, -`define(`WANT_PROFILING',no)') - - -C int calling_conventions (...); -C -C The global variable "calling_conventions_function" is the function to -C call, with the arguments as passed here. -C -C Perhaps the finit should be done only if the tags word isn't clear, but -C nothing uses the rounding mode or anything at the moment. - -define(`WANT_RBX', eval(8*0)($1)) -define(`WANT_RBP', eval(8*1)($1)) -define(`WANT_R12', eval(8*2)($1)) -define(`WANT_R13', eval(8*3)($1)) -define(`WANT_R14', eval(8*4)($1)) -define(`WANT_R15', eval(8*5)($1)) - -define(`JUNK_RAX', eval(8*6)($1)) -define(`JUNK_R10', eval(8*7)($1)) -define(`JUNK_R11', eval(8*8)($1)) - -define(`SAVE_RBX', eval(8*9)($1)) -define(`SAVE_RBP', eval(8*10)($1)) -define(`SAVE_R12', eval(8*11)($1)) -define(`SAVE_R13', eval(8*12)($1)) -define(`SAVE_R14', eval(8*13)($1)) -define(`SAVE_R15', eval(8*14)($1)) - -define(`RETADDR', eval(8*15)($1)) - -define(`RBX', eval(8*16)($1)) -define(`RBP', eval(8*17)($1)) -define(`R12', eval(8*18)($1)) -define(`R13', eval(8*19)($1)) -define(`R14', eval(8*20)($1)) -define(`R15', eval(8*21)($1)) -define(`RFLAGS', eval(8*22)($1)) - - -define(G, -m4_assert_numargs(1) -`GSYM_PREFIX`'$1') - - TEXT - ALIGN(32) -PROLOGUE(calling_conventions) - mov G(calling_conventions_values)@GOTPCREL(%rip), %rax - pop RETADDR(%rax) - - mov %rbx, SAVE_RBX(%rax) - mov %rbp, SAVE_RBP(%rax) - mov %r12, SAVE_R12(%rax) - mov %r13, SAVE_R13(%rax) - mov %r14, SAVE_R14(%rax) - mov %r15, SAVE_R15(%rax) - - C Values we expect to see unchanged, as per amd64check.c - mov WANT_RBX(%rax), %rbx - mov WANT_RBP(%rax), %rbp - mov WANT_R12(%rax), %r12 - mov WANT_R13(%rax), %r13 - mov WANT_R14(%rax), %r14 - mov WANT_R15(%rax), %r15 - - C Try to provoke a problem by starting with junk in the caller-saves - C registers, especially %rax which will be the return value. -C mov JUNK_RAX(%rax), %rax C overwritten below anyway - mov JUNK_R10(%rax), %r10 - mov JUNK_R11(%rax), %r11 - - mov G(calling_conventions_function)@GOTPCREL(%rip), %rax - call *(%rax) - - mov G(calling_conventions_values)@GOTPCREL(%rip), %rcx - - mov %rbx, RBX(%rcx) - mov %rbp, RBP(%rcx) - mov %r12, R12(%rcx) - mov %r13, R13(%rcx) - mov %r14, R14(%rcx) - mov %r15, R15(%rcx) - - pushf - pop %rbx - mov %rbx, RFLAGS(%rcx) - - mov SAVE_RBX(%rcx), %rbx - mov SAVE_RBP(%rcx), %rbp - mov SAVE_R12(%rcx), %r12 - mov SAVE_R13(%rcx), %r13 - mov SAVE_R14(%rcx), %r14 - mov SAVE_R15(%rcx), %r15 - - C Overwrite parameter registers -C mov JUNK_R9(%rcx), %r9 -C mov JUNK_R8(%rcx), %r8 -C mov JUNK_RCX(%rcx), %rcx -C mov JUNK_RDX(%rcx), %rdx -C mov JUNK_RSI(%rcx), %rsi -C mov JUNK_RDI(%rcx), %rdi - - push RETADDR(%rcx) - - mov G(calling_conventions_fenv)@GOTPCREL(%rip), %rcx - fstenv (%rcx) - finit - - ret - -EPILOGUE() diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/amd64check.c b/src/plugins/e-acsl/contrib/libgmp/tests/amd64check.c deleted file mode 100644 index 9fd0e904bd3..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/amd64check.c +++ /dev/null @@ -1,112 +0,0 @@ -/* AMD64 calling conventions checking. - -Copyright 2000, 2001, 2004, 2007 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* Vector if constants and register values. We use one vector to allow access - via a base pointer, very beneficial for the PIC-enabled amd64call.asm. */ -mp_limb_t calling_conventions_values[23] = -{ - CNST_LIMB(0x1234567887654321), /* want_rbx */ - CNST_LIMB(0x89ABCDEFFEDCBA98), /* want_rbp */ - CNST_LIMB(0xDEADBEEFBADECAFE), /* want_r12 */ - CNST_LIMB(0xFFEEDDCCBBAA9988), /* want_r13 */ - CNST_LIMB(0x0011223344556677), /* want_r14 */ - CNST_LIMB(0x1234432156788765), /* want_r15 */ - - CNST_LIMB(0xFEEDABBACAAFBEED), /* JUNK_RAX */ - CNST_LIMB(0xAB78DE89FF5125BB), /* JUNK_R10 */ - CNST_LIMB(0x1238901890189031) /* JUNK_R11 */ - - /* rest of array used for dynamic values. */ -}; - -/* Index starts for various regions in above vector. */ -#define WANT 0 -#define JUNK 6 -#define SAVE 9 -#define RETADDR 15 -#define VAL 16 -#define RFLAGS 22 - -/* values to check */ -#ifdef __cplusplus -extern "C" { -#endif -struct { - int control; - int status; - int tag; - int other[4]; -} calling_conventions_fenv; -#ifdef __cplusplus -} -#endif - - -const char *regname[6] = {"rbx", "rbp", "r12", "r13", "r14", "r15"}; - -#define DIR_BIT(rflags) (((rflags) & (1<<10)) != 0) - - -/* Return 1 if ok, 0 if not */ - -int -calling_conventions_check (void) -{ - const char *header = "Violated calling conventions:\n"; - int ret = 1; - int i; - -#define CHECK(callreg, regstr, value) \ - if (callreg != value) \ - { \ - printf ("%s %s got 0x%016lX want 0x%016lX\n", \ - header, regstr, callreg, value); \ - header = ""; \ - ret = 0; \ - } - - for (i = 0; i < 6; i++) - { - CHECK (calling_conventions_values[VAL+i], regname[i], calling_conventions_values[WANT+i]); - } - - if (DIR_BIT (calling_conventions_values[RFLAGS]) != 0) - { - printf ("%s rflags dir bit got %d want 0\n", - header, DIR_BIT (calling_conventions_values[RFLAGS])); - header = ""; - ret = 0; - } - - if ((calling_conventions_fenv.tag & 0xFFFF) != 0xFFFF) - { - printf ("%s fpu tags got 0x%X want 0xFFFF\n", - header, calling_conventions_fenv.tag & 0xFFFF); - header = ""; - ret = 0; - } - - return ret; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/arm32call.asm b/src/plugins/e-acsl/contrib/libgmp/tests/arm32call.asm deleted file mode 100644 index e689c5a4f0f..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/arm32call.asm +++ /dev/null @@ -1,83 +0,0 @@ -dnl ARM32 calling conventions checking. - -dnl Copyright 2000, 2003, 2004, 2006, 2007, 2010, 2013 Free Software -dnl Foundation, Inc. - -dnl This file is part of the GNU MP Library test suite. - -dnl The GNU MP Library test suite is free software; you can redistribute it -dnl and/or modify it under the terms of the GNU General Public License as -dnl published by the Free Software Foundation; either version 3 of the -dnl License, or (at your option) any later version. - -dnl The GNU MP Library test suite is distributed in the hope that it will be -dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -dnl Public License for more details. - -dnl You should have received a copy of the GNU General Public License along -dnl with the GNU MP Library test suite. If not, see -dnl https://www.gnu.org/licenses/. - - -dnl The current version of the code attempts to keep the call/return -dnl prediction stack valid, but matching calls and returns. - -include(`../config.m4') - - -C int calling_conventions (...); -C -C The global variable "calling_conventions_function" is the function to -C call, with the arguments as passed here. - -define(`WANT_CALLEE_SAVES', eval(4*0)) -define(`SAVE_CALLEE_SAVES', eval(4*8)) -define(`RETADDR', eval(4*16)) -define(`GOT_CALLEE_SAVES', eval(4*17)) -define(`JUNK_PARAMS', eval(4*25)) - - TEXT - ALIGN(32) -PROLOGUE(calling_conventions) - LEA( r12, calling_conventions_values) - - C Preserve callee-saves registers, including the link register r14 - add r12, r12, #SAVE_CALLEE_SAVES - stm r12, {r4-r11,r14} - sub r12, r12, #SAVE_CALLEE_SAVES - - C Put chosen junk into callee-saves registers - add r12, r12, #WANT_CALLEE_SAVES - ldm r12, {r4-r11} - sub r12, r12, #WANT_CALLEE_SAVES - - C No callee-saves registers on arm except r12 and parameter registers - C - - C Make the actual call - LEA( r12, calling_conventions_function) - ldr r12, [r12] - mov r14, pc - bx r12 - - LEA( r12, calling_conventions_values) - - C Save callee-saves registers after call - add r12, r12, #GOT_CALLEE_SAVES - stm r12, {r4-r11} - sub r12, r12, #GOT_CALLEE_SAVES - - C Restore callee-saves registers, including the link register r14 - add r12, r12, #SAVE_CALLEE_SAVES - ldm r12, {r4-r11,r14} - sub r12, r12, #SAVE_CALLEE_SAVES - - C Overwrite parameter registers. Note that we overwrite r1, which - C could hold one half of a 64-bit return value, since we don't use that - C in GMP. - add r12, r12, #JUNK_PARAMS - ldm r12, {r1-r3} - - bx r14 -EPILOGUE() diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/arm32check.c b/src/plugins/e-acsl/contrib/libgmp/tests/arm32check.c deleted file mode 100644 index f4bf06684cf..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/arm32check.c +++ /dev/null @@ -1,96 +0,0 @@ -/* ARM32 calling conventions checking. - -Copyright 2000, 2001, 2004, 2007 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* Vector if constants and register values. */ -mp_limb_t calling_conventions_values[29] = -{ - 0x12345678, /* 0 want_r4 */ - 0x87654321, /* 1 want_r5 */ - 0x89ABCDEF, /* 2 want_r6 */ - 0xFEDCBA98, /* 3 want_r7 */ - 0xDEADBEEF, /* 4 want_r8 */ - 0xBADECAFE, /* 5 want_r9 */ - 0xFFEEDDCC, /* 6 want_r10 */ - 0xBBAA9988, /* 7 want_r11 */ - - 0x00000000, /* 8 save_r4 */ - 0x00000000, /* 9 save_r5 */ - 0x00000000, /* 10 save_r6 */ - 0x00000000, /* 11 save_r7 */ - 0x00000000, /* 12 save_r8 */ - 0x00000000, /* 13 save_r9 */ - 0x00000000, /* 14 save_r10 */ - 0x00000000, /* 15 save_r11 */ - 0x00000000, /* 16 save_r14 */ - - 0x00000000, /* 17 got_r4 */ - 0x00000000, /* 18 got_r5 */ - 0x00000000, /* 19 got_r6 */ - 0x00000000, /* 20 got_r7 */ - 0x00000000, /* 21 got_r8 */ - 0x00000000, /* 22 got_r9 */ - 0x00000000, /* 23 got_r10 */ - 0x00000000, /* 24 got_r11 */ - - 0x00112233, /* 25 junk_r0 */ - 0x44556677, /* 26 junk_r1 */ - 0x12344321, /* 27 junk_r2 */ - 0x56788765, /* 28 junk_r3 */ -}; - -/* Index starts for various regions in above vector. */ -#define WANT_CALLEE_SAVES 0 -#define SAVE_CALLEE_SAVES 8 -#define RETADDR 16 -#define GOT_CALLEE_SAVES 17 -#define JUNK_PARAMS 25 - -/* Return 1 if ok, 0 if not */ - -int -calling_conventions_check (void) -{ - const char *header = "Violated calling conventions:\n"; - int ret = 1; - int i; - -#define CHECK(callreg, regnum, value) \ - if (callreg != value) \ - { \ - printf ("%s r%d got 0x%08lX want 0x%08lX\n", \ - header, regnum, callreg, value); \ - header = ""; \ - ret = 0; \ - } - - for (i = 0; i < 8; i++) - { - CHECK (calling_conventions_values[GOT_CALLEE_SAVES + i], - i + 4, - calling_conventions_values[WANT_CALLEE_SAVES + i]); - } - - return ret; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/Makefile.am b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/Makefile.am deleted file mode 100644 index d351675ee2f..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/Makefile.am +++ /dev/null @@ -1,81 +0,0 @@ -## Process this file with automake to generate Makefile.in - -# Copyright 2001-2004 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. - - -# LDADD has an explicit -L of $(top_builddir)/.libs for the benefit of gcc -# 3.2 on itanium2-hp-hpux11.22. Without this option, the libgmp.sl.6 -# required by libgmpxx.sl (ie. in its NEEDED records) is not found by the -# linker. FIXME: Presumably libtool should do something about this itself. -# -lm is needed for t-ops2 which compares the results of trunc and mpf_trunc. -# -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -LDADD = -L$(top_builddir)/.libs \ - $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la \ - $(top_builddir)/libgmp.la \ - -lm - -if WANT_CXX -check_PROGRAMS = t-binary t-cast t-cxx11 \ - t-headers t-iostream t-istream t-locale t-misc t-mix \ - t-ops t-ops2 t-ops3 t-ostream t-prec \ - t-ternary t-unary \ - t-do-exceptions-work-at-all-with-this-compiler \ - t-assign t-constr t-rand -TESTS = $(check_PROGRAMS) -endif - -t_assign_SOURCES = t-assign.cc -t_binary_SOURCES = t-binary.cc -t_cast_SOURCES = t-cast.cc -t_constr_SOURCES = t-constr.cc -t_cxx11_SOURCES = t-cxx11.cc -t_headers_SOURCES = t-headers.cc -t_iostream_SOURCES= t-iostream.cc -t_istream_SOURCES = t-istream.cc -t_locale_SOURCES = t-locale.cc clocale.c -t_misc_SOURCES = t-misc.cc -t_mix_SOURCES = t-mix.cc -t_ops_SOURCES = t-ops.cc -t_ops2_SOURCES = t-ops2.cc -t_ops3_SOURCES = t-ops3.cc -t_ostream_SOURCES = t-ostream.cc -t_prec_SOURCES = t-prec.cc -t_rand_SOURCES = t-rand.cc -t_ternary_SOURCES = t-ternary.cc -t_unary_SOURCES = t-unary.cc -t_do_exceptions_work_at_all_with_this_compiler_SOURCES = \ - t-do-exceptions-work-at-all-with-this-compiler.cc - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la - - -# Libtool (1.5) somehow botches its uninstalled shared library setups on -# OpenBSD 3.2, making the C++ test programs here fail. libgmpxx.so ends up -# with a NEEDED record asking for ./.libs/libgmp.so.N, but the loader can't -# find that unless it exists in the current directory. -# -# FIXME: Clearly libtool ought to handle this itself, in which case the hack -# here can be removed. -# -# Note this fix applies only when running "make check". The cp here should -# be done manually if just one program is to be built and run. -# -TESTS_ENVIRONMENT = cp $(top_builddir)/.libs/libgmp.so.* .libs 2>/dev/null || true; diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/Makefile.in b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/Makefile.in deleted file mode 100644 index 9db6ce8cfd5..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/Makefile.in +++ /dev/null @@ -1,1407 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright 2001-2004 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@WANT_CXX_TRUE@check_PROGRAMS = t-binary$(EXEEXT) t-cast$(EXEEXT) \ -@WANT_CXX_TRUE@ t-cxx11$(EXEEXT) t-headers$(EXEEXT) \ -@WANT_CXX_TRUE@ t-iostream$(EXEEXT) t-istream$(EXEEXT) \ -@WANT_CXX_TRUE@ t-locale$(EXEEXT) t-misc$(EXEEXT) \ -@WANT_CXX_TRUE@ t-mix$(EXEEXT) t-ops$(EXEEXT) t-ops2$(EXEEXT) \ -@WANT_CXX_TRUE@ t-ops3$(EXEEXT) t-ostream$(EXEEXT) \ -@WANT_CXX_TRUE@ t-prec$(EXEEXT) t-ternary$(EXEEXT) \ -@WANT_CXX_TRUE@ t-unary$(EXEEXT) \ -@WANT_CXX_TRUE@ t-do-exceptions-work-at-all-with-this-compiler$(EXEEXT) \ -@WANT_CXX_TRUE@ t-assign$(EXEEXT) t-constr$(EXEEXT) \ -@WANT_CXX_TRUE@ t-rand$(EXEEXT) -subdir = tests/cxx -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am_t_assign_OBJECTS = t-assign.$(OBJEXT) -t_assign_OBJECTS = $(am_t_assign_OBJECTS) -t_assign_LDADD = $(LDADD) -t_assign_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -am_t_binary_OBJECTS = t-binary.$(OBJEXT) -t_binary_OBJECTS = $(am_t_binary_OBJECTS) -t_binary_LDADD = $(LDADD) -t_binary_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_cast_OBJECTS = t-cast.$(OBJEXT) -t_cast_OBJECTS = $(am_t_cast_OBJECTS) -t_cast_LDADD = $(LDADD) -t_cast_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_constr_OBJECTS = t-constr.$(OBJEXT) -t_constr_OBJECTS = $(am_t_constr_OBJECTS) -t_constr_LDADD = $(LDADD) -t_constr_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_cxx11_OBJECTS = t-cxx11.$(OBJEXT) -t_cxx11_OBJECTS = $(am_t_cxx11_OBJECTS) -t_cxx11_LDADD = $(LDADD) -t_cxx11_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_do_exceptions_work_at_all_with_this_compiler_OBJECTS = \ - t-do-exceptions-work-at-all-with-this-compiler.$(OBJEXT) -t_do_exceptions_work_at_all_with_this_compiler_OBJECTS = \ - $(am_t_do_exceptions_work_at_all_with_this_compiler_OBJECTS) -t_do_exceptions_work_at_all_with_this_compiler_LDADD = $(LDADD) -t_do_exceptions_work_at_all_with_this_compiler_DEPENDENCIES = \ - $(top_builddir)/tests/libtests.la $(top_builddir)/libgmpxx.la \ - $(top_builddir)/libgmp.la -am_t_headers_OBJECTS = t-headers.$(OBJEXT) -t_headers_OBJECTS = $(am_t_headers_OBJECTS) -t_headers_LDADD = $(LDADD) -t_headers_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_iostream_OBJECTS = t-iostream.$(OBJEXT) -t_iostream_OBJECTS = $(am_t_iostream_OBJECTS) -t_iostream_LDADD = $(LDADD) -t_iostream_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_istream_OBJECTS = t-istream.$(OBJEXT) -t_istream_OBJECTS = $(am_t_istream_OBJECTS) -t_istream_LDADD = $(LDADD) -t_istream_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_locale_OBJECTS = t-locale.$(OBJEXT) clocale.$(OBJEXT) -t_locale_OBJECTS = $(am_t_locale_OBJECTS) -t_locale_LDADD = $(LDADD) -t_locale_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_misc_OBJECTS = t-misc.$(OBJEXT) -t_misc_OBJECTS = $(am_t_misc_OBJECTS) -t_misc_LDADD = $(LDADD) -t_misc_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_mix_OBJECTS = t-mix.$(OBJEXT) -t_mix_OBJECTS = $(am_t_mix_OBJECTS) -t_mix_LDADD = $(LDADD) -t_mix_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_ops_OBJECTS = t-ops.$(OBJEXT) -t_ops_OBJECTS = $(am_t_ops_OBJECTS) -t_ops_LDADD = $(LDADD) -t_ops_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_ops2_OBJECTS = t-ops2.$(OBJEXT) -t_ops2_OBJECTS = $(am_t_ops2_OBJECTS) -t_ops2_LDADD = $(LDADD) -t_ops2_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_ops3_OBJECTS = t-ops3.$(OBJEXT) -t_ops3_OBJECTS = $(am_t_ops3_OBJECTS) -t_ops3_LDADD = $(LDADD) -t_ops3_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_ostream_OBJECTS = t-ostream.$(OBJEXT) -t_ostream_OBJECTS = $(am_t_ostream_OBJECTS) -t_ostream_LDADD = $(LDADD) -t_ostream_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_prec_OBJECTS = t-prec.$(OBJEXT) -t_prec_OBJECTS = $(am_t_prec_OBJECTS) -t_prec_LDADD = $(LDADD) -t_prec_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_rand_OBJECTS = t-rand.$(OBJEXT) -t_rand_OBJECTS = $(am_t_rand_OBJECTS) -t_rand_LDADD = $(LDADD) -t_rand_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_ternary_OBJECTS = t-ternary.$(OBJEXT) -t_ternary_OBJECTS = $(am_t_ternary_OBJECTS) -t_ternary_LDADD = $(LDADD) -t_ternary_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -am_t_unary_OBJECTS = t-unary.$(OBJEXT) -t_unary_OBJECTS = $(am_t_unary_OBJECTS) -t_unary_LDADD = $(LDADD) -t_unary_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la $(top_builddir)/libgmp.la -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_@AM_V@) -am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) -am__v_CXX_0 = @echo " CXX " $@; -am__v_CXX_1 = -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) -am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) -am__v_CXXLD_0 = @echo " CXXLD " $@; -am__v_CXXLD_1 = -SOURCES = $(t_assign_SOURCES) $(t_binary_SOURCES) $(t_cast_SOURCES) \ - $(t_constr_SOURCES) $(t_cxx11_SOURCES) \ - $(t_do_exceptions_work_at_all_with_this_compiler_SOURCES) \ - $(t_headers_SOURCES) $(t_iostream_SOURCES) \ - $(t_istream_SOURCES) $(t_locale_SOURCES) $(t_misc_SOURCES) \ - $(t_mix_SOURCES) $(t_ops_SOURCES) $(t_ops2_SOURCES) \ - $(t_ops3_SOURCES) $(t_ostream_SOURCES) $(t_prec_SOURCES) \ - $(t_rand_SOURCES) $(t_ternary_SOURCES) $(t_unary_SOURCES) -DIST_SOURCES = $(t_assign_SOURCES) $(t_binary_SOURCES) \ - $(t_cast_SOURCES) $(t_constr_SOURCES) $(t_cxx11_SOURCES) \ - $(t_do_exceptions_work_at_all_with_this_compiler_SOURCES) \ - $(t_headers_SOURCES) $(t_iostream_SOURCES) \ - $(t_istream_SOURCES) $(t_locale_SOURCES) $(t_misc_SOURCES) \ - $(t_mix_SOURCES) $(t_ops_SOURCES) $(t_ops2_SOURCES) \ - $(t_ops3_SOURCES) $(t_ostream_SOURCES) $(t_prec_SOURCES) \ - $(t_rand_SOURCES) $(t_ternary_SOURCES) $(t_unary_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red='[0;31m'; \ - grn='[0;32m'; \ - lgn='[1;32m'; \ - blu='[1;34m'; \ - mgn='[0;35m'; \ - brg='[1m'; \ - std='[m'; \ - fi; \ -} -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck -TEST_SUITE_LOG = test-suite.log -TEST_EXTENSIONS = @EXEEXT@ .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/test-driver -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ABI = @ABI@ -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -ASMFLAGS = @ASMFLAGS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ -CC = @CC@ -CCAS = @CCAS@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CPP_FOR_BUILD = @CPP_FOR_BUILD@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@ -DEFS = @DEFS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -FGREP = @FGREP@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIMB_BITS = @GMP_LIMB_BITS@ -GMP_NAIL_BITS = @GMP_NAIL_BITS@ -GREP = @GREP@ -HAVE_CLOCK_01 = @HAVE_CLOCK_01@ -HAVE_CPUTIME_01 = @HAVE_CPUTIME_01@ -HAVE_GETRUSAGE_01 = @HAVE_GETRUSAGE_01@ -HAVE_GETTIMEOFDAY_01 = @HAVE_GETTIMEOFDAY_01@ -HAVE_HOST_CPU_FAMILY_power = @HAVE_HOST_CPU_FAMILY_power@ -HAVE_HOST_CPU_FAMILY_powerpc = @HAVE_HOST_CPU_FAMILY_powerpc@ -HAVE_SIGACTION_01 = @HAVE_SIGACTION_01@ -HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@ -HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@ -HAVE_STACK_T_01 = @HAVE_STACK_T_01@ -HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBCURSES = @LIBCURSES@ -LIBGMPXX_LDFLAGS = @LIBGMPXX_LDFLAGS@ -LIBGMP_DLL = @LIBGMP_DLL@ -LIBGMP_LDFLAGS = @LIBGMP_LDFLAGS@ -LIBM = @LIBM@ -LIBM_FOR_BUILD = @LIBM_FOR_BUILD@ -LIBOBJS = @LIBOBJS@ -LIBREADLINE = @LIBREADLINE@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -M4 = @M4@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@ -STRIP = @STRIP@ -TAL_OBJECT = @TAL_OBJECT@ -TUNE_LIBS = @TUNE_LIBS@ -TUNE_SQR_OBJ = @TUNE_SQR_OBJ@ -U_FOR_BUILD = @U_FOR_BUILD@ -VERSION = @VERSION@ -WITH_READLINE_01 = @WITH_READLINE_01@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gmp_srclinks = @gmp_srclinks@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -mpn_objects = @mpn_objects@ -mpn_objs_in_libgmp = @mpn_objs_in_libgmp@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# LDADD has an explicit -L of $(top_builddir)/.libs for the benefit of gcc -# 3.2 on itanium2-hp-hpux11.22. Without this option, the libgmp.sl.6 -# required by libgmpxx.sl (ie. in its NEEDED records) is not found by the -# linker. FIXME: Presumably libtool should do something about this itself. -# -lm is needed for t-ops2 which compares the results of trunc and mpf_trunc. -# -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -LDADD = -L$(top_builddir)/.libs \ - $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmpxx.la \ - $(top_builddir)/libgmp.la \ - -lm - -@WANT_CXX_TRUE@TESTS = $(check_PROGRAMS) -t_assign_SOURCES = t-assign.cc -t_binary_SOURCES = t-binary.cc -t_cast_SOURCES = t-cast.cc -t_constr_SOURCES = t-constr.cc -t_cxx11_SOURCES = t-cxx11.cc -t_headers_SOURCES = t-headers.cc -t_iostream_SOURCES = t-iostream.cc -t_istream_SOURCES = t-istream.cc -t_locale_SOURCES = t-locale.cc clocale.c -t_misc_SOURCES = t-misc.cc -t_mix_SOURCES = t-mix.cc -t_ops_SOURCES = t-ops.cc -t_ops2_SOURCES = t-ops2.cc -t_ops3_SOURCES = t-ops3.cc -t_ostream_SOURCES = t-ostream.cc -t_prec_SOURCES = t-prec.cc -t_rand_SOURCES = t-rand.cc -t_ternary_SOURCES = t-ternary.cc -t_unary_SOURCES = t-unary.cc -t_do_exceptions_work_at_all_with_this_compiler_SOURCES = \ - t-do-exceptions-work-at-all-with-this-compiler.cc - - -# Libtool (1.5) somehow botches its uninstalled shared library setups on -# OpenBSD 3.2, making the C++ test programs here fail. libgmpxx.so ends up -# with a NEEDED record asking for ./.libs/libgmp.so.N, but the loader can't -# find that unless it exists in the current directory. -# -# FIXME: Clearly libtool ought to handle this itself, in which case the hack -# here can be removed. -# -# Note this fix applies only when running "make check". The cp here should -# be done manually if just one program is to be built and run. -# -TESTS_ENVIRONMENT = cp $(top_builddir)/.libs/libgmp.so.* .libs 2>/dev/null || true; -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .cc .lo .log .o .obj .test .test$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps tests/cxx/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu --ignore-deps tests/cxx/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -t-assign$(EXEEXT): $(t_assign_OBJECTS) $(t_assign_DEPENDENCIES) $(EXTRA_t_assign_DEPENDENCIES) - @rm -f t-assign$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_assign_OBJECTS) $(t_assign_LDADD) $(LIBS) - -t-binary$(EXEEXT): $(t_binary_OBJECTS) $(t_binary_DEPENDENCIES) $(EXTRA_t_binary_DEPENDENCIES) - @rm -f t-binary$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_binary_OBJECTS) $(t_binary_LDADD) $(LIBS) - -t-cast$(EXEEXT): $(t_cast_OBJECTS) $(t_cast_DEPENDENCIES) $(EXTRA_t_cast_DEPENDENCIES) - @rm -f t-cast$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_cast_OBJECTS) $(t_cast_LDADD) $(LIBS) - -t-constr$(EXEEXT): $(t_constr_OBJECTS) $(t_constr_DEPENDENCIES) $(EXTRA_t_constr_DEPENDENCIES) - @rm -f t-constr$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_constr_OBJECTS) $(t_constr_LDADD) $(LIBS) - -t-cxx11$(EXEEXT): $(t_cxx11_OBJECTS) $(t_cxx11_DEPENDENCIES) $(EXTRA_t_cxx11_DEPENDENCIES) - @rm -f t-cxx11$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_cxx11_OBJECTS) $(t_cxx11_LDADD) $(LIBS) - -t-do-exceptions-work-at-all-with-this-compiler$(EXEEXT): $(t_do_exceptions_work_at_all_with_this_compiler_OBJECTS) $(t_do_exceptions_work_at_all_with_this_compiler_DEPENDENCIES) $(EXTRA_t_do_exceptions_work_at_all_with_this_compiler_DEPENDENCIES) - @rm -f t-do-exceptions-work-at-all-with-this-compiler$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_do_exceptions_work_at_all_with_this_compiler_OBJECTS) $(t_do_exceptions_work_at_all_with_this_compiler_LDADD) $(LIBS) - -t-headers$(EXEEXT): $(t_headers_OBJECTS) $(t_headers_DEPENDENCIES) $(EXTRA_t_headers_DEPENDENCIES) - @rm -f t-headers$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_headers_OBJECTS) $(t_headers_LDADD) $(LIBS) - -t-iostream$(EXEEXT): $(t_iostream_OBJECTS) $(t_iostream_DEPENDENCIES) $(EXTRA_t_iostream_DEPENDENCIES) - @rm -f t-iostream$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_iostream_OBJECTS) $(t_iostream_LDADD) $(LIBS) - -t-istream$(EXEEXT): $(t_istream_OBJECTS) $(t_istream_DEPENDENCIES) $(EXTRA_t_istream_DEPENDENCIES) - @rm -f t-istream$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_istream_OBJECTS) $(t_istream_LDADD) $(LIBS) - -t-locale$(EXEEXT): $(t_locale_OBJECTS) $(t_locale_DEPENDENCIES) $(EXTRA_t_locale_DEPENDENCIES) - @rm -f t-locale$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_locale_OBJECTS) $(t_locale_LDADD) $(LIBS) - -t-misc$(EXEEXT): $(t_misc_OBJECTS) $(t_misc_DEPENDENCIES) $(EXTRA_t_misc_DEPENDENCIES) - @rm -f t-misc$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_misc_OBJECTS) $(t_misc_LDADD) $(LIBS) - -t-mix$(EXEEXT): $(t_mix_OBJECTS) $(t_mix_DEPENDENCIES) $(EXTRA_t_mix_DEPENDENCIES) - @rm -f t-mix$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_mix_OBJECTS) $(t_mix_LDADD) $(LIBS) - -t-ops$(EXEEXT): $(t_ops_OBJECTS) $(t_ops_DEPENDENCIES) $(EXTRA_t_ops_DEPENDENCIES) - @rm -f t-ops$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_ops_OBJECTS) $(t_ops_LDADD) $(LIBS) - -t-ops2$(EXEEXT): $(t_ops2_OBJECTS) $(t_ops2_DEPENDENCIES) $(EXTRA_t_ops2_DEPENDENCIES) - @rm -f t-ops2$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_ops2_OBJECTS) $(t_ops2_LDADD) $(LIBS) - -t-ops3$(EXEEXT): $(t_ops3_OBJECTS) $(t_ops3_DEPENDENCIES) $(EXTRA_t_ops3_DEPENDENCIES) - @rm -f t-ops3$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_ops3_OBJECTS) $(t_ops3_LDADD) $(LIBS) - -t-ostream$(EXEEXT): $(t_ostream_OBJECTS) $(t_ostream_DEPENDENCIES) $(EXTRA_t_ostream_DEPENDENCIES) - @rm -f t-ostream$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_ostream_OBJECTS) $(t_ostream_LDADD) $(LIBS) - -t-prec$(EXEEXT): $(t_prec_OBJECTS) $(t_prec_DEPENDENCIES) $(EXTRA_t_prec_DEPENDENCIES) - @rm -f t-prec$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_prec_OBJECTS) $(t_prec_LDADD) $(LIBS) - -t-rand$(EXEEXT): $(t_rand_OBJECTS) $(t_rand_DEPENDENCIES) $(EXTRA_t_rand_DEPENDENCIES) - @rm -f t-rand$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_rand_OBJECTS) $(t_rand_LDADD) $(LIBS) - -t-ternary$(EXEEXT): $(t_ternary_OBJECTS) $(t_ternary_DEPENDENCIES) $(EXTRA_t_ternary_DEPENDENCIES) - @rm -f t-ternary$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_ternary_OBJECTS) $(t_ternary_LDADD) $(LIBS) - -t-unary$(EXEEXT): $(t_unary_OBJECTS) $(t_unary_DEPENDENCIES) $(EXTRA_t_unary_DEPENDENCIES) - @rm -f t-unary$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(t_unary_OBJECTS) $(t_unary_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(AM_V_CC)$(COMPILE) -c -o $@ $< - -.c.obj: - $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< - -.cc.o: - $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< - -.cc.obj: - $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cc.lo: - $(AM_V_CXX)$(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -recheck: all $(check_PROGRAMS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -t-binary.log: t-binary$(EXEEXT) - @p='t-binary$(EXEEXT)'; \ - b='t-binary'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-cast.log: t-cast$(EXEEXT) - @p='t-cast$(EXEEXT)'; \ - b='t-cast'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-cxx11.log: t-cxx11$(EXEEXT) - @p='t-cxx11$(EXEEXT)'; \ - b='t-cxx11'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-headers.log: t-headers$(EXEEXT) - @p='t-headers$(EXEEXT)'; \ - b='t-headers'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-iostream.log: t-iostream$(EXEEXT) - @p='t-iostream$(EXEEXT)'; \ - b='t-iostream'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-istream.log: t-istream$(EXEEXT) - @p='t-istream$(EXEEXT)'; \ - b='t-istream'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-locale.log: t-locale$(EXEEXT) - @p='t-locale$(EXEEXT)'; \ - b='t-locale'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-misc.log: t-misc$(EXEEXT) - @p='t-misc$(EXEEXT)'; \ - b='t-misc'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-mix.log: t-mix$(EXEEXT) - @p='t-mix$(EXEEXT)'; \ - b='t-mix'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-ops.log: t-ops$(EXEEXT) - @p='t-ops$(EXEEXT)'; \ - b='t-ops'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-ops2.log: t-ops2$(EXEEXT) - @p='t-ops2$(EXEEXT)'; \ - b='t-ops2'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-ops3.log: t-ops3$(EXEEXT) - @p='t-ops3$(EXEEXT)'; \ - b='t-ops3'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-ostream.log: t-ostream$(EXEEXT) - @p='t-ostream$(EXEEXT)'; \ - b='t-ostream'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-prec.log: t-prec$(EXEEXT) - @p='t-prec$(EXEEXT)'; \ - b='t-prec'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-ternary.log: t-ternary$(EXEEXT) - @p='t-ternary$(EXEEXT)'; \ - b='t-ternary'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-unary.log: t-unary$(EXEEXT) - @p='t-unary$(EXEEXT)'; \ - b='t-unary'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-do-exceptions-work-at-all-with-this-compiler.log: t-do-exceptions-work-at-all-with-this-compiler$(EXEEXT) - @p='t-do-exceptions-work-at-all-with-this-compiler$(EXEEXT)'; \ - b='t-do-exceptions-work-at-all-with-this-compiler'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-assign.log: t-assign$(EXEEXT) - @p='t-assign$(EXEEXT)'; \ - b='t-assign'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-constr.log: t-constr$(EXEEXT) - @p='t-constr$(EXEEXT)'; \ - b='t-constr'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-rand.log: t-rand$(EXEEXT) - @p='t-rand$(EXEEXT)'; \ - b='t-rand'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.test$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/clocale.c b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/clocale.c deleted file mode 100644 index 447c647408e..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/clocale.c +++ /dev/null @@ -1,66 +0,0 @@ -/* Manipulable localeconv and nl_langinfo. - -Copyright 2001, 2002, 2014 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#if HAVE_NL_TYPES_H -#include <nl_types.h> /* for nl_item */ -#endif - -#if HAVE_LANGINFO_H -#include <langinfo.h> /* for nl_langinfo */ -#endif - -#if HAVE_LOCALE_H -#include <locale.h> /* for lconv */ -#endif - - -/* Replace the libc localeconv and nl_langinfo with ones we can manipulate. - - This is done in a C file since if it was in a C++ file then we'd have to - match the "throw" or lack thereof declared for localeconv in <locale.h>. - g++ 3.2 gives an error about mismatched throws under "-pedantic", other - C++ compilers may very possibly do so too. */ - -extern char point_string[]; - -#if HAVE_LOCALECONV -struct lconv * -localeconv (void) -#if defined __cplusplus && defined __GLIBC__ - throw() -#endif -{ - static struct lconv l; - l.decimal_point = point_string; - return &l; -} -#endif - -#if HAVE_NL_LANGINFO -char * -nl_langinfo (nl_item n) -#if defined __cplusplus && defined __GLIBC__ - throw() -#endif -{ - return point_string; -} -#endif diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-assign.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-assign.cc deleted file mode 100644 index ad10edd8a8a..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-assign.cc +++ /dev/null @@ -1,604 +0,0 @@ -/* Test mp*_class assignment operators. - -Copyright 2001-2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <iostream> -#include <string> - -#include "gmp.h" -#include "gmpxx.h" -#include "gmp-impl.h" -#include "tests.h" - -using std::string; -using std::invalid_argument; - - -void -check_mpz (void) -{ - // operator=(const mpz_class &) - { - mpz_class a(123), b; - b = a; ASSERT_ALWAYS(b == 123); - } - - // template <class T, class U> operator=(const __gmp_expr<T, U> &) - // not tested here, see t-unary.cc, t-binary.cc - - // operator=(signed char) - { - signed char a = -127; - mpz_class b; - b = a; ASSERT_ALWAYS(b == -127); - } - - // operator=(unsigned char) - { - unsigned char a = 255; - mpz_class b; - b = a; ASSERT_ALWAYS(b == 255); - } - - // either signed or unsigned char, machine dependent - { - mpz_class a; - a = 'A'; ASSERT_ALWAYS(a == 65); - } - { - mpz_class a; - a = 'z'; ASSERT_ALWAYS(a == 122); - } - - // operator=(signed int) - { - signed int a = 0; - mpz_class b; - b = a; ASSERT_ALWAYS(b == 0); - } - { - signed int a = -123; - mpz_class b; - b = a; ASSERT_ALWAYS(b == -123); - } - { - signed int a = 32767; - mpz_class b; - b = a; ASSERT_ALWAYS(b == 32767); - } - - // operator=(unsigned int) - { - unsigned int a = 65535u; - mpz_class b; - b = a; ASSERT_ALWAYS(b == 65535u); - } - - // operator=(signed short int) - { - signed short int a = -12345; - mpz_class b; - b = a; ASSERT_ALWAYS(b == -12345); - } - - // operator=(unsigned short int) - { - unsigned short int a = 54321u; - mpz_class b; - b = a; ASSERT_ALWAYS(b == 54321u); - } - - // operator=(signed long int) - { - signed long int a = -1234567890L; - mpz_class b; - b = a; ASSERT_ALWAYS(b == -1234567890L); - } - - // operator=(unsigned long int) - { - unsigned long int a = 3456789012UL; - mpz_class b; - b = a; ASSERT_ALWAYS(b == 3456789012UL); - } - - // operator=(float) - { - float a = 123.0; - mpz_class b; - b = a; ASSERT_ALWAYS(b == 123); - } - - // operator=(double) - { - double a = 0.0; - mpz_class b; - b = a; ASSERT_ALWAYS(b == 0); - } - { - double a = -12.375; - mpz_class b; - b = a; ASSERT_ALWAYS(b == -12); - } - { - double a = 6.789e+3; - mpz_class b; - b = a; ASSERT_ALWAYS(b == 6789); - } - { - double a = 9.375e-1; - mpz_class b; - b = a; ASSERT_ALWAYS(b == 0); - } - - // operator=(long double) - // currently not implemented - - // operator=(const char *) - { - const char *a = "1234567890"; - mpz_class b; - b = a; ASSERT_ALWAYS(b == 1234567890L); - } - - // operator=(const std::string &) - { - string a("1234567890"); - mpz_class b; - b = a; ASSERT_ALWAYS(b == 1234567890L); - } - - // operator=(const char *) with invalid - { - try { - const char *a = "abc"; - mpz_class b; - b = a; - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // operator=(const std::string &) with invalid - { - try { - string a("def"); - mpz_class b; - b = a; - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // swap(mpz_class &) - { - mpz_class a(123); - mpz_class b(456); - a.swap(b); - a.swap(a); - ASSERT_ALWAYS(a == 456); - ASSERT_ALWAYS(b == 123); - } - - // swap(mpz_class &, mpz_class &) - { - mpz_class a(123); - mpz_class b(456); - ::swap(a, b); - ::swap(a, a); - ASSERT_ALWAYS(a == 456); - ASSERT_ALWAYS(b == 123); - } - { - using std::swap; - mpz_class a(123); - mpz_class b(456); - swap(a, b); - swap(a, a); - ASSERT_ALWAYS(a == 456); - ASSERT_ALWAYS(b == 123); - } -} - -void -check_mpq (void) -{ - // operator=(const mpq_class &) - { - mpq_class a(1, 2), b; - b = a; ASSERT_ALWAYS(b == 0.5); - } - - // template <class T, class U> operator=(const __gmp_expr<T, U> &) - // not tested here, see t-unary.cc, t-binary.cc - - // operator=(signed char) - { - signed char a = -127; - mpq_class b; - b = a; ASSERT_ALWAYS(b == -127); - } - - // operator=(unsigned char) - { - unsigned char a = 255; - mpq_class b; - b = a; ASSERT_ALWAYS(b == 255); - } - - // either signed or unsigned char, machine dependent - { - mpq_class a; - a = 'A'; ASSERT_ALWAYS(a == 65); - } - { - mpq_class a; - a = 'z'; ASSERT_ALWAYS(a == 122); - } - - // operator=(signed int) - { - signed int a = 0; - mpq_class b; - b = a; ASSERT_ALWAYS(b == 0); - } - { - signed int a = -123; - mpq_class b; - b = a; ASSERT_ALWAYS(b == -123); - } - { - signed int a = 32767; - mpq_class b; - b = a; ASSERT_ALWAYS(b == 32767); - } - - // operator=(unsigned int) - { - unsigned int a = 65535u; - mpq_class b; - b = a; ASSERT_ALWAYS(b == 65535u); - } - - // operator=(signed short int) - { - signed short int a = -12345; - mpq_class b; - b = a; ASSERT_ALWAYS(b == -12345); - } - - // operator=(unsigned short int) - { - unsigned short int a = 54321u; - mpq_class b; - b = a; ASSERT_ALWAYS(b == 54321u); - } - - // operator=(signed long int) - { - signed long int a = -1234567890L; - mpq_class b; - b = a; ASSERT_ALWAYS(b == -1234567890L); - } - - // operator=(unsigned long int) - { - unsigned long int a = 3456789012UL; - mpq_class b; - b = a; ASSERT_ALWAYS(b == 3456789012UL); - } - - // operator=(float) - { - float a = 123.0; - mpq_class b; - b = a; ASSERT_ALWAYS(b == 123); - } - - // operator=(double) - { - double a = 0.0; - mpq_class b; - b = a; ASSERT_ALWAYS(b == 0); - } - { - double a = -12.375; - mpq_class b; - b = a; ASSERT_ALWAYS(b == -12.375); - } - { - double a = 6.789e+3; - mpq_class b; - b = a; ASSERT_ALWAYS(b == 6789); - } - { - double a = 9.375e-1; - mpq_class b; - b = a; ASSERT_ALWAYS(b == 0.9375); - } - - // operator=(long double) - // currently not implemented - - // operator=(const char *) - { - const char *a = "1234567890"; - mpq_class b; - b = a; ASSERT_ALWAYS(b == 1234567890L); - } - - // operator=(const std::string &) - { - string a("1234567890"); - mpq_class b; - b = a; ASSERT_ALWAYS(b == 1234567890L); - } - - // operator=(const char *) with invalid - { - try { - const char *a = "abc"; - mpq_class b; - b = a; - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // operator=(const std::string &) with invalid - { - try { - string a("def"); - mpq_class b; - b = a; - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // swap(mpq_class &) - { - mpq_class a(3, 2); - mpq_class b(-1, 4); - a.swap(b); - a.swap(a); - ASSERT_ALWAYS(a == -.25); - ASSERT_ALWAYS(b == 1.5); - } - - // swap(mpq_class &, mpq_class &) - { - mpq_class a(3, 2); - mpq_class b(-1, 4); - ::swap(a, b); - ::swap(a, a); - ASSERT_ALWAYS(a == -.25); - ASSERT_ALWAYS(b == 1.5); - } - { - using std::swap; - mpq_class a(3, 2); - mpq_class b(-1, 4); - swap(a, b); - swap(a, a); - ASSERT_ALWAYS(a == -.25); - ASSERT_ALWAYS(b == 1.5); - } -} - -void -check_mpf (void) -{ - // operator=(const mpf_class &) - { - mpf_class a(123), b; - b = a; ASSERT_ALWAYS(b == 123); - } - - // template <class T, class U> operator=(const __gmp_expr<T, U> &) - // not tested here, see t-unary.cc, t-binary.cc - - // operator=(signed char) - { - signed char a = -127; - mpf_class b; - b = a; ASSERT_ALWAYS(b == -127); - } - - // operator=(unsigned char) - { - unsigned char a = 255; - mpf_class b; - b = a; ASSERT_ALWAYS(b == 255); - } - - // either signed or unsigned char, machine dependent - { - mpf_class a; - a = 'A'; ASSERT_ALWAYS(a == 65); - } - { - mpf_class a; - a = 'z'; ASSERT_ALWAYS(a == 122); - } - - // operator=(signed int) - { - signed int a = 0; - mpf_class b; - b = a; ASSERT_ALWAYS(b == 0); - } - { - signed int a = -123; - mpf_class b; - b = a; ASSERT_ALWAYS(b == -123); - } - { - signed int a = 32767; - mpf_class b; - b = a; ASSERT_ALWAYS(b == 32767); - } - - // operator=(unsigned int) - { - unsigned int a = 65535u; - mpf_class b; - b = a; ASSERT_ALWAYS(b == 65535u); - } - - // operator=(signed short int) - { - signed short int a = -12345; - mpf_class b; - b = a; ASSERT_ALWAYS(b == -12345); - } - - // operator=(unsigned short int) - { - unsigned short int a = 54321u; - mpf_class b; - b = a; ASSERT_ALWAYS(b == 54321u); - } - - // operator=(signed long int) - { - signed long int a = -1234567890L; - mpf_class b; - b = a; ASSERT_ALWAYS(b == -1234567890L); - } - - // operator=(unsigned long int) - { - unsigned long int a = 3456789012UL; - mpf_class b; - b = a; ASSERT_ALWAYS(b == 3456789012UL); - } - - // operator=(float) - { - float a = 123.0; - mpf_class b; - b = a; ASSERT_ALWAYS(b == 123); - } - - // operator=(double) - { - double a = 0.0; - mpf_class b; - b = a; ASSERT_ALWAYS(b == 0); - } - { - double a = -12.375; - mpf_class b; - b = a; ASSERT_ALWAYS(b == -12.375); - } - { - double a = 6.789e+3; - mpf_class b; - b = a; ASSERT_ALWAYS(b == 6789); - } - { - double a = 9.375e-1; - mpf_class b; - b = a; ASSERT_ALWAYS(b == 0.9375); - } - - // operator=(long double) - // currently not implemented - - // operator=(const char *) - { - const char *a = "1234567890"; - mpf_class b; - b = a; ASSERT_ALWAYS(b == 1234567890L); - } - - // operator=(const std::string &) - { - string a("1234567890"); - mpf_class b; - b = a; ASSERT_ALWAYS(b == 1234567890L); - } - - // operator=(const char *) with invalid - { - try { - const char *a = "abc"; - mpf_class b; - b = a; - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // operator=(const std::string &) with invalid - { - try { - string a("def"); - mpf_class b; - b = a; - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // swap(mpf_class &) - { - mpf_class a(123); - mpf_class b(456); - a.swap(b); - a.swap(a); - ASSERT_ALWAYS(a == 456); - ASSERT_ALWAYS(b == 123); - } - - // swap(mpf_class &, mpf_class &) - { - mpf_class a(123); - mpf_class b(456); - ::swap(a, b); - ::swap(a, a); - ASSERT_ALWAYS(a == 456); - ASSERT_ALWAYS(b == 123); - } - { - using std::swap; - mpf_class a(123); - mpf_class b(456); - swap(a, b); - swap(a, a); - ASSERT_ALWAYS(a == 456); - ASSERT_ALWAYS(b == 123); - } -} - - -int -main (void) -{ - tests_start(); - - check_mpz(); - check_mpq(); - check_mpf(); - - tests_end(); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-binary.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-binary.cc deleted file mode 100644 index 09d202b2265..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-binary.cc +++ /dev/null @@ -1,466 +0,0 @@ -/* Test mp*_class binary expressions. - -Copyright 2001-2003, 2008, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <iostream> - -#include "gmp.h" -#include "gmpxx.h" -#include "gmp-impl.h" -#include "tests.h" - -using namespace std; - - -void -check_mpz (void) -{ - // template <class T, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, T>, __gmp_expr<T, T>, Op> > - { - mpz_class a(1), b(2); - mpz_class c(a + b); ASSERT_ALWAYS(c == 3); - } - { - mpz_class a(3), b(4); - mpz_class c; - c = a * b; ASSERT_ALWAYS(c == 12); - } - { - mpz_class a(5), b(3); - mpz_class c; - c = a % b; ASSERT_ALWAYS(c == 2); - } - - // template <class T, class U, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, T>, U, Op> > - { - mpz_class a(1); - signed int b = 3; - mpz_class c(a - b); ASSERT_ALWAYS(c == -2); - } - { - mpz_class a(-8); - unsigned int b = 2; - mpz_class c; - c = a / b; ASSERT_ALWAYS(c == -4); - } - { - mpz_class a(2); - double b = 3.0; - mpz_class c(a + b); ASSERT_ALWAYS(c == 5); - } - { - mpz_class a(4); - mpz_class b; - b = a + 0; ASSERT_ALWAYS(b == 4); - } - - // template <class T, class U, class Op> - // __gmp_expr<T, __gmp_binary_expr<U, __gmp_expr<T, T>, Op> > - { - mpz_class a(3); - signed int b = 9; - mpz_class c(b / a); ASSERT_ALWAYS(c == 3); - } - - // template <class T, class U, class V, class W, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, U>, __gmp_expr<V, W>, Op> > - // type of result can't be mpz - - // template <class T, class U, class V, class W, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<U, V>, __gmp_expr<T, W>, Op> > - // type of result can't be mpz - - // template <class T, class U, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, T>, __gmp_expr<T, U>, Op> > - { - mpz_class a(3), b(4); - mpz_class c(a * (-b)); ASSERT_ALWAYS(c == -12); - c = c * (-b); ASSERT_ALWAYS(c == 48); - } - - // template <class T, class U, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, U>, __gmp_expr<T, T>, Op> > - { - mpz_class a(3), b(2), c(1); - mpz_class d; - d = (a % b) + c; ASSERT_ALWAYS(d == 2); - d = (a % b) + d; ASSERT_ALWAYS(d == 3); - } - - // template <class T, class U, class V, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, U>, V, Op> > - { - mpz_class a(-5); - unsigned int b = 2; - mpz_class c((-a) << b); ASSERT_ALWAYS(c == 20); - } - { - mpz_class a(5), b(-4); - signed int c = 3; - mpz_class d; - d = (a * b) >> c; ASSERT_ALWAYS(d == -3); - } - - // template <class T, class U, class V, class Op> - // __gmp_expr<T, __gmp_binary_expr<U, __gmp_expr<T, V>, Op> > - { - mpz_class a(2), b(4); - double c = 6; - mpz_class d(c / (a - b)); ASSERT_ALWAYS(d == -3); - } - { - mpz_class a(3), b(2); - double c = 1; - mpz_class d; - d = c + (a + b); ASSERT_ALWAYS(d == 6); - } - - // template <class T, class U, class V, class W, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, U>, __gmp_expr<V, W>, Op> > - // type of result can't be mpz - - // template <class T, class U, class V, class W, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<U, V>, __gmp_expr<T, W>, Op> > - // type of result can't be mpz - - // template <class T, class U, class V, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, U>, __gmp_expr<T, V>, Op> > - { - mpz_class a(3), b(5), c(7); - mpz_class d; - d = (a - b) * (-c); ASSERT_ALWAYS(d == 14); - d = (b - d) * (-a); ASSERT_ALWAYS(d == 27); - d = (a - b) * (-d); ASSERT_ALWAYS(d == 54); - } - - { - mpz_class a(0xcafe), b(0xbeef), c, want; - c = a & b; ASSERT_ALWAYS (c == 0x8aee); - c = a | b; ASSERT_ALWAYS (c == 0xfeff); - c = a ^ b; ASSERT_ALWAYS (c == 0x7411); - c = a & 0xbeef; ASSERT_ALWAYS (c == 0x8aee); - c = a | 0xbeef; ASSERT_ALWAYS (c == 0xfeff); - c = a ^ 0xbeef; ASSERT_ALWAYS (c == 0x7411); - c = a & -0xbeef; ASSERT_ALWAYS (c == 0x4010); - c = a | -0xbeef; ASSERT_ALWAYS (c == -0x3401); - c = a ^ -0xbeef; ASSERT_ALWAYS (c == -0x7411); - c = a & 48879.0; ASSERT_ALWAYS (c == 0x8aee); - c = a | 48879.0; ASSERT_ALWAYS (c == 0xfeff); - c = a ^ 48879.0; ASSERT_ALWAYS (c == 0x7411); - - c = a | 1267650600228229401496703205376.0; // 2^100 - want = "0x1000000000000000000000cafe"; - ASSERT_ALWAYS (c == want); - } - -} - -void -check_mpq (void) -{ - // template <class T, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, T>, __gmp_expr<T, T>, Op> > - { - mpq_class a(1, 2), b(3, 4); - mpq_class c(a + b); ASSERT_ALWAYS(c == 1.25); - } - - // template <class T, class U, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, T>, U, Op> > - { - mpq_class a(1, 2); - signed int b = 3; - mpq_class c(a - b); ASSERT_ALWAYS(c == -2.5); - } - { - mpq_class a(1, 2); - mpq_class b; - b = a + 0; ASSERT_ALWAYS(b == 0.5); - } - - // template <class T, class U, class Op> - // __gmp_expr<T, __gmp_binary_expr<U, __gmp_expr<T, T>, Op> > - { - mpq_class a(2, 3); - signed int b = 4; - mpq_class c; - c = b / a; ASSERT_ALWAYS(c == 6); - } - - // template <class T, class U, class V, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, T>, __gmp_expr<U, V>, Op> > - { - mpq_class a(1, 2); - mpz_class b(1); - mpq_class c(a + b); ASSERT_ALWAYS(c == 1.5); - } - { - mpq_class a(2, 3); - mpz_class b(1); - double c = 2.0; - mpq_class d; - d = a * (b + c); ASSERT_ALWAYS(d == 2); - d = d * (b + c); ASSERT_ALWAYS(d == 6); - } - - // template <class T, class U, class V, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<U, V>, __gmp_expr<T, T>, Op> > - { - mpq_class a(2, 3); - mpz_class b(4); - mpq_class c(b / a); ASSERT_ALWAYS(c == 6); - } - { - mpq_class a(2, 3); - mpz_class b(1), c(4); - mpq_class d; - d = (b - c) * a; ASSERT_ALWAYS(d == -2); - d = (b - c) * d; ASSERT_ALWAYS(d == 6); - } - - // template <class T, class U, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, T>, __gmp_expr<T, U>, Op> > - { - mpq_class a(1, 3), b(3, 4); - mpq_class c; - c = a * (-b); ASSERT_ALWAYS(c == -0.25); - a = a * (-b); ASSERT_ALWAYS(a == -0.25); - } - - // template <class T, class U, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, U>, __gmp_expr<T, T>, Op> > - { - mpq_class a(1, 3), b(2, 3), c(1, 4); - mpq_class d((a / b) + c); ASSERT_ALWAYS(d == 0.75); - c = (a / b) + c; ASSERT_ALWAYS(c == 0.75); - } - - // template <class T, class U, class V, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, U>, V, Op> > - { - mpq_class a(3, 8); - unsigned int b = 4; - mpq_class c((-a) << b); ASSERT_ALWAYS(c == -6); - } - - // template <class T, class U, class V, class Op> - // __gmp_expr<T, __gmp_binary_expr<U, __gmp_expr<T, V>, Op> > - { - mpq_class a(1, 2), b(1, 4); - double c = 6.0; - mpq_class d; - d = c / (a + b); ASSERT_ALWAYS(d == 8); - } - - // template <class T, class U, class V, class W, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, U>, __gmp_expr<V, W>, Op> > - { - mpq_class a(1, 2), b(1, 4); - mpz_class c(1); - mpq_class d((a + b) - c); ASSERT_ALWAYS(d == -0.25); - d = (a + d) - c; ASSERT_ALWAYS(d == -0.75); - d = (a + d) - d.get_num(); ASSERT_ALWAYS(d == 2.75); - d = (2 * d) * d.get_den(); ASSERT_ALWAYS(d == 22); - d = (b * d) / -d.get_num(); ASSERT_ALWAYS(d == -0.25); - } - { - mpq_class a(1, 3), b(3, 2); - mpz_class c(2), d(4); - mpq_class e; - e = (a * b) / (c - d); ASSERT_ALWAYS(e == -0.25); - e = (2 * e) / (c - d); ASSERT_ALWAYS(e == 0.25); - } - - // template <class T, class U, class V, class W, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<U, V>, __gmp_expr<T, W>, Op> > - { - mpq_class a(1, 3), b(3, 4); - mpz_class c(-3); - mpq_class d(c * (a * b)); ASSERT_ALWAYS(d == -0.75); - } - { - mpq_class a(1, 3), b(3, 5); - mpz_class c(6); - signed int d = 4; - mpq_class e; - e = (c % d) / (a * b); ASSERT_ALWAYS(e == 10); - e = (e.get_num() % d) / (2 / e); ASSERT_ALWAYS(e == 10); - } - - // template <class T, class U, class V, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, U>, __gmp_expr<T, V>, Op> > - { - mpq_class a(1, 3), b(3, 4), c(2, 5); - mpq_class d; - d = (a * b) / (-c); ASSERT_ALWAYS(d == -0.625); - d = (c * d) / (-b); ASSERT_ALWAYS(3 * d == 1); - d = (a * c) / (-d); ASSERT_ALWAYS(5 * d == -2); - } -} - -void -check_mpf (void) -{ - // template <class T, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, T>, __gmp_expr<T, T>, Op> > - { - mpf_class a(1), b(2); - mpf_class c(a + b); ASSERT_ALWAYS(c == 3); - } - { - mpf_class a(1.5), b(6); - mpf_class c; - c = a / b; ASSERT_ALWAYS(c == 0.25); - } - - // template <class T, class U, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, T>, U, Op> > - { - mpf_class a(1); - signed int b = -2; - mpf_class c(a - b); ASSERT_ALWAYS(c == 3); - } - { - mpf_class a(2); - mpf_class b; - b = a + 0; ASSERT_ALWAYS(b == 2); - } - - // template <class T, class U, class Op> - // __gmp_expr<T, __gmp_binary_expr<U, __gmp_expr<T, T>, Op> > - { - mpf_class a(2); - unsigned int b = 3; - mpf_class c; - c = b / a; ASSERT_ALWAYS(c == 1.5); - } - - // template <class T, class U, class V, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, T>, __gmp_expr<U, V>, Op> > - { - mpf_class a(2); - mpz_class b(3); - mpf_class c(a - b); ASSERT_ALWAYS(c == -1); - } - { - mpf_class a(3); - mpz_class b(2), c(1); - mpf_class d; - d = a * (b + c); ASSERT_ALWAYS(d == 9); - a = a * (b + c); ASSERT_ALWAYS(a == 9); - } - - // template <class T, class U, class V, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<U, V>, __gmp_expr<T, T>, Op> > - { - mpf_class a(6); - mpq_class b(3, 4); - mpf_class c(a * b); ASSERT_ALWAYS(c == 4.5); - } - - // template <class T, class U, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, T>, __gmp_expr<T, U>, Op> > - { - mpf_class a(2), b(-3); - mpf_class c; - c = a * (-b); ASSERT_ALWAYS(c == 6); - c = c * (-b); ASSERT_ALWAYS(c == 18); - } - - // template <class T, class U, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, U>, __gmp_expr<T, T>, Op> > - { - mpf_class a(3), b(4), c(5); - mpf_class d; - d = (a / b) - c; ASSERT_ALWAYS(d == -4.25); - c = (a / b) - c; ASSERT_ALWAYS(c == -4.25); - } - - // template <class T, class U, class V, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, U>, V, Op> > - { - mpf_class a(3); - unsigned int b = 2; - mpf_class c((-a) >> b); ASSERT_ALWAYS(c == -0.75); - } - - // template <class T, class U, class V, class Op> - // __gmp_expr<T, __gmp_binary_expr<U, __gmp_expr<T, V>, Op> > - { - mpf_class a(2), b(3); - double c = 5.0; - mpf_class d; - d = c / (a + b); ASSERT_ALWAYS(d == 1); - } - - // template <class T, class U, class V, class W, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, U>, __gmp_expr<V, W>, Op> > - { - mpf_class a(2), b(3); - mpz_class c(4); - mpf_class d; - d = (a + b) * c; ASSERT_ALWAYS(d == 20); - } - { - mpf_class a(2), b(3); - mpq_class c(1, 2), d(1, 4); - mpf_class e; - e = (a * b) / (c + d); ASSERT_ALWAYS(e == 8); - } - - // template <class T, class U, class V, class W, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<U, V>, __gmp_expr<T, W>, Op> > - { - mpf_class a(1), b(2); - mpq_class c(3); - mpf_class d(c / (a + b)); ASSERT_ALWAYS(d == 1); - } - { - mpf_class a(1); - mpz_class b(2); - mpq_class c(3, 4); - mpf_class d; - d = (-c) + (a + b); ASSERT_ALWAYS(d == 2.25); - } - - // template <class T, class U, class V, class Op> - // __gmp_expr<T, __gmp_binary_expr<__gmp_expr<T, U>, __gmp_expr<T, V>, Op> > - { - mpf_class a(1), b(2), c(3); - mpf_class d; - d = (a + b) * (-c); ASSERT_ALWAYS(d == -9); - } -} - - -int -main (void) -{ - tests_start(); - - check_mpz(); - check_mpq(); - check_mpf(); - - tests_end(); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-cast.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-cast.cc deleted file mode 100644 index 117fd87b802..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-cast.cc +++ /dev/null @@ -1,57 +0,0 @@ -/* Test g++ -Wold-style-cast cleanliness. - -Copyright 2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmpxx.h" - - -/* This code doesn't do anything when run, it just expands various C macros - to see that they don't trigger compile-time warnings from g++ - -Wold-style-cast. This option isn't used in a normal build, it has to be - added manually to make this test worthwhile. */ - -void -check_macros (void) -{ - mpz_t z; - long l = 123; - unsigned long u = 456; - int i; - mp_limb_t limb; - - mpz_init_set_ui (z, 0L); - i = mpz_odd_p (z); - i = mpz_even_p (z); - i = mpz_cmp_si (z, l); - i = mpz_cmp_ui (z, u); - mpz_clear (z); - - limb = GMP_NUMB_MASK; - limb = GMP_NUMB_MAX; - limb = GMP_NAIL_MASK; - - mpn_divmod (&limb, &limb, 1, &limb, 1); - mpn_divexact_by3 (&limb, &limb, 1); -} - -int -main (void) -{ - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-constr.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-constr.cc deleted file mode 100644 index 7a87f3cb048..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-constr.cc +++ /dev/null @@ -1,756 +0,0 @@ -/* Test mp*_class constructors. - -Copyright 2001-2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <iostream> -#include <string> - -#include "gmp.h" -#include "gmpxx.h" -#include "gmp-impl.h" -#include "tests.h" - -using namespace std; - - -void -check_mpz (void) -{ - // mpz_class() - { - mpz_class a; ASSERT_ALWAYS(a == 0); - } - - // mpz_class(const mpz_class &) - // see below - - // template <class T, class U> mpz_class(const __gmp_expr<T, U> &) - // not tested here, see t-unary.cc, t-binary.cc - - // mpz_class(signed char) - { - signed char a = -127; - mpz_class b(a); ASSERT_ALWAYS(b == -127); - } - - // mpz_class(unsigned char) - { - unsigned char a = 255; - mpz_class b(a); ASSERT_ALWAYS(b == 255); - } - - // either signed or unsigned char, machine dependent - { - mpz_class a('A'); ASSERT_ALWAYS(a == 65); - } - { - mpz_class a('z'); ASSERT_ALWAYS(a == 122); - } - - // mpz_class(signed int) - { - signed int a = 0; - mpz_class b(a); ASSERT_ALWAYS(b == 0); - } - { - signed int a = -123; - mpz_class b(a); ASSERT_ALWAYS(b == -123); - } - { - signed int a = 4567; - mpz_class b(a); ASSERT_ALWAYS(b == 4567); - } - - // mpz_class(unsigned int) - { - unsigned int a = 890; - mpz_class b(a); ASSERT_ALWAYS(b == 890); - } - - // mpz_class(signed short int) - { - signed short int a = -12345; - mpz_class b(a); ASSERT_ALWAYS(b == -12345); - } - - // mpz_class(unsigned short int) - { - unsigned short int a = 54321u; - mpz_class b(a); ASSERT_ALWAYS(b == 54321u); - } - - // mpz_class(signed long int) - { - signed long int a = -1234567890L; - mpz_class b(a); ASSERT_ALWAYS(b == -1234567890L); - } - - // mpz_class(unsigned long int) - { - unsigned long int a = 1UL << 30; - mpz_class b(a); ASSERT_ALWAYS(b == 1073741824L); - } - - // mpz_class(float) - { - float a = 123.45; - mpz_class b(a); ASSERT_ALWAYS(b == 123); - } - - // mpz_class(double) - { - double a = 3.141592653589793238; - mpz_class b(a); ASSERT_ALWAYS(b == 3); - } - - // mpz_class(long double) - // currently not implemented - - // mpz_class(const char *) - { - const char *a = "1234567890"; - mpz_class b(a); ASSERT_ALWAYS(b == 1234567890L); - } - - // mpz_class(const char *, int) - { - const char *a = "FFFF"; - int base = 16; - mpz_class b(a, base); ASSERT_ALWAYS(b == 65535u); - } - - // mpz_class(const std::string &) - { - string a("1234567890"); - mpz_class b(a); ASSERT_ALWAYS(b == 1234567890L); - } - - // mpz_class(const std::string &, int) - { - string a("7777"); - int base = 8; - mpz_class b(a, base); ASSERT_ALWAYS(b == 4095); - } - - // mpz_class(const char *) with invalid - { - try { - const char *a = "ABC"; - mpz_class b(a); - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // mpz_class(const char *, int) with invalid - { - try { - const char *a = "GHI"; - int base = 16; - mpz_class b(a, base); - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // mpz_class(const std::string &) with invalid - { - try { - string a("abc"); - mpz_class b(a); - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // mpz_class(const std::string &, int) with invalid - { - try { - string a("ZZZ"); - int base = 8; - mpz_class b(a, base); - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // mpz_class(mpz_srcptr) - { - mpz_t a; - mpz_init_set_ui(a, 100); - mpz_class b(a); ASSERT_ALWAYS(b == 100); - mpz_clear(a); - } - - // mpz_class(const mpz_class &) - { - mpz_class a(12345); // tested above, assume it works - mpz_class b(a); ASSERT_ALWAYS(b == 12345); - } - - // no constructor for bool, but it gets casted to int - { - bool a = true; - mpz_class b(a); ASSERT_ALWAYS(b == 1); - } - { - bool a = false; - mpz_class b(a); ASSERT_ALWAYS(b == 0); - } -} - -void -check_mpq (void) -{ - // mpq_class() - { - mpq_class a; ASSERT_ALWAYS(a == 0); - } - - // mpq_class(const mpq_class &) - // see below - - // template <class T, class U> mpq_class(const __gmp_expr<T, U> &) - // not tested here, see t-unary.cc, t-binary.cc - - // mpq_class(signed char) - { - signed char a = -127; - mpq_class b(a); ASSERT_ALWAYS(b == -127); - } - - // mpq_class(unsigned char) - { - unsigned char a = 255; - mpq_class b(a); ASSERT_ALWAYS(b == 255); - } - - // either signed or unsigned char, machine dependent - { - mpq_class a('A'); ASSERT_ALWAYS(a == 65); - } - { - mpq_class a('z'); ASSERT_ALWAYS(a == 122); - } - - // mpq_class(signed int) - { - signed int a = 0; - mpq_class b(a); ASSERT_ALWAYS(b == 0); - } - { - signed int a = -123; - mpq_class b(a); ASSERT_ALWAYS(b == -123); - } - { - signed int a = 4567; - mpq_class b(a); ASSERT_ALWAYS(b == 4567); - } - - // mpq_class(unsigned int) - { - unsigned int a = 890; - mpq_class b(a); ASSERT_ALWAYS(b == 890); - } - - // mpq_class(signed short int) - { - signed short int a = -12345; - mpq_class b(a); ASSERT_ALWAYS(b == -12345); - } - - // mpq_class(unsigned short int) - { - unsigned short int a = 54321u; - mpq_class b(a); ASSERT_ALWAYS(b == 54321u); - } - - // mpq_class(signed long int) - { - signed long int a = -1234567890L; - mpq_class b(a); ASSERT_ALWAYS(b == -1234567890L); - } - - // mpq_class(unsigned long int) - { - unsigned long int a = 1UL << 30; - mpq_class b(a); ASSERT_ALWAYS(b == 1073741824L); - } - - // mpq_class(float) - { - float a = 0.625; - mpq_class b(a); ASSERT_ALWAYS(b == 0.625); - } - - // mpq_class(double) - { - double a = 1.25; - mpq_class b(a); ASSERT_ALWAYS(b == 1.25); - } - - // mpq_class(long double) - // currently not implemented - - // mpq_class(const char *) - { - const char *a = "1234567890"; - mpq_class b(a); ASSERT_ALWAYS(b == 1234567890L); - } - - // mpq_class(const char *, int) - { - const char *a = "FFFF"; - int base = 16; - mpq_class b(a, base); ASSERT_ALWAYS(b == 65535u); - mpq_class c(0, 1); ASSERT_ALWAYS(c == 0); - } - - // mpq_class(const std::string &) - { - string a("1234567890"); - mpq_class b(a); ASSERT_ALWAYS(b == 1234567890L); - } - - // mpq_class(const std::string &, int) - { - string a("7777"); - int base = 8; - mpq_class b(a, base); ASSERT_ALWAYS(b == 4095); - } - - // mpq_class(const char *) with invalid - { - try { - const char *a = "abc"; - mpq_class b(a); - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // mpq_class(const char *, int) with invalid - { - try { - const char *a = "ZZZ"; - int base = 16; - mpq_class b (a, base); - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // mpq_class(const std::string &) with invalid - { - try { - string a("abc"); - mpq_class b(a); - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // mpq_class(const std::string &, int) with invalid - { - try { - string a("ZZZ"); - int base = 8; - mpq_class b (a, base); - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // mpq_class(mpq_srcptr) - { - mpq_t a; - mpq_init(a); - mpq_set_ui(a, 100, 1); - mpq_class b(a); ASSERT_ALWAYS(b == 100); - mpq_clear(a); - } - - // mpq_class(const mpz_class &, const mpz_class &) - { - mpz_class a(123), b(4); // tested above, assume it works - mpq_class c(a, b); ASSERT_ALWAYS(c == 30.75); - } - { - mpz_class a(-1), b(2); // tested above, assume it works - mpq_class c(a, b); ASSERT_ALWAYS(c == -0.5); - } - { - mpz_class a(5), b(4); // tested above, assume it works - mpq_class c(a, b); ASSERT_ALWAYS(c == 1.25); - } - - // mpq_class(const mpz_class &) - { - mpq_class a(12345); // tested above, assume it works - mpq_class b(a); ASSERT_ALWAYS(b == 12345); - } - - // no constructor for bool, but it gets casted to int - { - bool a = true; - mpq_class b(a); ASSERT_ALWAYS(b == 1); - } - { - bool a = false; - mpq_class b(a); ASSERT_ALWAYS(b == 0); - } -} - -void -check_mpf (void) -{ - // mpf_class() - { - mpf_class a; ASSERT_ALWAYS(a == 0); - } - - // mpf_class(const mpf_class &) - // mpf_class(const mpf_class &, unsigned long int) - // see below - - // template <class T, class U> mpf_class(const __gmp_expr<T, U> &) - // template <class T, class U> mpf_class(const __gmp_expr<T, U> &, - // unsigned long int) - // not tested here, see t-unary.cc, t-binary.cc - - // mpf_class(signed char) - { - signed char a = -127; - mpf_class b(a); ASSERT_ALWAYS(b == -127); - } - - // mpf_class(signed char, unsigned long int) - { - signed char a = -1; - int prec = 64; - mpf_class b(a, prec); ASSERT_ALWAYS(b == -1); - } - - // mpf_class(unsigned char) - { - unsigned char a = 255; - mpf_class b(a); ASSERT_ALWAYS(b == 255); - } - - // mpf_class(unsigned char, unsigned long int) - { - unsigned char a = 128; - int prec = 128; - mpf_class b(a, prec); ASSERT_ALWAYS(b == 128); - } - - // either signed or unsigned char, machine dependent - { - mpf_class a('A'); ASSERT_ALWAYS(a == 65); - } - { - int prec = 256; - mpf_class a('z', prec); ASSERT_ALWAYS(a == 122); - } - - // mpf_class(signed int) - { - signed int a = 0; - mpf_class b(a); ASSERT_ALWAYS(b == 0); - } - { - signed int a = -123; - mpf_class b(a); ASSERT_ALWAYS(b == -123); - } - { - signed int a = 4567; - mpf_class b(a); ASSERT_ALWAYS(b == 4567); - } - - // mpf_class(signed int, unsigned long int) - { - signed int a = -123; - int prec = 64; - mpf_class b(a, prec); ASSERT_ALWAYS(b == -123); - } - - // mpf_class(unsigned int) - { - unsigned int a = 890; - mpf_class b(a); ASSERT_ALWAYS(b == 890); - } - - // mpf_class(unsigned int, unsigned long int) - { - unsigned int a = 890; - int prec = 128; - mpf_class b(a, prec); ASSERT_ALWAYS(b == 890); - } - - // mpf_class(signed short int) - { - signed short int a = -12345; - mpf_class b(a); ASSERT_ALWAYS(b == -12345); - } - - // mpf_class(signed short int, unsigned long int) - { - signed short int a = 6789; - int prec = 256; - mpf_class b(a, prec); ASSERT_ALWAYS(b == 6789); - } - - // mpf_class(unsigned short int) - { - unsigned short int a = 54321u; - mpf_class b(a); ASSERT_ALWAYS(b == 54321u); - } - - // mpf_class(unsigned short int, unsigned long int) - { - unsigned short int a = 54321u; - int prec = 64; - mpf_class b(a, prec); ASSERT_ALWAYS(b == 54321u); - } - - // mpf_class(signed long int) - { - signed long int a = -1234567890L; - mpf_class b(a); ASSERT_ALWAYS(b == -1234567890L); - } - - // mpf_class(signed long int, unsigned long int) - { - signed long int a = -1234567890L; - int prec = 128; - mpf_class b(a, prec); ASSERT_ALWAYS(b == -1234567890L); - } - - // mpf_class(unsigned long int) - { - unsigned long int a = 3456789012UL; - mpf_class b(a); ASSERT_ALWAYS(b == 3456789012UL); - } - - // mpf_class(unsigned long int, unsigned long int) - { - unsigned long int a = 3456789012UL; - int prec = 256; - mpf_class b(a, prec); ASSERT_ALWAYS(b == 3456789012UL); - } - - // mpf_class(float) - { - float a = 1234.5; - mpf_class b(a); ASSERT_ALWAYS(b == 1234.5); - } - - // mpf_class(float, unsigned long int) - { - float a = 1234.5; - int prec = 64; - mpf_class b(a, prec); ASSERT_ALWAYS(b == 1234.5); - } - - // mpf_class(double) - { - double a = 12345.0; - mpf_class b(a); ASSERT_ALWAYS(b == 12345); - } - { - double a = 1.2345e+4; - mpf_class b(a); ASSERT_ALWAYS(b == 12345); - } - { - double a = 312.5e-2; - mpf_class b(a); ASSERT_ALWAYS(b == 3.125); - } - - // mpf_class(double, unsigned long int) - { - double a = 5.4321e+4; - int prec = 128; - mpf_class b(a, prec); ASSERT_ALWAYS(b == 54321L); - } - - // mpf_class(long double) - // mpf_class(long double, unsigned long int) - // currently not implemented - - // mpf_class(const char *) - { - const char *a = "1234567890"; - mpf_class b(a); ASSERT_ALWAYS(b == 1234567890L); - } - - // mpf_class(const char *, unsigned long int, int = 0) - { - const char *a = "1234567890"; - int prec = 256; - mpf_class b(a, prec); ASSERT_ALWAYS(b == 1234567890L); - } - { - const char *a = "777777"; - int prec = 64, base = 8; - mpf_class b(a, prec, base); ASSERT_ALWAYS(b == 262143L); - } - - // mpf_class(const std::string &) - { - string a("1234567890"); - mpf_class b(a); ASSERT_ALWAYS(b == 1234567890L); - } - - // mpf_class(const std::string &, unsigned long int, int = 0) - { - string a("1234567890"); - int prec = 128; - mpf_class b(a, prec); ASSERT_ALWAYS(b == 1234567890L); - } - { - string a("FFFF"); - int prec = 256, base = 16; - mpf_class b(a, prec, base); ASSERT_ALWAYS(b == 65535u); - } - - // mpf_class(const char *) with invalid - { - try { - const char *a = "abc"; - mpf_class b(a); - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // mpf_class(const char *, unsigned long int, int = 0) with invalid - { - try { - const char *a = "def"; - int prec = 256; - mpf_class b(a, prec); ASSERT_ALWAYS(b == 1234567890L); - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - { - try { - const char *a = "ghi"; - int prec = 64, base = 8; - mpf_class b(a, prec, base); ASSERT_ALWAYS(b == 262143L); - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // mpf_class(const std::string &) with invalid - { - try { - string a("abc"); - mpf_class b(a); ASSERT_ALWAYS(b == 1234567890L); - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // mpf_class(const std::string &, unsigned long int, int = 0) with invalid - { - try { - string a("def"); - int prec = 128; - mpf_class b(a, prec); ASSERT_ALWAYS(b == 1234567890L); - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - { - try { - string a("ghi"); - int prec = 256, base = 16; - mpf_class b(a, prec, base); ASSERT_ALWAYS(b == 65535u); - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (invalid_argument) { - } - } - - // mpf_class(mpf_srcptr) - { - mpf_t a; - mpf_init_set_ui(a, 100); - mpf_class b(a); ASSERT_ALWAYS(b == 100); - mpf_clear(a); - } - - // mpf_class(mpf_srcptr, unsigned long int) - { - mpf_t a; - int prec = 64; - mpf_init_set_ui(a, 100); - mpf_class b(a, prec); ASSERT_ALWAYS(b == 100); - mpf_clear(a); - } - - // mpf_class(const mpf_class &) - { - mpf_class a(12345); // tested above, assume it works - mpf_class b(a); ASSERT_ALWAYS(b == 12345); - } - - // mpf_class(const mpf_class &, unsigned long int) - { - mpf_class a(12345); // tested above, assume it works - int prec = 64; - mpf_class b(a, prec); ASSERT_ALWAYS(b == 12345); - } - - // no constructors for bool, but it gets casted to int - { - bool a = true; - mpf_class b(a); ASSERT_ALWAYS(b == 1); - } - { - bool a = false; - mpf_class b(a); ASSERT_ALWAYS(b == 0); - } - { - bool a = true; - int prec = 128; - mpf_class b(a, prec); ASSERT_ALWAYS(b == 1); - } - { - bool a = false; - int prec = 256; - mpf_class b(a, prec); ASSERT_ALWAYS(b == 0); - } -} - - -int -main (void) -{ - tests_start(); - - check_mpz(); - check_mpq(); - check_mpf(); - - tests_end(); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-cxx11.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-cxx11.cc deleted file mode 100644 index 1f314ff03a2..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-cxx11.cc +++ /dev/null @@ -1,225 +0,0 @@ -/* Test C++11 features - -Copyright 2011, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include "gmp.h" -#include "gmpxx.h" -#include "gmp-impl.h" -#include "tests.h" - -#if __GMPXX_USE_CXX11 - -#include <utility> -#include <type_traits> - -void check_noexcept () -{ - mpz_class z1, z2; - mpq_class q1, q2; - mpf_class f1, f2; - static_assert(noexcept(z1 = std::move(z2)), "sorry"); - static_assert(noexcept(q1 = std::move(q2)), "sorry"); - static_assert(noexcept(f1 = std::move(f2)), "sorry"); - static_assert(noexcept(q1 = std::move(z1)), "sorry"); -} - -void check_common_type () -{ -#define CHECK_COMMON_TYPE1(T, Res) \ - static_assert(std::is_same<std::common_type<T>::type, Res>::value, "sorry") -#define CHECK_COMMON_TYPE(T, U, Res) \ - static_assert(std::is_same<std::common_type<T, U>::type, Res>::value, "sorry") -#define CHECK_COMMON_TYPE_BUILTIN1(T, Res) \ - CHECK_COMMON_TYPE( signed char , T, Res); \ - CHECK_COMMON_TYPE(unsigned char , T, Res); \ - CHECK_COMMON_TYPE( signed short, T, Res); \ - CHECK_COMMON_TYPE(unsigned short, T, Res); \ - CHECK_COMMON_TYPE( signed int , T, Res); \ - CHECK_COMMON_TYPE(unsigned int , T, Res); \ - CHECK_COMMON_TYPE( signed long , T, Res); \ - CHECK_COMMON_TYPE(unsigned long , T, Res); \ - CHECK_COMMON_TYPE(float , T, Res); \ - CHECK_COMMON_TYPE(double, T, Res) -#define CHECK_COMMON_TYPE_BUILTIN2(T, Res) \ - CHECK_COMMON_TYPE(T, signed char , Res); \ - CHECK_COMMON_TYPE(T, unsigned char , Res); \ - CHECK_COMMON_TYPE(T, signed short, Res); \ - CHECK_COMMON_TYPE(T, unsigned short, Res); \ - CHECK_COMMON_TYPE(T, signed int , Res); \ - CHECK_COMMON_TYPE(T, unsigned int , Res); \ - CHECK_COMMON_TYPE(T, signed long , Res); \ - CHECK_COMMON_TYPE(T, unsigned long , Res); \ - CHECK_COMMON_TYPE(T, float , Res); \ - CHECK_COMMON_TYPE(T, double, Res) -#define CHECK_COMMON_TYPE_BUILTIN(T, Res) \ - CHECK_COMMON_TYPE_BUILTIN1(T, Res); \ - CHECK_COMMON_TYPE_BUILTIN2(T, Res) - /* These would just work with implicit conversions */ - CHECK_COMMON_TYPE (mpz_class, mpq_class, mpq_class); - CHECK_COMMON_TYPE (mpz_class, mpf_class, mpf_class); - CHECK_COMMON_TYPE (mpf_class, mpq_class, mpf_class); - - CHECK_COMMON_TYPE_BUILTIN (mpz_class, mpz_class); - CHECK_COMMON_TYPE_BUILTIN (mpq_class, mpq_class); - CHECK_COMMON_TYPE_BUILTIN (mpf_class, mpf_class); - - mpz_class z; mpq_class q; mpf_class f; - - CHECK_COMMON_TYPE (decltype(-z), mpz_class, mpz_class); - CHECK_COMMON_TYPE (decltype(-q), mpq_class, mpq_class); - CHECK_COMMON_TYPE (decltype(-f), mpf_class, mpf_class); - - CHECK_COMMON_TYPE (decltype(-z), mpq_class, mpq_class); - CHECK_COMMON_TYPE (decltype(-z), mpf_class, mpf_class); - CHECK_COMMON_TYPE (decltype(-q), mpf_class, mpf_class); - - /* These require a common_type specialization */ - CHECK_COMMON_TYPE (decltype(-z), decltype(z+z), mpz_class); - CHECK_COMMON_TYPE (decltype(-q), decltype(q+q), mpq_class); - CHECK_COMMON_TYPE (decltype(-f), decltype(f+f), mpf_class); - - CHECK_COMMON_TYPE (decltype(-q), mpz_class, mpq_class); - CHECK_COMMON_TYPE (decltype(-f), mpz_class, mpf_class); - CHECK_COMMON_TYPE (decltype(-f), mpq_class, mpf_class); - - CHECK_COMMON_TYPE (decltype(-z), decltype(-q), mpq_class); - CHECK_COMMON_TYPE (decltype(-z), decltype(-f), mpf_class); - CHECK_COMMON_TYPE (decltype(-q), decltype(-f), mpf_class); - - /* common_type now decays */ - CHECK_COMMON_TYPE (decltype(-z), decltype(-z), mpz_class); - CHECK_COMMON_TYPE (decltype(-q), decltype(-q), mpq_class); - CHECK_COMMON_TYPE (decltype(-f), decltype(-f), mpf_class); - CHECK_COMMON_TYPE1 (decltype(-z), mpz_class); - CHECK_COMMON_TYPE1 (decltype(-q), mpq_class); - CHECK_COMMON_TYPE1 (decltype(-f), mpf_class); - - /* Painful */ - CHECK_COMMON_TYPE_BUILTIN (decltype(-z), mpz_class); - CHECK_COMMON_TYPE_BUILTIN (decltype(-q), mpq_class); - CHECK_COMMON_TYPE_BUILTIN (decltype(-f), mpf_class); -} - -template<class T, class U = T> -void check_move_init () -{ - { - // Delete moved-from x1 - T x1 = 3; - U x2 = std::move(x1); - ASSERT_ALWAYS (x2 == 3); - } - { - // Assign to moved-from x1 - T x1 = 2; - U x2 = std::move(x1); - x1 = -7; - ASSERT_ALWAYS (x1 == -7); - ASSERT_ALWAYS (x2 == 2); - } -} - -template<class T, class U = T> -void check_move_assign () -{ - { - // Delete moved-from x1 - T x1 = 3; U x2; - x2 = std::move(x1); - ASSERT_ALWAYS (x2 == 3); - } - { - // Assign to moved-from x1 - T x1 = 2; U x2; - x2 = std::move(x1); - x1 = -7; - ASSERT_ALWAYS (x1 == -7); - ASSERT_ALWAYS (x2 == 2); - } - { - // Self move-assign (not necessary, but it happens to work...) - T x = 4; - x = std::move(x); - ASSERT_ALWAYS (x == 4); - } -} - -void check_user_defined_literal () -{ - ASSERT_ALWAYS (123_mpz % 5 == 3); - ASSERT_ALWAYS (-11_mpq / 22 == -.5); - ASSERT_ALWAYS (112.5e-1_mpf * 4 == 45); - { - mpz_class ref ( "123456789abcdef0123456789abcdef0123", 16); - ASSERT_ALWAYS (0x123456789abcdef0123456789abcdef0123_mpz == ref); - } -} - -// Check for explicit conversion to bool -void implicit_bool(bool); -int implicit_bool(...); - -void check_bool_conversion () -{ - const mpz_class zn = -2; - const mpq_class qn = -2; - const mpf_class fn = -2; - const mpz_class z0 = 0; - const mpq_class q0 = 0; - const mpf_class f0 = 0; - const mpz_class zp = +2; - const mpq_class qp = +2; - const mpf_class fp = +2; - if (zn && qn && fn && zp && qp && fp && !z0 && !q0 && !f0) - { - if (z0 || q0 || f0) ASSERT_ALWAYS(false); - } - else ASSERT_ALWAYS(false); - decltype(implicit_bool(zn)) zi = 1; - decltype(implicit_bool(qn)) qi = 1; - decltype(implicit_bool(fn)) fi = 1; - (void)(zi+qi+fi); -} - -int -main (void) -{ - tests_start(); - - check_noexcept(); - check_common_type(); - check_move_init<mpz_class>(); - check_move_init<mpq_class>(); - check_move_init<mpf_class>(); - check_move_assign<mpz_class>(); - check_move_assign<mpq_class>(); - check_move_assign<mpf_class>(); - check_move_init<mpz_class,mpq_class>(); - check_move_assign<mpz_class,mpq_class>(); - check_user_defined_literal(); - check_bool_conversion(); - - tests_end(); - return 0; -} - -#else -int main () { return 0; } -#endif diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-do-exceptions-work-at-all-with-this-compiler.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-do-exceptions-work-at-all-with-this-compiler.cc deleted file mode 100644 index 341a818b75f..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-do-exceptions-work-at-all-with-this-compiler.cc +++ /dev/null @@ -1,38 +0,0 @@ -/* Test if the compiler has working try / throw / catch. - -Copyright 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdexcept> - -inline void -throw_expr () -{ - throw std::invalid_argument ("Test"); -} - -using namespace std; - -int -main () -{ - try - { - throw_expr(); - } - catch (invalid_argument) { } -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-headers.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-headers.cc deleted file mode 100644 index 35f7a25c26f..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-headers.cc +++ /dev/null @@ -1,26 +0,0 @@ -/* Test that gmpxx.h compiles correctly. - -Copyright 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "gmpxx.h" - -int -main (void) -{ - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-iostream.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-iostream.cc deleted file mode 100644 index 92bd917a973..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-iostream.cc +++ /dev/null @@ -1,107 +0,0 @@ -/* Test stream formatted input and output on mp*_class - -Copyright 2011 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <sstream> - -#include "gmp.h" -#include "gmpxx.h" -#include "gmp-impl.h" -#include "tests.h" - -using namespace std; - -// The tests are extremely basic. These functions just forward to the -// ones tested in t-istream.cc and t-ostream.cc; we rely on those for -// advanced tests and only check the syntax here. - -void -checki () -{ - { - istringstream i("123"); - mpz_class x; - i >> x; - ASSERT_ALWAYS (x == 123); - } - { - istringstream i("3/4"); - mpq_class x; - i >> x; - ASSERT_ALWAYS (x == .75); - } - { - istringstream i("1.5"); - mpf_class x; - i >> x; - ASSERT_ALWAYS (x == 1.5); - } -} - -void -checko () -{ - { - ostringstream o; - mpz_class x=123; - o << x; - ASSERT_ALWAYS (o.str() == "123"); - } - { - ostringstream o; - mpz_class x=123; - o << (x+1); - ASSERT_ALWAYS (o.str() == "124"); - } - { - ostringstream o; - mpq_class x(3,4); - o << x; - ASSERT_ALWAYS (o.str() == "3/4"); - } - { - ostringstream o; - mpq_class x(3,4); - o << (x+1); - ASSERT_ALWAYS (o.str() == "7/4"); - } - { - ostringstream o; - mpf_class x=1.5; - o << x; - ASSERT_ALWAYS (o.str() == "1.5"); - } - { - ostringstream o; - mpf_class x=1.5; - o << (x+1); - ASSERT_ALWAYS (o.str() == "2.5"); - } -} - -int -main (int argc, char *argv[]) -{ - tests_start (); - - checki (); - checko (); - - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-istream.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-istream.cc deleted file mode 100644 index f04ae083f80..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-istream.cc +++ /dev/null @@ -1,599 +0,0 @@ -/* Test istream formatted input. - -Copyright 2001-2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <iostream> -#include <cstdlib> -#include <cstring> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -using namespace std; - - -// Under option_check_standard, the various test cases for mpz operator>> -// are put through the standard operator>> for long, and likewise mpf -// operator>> is put through double. -// -// In g++ 3.3 this results in some printouts about the final position -// indicated for something like ".e123". Our mpf code stops at the "e" -// since there's no mantissa digits, but g++ reads the whole thing and only -// then decides it's bad. - -bool option_check_standard = false; - - -// On some versions of g++ 2.96 it's been observed that putback() may leave -// tellg() unchanged. We believe this is incorrect and presumably the -// result of a bug, since for instance it's ok in g++ 2.95 and g++ 3.3. We -// detect the problem at runtime and disable affected checks. - -bool putback_tellg_works = true; - -void -check_putback_tellg (void) -{ - istringstream input ("hello"); - streampos old_pos, new_pos; - char c; - - input.get(c); - old_pos = input.tellg(); - input.putback(c); - new_pos = input.tellg(); - - if (old_pos == new_pos) - { - cout << "Warning, istringstream has a bug: putback() doesn't update tellg().\n";; - cout << "Tests on tellg() will be skipped.\n"; - putback_tellg_works = false; - } -} - - -#define WRONG(str) \ - do { \ - cout << str ", data[" << i << "]\n"; \ - cout << " input: \"" << data[i].input << "\"\n"; \ - cout << " flags: " << hex << input.flags() << dec << "\n"; \ - } while (0) - -void -check_mpz (void) -{ - static const struct { - const char *input; - int want_pos; - const char *want; - ios::fmtflags flags; - - } data[] = { - - { "0", -1, "0", (ios::fmtflags) 0 }, - { "123", -1, "123", (ios::fmtflags) 0 }, - { "0123", -1, "83", (ios::fmtflags) 0 }, - { "0x123", -1, "291", (ios::fmtflags) 0 }, - { "-123", -1, "-123", (ios::fmtflags) 0 }, - { "-0123", -1, "-83", (ios::fmtflags) 0 }, - { "-0x123", -1, "-291", (ios::fmtflags) 0 }, - { "+123", -1, "123", (ios::fmtflags) 0 }, - { "+0123", -1, "83", (ios::fmtflags) 0 }, - { "+0x123", -1, "291", (ios::fmtflags) 0 }, - - { "0", -1, "0", ios::dec }, - { "1f", 1, "1", ios::dec }, - { "011f", 3, "11", ios::dec }, - { "123", -1, "123", ios::dec }, - { "-1f", 2, "-1", ios::dec }, - { "-011f", 4, "-11", ios::dec }, - { "-123", -1, "-123", ios::dec }, - { "+1f", 2, "1", ios::dec }, - { "+011f", 4, "11", ios::dec }, - { "+123", -1, "123", ios::dec }, - - { "0", -1, "0", ios::oct }, - { "123", -1, "83", ios::oct }, - { "-123", -1, "-83", ios::oct }, - { "+123", -1, "83", ios::oct }, - - { "0", -1, "0", ios::hex }, - { "123", -1, "291", ios::hex }, - { "ff", -1, "255", ios::hex }, - { "FF", -1, "255", ios::hex }, - { "-123", -1, "-291", ios::hex }, - { "-ff", -1, "-255", ios::hex }, - { "-FF", -1, "-255", ios::hex }, - { "+123", -1, "291", ios::hex }, - { "+ff", -1, "255", ios::hex }, - { "+FF", -1, "255", ios::hex }, - { "ab", -1, "171", ios::hex }, - { "cd", -1, "205", ios::hex }, - { "ef", -1, "239", ios::hex }, - - { " 123", 0, NULL, (ios::fmtflags) 0 }, // not without skipws - { " 123", -1, "123", ios::skipws }, - }; - - mpz_t got, want; - bool got_ok, want_ok; - bool got_eof, want_eof; - long got_si, want_si; - streampos init_tellg, got_pos, want_pos; - - mpz_init (got); - mpz_init (want); - - for (size_t i = 0; i < numberof (data); i++) - { - size_t input_length = strlen (data[i].input); - want_pos = (data[i].want_pos == -1 - ? input_length : data[i].want_pos); - want_eof = (want_pos == streampos(input_length)); - - want_ok = (data[i].want != NULL); - - if (data[i].want != NULL) - mpz_set_str_or_abort (want, data[i].want, 0); - else - mpz_set_ui (want, 0L); - - if (option_check_standard && mpz_fits_slong_p (want)) - { - istringstream input (data[i].input); - input.flags (data[i].flags); - init_tellg = input.tellg(); - want_si = mpz_get_si (want); - - input >> got_si; - got_ok = !input.fail(); - got_eof = input.eof(); - input.clear(); - got_pos = input.tellg() - init_tellg; - - if (got_ok != want_ok) - { - WRONG ("stdc++ operator>> wrong status, check_mpz"); - cout << " want_ok: " << want_ok << "\n"; - cout << " got_ok: " << got_ok << "\n"; - } - if (want_ok && got_si != want_si) - { - WRONG ("stdc++ operator>> wrong result, check_mpz"); - cout << " got_si: " << got_si << "\n"; - cout << " want_si: " << want_si << "\n"; - } - if (want_ok && got_eof != want_eof) - { - WRONG ("stdc++ operator>> wrong EOF state, check_mpz"); - cout << " got_eof: " << got_eof << "\n"; - cout << " want_eof: " << want_eof << "\n"; - } - if (putback_tellg_works && got_pos != want_pos) - { - WRONG ("stdc++ operator>> wrong position, check_mpz"); - cout << " want_pos: " << want_pos << "\n"; - cout << " got_pos: " << got_pos << "\n"; - } - } - - { - istringstream input (data[i].input); - input.flags (data[i].flags); - init_tellg = input.tellg(); - - mpz_set_ui (got, 0xDEAD); - input >> got; - got_ok = !input.fail(); - got_eof = input.eof(); - input.clear(); - got_pos = input.tellg() - init_tellg; - - if (got_ok != want_ok) - { - WRONG ("mpz operator>> wrong status"); - cout << " want_ok: " << want_ok << "\n"; - cout << " got_ok: " << got_ok << "\n"; - abort (); - } - if (want_ok && mpz_cmp (got, want) != 0) - { - WRONG ("mpz operator>> wrong result"); - mpz_trace (" got ", got); - mpz_trace (" want", want); - abort (); - } - if (want_ok && got_eof != want_eof) - { - WRONG ("mpz operator>> wrong EOF state"); - cout << " want_eof: " << want_eof << "\n"; - cout << " got_eof: " << got_eof << "\n"; - abort (); - } - if (putback_tellg_works && got_pos != want_pos) - { - WRONG ("mpz operator>> wrong position"); - cout << " want_pos: " << want_pos << "\n"; - cout << " got_pos: " << got_pos << "\n"; - abort (); - } - } - } - - mpz_clear (got); - mpz_clear (want); -} - -void -check_mpq (void) -{ - static const struct { - const char *input; - int want_pos; - const char *want; - ios::fmtflags flags; - - } data[] = { - - { "0", -1, "0", (ios::fmtflags) 0 }, - { "00", -1, "0", (ios::fmtflags) 0 }, - { "0x0", -1, "0", (ios::fmtflags) 0 }, - - { "123/456", -1, "123/456", ios::dec }, - { "0123/456", -1, "123/456", ios::dec }, - { "123/0456", -1, "123/456", ios::dec }, - { "0123/0456", -1, "123/456", ios::dec }, - - { "123/456", -1, "83/302", ios::oct }, - { "0123/456", -1, "83/302", ios::oct }, - { "123/0456", -1, "83/302", ios::oct }, - { "0123/0456", -1, "83/302", ios::oct }, - - { "ab", -1, "171", ios::hex }, - { "cd", -1, "205", ios::hex }, - { "ef", -1, "239", ios::hex }, - - { "0/0", -1, "0/0", (ios::fmtflags) 0 }, - { "5/8", -1, "5/8", (ios::fmtflags) 0 }, - { "0x5/0x8", -1, "5/8", (ios::fmtflags) 0 }, - - { "123/456", -1, "123/456", (ios::fmtflags) 0 }, - { "123/0456", -1, "123/302", (ios::fmtflags) 0 }, - { "123/0x456", -1, "123/1110", (ios::fmtflags) 0 }, - { "123/0X456", -1, "123/1110", (ios::fmtflags) 0 }, - - { "0123/123", -1, "83/123", (ios::fmtflags) 0 }, - { "0123/0123", -1, "83/83", (ios::fmtflags) 0 }, - { "0123/0x123", -1, "83/291", (ios::fmtflags) 0 }, - { "0123/0X123", -1, "83/291", (ios::fmtflags) 0 }, - - { "0x123/123", -1, "291/123", (ios::fmtflags) 0 }, - { "0X123/0123", -1, "291/83", (ios::fmtflags) 0 }, - { "0x123/0x123", -1, "291/291", (ios::fmtflags) 0 }, - - { " 123", 0, NULL, (ios::fmtflags) 0 }, // not without skipws - { " 123", -1, "123", ios::skipws }, - - { "123 /456", 3, "123", (ios::fmtflags) 0 }, - { "123/ 456", 4, NULL, (ios::fmtflags) 0 }, - { "123/" , -1, NULL, (ios::fmtflags) 0 }, - { "123 /456", 3, "123", ios::skipws }, - { "123/ 456", 4, NULL, ios::skipws }, - }; - - mpq_t got, want; - bool got_ok, want_ok; - bool got_eof, want_eof; - long got_si, want_si; - streampos init_tellg, got_pos, want_pos; - - mpq_init (got); - mpq_init (want); - - for (size_t i = 0; i < numberof (data); i++) - { - size_t input_length = strlen (data[i].input); - want_pos = (data[i].want_pos == -1 - ? input_length : data[i].want_pos); - want_eof = (want_pos == streampos(input_length)); - - want_ok = (data[i].want != NULL); - - if (data[i].want != NULL) - mpq_set_str_or_abort (want, data[i].want, 0); - else - mpq_set_ui (want, 0L, 1L); - - if (option_check_standard - && mpz_fits_slong_p (mpq_numref(want)) - && mpz_cmp_ui (mpq_denref(want), 1L) == 0 - && strchr (data[i].input, '/') == NULL) - { - istringstream input (data[i].input); - input.flags (data[i].flags); - init_tellg = input.tellg(); - want_si = mpz_get_si (mpq_numref(want)); - - input >> got_si; - got_ok = !input.fail(); - got_eof = input.eof(); - input.clear(); - got_pos = input.tellg() - init_tellg; - - if (got_ok != want_ok) - { - WRONG ("stdc++ operator>> wrong status, check_mpq"); - cout << " want_ok: " << want_ok << "\n"; - cout << " got_ok: " << got_ok << "\n"; - } - if (want_ok && want_si != got_si) - { - WRONG ("stdc++ operator>> wrong result, check_mpq"); - cout << " got_si: " << got_si << "\n"; - cout << " want_si: " << want_si << "\n"; - } - if (want_ok && got_eof != want_eof) - { - WRONG ("stdc++ operator>> wrong EOF state, check_mpq"); - cout << " got_eof: " << got_eof << "\n"; - cout << " want_eof: " << want_eof << "\n"; - } - if (putback_tellg_works && got_pos != want_pos) - { - WRONG ("stdc++ operator>> wrong position, check_mpq"); - cout << " want_pos: " << want_pos << "\n"; - cout << " got_pos: " << got_pos << "\n"; - } - } - - { - istringstream input (data[i].input); - input.flags (data[i].flags); - init_tellg = input.tellg(); - mpq_set_si (got, 0xDEAD, 0xBEEF); - - input >> got; - got_ok = !input.fail(); - got_eof = input.eof(); - input.clear(); - got_pos = input.tellg() - init_tellg; - - if (got_ok != want_ok) - { - WRONG ("mpq operator>> wrong status"); - cout << " want_ok: " << want_ok << "\n"; - cout << " got_ok: " << got_ok << "\n"; - abort (); - } - // don't use mpq_equal, since we allow non-normalized values to be - // read, which can trigger ASSERTs in mpq_equal - if (want_ok && (mpz_cmp (mpq_numref (got), mpq_numref(want)) != 0 - || mpz_cmp (mpq_denref (got), mpq_denref(want)) != 0)) - { - WRONG ("mpq operator>> wrong result"); - mpq_trace (" got ", got); - mpq_trace (" want", want); - abort (); - } - if (want_ok && got_eof != want_eof) - { - WRONG ("mpq operator>> wrong EOF state"); - cout << " want_eof: " << want_eof << "\n"; - cout << " got_eof: " << got_eof << "\n"; - abort (); - } - if (putback_tellg_works && got_pos != want_pos) - { - WRONG ("mpq operator>> wrong position"); - cout << " want_pos: " << want_pos << "\n"; - cout << " got_pos: " << got_pos << "\n"; - abort (); - } - } - } - - mpq_clear (got); - mpq_clear (want); -} - - -void -check_mpf (void) -{ - static const struct { - const char *input; - int want_pos; - const char *want; - ios::fmtflags flags; - - } data[] = { - - { "0", -1, "0", (ios::fmtflags) 0 }, - { "+0", -1, "0", (ios::fmtflags) 0 }, - { "-0", -1, "0", (ios::fmtflags) 0 }, - { "0.0", -1, "0", (ios::fmtflags) 0 }, - { "0.", -1, "0", (ios::fmtflags) 0 }, - { ".0", -1, "0", (ios::fmtflags) 0 }, - { "+.0", -1, "0", (ios::fmtflags) 0 }, - { "-.0", -1, "0", (ios::fmtflags) 0 }, - { "+0.00", -1, "0", (ios::fmtflags) 0 }, - { "-0.000", -1, "0", (ios::fmtflags) 0 }, - { "+0.00", -1, "0", (ios::fmtflags) 0 }, - { "-0.000", -1, "0", (ios::fmtflags) 0 }, - { "0.0e0", -1, "0", (ios::fmtflags) 0 }, - { "0.e0", -1, "0", (ios::fmtflags) 0 }, - { ".0e0", -1, "0", (ios::fmtflags) 0 }, - { "0.0e-0", -1, "0", (ios::fmtflags) 0 }, - { "0.e-0", -1, "0", (ios::fmtflags) 0 }, - { ".0e-0", -1, "0", (ios::fmtflags) 0 }, - { "0.0e+0", -1, "0", (ios::fmtflags) 0 }, - { "0.e+0", -1, "0", (ios::fmtflags) 0 }, - { ".0e+0", -1, "0", (ios::fmtflags) 0 }, - - { "1", -1, "1", (ios::fmtflags) 0 }, - { "+1", -1, "1", (ios::fmtflags) 0 }, - { "-1", -1, "-1", (ios::fmtflags) 0 }, - - { " 0", 0, NULL, (ios::fmtflags) 0 }, // not without skipws - { " 0", -1, "0", ios::skipws }, - { " +0", -1, "0", ios::skipws }, - { " -0", -1, "0", ios::skipws }, - - { "+-123", 1, NULL, (ios::fmtflags) 0 }, - { "-+123", 1, NULL, (ios::fmtflags) 0 }, - { "1e+-123", 3, NULL, (ios::fmtflags) 0 }, - { "1e-+123", 3, NULL, (ios::fmtflags) 0 }, - - { "e123", 0, NULL, (ios::fmtflags) 0 }, // at least one mantissa digit - { ".e123", 1, NULL, (ios::fmtflags) 0 }, - { "+.e123", 2, NULL, (ios::fmtflags) 0 }, - { "-.e123", 2, NULL, (ios::fmtflags) 0 }, - - { "123e", 4, NULL, (ios::fmtflags) 0 }, // at least one exponent digit - { "123e-", 5, NULL, (ios::fmtflags) 0 }, - { "123e+", 5, NULL, (ios::fmtflags) 0 }, - }; - - mpf_t got, want; - bool got_ok, want_ok; - bool got_eof, want_eof; - double got_d, want_d; - streampos init_tellg, got_pos, want_pos; - - mpf_init (got); - mpf_init (want); - - for (size_t i = 0; i < numberof (data); i++) - { - size_t input_length = strlen (data[i].input); - want_pos = (data[i].want_pos == -1 - ? input_length : data[i].want_pos); - want_eof = (want_pos == streampos(input_length)); - - want_ok = (data[i].want != NULL); - - if (data[i].want != NULL) - mpf_set_str_or_abort (want, data[i].want, 0); - else - mpf_set_ui (want, 0L); - - want_d = mpf_get_d (want); - if (option_check_standard && mpf_cmp_d (want, want_d) == 0) - { - istringstream input (data[i].input); - input.flags (data[i].flags); - init_tellg = input.tellg(); - - input >> got_d; - got_ok = !input.fail(); - got_eof = input.eof(); - input.clear(); - got_pos = input.tellg() - init_tellg; - - if (got_ok != want_ok) - { - WRONG ("stdc++ operator>> wrong status, check_mpf"); - cout << " want_ok: " << want_ok << "\n"; - cout << " got_ok: " << got_ok << "\n"; - } - if (want_ok && want_d != got_d) - { - WRONG ("stdc++ operator>> wrong result, check_mpf"); - cout << " got: " << got_d << "\n"; - cout << " want: " << want_d << "\n"; - } - if (want_ok && got_eof != want_eof) - { - WRONG ("stdc++ operator>> wrong EOF state, check_mpf"); - cout << " got_eof: " << got_eof << "\n"; - cout << " want_eof: " << want_eof << "\n"; - } - if (putback_tellg_works && got_pos != want_pos) - { - WRONG ("stdc++ operator>> wrong position, check_mpf"); - cout << " want_pos: " << want_pos << "\n"; - cout << " got_pos: " << got_pos << "\n"; - } - } - - { - istringstream input (data[i].input); - input.flags (data[i].flags); - init_tellg = input.tellg(); - - mpf_set_ui (got, 0xDEAD); - input >> got; - got_ok = !input.fail(); - got_eof = input.eof(); - input.clear(); - got_pos = input.tellg() - init_tellg; - - if (got_ok != want_ok) - { - WRONG ("mpf operator>> wrong status"); - cout << " want_ok: " << want_ok << "\n"; - cout << " got_ok: " << got_ok << "\n"; - abort (); - } - if (want_ok && mpf_cmp (got, want) != 0) - { - WRONG ("mpf operator>> wrong result"); - mpf_trace (" got ", got); - mpf_trace (" want", want); - abort (); - } - if (want_ok && got_eof != want_eof) - { - WRONG ("mpf operator>> wrong EOF state"); - cout << " want_eof: " << want_eof << "\n"; - cout << " got_eof: " << got_eof << "\n"; - abort (); - } - if (putback_tellg_works && got_pos != want_pos) - { - WRONG ("mpf operator>> wrong position"); - cout << " want_pos: " << want_pos << "\n"; - cout << " got_pos: " << got_pos << "\n"; - abort (); - } - } - } - - mpf_clear (got); - mpf_clear (want); -} - - - -int -main (int argc, char *argv[]) -{ - if (argc > 1 && strcmp (argv[1], "-s") == 0) - option_check_standard = true; - - tests_start (); - - check_putback_tellg (); - check_mpz (); - check_mpq (); - check_mpf (); - - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-locale.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-locale.cc deleted file mode 100644 index 01eacda9f23..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-locale.cc +++ /dev/null @@ -1,195 +0,0 @@ -/* Test locale support in C++ functions. - -Copyright 2001-2003, 2007 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <clocale> -#include <iostream> -#include <cstdlib> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -using namespace std; - - -extern "C" { - char point_string[2]; -} - -#if HAVE_STD__LOCALE -// Like std::numpunct, but with decimal_point coming from point_string[]. -class my_numpunct : public numpunct<char> { - public: - explicit my_numpunct (size_t r = 0) : numpunct<char>(r) { } - protected: - char do_decimal_point() const { return point_string[0]; } -}; -#endif - -void -set_point (char c) -{ - point_string[0] = c; - -#if HAVE_STD__LOCALE - locale loc (locale::classic(), new my_numpunct ()); - locale::global (loc); -#endif -} - - -void -check_input (void) -{ - static const struct { - const char *str1; - const char *str2; - double want; - } data[] = { - - { "1","", 1.0 }, - { "1","0", 1.0 }, - { "1","00", 1.0 }, - - { "","5", 0.5 }, - { "0","5", 0.5 }, - { "00","5", 0.5 }, - { "00","50", 0.5 }, - - { "1","5", 1.5 }, - { "1","5e1", 15.0 }, - }; - - static char point[] = { - '.', ',', 'x', '\xFF' - }; - - mpf_t got; - mpf_init (got); - - for (size_t i = 0; i < numberof (point); i++) - { - set_point (point[i]); - - for (int neg = 0; neg <= 1; neg++) - { - for (size_t j = 0; j < numberof (data); j++) - { - string str = string(data[j].str1)+point[i]+string(data[j].str2); - if (neg) - str = "-" + str; - - istringstream is (str.c_str()); - - mpf_set_ui (got, 123); // dummy initial value - - if (! (is >> got)) - { - cout << "istream mpf_t operator>> error\n"; - cout << " point " << point[i] << "\n"; - cout << " str \"" << str << "\"\n"; - cout << " localeconv point \"" - << GMP_DECIMAL_POINT << "\"\n"; - abort (); - } - - double want = data[j].want; - if (neg) - want = -want; - if (mpf_cmp_d (got, want) != 0) - { - cout << "istream mpf_t operator>> wrong\n"; - cout << " point " << point[i] << "\n"; - cout << " str \"" << str << "\"\n"; - cout << " got " << got << "\n"; - cout << " want " << want << "\n"; - cout << " localeconv point \"" - << GMP_DECIMAL_POINT << "\"\n"; - abort (); - } - } - } - } - - mpf_clear (got); -} - -void -check_output (void) -{ - static char point[] = { - '.', ',', 'x', '\xFF' - }; - - for (size_t i = 0; i < numberof (point); i++) - { - set_point (point[i]); - ostringstream got; - - mpf_t f; - mpf_init (f); - mpf_set_d (f, 1.5); - got << f; - mpf_clear (f); - - string want = string("1") + point[i] + string("5"); - - if (want.compare (got.str()) != 0) - { - cout << "ostream mpf_t operator<< doesn't respect locale\n"; - cout << " point " << point[i] << "\n"; - cout << " got \"" << got.str() << "\"\n"; - cout << " want \"" << want << "\"\n"; - abort (); - } - } -} - -int -replacement_works (void) -{ - set_point ('x'); - mpf_t f; - mpf_init (f); - mpf_set_d (f, 1.5); - ostringstream s; - s << f; - mpf_clear (f); - - return (s.str().compare("1x5") == 0); -} - -int -main (void) -{ - tests_start (); - - if (replacement_works()) - { - check_input (); - check_output (); - } - else - { - cout << "Replacing decimal point didn't work, tests skipped\n"; - } - - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-misc.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-misc.cc deleted file mode 100644 index 07079880e7a..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-misc.cc +++ /dev/null @@ -1,398 +0,0 @@ -/* Test mp*_class functions. - -Copyright 2002, 2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -/* Note that we don't use <climits> for LONG_MIN, but instead our own - definitions in gmp-impl.h. In g++ 2.95.4 (debian 3.0) under - -mcpu=ultrasparc, limits.h sees __sparc_v9__ defined and assumes that - means long is 64-bit long, but it's only 32-bits, causing fatal compile - errors. */ - -#include "config.h" - -#include <string> - -#include "gmp.h" -#include "gmpxx.h" -#include "gmp-impl.h" -#include "tests.h" - -using namespace std; - - -void -check_mpz (void) -{ - // mpz_class::fits_sint_p - { - bool fits; - mpz_class z; - z = INT_MIN; fits = z.fits_sint_p(); ASSERT_ALWAYS (fits); - z--; fits = z.fits_sint_p(); ASSERT_ALWAYS (! fits); - z = INT_MAX; fits = z.fits_sint_p(); ASSERT_ALWAYS (fits); - z++; fits = z.fits_sint_p(); ASSERT_ALWAYS (! fits); - } - - // mpz_class::fits_uint_p - { - bool fits; - mpz_class z; - z = 0; fits = z.fits_uint_p(); ASSERT_ALWAYS (fits); - z--; fits = z.fits_uint_p(); ASSERT_ALWAYS (! fits); - z = UINT_MAX; fits = z.fits_uint_p(); ASSERT_ALWAYS (fits); - z++; fits = z.fits_uint_p(); ASSERT_ALWAYS (! fits); - } - - // mpz_class::fits_slong_p - { - bool fits; - mpz_class z; - z = LONG_MIN; fits = z.fits_slong_p(); ASSERT_ALWAYS (fits); - z--; fits = z.fits_slong_p(); ASSERT_ALWAYS (! fits); - z = LONG_MAX; fits = z.fits_slong_p(); ASSERT_ALWAYS (fits); - z++; fits = z.fits_slong_p(); ASSERT_ALWAYS (! fits); - } - - // mpz_class::fits_ulong_p - { - bool fits; - mpz_class z; - z = 0; fits = z.fits_ulong_p(); ASSERT_ALWAYS (fits); - z--; fits = z.fits_ulong_p(); ASSERT_ALWAYS (! fits); - z = ULONG_MAX; fits = z.fits_ulong_p(); ASSERT_ALWAYS (fits); - z++; fits = z.fits_ulong_p(); ASSERT_ALWAYS (! fits); - } - - // mpz_class::fits_sshort_p - { - bool fits; - mpz_class z; - z = SHRT_MIN; fits = z.fits_sshort_p(); ASSERT_ALWAYS (fits); - z--; fits = z.fits_sshort_p(); ASSERT_ALWAYS (! fits); - z = SHRT_MAX; fits = z.fits_sshort_p(); ASSERT_ALWAYS (fits); - z++; fits = z.fits_sshort_p(); ASSERT_ALWAYS (! fits); - } - - // mpz_class::fits_ushort_p - { - bool fits; - mpz_class z; - z = 0; fits = z.fits_ushort_p(); ASSERT_ALWAYS (fits); - z--; fits = z.fits_ushort_p(); ASSERT_ALWAYS (! fits); - z = USHRT_MAX; fits = z.fits_ushort_p(); ASSERT_ALWAYS (fits); - z++; fits = z.fits_ushort_p(); ASSERT_ALWAYS (! fits); - } - - // mpz_class::get_mpz_t - { - mpz_class z(0); - mpz_ptr p = z.get_mpz_t(); - ASSERT_ALWAYS (mpz_cmp_ui (p, 0) == 0); - } - { - mpz_class z(0); - mpz_srcptr p = z.get_mpz_t(); - ASSERT_ALWAYS (mpz_cmp_ui (p, 0) == 0); - } - - // mpz_class::get_d - // mpz_class::get_si - // mpz_class::get_ui - { - mpz_class z(123); - { double d = z.get_d(); ASSERT_ALWAYS (d == 123.0); } - { long l = z.get_si(); ASSERT_ALWAYS (l == 123L); } - { long u = z.get_ui(); ASSERT_ALWAYS (u == 123L); } - } - { - mpz_class z(-123); - { double d = z.get_d(); ASSERT_ALWAYS (d == -123.0); } - { long l = z.get_si(); ASSERT_ALWAYS (l == -123L); } - } - - // mpz_class::get_str - { - mpz_class z(123); - string s; - s = z.get_str(); ASSERT_ALWAYS (s == "123"); - s = z.get_str(16); ASSERT_ALWAYS (s == "7b"); - s = z.get_str(-16); ASSERT_ALWAYS (s == "7B"); - } - - // mpz_class::set_str - { - mpz_class z; - int ret; - ret = z.set_str ("123", 10); ASSERT_ALWAYS (ret == 0 && z == 123); - ret = z.set_str ("7b", 16); ASSERT_ALWAYS (ret == 0 && z == 123); - ret = z.set_str ("7B", 16); ASSERT_ALWAYS (ret == 0 && z == 123); - ret = z.set_str ("0x7B", 0); ASSERT_ALWAYS (ret == 0 && z == 123); - - ret = z.set_str (string("123"), 10); ASSERT_ALWAYS (ret == 0 && z == 123); - ret = z.set_str (string("7b"), 16); ASSERT_ALWAYS (ret == 0 && z == 123); - ret = z.set_str (string("7B"), 16); ASSERT_ALWAYS (ret == 0 && z == 123); - ret = z.set_str (string("0x7B"), 0); ASSERT_ALWAYS (ret == 0 && z == 123); - } -} - -void -check_mpq (void) -{ - // mpq_class::canonicalize - { - mpq_class q(12,9); - q.canonicalize(); - ASSERT_ALWAYS (q.get_num() == 4); - ASSERT_ALWAYS (q.get_den() == 3); - } - - // mpq_class::get_d - { - mpq_class q(123); - { double d = q.get_d(); ASSERT_ALWAYS (d == 123.0); } - } - { - mpq_class q(-123); - { double d = q.get_d(); ASSERT_ALWAYS (d == -123.0); } - } - - // mpq_class::get_mpq_t - { - mpq_class q(0); - mpq_ptr p = q.get_mpq_t(); - ASSERT_ALWAYS (mpq_cmp_ui (p, 0, 1) == 0); - } - { - mpq_class q(0); - mpq_srcptr p = q.get_mpq_t(); - ASSERT_ALWAYS (mpq_cmp_ui (p, 0, 1) == 0); - } - - // mpq_class::get_num, mpq_class::get_den - { - const mpq_class q(4,5); - mpz_class z; - z = q.get_num(); ASSERT_ALWAYS (z == 4); - z = q.get_den(); ASSERT_ALWAYS (z == 5); - } - - // mpq_class::get_num_mpz_t, mpq_class::get_den_mpz_t - { - mpq_class q(4,5); - mpz_ptr p; - p = q.get_num_mpz_t(); ASSERT_ALWAYS (mpz_cmp_ui (p, 4) == 0); - p = q.get_den_mpz_t(); ASSERT_ALWAYS (mpz_cmp_ui (p, 5) == 0); - } - { - const mpq_class q(4,5); - mpz_srcptr p; - p = q.get_num_mpz_t(); ASSERT_ALWAYS (mpz_cmp_ui (p, 4) == 0); - p = q.get_den_mpz_t(); ASSERT_ALWAYS (mpz_cmp_ui (p, 5) == 0); - } - - // mpq_class::get_str - { - mpq_class q(17,11); - string s; - s = q.get_str(); ASSERT_ALWAYS (s == "17/11"); - s = q.get_str(10); ASSERT_ALWAYS (s == "17/11"); - s = q.get_str(16); ASSERT_ALWAYS (s == "11/b"); - s = q.get_str(-16); ASSERT_ALWAYS (s == "11/B"); - } - - // mpq_class::set_str - { - mpq_class q; - int ret; - ret = q.set_str ("123", 10); ASSERT_ALWAYS (ret == 0 && q == 123); - ret = q.set_str ("4/5", 10); ASSERT_ALWAYS (ret == 0 && q == mpq_class(4,5)); - ret = q.set_str ("7b", 16); ASSERT_ALWAYS (ret == 0 && q == 123); - ret = q.set_str ("7B", 16); ASSERT_ALWAYS (ret == 0 && q == 123); - ret = q.set_str ("0x7B", 0); ASSERT_ALWAYS (ret == 0 && q == 123); - ret = q.set_str ("0x10/17", 0); ASSERT_ALWAYS (ret == 0 && q == mpq_class(16,17)); - - ret = q.set_str (string("4/5"), 10); ASSERT_ALWAYS (ret == 0 && q == mpq_class(4,5)); - ret = q.set_str (string("123"), 10); ASSERT_ALWAYS (ret == 0 && q == 123); - ret = q.set_str (string("7b"), 16); ASSERT_ALWAYS (ret == 0 && q == 123); - ret = q.set_str (string("7B"), 16); ASSERT_ALWAYS (ret == 0 && q == 123); - ret = q.set_str (string("0x7B"), 0); ASSERT_ALWAYS (ret == 0 && q == 123); - ret = q.set_str (string("0x10/17"), 0); ASSERT_ALWAYS (ret == 0 && q == mpq_class(16,17)); - } -} - -void -check_mpf (void) -{ - // mpf_class::fits_sint_p - { - bool fits; - mpf_class f (0, 2*8*sizeof(int)); - f = INT_MIN; fits = f.fits_sint_p(); ASSERT_ALWAYS (fits); - f--; fits = f.fits_sint_p(); ASSERT_ALWAYS (! fits); - f = INT_MAX; fits = f.fits_sint_p(); ASSERT_ALWAYS (fits); - f++; fits = f.fits_sint_p(); ASSERT_ALWAYS (! fits); - } - - // mpf_class::fits_uint_p - { - bool fits; - mpf_class f (0, 2*8*sizeof(int)); - f = 0; fits = f.fits_uint_p(); ASSERT_ALWAYS (fits); - f--; fits = f.fits_uint_p(); ASSERT_ALWAYS (! fits); - f = UINT_MAX; fits = f.fits_uint_p(); ASSERT_ALWAYS (fits); - f++; fits = f.fits_uint_p(); ASSERT_ALWAYS (! fits); - } - - // mpf_class::fits_slong_p - { - bool fits; - mpf_class f (0, 2*8*sizeof(long)); - f = LONG_MIN; fits = f.fits_slong_p(); ASSERT_ALWAYS (fits); - f--; fits = f.fits_slong_p(); ASSERT_ALWAYS (! fits); - f = LONG_MAX; fits = f.fits_slong_p(); ASSERT_ALWAYS (fits); - f++; fits = f.fits_slong_p(); ASSERT_ALWAYS (! fits); - } - - // mpf_class::fits_ulong_p - { - bool fits; - mpf_class f (0, 2*8*sizeof(long)); - f = 0; fits = f.fits_ulong_p(); ASSERT_ALWAYS (fits); - f--; fits = f.fits_ulong_p(); ASSERT_ALWAYS (! fits); - f = ULONG_MAX; fits = f.fits_ulong_p(); ASSERT_ALWAYS (fits); - f++; fits = f.fits_ulong_p(); ASSERT_ALWAYS (! fits); - } - - // mpf_class::fits_sshort_p - { - bool fits; - mpf_class f (0, 2*8*sizeof(short)); - f = SHRT_MIN; fits = f.fits_sshort_p(); ASSERT_ALWAYS (fits); - f--; fits = f.fits_sshort_p(); ASSERT_ALWAYS (! fits); - f = SHRT_MAX; fits = f.fits_sshort_p(); ASSERT_ALWAYS (fits); - f++; fits = f.fits_sshort_p(); ASSERT_ALWAYS (! fits); - } - - // mpf_class::fits_ushort_p - { - bool fits; - mpf_class f (0, 2*8*sizeof(short)); - f = 0; fits = f.fits_ushort_p(); ASSERT_ALWAYS (fits); - f--; fits = f.fits_ushort_p(); ASSERT_ALWAYS (! fits); - f = USHRT_MAX; fits = f.fits_ushort_p(); ASSERT_ALWAYS (fits); - f++; fits = f.fits_ushort_p(); ASSERT_ALWAYS (! fits); - } - - // mpf_class::get_d - // mpf_class::get_si - // mpf_class::get_ui - { - mpf_class f(123); - { double d = f.get_d(); ASSERT_ALWAYS (d == 123.0); } - { long l = f.get_si(); ASSERT_ALWAYS (l == 123L); } - { long u = f.get_ui(); ASSERT_ALWAYS (u == 123L); } - } - { - mpf_class f(-123); - { double d = f.get_d(); ASSERT_ALWAYS (d == -123.0); } - { long l = f.get_si(); ASSERT_ALWAYS (l == -123L); } - } - - // mpf_class::get_prec - { - mpf_class f; - ASSERT_ALWAYS (f.get_prec() == mpf_get_default_prec()); - } - - // mpf_class::get_str - { - mpf_class f(123); - string s; - mp_exp_t e; - s = f.get_str(e); ASSERT_ALWAYS (s == "123" && e == 3); - s = f.get_str(e, 16); ASSERT_ALWAYS (s == "7b" && e == 2); - s = f.get_str(e, -16); ASSERT_ALWAYS (s == "7B" && e == 2); - s = f.get_str(e, 10, 2); ASSERT_ALWAYS (s == "12" && e == 3); - s = f.get_str(e, 10, 1); ASSERT_ALWAYS (s == "1" && e == 3); - } - - // mpf_class::set_str - { - mpf_class f; - int ret; - ret = f.set_str ("123", 10); ASSERT_ALWAYS (ret == 0 && f == 123); - ret = f.set_str ("123e1", 10); ASSERT_ALWAYS (ret == 0 && f == 1230); - ret = f.set_str ("1230e-1", 10); ASSERT_ALWAYS (ret == 0 && f == 123); - ret = f.set_str ("7b", 16); ASSERT_ALWAYS (ret == 0 && f == 123); - ret = f.set_str ("7B", 16); ASSERT_ALWAYS (ret == 0 && f == 123); - ret = f.set_str ("7B@1", 16); ASSERT_ALWAYS (ret == 0 && f == 1968); - ret = f.set_str ("7B0@-1", 16); ASSERT_ALWAYS (ret == 0 && f == 123); - - ret = f.set_str (string("123"), 10); ASSERT_ALWAYS (ret == 0 && f == 123); - ret = f.set_str (string("123e1"), 10); ASSERT_ALWAYS (ret == 0 && f == 1230); - ret = f.set_str (string("1230e-1"), 10); ASSERT_ALWAYS (ret == 0 && f == 123); - ret = f.set_str (string("7b"), 16); ASSERT_ALWAYS (ret == 0 && f == 123); - ret = f.set_str (string("7B"), 16); ASSERT_ALWAYS (ret == 0 && f == 123); - ret = f.set_str (string("7B@1"), 16); ASSERT_ALWAYS (ret == 0 && f == 1968); - ret = f.set_str (string("7B0@-1"), 16); ASSERT_ALWAYS (ret == 0 && f == 123); - } - - // mpf_class::set_prec - { - mpf_class f; - f.set_prec (256); - ASSERT_ALWAYS (f.get_prec () >= 256); - } - - // mpf_class::set_prec_raw - { - mpf_class f (0, 100 * GMP_NUMB_BITS); - f.set_prec_raw (5 * GMP_NUMB_BITS); - ASSERT_ALWAYS (f.get_prec () >= 5 * GMP_NUMB_BITS); - ASSERT_ALWAYS (f.get_prec () < 100 * GMP_NUMB_BITS); - f.set_prec_raw (100 * GMP_NUMB_BITS); - } -} - -// std::numeric_limits -void -check_limits (void) -{ - // Check that the content is not private. - ASSERT_ALWAYS ( std::numeric_limits<mpz_class>::is_integer); - ASSERT_ALWAYS (!std::numeric_limits<mpf_class>::is_integer); - - // Check that symbols are emitted. - ASSERT_ALWAYS (&std::numeric_limits<mpz_class>::is_integer - != &std::numeric_limits<mpq_class>::is_integer); -} - -int -main (void) -{ - tests_start(); - - check_mpz(); - check_mpq(); - check_mpf(); - check_limits(); - - tests_end(); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-mix.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-mix.cc deleted file mode 100644 index aeb6f675890..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-mix.cc +++ /dev/null @@ -1,83 +0,0 @@ -/* Test legality of conversion between the different mp*_class - -Copyright 2011 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include "gmp.h" -#include "gmpxx.h" -#include "gmp-impl.h" -#include "tests.h" - -int f_z (mpz_class){return 0;} -int f_q (mpq_class){return 1;} -int f_f (mpf_class){return 2;} -int f_zq (mpz_class){return 0;} -int f_zq (mpq_class){return 1;} -int f_zf (mpz_class){return 0;} -int f_zf (mpf_class){return 2;} -int f_qf (mpq_class){return 1;} -int f_qf (mpf_class){return 2;} -int f_zqf(mpz_class){return 0;} -int f_zqf(mpq_class){return 1;} -int f_zqf(mpf_class){return 2;} - -void -check (void) -{ - mpz_class z=42; - mpq_class q=33; - mpf_class f=18; - - ASSERT_ALWAYS(f_z (z)==0); ASSERT_ALWAYS(f_z (-z)==0); - ASSERT_ALWAYS(f_q (z)==1); ASSERT_ALWAYS(f_q (-z)==1); - ASSERT_ALWAYS(f_q (q)==1); ASSERT_ALWAYS(f_q (-q)==1); - ASSERT_ALWAYS(f_f (z)==2); ASSERT_ALWAYS(f_f (-z)==2); - ASSERT_ALWAYS(f_f (q)==2); ASSERT_ALWAYS(f_f (-q)==2); - ASSERT_ALWAYS(f_f (f)==2); ASSERT_ALWAYS(f_f (-f)==2); - ASSERT_ALWAYS(f_zq (z)==0); - ASSERT_ALWAYS(f_zq (q)==1); ASSERT_ALWAYS(f_zq (-q)==1); - ASSERT_ALWAYS(f_zf (z)==0); - ASSERT_ALWAYS(f_zf (f)==2); ASSERT_ALWAYS(f_zf (-f)==2); - ASSERT_ALWAYS(f_qf (q)==1); - ASSERT_ALWAYS(f_qf (f)==2); ASSERT_ALWAYS(f_qf (-f)==2); - ASSERT_ALWAYS(f_zqf(z)==0); - ASSERT_ALWAYS(f_zqf(q)==1); - ASSERT_ALWAYS(f_zqf(f)==2); ASSERT_ALWAYS(f_zqf(-f)==2); - - ASSERT_ALWAYS(f_zqf(mpz_class(z))==0); ASSERT_ALWAYS(f_zqf(mpz_class(-z))==0); - ASSERT_ALWAYS(f_zqf(mpz_class(q))==0); ASSERT_ALWAYS(f_zqf(mpz_class(-q))==0); - ASSERT_ALWAYS(f_zqf(mpz_class(f))==0); ASSERT_ALWAYS(f_zqf(mpz_class(-f))==0); - ASSERT_ALWAYS(f_zqf(mpq_class(z))==1); ASSERT_ALWAYS(f_zqf(mpq_class(-z))==1); - ASSERT_ALWAYS(f_zqf(mpq_class(q))==1); ASSERT_ALWAYS(f_zqf(mpq_class(-q))==1); - ASSERT_ALWAYS(f_zqf(mpq_class(f))==1); ASSERT_ALWAYS(f_zqf(mpq_class(-f))==1); - ASSERT_ALWAYS(f_zqf(mpf_class(z))==2); ASSERT_ALWAYS(f_zqf(mpf_class(-z))==2); - ASSERT_ALWAYS(f_zqf(mpf_class(q))==2); ASSERT_ALWAYS(f_zqf(mpf_class(-q))==2); - ASSERT_ALWAYS(f_zqf(mpf_class(f))==2); ASSERT_ALWAYS(f_zqf(mpf_class(-f))==2); -} - -int -main (void) -{ - tests_start(); - - check(); - - tests_end(); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ops.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ops.cc deleted file mode 100644 index d298b6b3d8b..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ops.cc +++ /dev/null @@ -1,744 +0,0 @@ -/* Test mp*_class operators and functions. - -Copyright 2001-2003, 2015 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <iostream> - -#include "gmp.h" -#include "gmpxx.h" -#include "gmp-impl.h" -#include "tests.h" - -using namespace std; - - -void -check_mpz (void) -{ - // unary operators and functions - - // operator+ - { - mpz_class a(1); - mpz_class b; - b = +a; ASSERT_ALWAYS(b == 1); - } - - // operator- - { - mpz_class a(2); - mpz_class b; - b = -a; ASSERT_ALWAYS(b == -2); - } - - // operator~ - { - mpz_class a(3); - mpz_class b; - b = ~a; ASSERT_ALWAYS(b == -4); - } - - // abs - { - mpz_class a(-123); - mpz_class b; - b = abs(a); ASSERT_ALWAYS(b == 123); - a <<= 300; - b = abs(a); ASSERT_ALWAYS(a + b == 0); - } - - // sqrt - { - mpz_class a(25); - mpz_class b; - b = sqrt(a); ASSERT_ALWAYS(b == 5); - } - { - mpz_class a(125); - mpz_class b; - b = sqrt(a); ASSERT_ALWAYS(b == 11); // round toward zero - } - - // sgn - { - mpz_class a(123); - int b = sgn(a); ASSERT_ALWAYS(b == 1); - } - { - mpz_class a(0); - int b = sgn(a); ASSERT_ALWAYS(b == 0); - } - { - mpz_class a(-123); - int b = sgn(a); ASSERT_ALWAYS(b == -1); - } - - - // binary operators and functions - - // operator+ - { - mpz_class a(1), b(2); - mpz_class c; - c = a + b; ASSERT_ALWAYS(c == 3); - } - { - mpz_class a(3); - signed int b = 4; - mpz_class c; - c = a + b; ASSERT_ALWAYS(c == 7); - } - { - mpz_class a(5); - double b = 6.0; - mpz_class c; - c = b + a; ASSERT_ALWAYS(c == 11); - } - - // operator- - { - mpz_class a(3), b(6); - mpz_class c; - c = a - b; ASSERT_ALWAYS(c == -3); - } - - // operator* - { - mpz_class a(-2), b(4); - mpz_class c; - c = a * b; ASSERT_ALWAYS(c == -8); - } - { - mpz_class a(2); - long b = -4; - mpz_class c; - c = a * b; ASSERT_ALWAYS(c == -8); - c = b * a; ASSERT_ALWAYS(c == -8); - } - { - mpz_class a(-2); - unsigned long b = 4; - mpz_class c; - c = a * b; ASSERT_ALWAYS(c == -8); - c = b * a; ASSERT_ALWAYS(c == -8); - } - - // operator/ and operator% - { - mpz_class a(12), b(4); - mpz_class c; - c = a / b; ASSERT_ALWAYS(c == 3); - c = a % b; ASSERT_ALWAYS(c == 0); - } - { - mpz_class a(7), b(5); - mpz_class c; - c = a / b; ASSERT_ALWAYS(c == 1); - c = a % b; ASSERT_ALWAYS(c == 2); - } - { - mpz_class a(-10); - signed int ai = -10; - mpz_class b(3); - signed int bi = 3; - mpz_class c; - c = a / b; ASSERT_ALWAYS(c == -3); - c = a % b; ASSERT_ALWAYS(c == -1); - c = a / bi; ASSERT_ALWAYS(c == -3); - c = a % bi; ASSERT_ALWAYS(c == -1); - c = ai / b; ASSERT_ALWAYS(c == -3); - c = ai % b; ASSERT_ALWAYS(c == -1); - } - { - mpz_class a(-10); - signed int ai = -10; - mpz_class b(-3); - signed int bi = -3; - mpz_class c; - c = a / b; ASSERT_ALWAYS(c == 3); - c = a % b; ASSERT_ALWAYS(c == -1); - c = a / bi; ASSERT_ALWAYS(c == 3); - c = a % bi; ASSERT_ALWAYS(c == -1); - c = ai / b; ASSERT_ALWAYS(c == 3); - c = ai % b; ASSERT_ALWAYS(c == -1); - } - { - mpz_class a (LONG_MIN); - signed long ai = LONG_MIN; - mpz_class b = - mpz_class (LONG_MIN); - mpz_class c; - c = a / b; ASSERT_ALWAYS(c == -1); - c = a % b; ASSERT_ALWAYS(c == 0); - c = ai / b; ASSERT_ALWAYS(c == -1); - c = ai % b; ASSERT_ALWAYS(c == 0); - } - - // operator& - // operator| - // operator^ - - // operator<< - { - mpz_class a(3); - unsigned int b = 4; - mpz_class c; - c = a << b; ASSERT_ALWAYS(c == 48); - } - - // operator>> - { - mpz_class a(127); - unsigned int b = 4; - mpz_class c; - c = a >> b; ASSERT_ALWAYS(c == 7); - } - - // operator== - // operator!= - // operator< - // operator<= - // operator> - // operator>= - - // cmp - { - mpz_class a(123), b(45); - int c; - c = cmp(a, b); ASSERT_ALWAYS(c > 0); - c = cmp(b, a); ASSERT_ALWAYS(c < 0); - } - { - mpz_class a(123); - unsigned long b = 45; - int c; - c = cmp(a, b); ASSERT_ALWAYS(c > 0); - c = cmp(b, a); ASSERT_ALWAYS(c < 0); - } - { - mpz_class a(123); - long b = 45; - int c; - c = cmp(a, b); ASSERT_ALWAYS(c > 0); - c = cmp(b, a); ASSERT_ALWAYS(c < 0); - } - { - mpz_class a(123); - double b = 45; - int c; - c = cmp(a, b); ASSERT_ALWAYS(c > 0); - c = cmp(b, a); ASSERT_ALWAYS(c < 0); - } - - - // ternary operators - - // mpz_addmul - { - mpz_class a(1), b(2), c(3); - mpz_class d; - d = a + b * c; ASSERT_ALWAYS(d == 7); - } - { - mpz_class a(1), b(2); - unsigned int c = 3; - mpz_class d; - d = a + b * c; ASSERT_ALWAYS(d == 7); - } - { - mpz_class a(1), b(3); - unsigned int c = 2; - mpz_class d; - d = a + c * b; ASSERT_ALWAYS(d == 7); - } - { - mpz_class a(1), b(2); - signed int c = 3; - mpz_class d; - d = a + b * c; ASSERT_ALWAYS(d == 7); - } - { - mpz_class a(1), b(3); - signed int c = 2; - mpz_class d; - d = a + c * b; ASSERT_ALWAYS(d == 7); - } - { - mpz_class a(1), b(2); - double c = 3.0; - mpz_class d; - d = a + b * c; ASSERT_ALWAYS(d == 7); - } - { - mpz_class a(1), b(3); - double c = 2.0; - mpz_class d; - d = a + c * b; ASSERT_ALWAYS(d == 7); - } - - { - mpz_class a(2), b(3), c(4); - mpz_class d; - d = a * b + c; ASSERT_ALWAYS(d == 10); - } - { - mpz_class a(2), b(4); - unsigned int c = 3; - mpz_class d; - d = a * c + b; ASSERT_ALWAYS(d == 10); - } - { - mpz_class a(3), b(4); - unsigned int c = 2; - mpz_class d; - d = c * a + b; ASSERT_ALWAYS(d == 10); - } - { - mpz_class a(2), b(4); - signed int c = 3; - mpz_class d; - d = a * c + b; ASSERT_ALWAYS(d == 10); - } - { - mpz_class a(3), b(4); - signed int c = 2; - mpz_class d; - d = c * a + b; ASSERT_ALWAYS(d == 10); - } - { - mpz_class a(2), b(4); - double c = 3.0; - mpz_class d; - d = a * c + b; ASSERT_ALWAYS(d == 10); - } - { - mpz_class a(3), b(4); - double c = 2.0; - mpz_class d; - d = c * a + b; ASSERT_ALWAYS(d == 10); - } - - // mpz_submul - { - mpz_class a(1), b(2), c(3); - mpz_class d; - d = a - b * c; ASSERT_ALWAYS(d == -5); - } - { - mpz_class a(1), b(2); - unsigned int c = 3; - mpz_class d; - d = a - b * c; ASSERT_ALWAYS(d == -5); - } - { - mpz_class a(1), b(3); - unsigned int c = 2; - mpz_class d; - d = a - c * b; ASSERT_ALWAYS(d == -5); - } - { - mpz_class a(1), b(2); - signed int c = 3; - mpz_class d; - d = a - b * c; ASSERT_ALWAYS(d == -5); - } - { - mpz_class a(1), b(3); - signed int c = 2; - mpz_class d; - d = a - c * b; ASSERT_ALWAYS(d == -5); - } - { - mpz_class a(1), b(2); - double c = 3.0; - mpz_class d; - d = a - b * c; ASSERT_ALWAYS(d == -5); - } - { - mpz_class a(1), b(3); - double c = 2.0; - mpz_class d; - d = a - c * b; ASSERT_ALWAYS(d == -5); - } - - { - mpz_class a(2), b(3), c(4); - mpz_class d; - d = a * b - c; ASSERT_ALWAYS(d == 2); - } - { - mpz_class a(2), b(4); - unsigned int c = 3; - mpz_class d; - d = a * c - b; ASSERT_ALWAYS(d == 2); - } - { - mpz_class a(3), b(4); - unsigned int c = 2; - mpz_class d; - d = c * a - b; ASSERT_ALWAYS(d == 2); - } - { - mpz_class a(2), b(4); - signed int c = 3; - mpz_class d; - d = a * c - b; ASSERT_ALWAYS(d == 2); - } - { - mpz_class a(3), b(4); - signed int c = 2; - mpz_class d; - d = c * a - b; ASSERT_ALWAYS(d == 2); - } - { - mpz_class a(2), b(4); - double c = 3.0; - mpz_class d; - d = a * c - b; ASSERT_ALWAYS(d == 2); - } - { - mpz_class a(3), b(4); - double c = 2.0; - mpz_class d; - d = c * a - b; ASSERT_ALWAYS(d == 2); - } -} - -void -check_mpq (void) -{ - // unary operators and functions - - // operator+ - { - mpq_class a(1, 2); - mpq_class b; - b = +a; ASSERT_ALWAYS(b == 0.5); - } - - // operator- - { - mpq_class a(3, 4); - mpq_class b; - b = -a; ASSERT_ALWAYS(b == -0.75); - } - - // abs - { - mpq_class a(-123); - mpq_class b; - b = abs(a); ASSERT_ALWAYS(b == 123); - } - - // sgn - { - mpq_class a(123); - int b = sgn(a); ASSERT_ALWAYS(b == 1); - } - { - mpq_class a(0); - int b = sgn(a); ASSERT_ALWAYS(b == 0); - } - { - mpq_class a(-123); - int b = sgn(a); ASSERT_ALWAYS(b == -1); - } - - - // binary operators and functions - - // operator+ - { - mpq_class a(1, 2), b(3, 4); - mpq_class c; - c = a + b; ASSERT_ALWAYS(c == 1.25); - } - { - mpq_class a(1, 2); - signed int b = 2; - mpq_class c; - c = a + b; ASSERT_ALWAYS(c == 2.5); - } - { - mpq_class a(1, 2); - double b = 1.5; - mpq_class c; - c = b + a; ASSERT_ALWAYS(c == 2); - } - - // operator- - { - mpq_class a(1, 2), b(3, 4); - mpq_class c; - c = a - b; ASSERT_ALWAYS(c == -0.25); - } - - // operator* - { - mpq_class a(1, 3), b(3, 4); - mpq_class c; - c = a * b; ASSERT_ALWAYS(c == 0.25); - c = b * b; ASSERT_ALWAYS(c == 0.5625); - } - - // operator/ - { - mpq_class a(1, 2), b(2, 3); - mpq_class c; - c = a / b; ASSERT_ALWAYS(c == 0.75); - } - - // operator<< - // operator>> - // operator== - // operator!= - // operator< - // operator<= - // operator> - // operator>= - - // cmp - { - mpq_class a(123), b(45); - int c; - c = cmp(a, b); ASSERT_ALWAYS(c > 0); - c = cmp(b, a); ASSERT_ALWAYS(c < 0); - } - { - mpq_class a(123); - unsigned long b = 45; - int c; - c = cmp(a, b); ASSERT_ALWAYS(c > 0); - c = cmp(b, a); ASSERT_ALWAYS(c < 0); - } - { - mpq_class a(123); - long b = 45; - int c; - c = cmp(a, b); ASSERT_ALWAYS(c > 0); - c = cmp(b, a); ASSERT_ALWAYS(c < 0); - } - { - mpq_class a(123); - double b = 45; - int c; - c = cmp(a, b); ASSERT_ALWAYS(c > 0); - c = cmp(b, a); ASSERT_ALWAYS(c < 0); - } - { - mpq_class a(123); - mpz_class b(45); - int c; - c = cmp(a, b); ASSERT_ALWAYS(c > 0); - c = cmp(b, a); ASSERT_ALWAYS(c < 0); - } -} - -void -check_mpf (void) -{ - // unary operators and functions - - // operator+ - { - mpf_class a(1); - mpf_class b; - b = +a; ASSERT_ALWAYS(b == 1); - } - - // operator- - { - mpf_class a(2); - mpf_class b; - b = -a; ASSERT_ALWAYS(b == -2); - } - - // abs - { - mpf_class a(-123); - mpf_class b; - b = abs(a); ASSERT_ALWAYS(b == 123); - } - - // trunc - { - mpf_class a(1.5); - mpf_class b; - b = trunc(a); ASSERT_ALWAYS(b == 1); - } - { - mpf_class a(-1.5); - mpf_class b; - b = trunc(a); ASSERT_ALWAYS(b == -1); - } - - // floor - { - mpf_class a(1.9); - mpf_class b; - b = floor(a); ASSERT_ALWAYS(b == 1); - } - { - mpf_class a(-1.1); - mpf_class b; - b = floor(a); ASSERT_ALWAYS(b == -2); - } - - // ceil - { - mpf_class a(1.1); - mpf_class b; - b = ceil(a); ASSERT_ALWAYS(b == 2); - } - { - mpf_class a(-1.9); - mpf_class b; - b = ceil(a); ASSERT_ALWAYS(b == -1); - } - - // sqrt - { - mpf_class a(25); - mpf_class b; - b = sqrt(a); ASSERT_ALWAYS(b == 5); - } - { - mpf_class a(2.25); - mpf_class b; - b = sqrt(a); ASSERT_ALWAYS(b == 1.5); - } - - // sgn - { - mpf_class a(123); - int b = sgn(a); ASSERT_ALWAYS(b == 1); - } - { - mpf_class a(0); - int b = sgn(a); ASSERT_ALWAYS(b == 0); - } - { - mpf_class a(-123); - int b = sgn(a); ASSERT_ALWAYS(b == -1); - } - - - // binary operators and functions - - // operator+ - { - mpf_class a(1), b(2); - mpf_class c; - c = a + b; ASSERT_ALWAYS(c == 3); - } - - // operator- - { - mpf_class a(3), b(4); - mpf_class c; - c = a - b; ASSERT_ALWAYS(c == -1); - } - - // operator* - { - mpf_class a(2), b(5); - mpf_class c; - c = a * b; ASSERT_ALWAYS(c == 10); - } - - // operator/ - { - mpf_class a(7), b(4); - mpf_class c; - c = a / b; ASSERT_ALWAYS(c == 1.75); - } - - // operator<< - // operator>> - // operator== - // operator!= - // operator< - // operator<= - // operator> - // operator>= - - // hypot - { - mpf_class a(3), b(4); - mpf_class c; - c = hypot(a, b); ASSERT_ALWAYS(c == 5); - } - - // cmp - { - mpf_class a(123), b(45); - int c; - c = cmp(a, b); ASSERT_ALWAYS(c > 0); - c = cmp(b, a); ASSERT_ALWAYS(c < 0); - } - { - mpf_class a(123); - unsigned long b = 45; - int c; - c = cmp(a, b); ASSERT_ALWAYS(c > 0); - c = cmp(b, a); ASSERT_ALWAYS(c < 0); - } - { - mpf_class a(123); - long b = 45; - int c; - c = cmp(a, b); ASSERT_ALWAYS(c > 0); - c = cmp(b, a); ASSERT_ALWAYS(c < 0); - } - { - mpf_class a(123); - double b = 45; - int c; - c = cmp(a, b); ASSERT_ALWAYS(c > 0); - c = cmp(b, a); ASSERT_ALWAYS(c < 0); - } - { - mpf_class a(123); - mpz_class b(45); - int c; - c = cmp(a, b); ASSERT_ALWAYS(c > 0); - c = cmp(b, a); ASSERT_ALWAYS(c < 0); - } - { - mpf_class a(123); - mpq_class b(45); - int c; - c = cmp(a, b); ASSERT_ALWAYS(c > 0); - c = cmp(b, a); ASSERT_ALWAYS(c < 0); - } -} - - -int -main (void) -{ - tests_start(); - - check_mpz(); - check_mpq(); - check_mpf(); - - tests_end(); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ops2.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ops2.cc deleted file mode 100644 index f775a5b7c75..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ops2.cc +++ /dev/null @@ -1,268 +0,0 @@ -/* Test mp*_class operators and functions. - -Copyright 2011, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <math.h> - -#include "gmp.h" -#include "gmpxx.h" -#include "gmp-impl.h" -#include "tests.h" - - -#define CHECK1(Type,a,fun) \ - ASSERT_ALWAYS(fun((Type)(a))==fun(a)) -#define CHECK(Type1,Type2,a,b,op) \ - ASSERT_ALWAYS(((Type1)(a) op (Type2)(b))==((a) op (b))) -#define CHECK_G(Type,a,b,op) \ - CHECK(Type,Type,a,b,op) -#define CHECK_UI(Type,a,b,op) \ - CHECK(Type,unsigned long,a,b,op); \ - CHECK(unsigned long,Type,a,b,op) -#define CHECK_SI(Type,a,b,op) \ - CHECK(Type,long,a,b,op); \ - CHECK(long,Type,a,b,op) -#define CHECK_D(Type,a,b,op) \ - CHECK(Type,double,a,b,op); \ - CHECK(double,Type,a,b,op) -#define CHECK_MPZ(Type,a,b,op) \ - CHECK(Type,mpz_class,a,b,op); \ - CHECK(mpz_class,Type,a,b,op) -#define CHECK_MPQ(Type,a,b,op) \ - CHECK(Type,mpq_class,a,b,op); \ - CHECK(mpq_class,Type,a,b,op) -#define CHECK_ALL_SIGNED(Type,a,b,op) \ - CHECK_G(Type,a,b,op); \ - CHECK_SI(Type,a,b,op); \ - CHECK_D(Type,a,b,op) -#define CHECK_ALL_SIGNS(Type,a,b,op) \ - CHECK_ALL_SIGNED(Type,a,b,op); \ - CHECK_ALL_SIGNED(Type,-(a),b,op); \ - CHECK_ALL_SIGNED(Type,a,-(b),op); \ - CHECK_ALL_SIGNED(Type,-(a),-(b),op) -#define CHECK_ALL(Type,a,b,op) \ - CHECK_ALL_SIGNED(Type,a,b,op); \ - CHECK_UI(Type,a,b,op) -#define CHECK_ALL_SIGNED_COMPARISONS(Type,a,b) \ - CHECK_ALL_SIGNED(Type,a,b,<); \ - CHECK_ALL_SIGNED(Type,a,b,>); \ - CHECK_ALL_SIGNED(Type,a,b,<=); \ - CHECK_ALL_SIGNED(Type,a,b,>=); \ - CHECK_ALL_SIGNED(Type,a,b,==); \ - CHECK_ALL_SIGNED(Type,a,b,!=) -#define CHECK_ALL_SIGNS_COMPARISONS(Type,a,b) \ - CHECK_ALL_SIGNS(Type,a,b,<); \ - CHECK_ALL_SIGNS(Type,a,b,>); \ - CHECK_ALL_SIGNS(Type,a,b,<=); \ - CHECK_ALL_SIGNS(Type,a,b,>=); \ - CHECK_ALL_SIGNS(Type,a,b,==); \ - CHECK_ALL_SIGNS(Type,a,b,!=) -#define CHECK_ALL_COMPARISONS(Type,a,b) \ - CHECK_ALL(Type,a,b,<); \ - CHECK_ALL(Type,a,b,>); \ - CHECK_ALL(Type,a,b,<=); \ - CHECK_ALL(Type,a,b,>=); \ - CHECK_ALL(Type,a,b,==); \ - CHECK_ALL(Type,a,b,!=) - - -void checkz (){ - CHECK_ALL(mpz_class,5,2,+); - CHECK_ALL(mpz_class,5,2,-); - CHECK_ALL(mpz_class,5,2,*); - CHECK_ALL(mpz_class,5,2,/); - CHECK_ALL(mpz_class,5,2,%); - CHECK_ALL_COMPARISONS(mpz_class,5,2); - CHECK_ALL_SIGNS(mpz_class,11,3,+); - CHECK_ALL_SIGNS(mpz_class,11,3,-); - CHECK_ALL_SIGNS(mpz_class,11,3,*); - CHECK_ALL_SIGNS(mpz_class,11,3,/); - CHECK_ALL_SIGNS(mpz_class,11,3,%); - CHECK_ALL_SIGNS(mpz_class,17,2,*); - CHECK_ALL_SIGNS(mpz_class,17,2,/); - CHECK_ALL_SIGNS(mpz_class,17,2,%); - CHECK(unsigned long,mpz_class,5,-2,/); - CHECK(unsigned long,mpz_class,5,-2,%); - ASSERT_ALWAYS(7ul/mpz_class(1e35)==0); - ASSERT_ALWAYS(7ul%mpz_class(1e35)==7); - ASSERT_ALWAYS(7ul/mpz_class(-1e35)==0); - ASSERT_ALWAYS(7ul%mpz_class(-1e35)==7); - CHECK_ALL_SIGNS_COMPARISONS(mpz_class,11,3); - CHECK_ALL(mpz_class,6,3,&); - CHECK_ALL(mpz_class,6,3,|); - CHECK_ALL(mpz_class,6,3,^); - CHECK(mpz_class,unsigned long,6,2,<<); - CHECK(mpz_class,unsigned long,6,2,>>); - CHECK(mpz_class,unsigned long,-13,2,<<); - CHECK(mpz_class,unsigned long,-13,2,>>); - ASSERT_ALWAYS(++mpz_class(7)==8); - ASSERT_ALWAYS(++mpz_class(-8)==-7); - ASSERT_ALWAYS(--mpz_class(8)==7); - ASSERT_ALWAYS(--mpz_class(-7)==-8); - ASSERT_ALWAYS(~mpz_class(7)==-8); - ASSERT_ALWAYS(~mpz_class(-8)==7); - ASSERT_ALWAYS(+mpz_class(7)==7); - ASSERT_ALWAYS(+mpz_class(-8)==-8); - ASSERT_ALWAYS(-mpz_class(7)==-7); - ASSERT_ALWAYS(-mpz_class(-8)==8); - ASSERT_ALWAYS(abs(mpz_class(7))==7); - ASSERT_ALWAYS(abs(mpz_class(-8))==8); - ASSERT_ALWAYS(sqrt(mpz_class(7))==2); - ASSERT_ALWAYS(sqrt(mpz_class(0))==0); - ASSERT_ALWAYS(sgn(mpz_class(0))==0); - ASSERT_ALWAYS(sgn(mpz_class(9))==1); - ASSERT_ALWAYS(sgn(mpz_class(-17))==-1); - ASSERT_ALWAYS(mpz_class(1)+DBL_MAX>2); - ASSERT_ALWAYS(mpz_class(1)+DBL_MIN<2); - ASSERT_ALWAYS(mpz_class(1)+std::numeric_limits<double>::denorm_min()<2); - ASSERT_ALWAYS(gcd(mpz_class(6),mpz_class(8))==2); - ASSERT_ALWAYS(gcd(-mpz_class(6),mpz_class(8))==2); - ASSERT_ALWAYS(gcd(-mpz_class(6),-mpz_class(8))==2); - ASSERT_ALWAYS(gcd(mpz_class(6),8.f)==2); - ASSERT_ALWAYS(gcd(-mpz_class(6),static_cast<unsigned char>(8))==2); - ASSERT_ALWAYS(gcd(static_cast<long>(-6),mpz_class(5)+3)==2); - ASSERT_ALWAYS(lcm(mpz_class(6),mpz_class(8))==24); - ASSERT_ALWAYS(lcm(-mpz_class(6),mpz_class(8))==24); - ASSERT_ALWAYS(lcm(-mpz_class(6),-mpz_class(8))==24); - ASSERT_ALWAYS(lcm(mpz_class(6),static_cast<short>(8))==24); - ASSERT_ALWAYS(lcm(-mpz_class(6),static_cast<unsigned char>(8))==24); - ASSERT_ALWAYS(lcm(-6.,mpz_class(5)+3)==24); -} - -template<class T> -void checkqf (){ - CHECK_ALL(T,5.,2,+); CHECK_MPZ(T,5.,2,+); - CHECK_ALL(T,5.,2,-); CHECK_MPZ(T,5.,2,-); - CHECK_ALL(T,5.,2,*); CHECK_MPZ(T,5.,2,*); - CHECK_ALL(T,5.,2,/); CHECK_MPZ(T,5.,2,/); - CHECK_ALL(T,0.,2,/); - CHECK_ALL_SIGNS(T,11.,3,+); - CHECK_ALL_SIGNS(T,11.,3,-); - CHECK_ALL_SIGNS(T,11.,3,*); - CHECK_ALL_SIGNS(T,11.,4,/); - CHECK_SI(T,LONG_MIN,1,*); - CHECK_SI(T,0,3,*); - CHECK_ALL_COMPARISONS(T,5.,2); - CHECK_ALL_SIGNS_COMPARISONS(T,11.,3); - CHECK_MPZ(T,5,-2,<); - CHECK_MPZ(T,5,-2,>); - CHECK_MPZ(T,5,-2,<=); - CHECK_MPZ(T,5,-2,>=); - CHECK_MPZ(T,5,-2,==); - CHECK_MPZ(T,5,-2,!=); - CHECK_MPZ(T,0,0,<); - CHECK_MPZ(T,0,0,>); - CHECK_MPZ(T,0,0,<=); - CHECK_MPZ(T,0,0,>=); - CHECK_MPZ(T,0,0,==); - CHECK_MPZ(T,0,0,!=); - ASSERT_ALWAYS(T(6)<<2==6.*4); - ASSERT_ALWAYS(T(6)>>2==6./4); - ASSERT_ALWAYS(T(-13)<<2==-13.*4); - ASSERT_ALWAYS(T(-13)>>2==-13./4); - ASSERT_ALWAYS(++T(7)==8); - ASSERT_ALWAYS(++T(-8)==-7); - ASSERT_ALWAYS(--T(8)==7); - ASSERT_ALWAYS(--T(-7)==-8); - ASSERT_ALWAYS(+T(7)==7); - ASSERT_ALWAYS(+T(-8)==-8); - ASSERT_ALWAYS(-T(7)==-7); - ASSERT_ALWAYS(-T(-8)==8); - ASSERT_ALWAYS(abs(T(7))==7); - ASSERT_ALWAYS(abs(T(-8))==8); - ASSERT_ALWAYS(sgn(T(0))==0); - ASSERT_ALWAYS(sgn(T(9))==1); - ASSERT_ALWAYS(sgn(T(-17))==-1); - ASSERT_ALWAYS(T(1)+DBL_MAX>2); - ASSERT_ALWAYS(T(1)+DBL_MIN>1); - ASSERT_ALWAYS(T(1)+DBL_MIN<1.001); - ASSERT_ALWAYS(T(1)+std::numeric_limits<double>::denorm_min()>1); - ASSERT_ALWAYS(T(1)+std::numeric_limits<double>::denorm_min()<1.001); -} - -void checkf (){ - ASSERT_ALWAYS(sqrt(mpf_class(7))>2.64); - ASSERT_ALWAYS(sqrt(mpf_class(7))<2.65); - ASSERT_ALWAYS(sqrt(mpf_class(0))==0); - // TODO: add some consistency checks, as described in - // https://gmplib.org/list-archives/gmp-bugs/2013-February/002940.html - CHECK1(mpf_class,1.9,trunc); - CHECK1(mpf_class,1.9,floor); - CHECK1(mpf_class,1.9,ceil); - CHECK1(mpf_class,4.3,trunc); - CHECK1(mpf_class,4.3,floor); - CHECK1(mpf_class,4.3,ceil); - CHECK1(mpf_class,-7.1,trunc); - CHECK1(mpf_class,-7.1,floor); - CHECK1(mpf_class,-7.1,ceil); - CHECK1(mpf_class,-2.8,trunc); - CHECK1(mpf_class,-2.8,floor); - CHECK1(mpf_class,-2.8,ceil); - CHECK1(mpf_class,-1.5,trunc); - CHECK1(mpf_class,-1.5,floor); - CHECK1(mpf_class,-1.5,ceil); - CHECK1(mpf_class,2.5,trunc); - CHECK1(mpf_class,2.5,floor); - CHECK1(mpf_class,2.5,ceil); - ASSERT_ALWAYS(hypot(mpf_class(-3),mpf_class(4))>4.9); - ASSERT_ALWAYS(hypot(mpf_class(-3),mpf_class(4))<5.1); - ASSERT_ALWAYS(hypot(mpf_class(-3),4.)>4.9); - ASSERT_ALWAYS(hypot(-3.,mpf_class(4))<5.1); - ASSERT_ALWAYS(hypot(mpf_class(-3),4l)>4.9); - ASSERT_ALWAYS(hypot(-3l,mpf_class(4))<5.1); - ASSERT_ALWAYS(hypot(mpf_class(-3),4ul)>4.9); - ASSERT_ALWAYS(hypot(3ul,mpf_class(4))<5.1); - CHECK(mpf_class,mpq_class,1.5,2.25,+); - CHECK(mpf_class,mpq_class,1.5,2.25,-); - CHECK(mpf_class,mpq_class,1.5,-2.25,*); - CHECK(mpf_class,mpq_class,1.5,-2,/); - CHECK_MPQ(mpf_class,-5.5,-2.25,+); - CHECK_MPQ(mpf_class,-5.5,-2.25,-); - CHECK_MPQ(mpf_class,-5.5,-2.25,*); - CHECK_MPQ(mpf_class,-5.25,-0.5,/); - CHECK_MPQ(mpf_class,5,-2,<); - CHECK_MPQ(mpf_class,5,-2,>); - CHECK_MPQ(mpf_class,5,-2,<=); - CHECK_MPQ(mpf_class,5,-2,>=); - CHECK_MPQ(mpf_class,5,-2,==); - CHECK_MPQ(mpf_class,5,-2,!=); - CHECK_MPQ(mpf_class,0,0,<); - CHECK_MPQ(mpf_class,0,0,>); - CHECK_MPQ(mpf_class,0,0,<=); - CHECK_MPQ(mpf_class,0,0,>=); - CHECK_MPQ(mpf_class,0,0,==); - CHECK_MPQ(mpf_class,0,0,!=); -} - -int -main (void) -{ - tests_start(); - - // Enough precision for 1 + denorm_min - mpf_set_default_prec(DBL_MANT_DIG-DBL_MIN_EXP+42); - checkz(); - checkqf<mpq_class>(); - checkqf<mpf_class>(); - checkf(); - - tests_end(); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ops3.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ops3.cc deleted file mode 100644 index cb6a2efc7d5..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ops3.cc +++ /dev/null @@ -1,133 +0,0 @@ -/* Test mp*_class assignment operators (+=, -=, etc) - -Copyright 2011 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include "gmp.h" -#include "gmpxx.h" -#include "gmp-impl.h" -#include "tests.h" - -using namespace std; - -#define FOR_ALL_SIGNED_BUILTIN(F) \ - F(signed char) \ - F(signed short) \ - F(signed int) \ - F(signed long) \ - F(float) \ - F(double) - -#define FOR_ALL_BUILTIN(F) \ - FOR_ALL_SIGNED_BUILTIN(F) \ - F(char) \ - F(unsigned char) \ - F(unsigned short) \ - F(unsigned int) \ - F(unsigned long) - -#define FOR_ALL_GMPXX(F) \ - F(mpz_class) \ - F(mpq_class) \ - F(mpf_class) - -template<class T,class U> void f(T t, U u){ - T a=t; - ASSERT_ALWAYS((a+=u)==(t+u)); ASSERT_ALWAYS(a==(t+u)); - ASSERT_ALWAYS((a-=u)==t); ASSERT_ALWAYS(a==t); - ASSERT_ALWAYS((a*=u)==(t*u)); ASSERT_ALWAYS(a==(t*u)); - ASSERT_ALWAYS((a/=u)==t); ASSERT_ALWAYS(a==t); - ASSERT_ALWAYS((a<<=5)==(t<<5)); ASSERT_ALWAYS(a==(t<<5)); - ASSERT_ALWAYS((a>>=5)==t); ASSERT_ALWAYS(a==t); -} - -template<class T,class U> void g(T t, U u){ - T a=t; - ASSERT_ALWAYS((a%=u)==(t%u)); ASSERT_ALWAYS(a==(t%u)); - a=t; - ASSERT_ALWAYS((a&=u)==(t&u)); ASSERT_ALWAYS(a==(t&u)); - a=t; - ASSERT_ALWAYS((a|=u)==(t|u)); ASSERT_ALWAYS(a==(t|u)); - a=t; - ASSERT_ALWAYS((a^=u)==(t^u)); ASSERT_ALWAYS(a==(t^u)); -} - -template<class T> void h(T t){ - T a=t; - ASSERT_ALWAYS((a<<=5)==(t<<5)); ASSERT_ALWAYS(a==(t<<5)); - ASSERT_ALWAYS((a>>=5)==t); ASSERT_ALWAYS(a==t); -} - -template<class T, class U> void ffs(T t, U u){ -#define F(V) f(t,(V)u); - FOR_ALL_SIGNED_BUILTIN(F) - FOR_ALL_GMPXX(F) -#undef F -#define F(V) f(t,-(V)u); - FOR_ALL_GMPXX(F) -#undef F -} - -template<class T, class U> void ff(T t, U u){ -#define F(V) f(t,(V)u); - FOR_ALL_BUILTIN(F) - FOR_ALL_GMPXX(F) -#undef F -#define F(V) f(t,-(V)u); - FOR_ALL_GMPXX(F) -#undef F -} - -template<class U> void ggs(mpz_class t, U u){ -#define F(V) g(t,(V)u); - FOR_ALL_SIGNED_BUILTIN(F) -#undef F - g(t,(mpz_class)u); - g(t,-(mpz_class)u); -} - -template<class U> void gg(mpz_class t, U u){ -#define F(V) g(t,(V)u); - FOR_ALL_BUILTIN(F) -#undef F - g(t,(mpz_class)u); - g(t,-(mpz_class)u); -} - -void check(){ - mpz_class z=18; - mpq_class q(7,2); - mpf_class d=3.375; - h(z); h(q); h(d); - ff(z,13); ff(q,13); ff(d,13); - ffs(z,-42); ffs(q,-42); ffs(d,-42); - gg(z,33); ggs(z,-22); -} - - -int -main (void) -{ - tests_start(); - - check(); - - tests_end(); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ostream.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ostream.cc deleted file mode 100644 index 9b4f5e7dd74..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ostream.cc +++ /dev/null @@ -1,450 +0,0 @@ -/* Test ostream formatted output. - -Copyright 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <iostream> -#include <cstdlib> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -using namespace std; - - -bool option_check_standard = false; - - -#define CALL(expr) \ - do { \ - got.flags (data[i].flags); \ - got.width (data[i].width); \ - got.precision (data[i].precision); \ - if (data[i].fill == '\0') \ - got.fill (' '); \ - else \ - got.fill (data[i].fill); \ - \ - if (! (expr)) \ - { \ - cout << "\"got\" output error\n"; \ - abort (); \ - } \ - if (got.width() != 0) \ - { \ - cout << "\"got\" width not reset to 0\n"; \ - abort (); \ - } \ - \ - } while (0) - - -#define DUMP() \ - do { \ - cout << " want: |" << data[i].want << "|\n"; \ - cout << " got: |" << got.str() << "|\n"; \ - cout << " width: " << data[i].width << "\n"; \ - cout << " prec: " << got.precision() << "\n"; \ - cout << " flags: " << hex << (unsigned long) got.flags() << "\n"; \ - } while (0) - -#define ABORT() \ - do { \ - DUMP (); \ - abort (); \ - } while (0) - -void -check_mpz (void) -{ - static const struct { - const char *z; - const char *want; - ios::fmtflags flags; - int width; - int precision; - char fill; - - } data[] = { - - { "0", "0", ios::dec }, - - { "0", "0", ios::oct }, - { "0", "0", ios::oct | ios::showbase }, - - { "0", "0", ios::hex }, - { "0", "0x0", ios::hex | ios::showbase }, - { "0", "0X0", ios::hex | ios::showbase | ios::uppercase }, - - { "1", "****1", ios::dec, 5, 0, '*' }, - - { "-1", " -1", ios::dec | ios::right, 5 }, - { "-1", "- 1", ios::dec | ios::internal, 5 }, - { "-1", "-1 ", ios::dec | ios::left, 5 }, - - { "1", " 0x1", ios::hex | ios::showbase | ios::right, 6 }, - { "1", "0x 1", ios::hex | ios::showbase | ios::internal, 6 }, - { "1", "0x1 ", ios::hex | ios::showbase | ios::left, 6 }, - - { "1", " +0x1", ios::hex | ios::showbase | ios::showpos | ios::right, - 7 }, - { "1", "+0x 1", ios::hex | ios::showbase | ios::showpos | ios::internal, - 7 }, - { "1", "+0x1 ", ios::hex | ios::showbase | ios::showpos | ios::left, - 7 }, - - { "123", "7b", ios::hex }, - { "123", "7B", ios::hex | ios::uppercase }, - { "123", "0x7b", ios::hex | ios::showbase }, - { "123", "0X7B", ios::hex | ios::showbase | ios::uppercase }, - { "-123", "-0x7b", ios::hex | ios::showbase }, - { "-123", "-0X7B", ios::hex | ios::showbase | ios::uppercase }, - - { "123", "173", ios::oct }, - { "123", "173", ios::oct | ios::uppercase }, - { "123", "0173", ios::oct | ios::showbase }, - { "123", "0173", ios::oct | ios::showbase | ios::uppercase }, - { "-123", "-0173", ios::oct | ios::showbase }, - { "-123", "-0173", ios::oct | ios::showbase | ios::uppercase }, - - }; - - size_t i; - mpz_t z; - - mpz_init (z); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (z, data[i].z, 0); - - if (option_check_standard - && mpz_fits_slong_p (z) - - // no negatives or showpos in hex or oct - && (((data[i].flags & ios::basefield) == ios::hex - || (data[i].flags & ios::basefield) == ios::oct) - ? (mpz_sgn (z) >= 0 - && ! (data[i].flags & ios::showpos)) - : 1) - ) - { - ostringstream got; - long n = mpz_get_si (z); - CALL (got << n); - if (got.str().compare (data[i].want) != 0) - { - cout << "check_mpz data[" << i - << "] doesn't match standard ostream output\n"; - cout << " z: " << data[i].z << "\n"; - cout << " n: " << n << "\n"; - DUMP (); - } - } - - { - ostringstream got; - CALL (got << z); - if (got.str().compare (data[i].want) != 0) - { - cout << "mpz operator<< wrong, data[" << i << "]\n"; - cout << " z: " << data[i].z << "\n"; - ABORT (); - } - } - } - - mpz_clear (z); -} - -void -check_mpq (void) -{ - static const struct { - const char *q; - const char *want; - ios::fmtflags flags; - int width; - int precision; - char fill; - - } data[] = { - - { "0", "0", ios::dec }, - { "0", "0", ios::hex }, - { "0", "0x0", ios::hex | ios::showbase }, - { "0", "0X0", ios::hex | ios::showbase | ios::uppercase }, - - { "5/8", "5/8", ios::dec }, - { "5/8", "0X5/0X8", ios::hex | ios::showbase | ios::uppercase }, - - // zero denominator with showbase - { "0/0", " 0/0", ios::oct | ios::showbase, 10 }, - { "0/0", " 0/0", ios::dec | ios::showbase, 10 }, - { "0/0", " 0x0/0x0", ios::hex | ios::showbase, 10 }, - { "123/0", " 0173/0", ios::oct | ios::showbase, 10 }, - { "123/0", " 123/0", ios::dec | ios::showbase, 10 }, - { "123/0", " 0x7b/0x0", ios::hex | ios::showbase, 10 }, - { "123/0", " 0X7B/0X0", ios::hex | ios::showbase | ios::uppercase, 10 }, - { "0/123", " 0/0173", ios::oct | ios::showbase, 10 }, - { "0/123", " 0/123", ios::dec | ios::showbase, 10 }, - { "0/123", " 0x0/0x7b", ios::hex | ios::showbase, 10 }, - { "0/123", " 0X0/0X7B", ios::hex | ios::showbase | ios::uppercase, 10 }, - }; - - size_t i; - mpq_t q; - - mpq_init (q); - -#define mpq_integer_p(q) (mpz_cmp_ui (mpq_denref(q), 1L) == 0) - - for (i = 0; i < numberof (data); i++) - { - mpq_set_str_or_abort (q, data[i].q, 0); - MPZ_CHECK_FORMAT (mpq_numref (q)); - MPZ_CHECK_FORMAT (mpq_denref (q)); - - if (option_check_standard - && mpz_fits_slong_p (mpq_numref(q)) - && mpq_integer_p (q)) - { - ostringstream got; - long n = mpz_get_si (mpq_numref(q)); - CALL (got << n); - if (got.str().compare (data[i].want) != 0) - { - cout << "check_mpq data[" << i - << "] doesn't match standard ostream output\n"; - cout << " q: " << data[i].q << "\n"; - cout << " n: " << n << "\n"; - DUMP (); - } - } - - { - ostringstream got; - CALL (got << q); - if (got.str().compare (data[i].want) != 0) - { - cout << "mpq operator<< wrong, data[" << i << "]\n"; - cout << " q: " << data[i].q << "\n"; - ABORT (); - } - } - } - - mpq_clear (q); -} - - -void -check_mpf (void) -{ - static const struct { - const char *f; - const char *want; - ios::fmtflags flags; - int width; - int precision; - char fill; - - } data[] = { - - { "0", "0", ios::dec }, - { "0", "+0", ios::dec | ios::showpos }, - { "0", "0.00000", ios::dec | ios::showpoint }, - { "0", "0", ios::dec | ios::fixed }, - { "0", "0.", ios::dec | ios::fixed | ios::showpoint }, - { "0", "0.000000e+00", ios::dec | ios::scientific }, - { "0", "0.000000e+00", ios::dec | ios::scientific | ios::showpoint }, - - { "0", "0", ios::dec, 0, 4 }, - { "0", "0.000", ios::dec | ios::showpoint, 0, 4 }, - { "0", "0.0000", ios::dec | ios::fixed, 0, 4 }, - { "0", "0.0000", ios::dec | ios::fixed | ios::showpoint, 0, 4 }, - { "0", "0.0000e+00", ios::dec | ios::scientific, 0, 4 }, - { "0", "0.0000e+00", ios::dec | ios::scientific | ios::showpoint, 0, 4 }, - - { "1", "1", ios::dec }, - { "1", "+1", ios::dec | ios::showpos }, - { "1", "1.00000", ios::dec | ios::showpoint }, - { "1", "1", ios::dec | ios::fixed }, - { "1", "1.", ios::dec | ios::fixed | ios::showpoint }, - { "1", "1.000000e+00", ios::dec | ios::scientific }, - { "1", "1.000000e+00", ios::dec | ios::scientific | ios::showpoint }, - - { "1", "1", ios::dec, 0, 4 }, - { "1", "1.000", ios::dec | ios::showpoint, 0, 4 }, - { "1", "1.0000", ios::dec | ios::fixed, 0, 4 }, - { "1", "1.0000", ios::dec | ios::fixed | ios::showpoint, 0, 4 }, - { "1", "1.0000e+00", ios::dec | ios::scientific, 0, 4 }, - { "1", "1.0000e+00", ios::dec | ios::scientific | ios::showpoint, 0, 4 }, - - { "-1", "-1", ios::dec | ios::showpos }, - - { "-1", " -1", ios::dec, 4 }, - { "-1", "- 1", ios::dec | ios::internal, 4 }, - { "-1", "-1 ", ios::dec | ios::left, 4 }, - - { "-1", " -0x1", ios::hex | ios::showbase, 6 }, - { "-1", "-0x 1", ios::hex | ios::showbase | ios::internal, 6 }, - { "-1", "-0x1 ", ios::hex | ios::showbase | ios::left, 6 }, - - { "1", "*********1", ios::dec, 10, 4, '*' }, - { "1234", "******1234", ios::dec, 10, 4, '*' }, - { "1234", "*****1234.", ios::dec | ios::showpoint, 10, 4, '*' }, - - { "12345", "1.23e+04", ios::dec, 0, 3 }, - - { "12345", "12345.", ios::dec | ios::fixed | ios::showpoint }, - - { "1.9999999", "2", ios::dec, 0, 1 }, - { "1.0009999999", "1.001", ios::dec, 0, 4 }, - { "1.0001", "1", ios::dec, 0, 4 }, - { "1.0004", "1", ios::dec, 0, 4 }, - { "1.000555", "1.001", ios::dec, 0, 4 }, - - { "1.0002", "1.000", ios::dec | ios::fixed, 0, 3 }, - { "1.0008", "1.001", ios::dec | ios::fixed, 0, 3 }, - - { "0", "0", ios::hex }, - { "0", "0x0", ios::hex | ios::showbase }, - { "0", "0X0", ios::hex | ios::showbase | ios::uppercase }, - { "123", "7b", ios::hex }, - { "123", "0x7b", ios::hex | ios::showbase }, - { "123", "0X7B", ios::hex | ios::showbase | ios::uppercase }, - - { "0", "0.000@+00", ios::hex | ios::scientific, 0, 3 }, - { "256", "1.000@+02", ios::hex | ios::scientific, 0, 3 }, - - { "123", "7.b@+01", ios::hex | ios::scientific, 0, 1 }, - { "123", "7.B@+01", ios::hex | ios::scientific | ios::uppercase, 0, 1 }, - { "123", "0x7.b@+01", ios::hex | ios::scientific | ios::showbase, 0, 1 }, - { "123", "0X7.B@+01", - ios::hex | ios::scientific | ios::showbase | ios::uppercase, 0, 1 }, - - { "1099511627776", "1.0@+10", ios::hex | ios::scientific, 0, 1 }, - { "1099511627776", "1.0@+10", - ios::hex | ios::scientific | ios::uppercase, 0, 1 }, - - { "0.0625", "1.00@-01", ios::hex | ios::scientific, 0, 2 }, - - { "0", "0", ios::oct }, - { "123", "173", ios::oct }, - { "123", "0173", ios::oct | ios::showbase }, - - // octal showbase suppressed for 0 - { "0", "0", ios::oct | ios::showbase }, - { ".125", "00.1", ios::oct | ios::showbase, 0, 1 }, - { ".015625", "00.01", ios::oct | ios::showbase, 0, 2 }, - { ".125", "00.1", ios::fixed | ios::oct | ios::showbase, 0, 1 }, - { ".015625", "0.0", ios::fixed | ios::oct | ios::showbase, 0, 1 }, - { ".015625", "00.01", ios::fixed | ios::oct | ios::showbase, 0, 2 }, - - { "0.125", "1.000000e-01", ios::oct | ios::scientific }, - { "0.125", "+1.000000e-01", ios::oct | ios::scientific | ios::showpos }, - { "-0.125", "-1.000000e-01", ios::oct | ios::scientific }, - { "-0.125", "-1.000000e-01", ios::oct | ios::scientific | ios::showpos }, - - { "0", "0.000e+00", ios::oct | ios::scientific, 0, 3 }, - { "256", "4.000e+02", ios::oct | ios::scientific, 0, 3 }, - { "256", "04.000e+02", ios::oct | ios::scientific | ios::showbase, 0, 3 }, - { "256", "4.000E+02", ios::oct | ios::scientific | ios::uppercase, 0, 3 }, - { "256", "04.000E+02", - ios::oct | ios::scientific | ios::showbase | ios::uppercase, 0, 3 }, - - { "16777216", "1.000000e+08", ios::oct | ios::scientific }, - { "16777216", "1.000000E+08", - ios::oct | ios::scientific | ios::uppercase }, - { "16777216", "01.000000e+08", - ios::oct | ios::scientific | ios::showbase }, - { "16777216", "01.000000E+08", - ios::oct | ios::scientific | ios::showbase | ios::uppercase }, - { "16777216", "+01.000000e+08", - ios::oct | ios::scientific | ios::showbase | ios::showpos }, - { "16777216", "+01.000000E+08", ios::oct | ios::scientific - | ios::showbase | ios::showpos | ios::uppercase }, - { "-16777216", "-01.000000e+08", - ios::oct | ios::scientific | ios::showbase | ios::showpos }, - { "-16777216", "-01.000000E+08", ios::oct | ios::scientific - | ios::showbase | ios::showpos | ios::uppercase }, - - }; - - size_t i; - mpf_t f, f2; - double d; - - mpf_init (f); - mpf_init (f2); - - for (i = 0; i < numberof (data); i++) - { - mpf_set_str_or_abort (f, data[i].f, 0); - - d = mpf_get_d (f); - mpf_set_d (f2, d); - if (option_check_standard && mpf_cmp (f, f2) == 0 - && ! (data[i].flags & (ios::hex | ios::oct | ios::showbase))) - { - ostringstream got; - CALL (got << d); - if (got.str().compare (data[i].want) != 0) - { - cout << "check_mpf data[" << i - << "] doesn't match standard ostream output\n"; - cout << " f: " << data[i].f << "\n"; - cout << " d: " << d << "\n"; - DUMP (); - } - } - - { - ostringstream got; - CALL (got << f); - if (got.str().compare (data[i].want) != 0) - { - cout << "mpf operator<< wrong, data[" << i << "]\n"; - cout << " f: " << data[i].f << "\n"; - ABORT (); - } - } - } - - mpf_clear (f); - mpf_clear (f2); -} - - - -int -main (int argc, char *argv[]) -{ - if (argc > 1 && strcmp (argv[1], "-s") == 0) - option_check_standard = true; - - tests_start (); - - check_mpz (); - check_mpq (); - check_mpf (); - - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-prec.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-prec.cc deleted file mode 100644 index 8039219f21d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-prec.cc +++ /dev/null @@ -1,217 +0,0 @@ -/* Test precision of mpf_class expressions. - -Copyright 2001-2003, 2008 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <iostream> - -#include "gmp.h" -#include "gmpxx.h" -#include "gmp-impl.h" -#include "tests.h" - -using namespace std; - - -const int -small_prec = 64, medium_prec = 128, large_prec = 192, very_large_prec = 256; - -#define ASSERT_ALWAYS_PREC(a, s, prec) \ -{ \ - mpf_srcptr _a = a.get_mpf_t(); \ - mpf_class _b(s, prec); \ - mpf_srcptr _c = _b.get_mpf_t(); \ - ASSERT_ALWAYS(mpf_eq(_a, _c, prec)); \ -} - - - -void -check_mpf (void) -{ - mpf_set_default_prec(medium_prec); - - // simple expressions - { - mpf_class f(3.0, small_prec); - mpf_class g(1 / f, very_large_prec); - ASSERT_ALWAYS_PREC - (g, "0.33333 33333 33333 33333 33333 33333 33333 33333 33333 33333" - " 33333 33333 33333 33333 33333 333", very_large_prec); - } - { - mpf_class f(9.0, medium_prec); - mpf_class g(0.0, very_large_prec); - g = 1 / f; - ASSERT_ALWAYS_PREC - (g, "0.11111 11111 11111 11111 11111 11111 11111 11111 11111 11111" - " 11111 11111 11111 11111 11111 111", very_large_prec); - } - { - mpf_class f(15.0, large_prec); - mpf_class g(0.0, very_large_prec); - g = 1 / f; - ASSERT_ALWAYS_PREC - (g, "0.06666 66666 66666 66666 66666 66666 66666 66666 66666 66666" - " 66666 66666 66666 66666 66666 667", very_large_prec); - } - - // compound expressions - { - mpf_class f(3.0, small_prec); - mpf_class g(-(-(-1 / f)), very_large_prec); - ASSERT_ALWAYS_PREC - (g, "-0.33333 33333 33333 33333 33333 33333 33333 33333 33333 33333" - " 33333 33333 33333 33333 33333 333", very_large_prec); - } - { - mpf_class f(3.0, small_prec), g(9.0, medium_prec); - mpf_class h(0.0, very_large_prec); - h = 1/f + 1/g; - ASSERT_ALWAYS_PREC - (h, "0.44444 44444 44444 44444 44444 44444 44444 44444 44444 44444" - " 44444 44444 44444 44444 44444 444", very_large_prec); - } - { - mpf_class f(3.0, small_prec), g(9.0, medium_prec), h(15.0, large_prec); - mpf_class i(0.0, very_large_prec); - i = f / g + h; - ASSERT_ALWAYS_PREC - (i, "15.33333 33333 33333 33333 33333 33333 33333 33333 33333 33333" - " 33333 33333 33333 33333 33333 3", very_large_prec); - } - { - mpf_class f(3.0, small_prec); - mpf_class g(-(1 + f) / 3, very_large_prec); - ASSERT_ALWAYS_PREC - (g, "-1.33333 33333 33333 33333 33333 33333 33333 33333 33333 33333" - " 33333 33333 33333 33333 33333 33", very_large_prec); - } - { - mpf_class f(9.0, medium_prec); - mpf_class g(0.0, very_large_prec); - g = sqrt(1 / f); - ASSERT_ALWAYS_PREC - (g, "0.33333 33333 33333 33333 33333 33333 33333 33333 33333 33333" - " 33333 33333 33333 33333 33333 333", very_large_prec); - } - { - mpf_class f(15.0, large_prec); - mpf_class g(0.0, very_large_prec); - g = hypot(1 + 5 / f, 1.0); - ASSERT_ALWAYS_PREC - (g, "1.66666 66666 66666 66666 66666 66666 66666 66666 66666 66666" - " 66666 66666 66666 66666 66666 67", very_large_prec); - } - - // compound assignments - { - mpf_class f(3.0, small_prec), g(9.0, medium_prec); - mpf_class h(1.0, very_large_prec); - h -= f / g; - ASSERT_ALWAYS_PREC - (h, "0.66666 66666 66666 66666 66666 66666 66666 66666 66666 66666" - " 66666 66666 66666 66666 66666 667", very_large_prec); - } - - // construction from expressions - { - mpf_class f(3.0, small_prec); - mpf_class g(0.0, very_large_prec); - g = mpf_class(1 / f); - ASSERT_ALWAYS_PREC(g, "0.33333 33333 33333 33333", small_prec); - } - { - mpf_class f(9.0, medium_prec); - mpf_class g(0.0, very_large_prec); - g = mpf_class(1 / f); - ASSERT_ALWAYS_PREC - (g, "0.11111 11111 11111 11111 11111 11111 11111 1111", medium_prec); - } - { - mpf_class f(15.0, large_prec); - mpf_class g(0.0, very_large_prec); - g = mpf_class(1 / f); - ASSERT_ALWAYS_PREC - (g, "0.06666 66666 66666 66666 66666 66666 66666 66666 66666 66666" - " 66666 6667", large_prec); - } - - { - mpf_class f(3.0, small_prec), g(9.0, medium_prec); - mpf_class h(0.0, very_large_prec); - h = mpf_class(f / g + 1, large_prec); - ASSERT_ALWAYS_PREC - (h, "1.33333 33333 33333 33333 33333 33333 33333 33333 33333 33333" - " 33333 333", - large_prec); - } - - // mixed mpf/mpq expressions - { - mpf_class f(3.0, small_prec); - mpq_class q(1, 3); - mpf_class g(0.0, very_large_prec); - g = f - q; - ASSERT_ALWAYS_PREC - (g, "2.66666 66666 66666 66666 66666 66666 66666 66666 66666 66666" - " 66666 66666 66666 66666 66666 67", very_large_prec); - } - - { - mpf_class f(3.0, small_prec); - mpq_class q(1, 3); - mpf_class g(0.0, very_large_prec); - g = mpf_class(f - q, large_prec); - ASSERT_ALWAYS_PREC - (g, "2.66666 66666 66666 66666 66666 66666 66666 66666 66666 66666" - " 66666 667", - large_prec); - } - { - mpf_class f(3.0, small_prec); - mpq_class q(1, 3); - mpf_class g(0.0, very_large_prec); - g = mpf_class(f - q); - ASSERT_ALWAYS_PREC - (g, "2.66666 66666 66666 66666 66666 66666 66666 667", medium_prec); - } - { - mpf_class f(15.0, large_prec); - mpq_class q(1, 3); - mpf_class g(0.0, very_large_prec); - g = mpf_class(f + q); - ASSERT_ALWAYS_PREC - (g, "15.33333 33333 33333 33333 33333 33333 33333 33333 33333 33333" - " 33333 33", - large_prec); - } -} - - -int -main (void) -{ - tests_start(); - - check_mpf(); - - tests_end(); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-rand.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-rand.cc deleted file mode 100644 index b71c49627b5..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-rand.cc +++ /dev/null @@ -1,149 +0,0 @@ -/* Test gmp_randclass. - -Copyright 2002, 2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmpxx.h" -#include "gmp-impl.h" -#include "tests.h" - -using namespace std; - - -/* all flavours of initialization */ -void -check_randinit (void) -{ - { - gmp_randclass r(gmp_randinit_default); - } - - { - mpz_class a(0); - unsigned long c = 0, m2exp = 8; - gmp_randclass r(gmp_randinit_lc_2exp, a, c, m2exp); - } - - { - unsigned long m2exp = 64; - gmp_randclass r(gmp_randinit_lc_2exp_size, m2exp); - } - - /* gmp_randinit_lc_2exp_size, with excessive size */ - { - try { - unsigned long m2exp = ULONG_MAX; - gmp_randclass r(gmp_randinit_lc_2exp_size, m2exp); - ASSERT_ALWAYS (0); /* should not be reached */ - } catch (length_error) { - } - } - - { - gmp_randclass r(gmp_randinit_mt); - } - - /* obsolete, but still available */ - { - gmp_randalg_t alg = GMP_RAND_ALG_LC; - unsigned long m2exp = 64; - gmp_randclass r(alg, m2exp); - } - { - gmp_randalg_t alg = GMP_RAND_ALG_DEFAULT; - unsigned long m2exp = 64; - gmp_randclass r(alg, m2exp); - } - { - gmp_randalg_t alg = (gmp_randalg_t) 0; - unsigned long m2exp = 64; - gmp_randclass r(alg, m2exp); - } -} - -void -check_mpz (void) -{ - { - gmp_randclass r(gmp_randinit_default); - mpz_class a(123); - unsigned int b = 256; - mpz_class c; - r.seed(a); - c = r.get_z_bits(b); - } - { - gmp_randclass r(gmp_randinit_default); - mpz_class a(256); - unsigned long b = 123; - mpz_class c; - r.seed(b); - c = r.get_z_bits(a); - } - { - gmp_randclass r(gmp_randinit_default); - mpz_class a(123), b(256); - mpz_class c; - r.seed(a); - c = r.get_z_range(b); - } -} - -void -check_mpf (void) -{ - { - gmp_randclass r(gmp_randinit_default); - mpz_class a(123); - r.seed(a); - mpf_class b; - b = r.get_f(); - mpf_class c(r.get_f()); - ASSERT_ALWAYS (c.get_prec() == mpf_get_default_prec()); - mpf_class d(r.get_f(),212); - ASSERT_ALWAYS (d.get_prec() >= 212); - } - { - gmp_randclass r(gmp_randinit_default); - int a = 123, b = 198; - r.seed(a); - mpf_class c; - c = r.get_f(b); - ASSERT_ALWAYS (c.get_prec() == mpf_get_default_prec()); - mpf_class d(r.get_f(b)); - ASSERT_ALWAYS (d.get_prec() >= 198); - mpf_class e(r.get_f(b)-r.get_f()); - ASSERT_ALWAYS (e.get_prec() >= 198); - mpf_class f(r.get_f(60),300); - ASSERT_ALWAYS (f.get_prec() >= 300); - } -} - - -int -main (void) -{ - tests_start(); - - check_randinit(); - check_mpz(); - check_mpf(); - - tests_end(); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ternary.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ternary.cc deleted file mode 100644 index 405f6f4981d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-ternary.cc +++ /dev/null @@ -1,735 +0,0 @@ -/* Test mp*_class ternary expressions. - -Copyright 2001-2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <iostream> - -#include "gmp.h" -#include "gmpxx.h" -#include "gmp-impl.h" -#include "tests.h" - -using namespace std; - - -/* The various test cases are broken up into separate functions to keep down - compiler memory use. They're static so that any mistakenly omitted from - main() will provoke warnings (under gcc -Wall at least). */ - -static void -check_mpz_1 (void) -{ - // template<class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<mpz_class, __gmp_expr - // <mpz_t, __gmp_binary_expr<mpz_class, mpz_class, Op1> >, Op2> > - { - mpz_class a(1), b(2), c(3); - mpz_class d; - d = a + b * c; ASSERT_ALWAYS(d == 7); - } - { - mpz_class a(1), b(2), c(3); - mpz_class d; - d = a - b * c; ASSERT_ALWAYS(d == -5); - } -} - -static void -check_mpz_2 (void) -{ - // template <class T, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<mpz_class, __gmp_expr - // <mpz_t, __gmp_binary_expr<mpz_class, T, Op1> >, Op2> > - { - mpz_class a(1), b(2); - signed int c = 3; - mpz_class d; - d = a + b * c; ASSERT_ALWAYS(d == 7); - } - { - mpz_class a(1), b(2); - signed int c = 3; - mpz_class d; - d = a - b * c; ASSERT_ALWAYS(d == -5); - } -} - -static void -check_mpz_3 (void) -{ - // template <class T, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<mpz_class, __gmp_expr - // <mpz_t, __gmp_binary_expr<T, mpz_class, Op1> >, Op2> > - { - mpz_class a(1), b(2); - unsigned int c = 3; - mpz_class d; - d = a + c * b; ASSERT_ALWAYS(d == 7); - } - { - mpz_class a(1), b(2); - unsigned int c = 3; - mpz_class d; - d = a - c * b; ASSERT_ALWAYS(d == -5); - } -} - -static void -check_mpz_4 (void) -{ - // template <class T, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<mpz_class, __gmp_expr - // <mpz_t, __gmp_binary_expr<mpz_class, __gmp_expr<mpz_t, T>, Op1> >, Op2> > - { - mpz_class a(1), b(2), c(3); - double d = 4.0; - mpz_class e; - e = a + b * (c + d); ASSERT_ALWAYS(e == 15); - } - { - mpz_class a(1), b(2), c(3); - double d = 4.0; - mpz_class e; - e = a - b * (c + d); ASSERT_ALWAYS(e == -13); - } -} - -static void -check_mpz_5 (void) -{ - // template <class T, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<mpz_class, __gmp_expr - // <mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, T>, mpz_class, Op1> >, Op2> > - { - mpz_class a(1), b(2), c(3); - signed int d = 4; - mpz_class e; - e = a + (b - d) * c; ASSERT_ALWAYS(e == -5); - } - { - mpz_class a(1), b(2), c(3); - signed int d = 4; - mpz_class e; - e = a - (b - d) * c; ASSERT_ALWAYS(e == 7); - } -} - -static void -check_mpz_6 (void) -{ - // template <class T, class U, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<mpz_class, __gmp_expr - // <mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, T>, U, Op1> >, Op2> > - { - mpz_class a(1), b(2); - unsigned int c = 3, d = 4; - mpz_class e; - e = a + (b + c) * d; ASSERT_ALWAYS(e == 21); - } - { - mpz_class a(1), b(2); - unsigned int c = 3, d = 4; - mpz_class e; - e = a - (b + c) * d; ASSERT_ALWAYS(e == -19); - } -} - -static void -check_mpz_7 (void) -{ - // template <class T, class U, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<mpz_class, __gmp_expr - // <mpz_t, __gmp_binary_expr<T, __gmp_expr<mpz_t, U>, Op1> >, Op2> > - { - mpz_class a(1), b(2); - double c = 3.0, d = 4.0; - mpz_class e; - e = a + c * (b + d); ASSERT_ALWAYS(e == 19); - } - { - mpz_class a(1), b(2); - double c = 3.0, d = 4.0; - mpz_class e; - e = a - c * (b + d); ASSERT_ALWAYS(e == -17); - } -} - -static void -check_mpz_8 (void) -{ - // template <class T, class U, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<mpz_class, __gmp_expr - // <mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, T>, __gmp_expr<mpz_t, U>, - // Op1> >, Op2> > - { - mpz_class a(1), b(2), c(3); - signed int d = 4, e = 5; - mpz_class f; - f = a + (b - d) * (c + e); ASSERT_ALWAYS(f == -15); - } - { - mpz_class a(1), b(2), c(3); - signed int d = 4, e = 5; - mpz_class f; - f = a - (b - d) * (c + e); ASSERT_ALWAYS(f == 17); - } -} - -static void -check_mpz_9 (void) -{ - // template <class T, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, T>, - // __gmp_expr<mpz_t, __gmp_binary_expr<mpz_class, mpz_class, Op1> >, Op2> > - { - mpz_class a(1), b(2), c(3); - unsigned int d = 4; - mpz_class e; - e = (a + d) + b * c; ASSERT_ALWAYS(e == 11); - } - { - mpz_class a(1), b(2), c(3); - unsigned int d = 4; - mpz_class e; - e = (a + d) - b * c; ASSERT_ALWAYS(e == -1); - } -} - -static void -check_mpz_10 (void) -{ - // template <class T, class U, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, T>, - // __gmp_expr<mpz_t, __gmp_binary_expr<mpz_class, U, Op1> >, Op2> > - { - mpz_class a(1), b(2); - double c = 3.0, d = 4.0; - mpz_class e; - e = (a - c) + b * d; ASSERT_ALWAYS(e == 6); - } - { - mpz_class a(1), b(2); - double c = 3.0, d = 4.0; - mpz_class e; - e = (a - c) - b * d; ASSERT_ALWAYS(e == -10); - } -} - -static void -check_mpz_11 (void) -{ - // template <class T, class U, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, T>, - // __gmp_expr<mpz_t, __gmp_binary_expr<U, mpz_class, Op1> >, Op2> > - { - mpz_class a(1), b(2); - signed int c = 3, d = 4; - mpz_class e; - e = (a - c) + d * b; ASSERT_ALWAYS(e == 6); - } - { - mpz_class a(1), b(2); - signed int c = 3, d = 4; - mpz_class e; - e = (a - c) - d * b; ASSERT_ALWAYS(e == -10); - } -} - -static void -check_mpz_12 (void) -{ - // template <class T, class U, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, T>, __gmp_expr - // <mpz_t, __gmp_binary_expr<mpz_class, __gmp_expr<mpz_t, U>, Op1> >, Op2> > - { - mpz_class a(1), b(2), c(3); - unsigned int d = 4, e = 5; - mpz_class f; - f = (a + d) + b * (c - e); ASSERT_ALWAYS(f == 1); - } - { - mpz_class a(1), b(2), c(3); - unsigned int d = 4, e = 5; - mpz_class f; - f = (a + d) - b * (c - e); ASSERT_ALWAYS(f == 9); - } -} - -static void -check_mpz_13 (void) -{ - // template <class T, class U, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, T>, __gmp_expr - // <mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, U>, mpz_class, Op1> >, Op2> > - { - mpz_class a(1), b(2), c(3); - double d = 4.0, e = 5.0; - mpz_class f; - f = (a - d) + (b + e) * c; ASSERT_ALWAYS(f == 18); - } - { - mpz_class a(1), b(2), c(3); - double d = 4.0, e = 5.0; - mpz_class f; - f = (a - d) - (b + e) * c; ASSERT_ALWAYS(f == -24); - } - -} - -static void -check_mpz_14 (void) -{ - // template <class T, class U, class V, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, T>, __gmp_expr - // <mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, U>, V, Op1> >, Op2> > - { - mpz_class a(1), b(2); - signed int c = 3, d = 4, e = 5; - mpz_class f; - f = (a + c) + (b + d) * e; ASSERT_ALWAYS(f == 34); - } - { - mpz_class a(1), b(2); - signed int c = 3, d = 4, e = 5; - mpz_class f; - f = (a + c) - (b + d) * e; ASSERT_ALWAYS(f == -26); - } -} - -static void -check_mpz_15 (void) -{ - // template <class T, class U, class V, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, T>, __gmp_expr - // <mpz_t, __gmp_binary_expr<U, __gmp_expr<mpz_t, V>, Op1> >, Op2> > - { - mpz_class a(1), b(2); - unsigned int c = 3, d = 4, e = 5; - mpz_class f; - f = (a - c) + d * (b - e); ASSERT_ALWAYS(f == -14); - } - { - mpz_class a(1), b(2); - unsigned int c = 3, d = 4, e = 5; - mpz_class f; - f = (a - c) - d * (b - e); ASSERT_ALWAYS(f == 10); - } - -} - -static void -check_mpz_16 (void) -{ - // template <class T, class U, class V, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, T>, __gmp_expr - // <mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, U>, __gmp_expr<mpz_t, V>, - // Op1> >, Op2> > - { - mpz_class a(1), b(2), c(3); - double d = 4.0, e = 5.0, f = 6.0; - mpz_class g; - g = (a + d) + (b - e) * (c + f); ASSERT_ALWAYS(g == -22); - } - { - mpz_class a(1), b(2), c(3); - double d = 4.0, e = 5.0, f = 6.0; - mpz_class g; - g = (a + d) - (b - e) * (c + f); ASSERT_ALWAYS(g == 32); - } -} - -static void -check_mpz_17 (void) -{ - // template <class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr - // <mpz_t, __gmp_binary_expr<mpz_class, mpz_class, Op1> >, mpz_class, Op2> > - { - mpz_class a(2), b(3), c(4); - mpz_class d; - d = a * b + c; ASSERT_ALWAYS(d == 10); - } - { - mpz_class a(2), b(3), c(4); - mpz_class d; - d = a * b - c; ASSERT_ALWAYS(d == 2); - } -} - -static void -check_mpz_18 (void) -{ - // template <class T, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr - // <mpz_t, __gmp_binary_expr<mpz_class, T, Op1> >, mpz_class, Op2> > - { - mpz_class a(2), b(3); - signed int c = 4; - mpz_class d; - d = a * c + b; ASSERT_ALWAYS(d == 11); - } - { - mpz_class a(2), b(3); - signed int c = 4; - mpz_class d; - d = a * c - b; ASSERT_ALWAYS(d == 5); - } - -} - -static void -check_mpz_19 (void) -{ - // template <class T, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr - // <mpz_t, __gmp_binary_expr<T, mpz_class, Op1> >, mpz_class, Op2> > - { - mpz_class a(2), b(3); - unsigned int c = 4; - mpz_class d; - d = c * a + b; ASSERT_ALWAYS(d == 11); - } - { - mpz_class a(2), b(3); - unsigned int c = 4; - mpz_class d; - d = c * a - b; ASSERT_ALWAYS(d == 5); - } -} - -static void -check_mpz_20 (void) -{ - // template <class T, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, __gmp_binary_expr - // <mpz_class, __gmp_expr<mpz_t, T>, Op1> >, mpz_class, Op2> > - { - mpz_class a(2), b(3), c(4); - double d = 5.0; - mpz_class e; - e = a * (b + d) + c; ASSERT_ALWAYS(e == 20); - } - { - mpz_class a(2), b(3), c(4); - double d = 5.0; - mpz_class e; - e = a * (b + d) - c; ASSERT_ALWAYS(e == 12); - } -} - -static void -check_mpz_21 (void) -{ - // template <class T, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, __gmp_binary_expr - // <__gmp_expr<mpz_t, T>, mpz_class, Op1> >, mpz_class, Op2> > - { - mpz_class a(2), b(3), c(4); - signed int d = 5; - mpz_class e; - e = (a - d) * b + c; ASSERT_ALWAYS(e == -5); - } - { - mpz_class a(2), b(3), c(4); - signed int d = 5; - mpz_class e; - e = (a - d) * b - c; ASSERT_ALWAYS(e == -13); - } -} - -static void -check_mpz_22 (void) -{ - // template <class T, class U, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, __gmp_binary_expr - // <__gmp_expr<mpz_t, T>, U, Op1> >, mpz_class, Op2> > - { - mpz_class a(2), b(3); - unsigned int c = 4, d = 5; - mpz_class e; - e = (a + c) * d + b; ASSERT_ALWAYS(e == 33); - } - { - mpz_class a(2), b(3); - unsigned int c = 4, d = 5; - mpz_class e; - e = (a + c) * d - b; ASSERT_ALWAYS(e == 27); - } -} - -static void -check_mpz_23 (void) -{ - // template <class T, class U, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, __gmp_binary_expr - // <T, __gmp_expr<mpz_t, U>, Op1> >, mpz_class, Op2> > - { - mpz_class a(2), b(3); - double c = 4.0, d = 5.0; - mpz_class e; - e = c * (a + d) + b; ASSERT_ALWAYS(e == 31); - } - { - mpz_class a(2), b(3); - double c = 4.0, d = 5.0; - mpz_class e; - e = c * (a + d) - b; ASSERT_ALWAYS(e == 25); - } - -} - -static void -check_mpz_24 (void) -{ - // template <class T, class U, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, __gmp_binary_expr - // <__gmp_expr<mpz_t, T>, __gmp_expr<mpz_t, U>, Op1> >, mpz_class, Op2> > - { - mpz_class a(2), b(3), c(4); - signed int d = 5, e = 6; - mpz_class f; - f = (a - d) * (b + e) + c; ASSERT_ALWAYS(f == -23); - } - { - mpz_class a(2), b(3), c(4); - signed int d = 5, e = 6; - mpz_class f; - f = (a - d) * (b + e) - c; ASSERT_ALWAYS(f == -31); - } -} - -static void -check_mpz_25 (void) -{ - // template <class T, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, __gmp_binary_expr - // <mpz_class, mpz_class, Op1> >, __gmp_expr<mpz_t, T>, Op2> > - { - mpz_class a(2), b(3), c(4); - unsigned int d = 5; - mpz_class e; - e = a * b + (c - d); ASSERT_ALWAYS(e == 5); - } - { - mpz_class a(2), b(3), c(4); - unsigned int d = 5; - mpz_class e; - e = a * b - (c - d); ASSERT_ALWAYS(e == 7); - } -} - -static void -check_mpz_26 (void) -{ - // template <class T, class U, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, __gmp_binary_expr - // <mpz_class, T, Op1> >, __gmp_expr<mpz_t, U>, Op2> > - { - mpz_class a(2), b(3); - double c = 4.0, d = 5.0; - mpz_class e; - e = a * c + (b + d); ASSERT_ALWAYS(e == 16); - } - { - mpz_class a(2), b(3); - double c = 4.0, d = 5.0; - mpz_class e; - e = a * c - (b + d); ASSERT_ALWAYS(e == 0); - } -} - -static void -check_mpz_27 (void) -{ - // template <class T, class U, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, __gmp_binary_expr - // <T, mpz_class, Op1> >, __gmp_expr<mpz_t, U>, Op2> > - { - mpz_class a(2), b(3); - signed int c = 4, d = 5; - mpz_class e; - e = c * a + (b - d); ASSERT_ALWAYS(e == 6); - } - { - mpz_class a(2), b(3); - signed int c = 4, d = 5; - mpz_class e; - e = c * a - (b - d); ASSERT_ALWAYS(e == 10); - } -} - -static void -check_mpz_28 (void) -{ - // template <class T, class U, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, __gmp_binary_expr - // <mpz_class, __gmp_expr<mpz_t, T>, Op1> >, __gmp_expr<mpz_t, U>, Op2> > - { - mpz_class a(2), b(3), c(4); - unsigned int d = 5, e = 6; - mpz_class f; - f = a * (b - d) + (c + e); ASSERT_ALWAYS(f == 6); - } - { - mpz_class a(2), b(3), c(4); - unsigned int d = 5, e = 6; - mpz_class f; - f = a * (b - d) - (c + e); ASSERT_ALWAYS(f == -14); - } -} - -static void -check_mpz_29 (void) -{ - // template <class T, class U, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, __gmp_binary_expr - // <__gmp_expr<mpz_t, T>, mpz_class, Op1> >, __gmp_expr<mpz_t, U>, Op2> > - { - mpz_class a(2), b(3), c(4); - double d = 5.0, e = 6.0; - mpz_class f; - f = (a + d) * b + (c - e); ASSERT_ALWAYS(f == 19); - } - { - mpz_class a(2), b(3), c(4); - double d = 5.0, e = 6.0; - mpz_class f; - f = (a + d) * b - (c - e); ASSERT_ALWAYS(f == 23); - } -} - -static void -check_mpz_30 (void) -{ - // template <class T, class U, class V, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, __gmp_binary_expr - // <__gmp_expr<mpz_t, T>, U, Op1> >, __gmp_expr<mpz_t, V>, Op2> > - { - mpz_class a(2), b(3); - signed int c = 4, d = 5, e = 6; - mpz_class f; - f = (a + c) * d + (b + e); ASSERT_ALWAYS(f == 39); - } - { - mpz_class a(2), b(3); - signed int c = 4, d = 5, e = 6; - mpz_class f; - f = (a + c) * d - (b + e); ASSERT_ALWAYS(f == 21); - } -} - -static void -check_mpz_31 (void) -{ - // template <class T, class U, class V, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, __gmp_binary_expr - // <T, __gmp_expr<mpz_t, U>, Op1> >, __gmp_expr<mpz_t, V>, Op2> > - { - mpz_class a(2), b(3); - unsigned int c = 4, d = 5, e = 6; - mpz_class f; - f = c * (a + d) + (b - e); ASSERT_ALWAYS(f == 25); - } - { - mpz_class a(2), b(3); - unsigned int c = 4, d = 5, e = 6; - mpz_class f; - f = c * (a + d) - (b - e); ASSERT_ALWAYS(f == 31); - } -} - -static void -check_mpz_32 (void) -{ - // template <class T, class U, class V, class Op1, class Op2> - // __gmp_expr<mpz_t, __gmp_binary_expr<__gmp_expr<mpz_t, __gmp_binary_expr - // <__gmp_expr<mpz_t, T>, __gmp_expr<mpz_t, U>, Op1> >, - // __gmp_expr<mpz_t, V>, Op2> > - { - mpz_class a(2), b(3), c(4); - double d = 5.0, e = 6.0, f = 7.0; - mpz_class g; - g = (a + d) * (b - e) + (c + f); ASSERT_ALWAYS(g == -10); - } - { - mpz_class a(2), b(3), c(4); - double d = 5.0, e = 6.0, f = 7.0; - mpz_class g; - g = (a + d) * (b - e) - (c + f); ASSERT_ALWAYS(g == -32); - } -} - -void -check_mpq (void) -{ - // currently there's no ternary mpq operation -} - -void -check_mpf (void) -{ - // currently there's no ternary mpf operation -} - - -int -main (void) -{ - tests_start(); - - check_mpz_1 (); - check_mpz_2 (); - check_mpz_3 (); - check_mpz_4 (); - check_mpz_5 (); - check_mpz_6 (); - check_mpz_7 (); - check_mpz_8 (); - check_mpz_9 (); - check_mpz_10 (); - check_mpz_11 (); - check_mpz_12 (); - check_mpz_13 (); - check_mpz_14 (); - check_mpz_15 (); - check_mpz_16 (); - check_mpz_17 (); - check_mpz_18 (); - check_mpz_19 (); - check_mpz_20 (); - check_mpz_21 (); - check_mpz_22 (); - check_mpz_23 (); - check_mpz_24 (); - check_mpz_25 (); - check_mpz_26 (); - check_mpz_27 (); - check_mpz_28 (); - check_mpz_29 (); - check_mpz_30 (); - check_mpz_31 (); - check_mpz_32 (); - - check_mpq(); - check_mpf(); - - tests_end(); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-unary.cc b/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-unary.cc deleted file mode 100644 index d33b995d217..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/cxx/t-unary.cc +++ /dev/null @@ -1,133 +0,0 @@ -/* Test mp*_class unary expressions. - -Copyright 2001-2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <iostream> - -#include "gmp.h" -#include "gmpxx.h" -#include "gmp-impl.h" -#include "tests.h" - -using namespace std; - - -void -check_mpz (void) -{ - // template <class T, class Op> - // __gmp_expr<T, __gmp_unary_expr<__gmp_expr<T, T>, Op> > - { - mpz_class a(1); - mpz_class b(+a); ASSERT_ALWAYS(b == 1); - } - { - mpz_class a(2); - mpz_class b; - b = -a; ASSERT_ALWAYS(b == -2); - } - { - mpz_class a(3); - mpz_class b; - b = ~a; ASSERT_ALWAYS(b == -4); - } - - // template <class T, class U, class Op> - // __gmp_expr<T, __gmp_unary_expr<__gmp_expr<T, U>, Op> > - { - mpz_class a(1); - mpz_class b(-(-a)); ASSERT_ALWAYS(b == 1); - } - { - mpz_class a(2); - mpz_class b; - b = -(-(-a)); ASSERT_ALWAYS(b == -2); - } -} - -void -check_mpq (void) -{ - // template <class T, class Op> - // __gmp_expr<T, __gmp_unary_expr<__gmp_expr<T, T>, Op> > - { - mpq_class a(1); - mpq_class b(+a); ASSERT_ALWAYS(b == 1); - } - { - mpq_class a(2); - mpq_class b; - b = -a; ASSERT_ALWAYS(b == -2); - } - - // template <class T, class U, class Op> - // __gmp_expr<T, __gmp_unary_expr<__gmp_expr<T, U>, Op> > - { - mpq_class a(1); - mpq_class b(-(-a)); ASSERT_ALWAYS(b == 1); - } - { - mpq_class a(2); - mpq_class b; - b = -(-(-a)); ASSERT_ALWAYS(b == -2); - } -} - -void -check_mpf (void) -{ - // template <class T, class Op> - // __gmp_expr<T, __gmp_unary_expr<__gmp_expr<T, T>, Op> > - { - mpf_class a(1); - mpf_class b(+a); ASSERT_ALWAYS(b == 1); - } - { - mpf_class a(2); - mpf_class b; - b = -a; ASSERT_ALWAYS(b == -2); - } - - // template <class T, class U, class Op> - // __gmp_expr<T, __gmp_unary_expr<__gmp_expr<T, U>, Op> > - { - mpf_class a(1); - mpf_class b(-(-a)); ASSERT_ALWAYS(b == 1); - } - { - mpf_class a(2); - mpf_class b; - b = -(-(-a)); ASSERT_ALWAYS(b == -2); - } -} - - -int -main (void) -{ - tests_start(); - - check_mpz(); - check_mpq(); - check_mpf(); - - tests_end(); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/devel/Makefile.am b/src/plugins/e-acsl/contrib/libgmp/tests/devel/Makefile.am deleted file mode 100644 index e11c5a64e8a..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/devel/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -## Process this file with automake to generate Makefile.in - -# Copyright 2000-2002 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. - - -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la - -# add_n_sub_n add_n_sub_n_2 not yet built since mpn_add_n_sub_n doesn't yet exist -# -EXTRA_PROGRAMS = \ - aors_n anymul_1 copy divmod_1 divrem shift logops_n tst-addsub try - -allprogs: $(EXTRA_PROGRAMS) - -CLEANFILES = $(EXTRA_PROGRAMS) - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/devel/Makefile.in b/src/plugins/e-acsl/contrib/libgmp/tests/devel/Makefile.in deleted file mode 100644 index f793f0b8e81..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/devel/Makefile.in +++ /dev/null @@ -1,698 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright 2000-2002 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -EXTRA_PROGRAMS = aors_n$(EXEEXT) anymul_1$(EXEEXT) copy$(EXEEXT) \ - divmod_1$(EXEEXT) divrem$(EXEEXT) shift$(EXEEXT) \ - logops_n$(EXEEXT) tst-addsub$(EXEEXT) try$(EXEEXT) -subdir = tests/devel -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -anymul_1_SOURCES = anymul_1.c -anymul_1_OBJECTS = anymul_1.$(OBJEXT) -anymul_1_LDADD = $(LDADD) -anymul_1_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -aors_n_SOURCES = aors_n.c -aors_n_OBJECTS = aors_n.$(OBJEXT) -aors_n_LDADD = $(LDADD) -aors_n_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -copy_SOURCES = copy.c -copy_OBJECTS = copy.$(OBJEXT) -copy_LDADD = $(LDADD) -copy_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -divmod_1_SOURCES = divmod_1.c -divmod_1_OBJECTS = divmod_1.$(OBJEXT) -divmod_1_LDADD = $(LDADD) -divmod_1_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -divrem_SOURCES = divrem.c -divrem_OBJECTS = divrem.$(OBJEXT) -divrem_LDADD = $(LDADD) -divrem_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -logops_n_SOURCES = logops_n.c -logops_n_OBJECTS = logops_n.$(OBJEXT) -logops_n_LDADD = $(LDADD) -logops_n_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -shift_SOURCES = shift.c -shift_OBJECTS = shift.$(OBJEXT) -shift_LDADD = $(LDADD) -shift_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -try_SOURCES = try.c -try_OBJECTS = try.$(OBJEXT) -try_LDADD = $(LDADD) -try_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -tst_addsub_SOURCES = tst-addsub.c -tst_addsub_OBJECTS = tst-addsub.$(OBJEXT) -tst_addsub_LDADD = $(LDADD) -tst_addsub_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = anymul_1.c aors_n.c copy.c divmod_1.c divrem.c logops_n.c \ - shift.c try.c tst-addsub.c -DIST_SOURCES = anymul_1.c aors_n.c copy.c divmod_1.c divrem.c \ - logops_n.c shift.c try.c tst-addsub.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ABI = @ABI@ -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -ASMFLAGS = @ASMFLAGS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ -CC = @CC@ -CCAS = @CCAS@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CPP_FOR_BUILD = @CPP_FOR_BUILD@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@ -DEFS = @DEFS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -FGREP = @FGREP@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIMB_BITS = @GMP_LIMB_BITS@ -GMP_NAIL_BITS = @GMP_NAIL_BITS@ -GREP = @GREP@ -HAVE_CLOCK_01 = @HAVE_CLOCK_01@ -HAVE_CPUTIME_01 = @HAVE_CPUTIME_01@ -HAVE_GETRUSAGE_01 = @HAVE_GETRUSAGE_01@ -HAVE_GETTIMEOFDAY_01 = @HAVE_GETTIMEOFDAY_01@ -HAVE_HOST_CPU_FAMILY_power = @HAVE_HOST_CPU_FAMILY_power@ -HAVE_HOST_CPU_FAMILY_powerpc = @HAVE_HOST_CPU_FAMILY_powerpc@ -HAVE_SIGACTION_01 = @HAVE_SIGACTION_01@ -HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@ -HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@ -HAVE_STACK_T_01 = @HAVE_STACK_T_01@ -HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBCURSES = @LIBCURSES@ -LIBGMPXX_LDFLAGS = @LIBGMPXX_LDFLAGS@ -LIBGMP_DLL = @LIBGMP_DLL@ -LIBGMP_LDFLAGS = @LIBGMP_LDFLAGS@ -LIBM = @LIBM@ -LIBM_FOR_BUILD = @LIBM_FOR_BUILD@ -LIBOBJS = @LIBOBJS@ -LIBREADLINE = @LIBREADLINE@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -M4 = @M4@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@ -STRIP = @STRIP@ -TAL_OBJECT = @TAL_OBJECT@ -TUNE_LIBS = @TUNE_LIBS@ -TUNE_SQR_OBJ = @TUNE_SQR_OBJ@ -U_FOR_BUILD = @U_FOR_BUILD@ -VERSION = @VERSION@ -WITH_READLINE_01 = @WITH_READLINE_01@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gmp_srclinks = @gmp_srclinks@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -mpn_objects = @mpn_objects@ -mpn_objs_in_libgmp = @mpn_objs_in_libgmp@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la -CLEANFILES = $(EXTRA_PROGRAMS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps tests/devel/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu --ignore-deps tests/devel/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -anymul_1$(EXEEXT): $(anymul_1_OBJECTS) $(anymul_1_DEPENDENCIES) $(EXTRA_anymul_1_DEPENDENCIES) - @rm -f anymul_1$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(anymul_1_OBJECTS) $(anymul_1_LDADD) $(LIBS) - -aors_n$(EXEEXT): $(aors_n_OBJECTS) $(aors_n_DEPENDENCIES) $(EXTRA_aors_n_DEPENDENCIES) - @rm -f aors_n$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(aors_n_OBJECTS) $(aors_n_LDADD) $(LIBS) - -copy$(EXEEXT): $(copy_OBJECTS) $(copy_DEPENDENCIES) $(EXTRA_copy_DEPENDENCIES) - @rm -f copy$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(copy_OBJECTS) $(copy_LDADD) $(LIBS) - -divmod_1$(EXEEXT): $(divmod_1_OBJECTS) $(divmod_1_DEPENDENCIES) $(EXTRA_divmod_1_DEPENDENCIES) - @rm -f divmod_1$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(divmod_1_OBJECTS) $(divmod_1_LDADD) $(LIBS) - -divrem$(EXEEXT): $(divrem_OBJECTS) $(divrem_DEPENDENCIES) $(EXTRA_divrem_DEPENDENCIES) - @rm -f divrem$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(divrem_OBJECTS) $(divrem_LDADD) $(LIBS) - -logops_n$(EXEEXT): $(logops_n_OBJECTS) $(logops_n_DEPENDENCIES) $(EXTRA_logops_n_DEPENDENCIES) - @rm -f logops_n$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(logops_n_OBJECTS) $(logops_n_LDADD) $(LIBS) - -shift$(EXEEXT): $(shift_OBJECTS) $(shift_DEPENDENCIES) $(EXTRA_shift_DEPENDENCIES) - @rm -f shift$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(shift_OBJECTS) $(shift_LDADD) $(LIBS) - -try$(EXEEXT): $(try_OBJECTS) $(try_DEPENDENCIES) $(EXTRA_try_DEPENDENCIES) - @rm -f try$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(try_OBJECTS) $(try_LDADD) $(LIBS) - -tst-addsub$(EXEEXT): $(tst_addsub_OBJECTS) $(tst_addsub_DEPENDENCIES) $(EXTRA_tst_addsub_DEPENDENCIES) - @rm -f tst-addsub$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tst_addsub_OBJECTS) $(tst_addsub_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(AM_V_CC)$(COMPILE) -c -o $@ $< - -.c.obj: - $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ - clean-libtool cscopelist-am ctags ctags-am distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -allprogs: $(EXTRA_PROGRAMS) - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/devel/README b/src/plugins/e-acsl/contrib/libgmp/tests/devel/README deleted file mode 100644 index 77fa65dba3f..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/devel/README +++ /dev/null @@ -1,37 +0,0 @@ -Copyright 2000, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. - - - - - DEVELOPMENT TEST PROGRAMS - - -This directory contains various programs used during development. Casual -GMP users are unlikely to find anything of interest. - -Nothing here is built or installed, nor even run in a "make check", but -there's Makefile rules to build each program, or "allprogs" to build -everything. - - - ----------------- -Local variables: -mode: text -fill-column: 76 -End: diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/devel/anymul_1.c b/src/plugins/e-acsl/contrib/libgmp/tests/devel/anymul_1.c deleted file mode 100644 index 79807b0ce51..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/devel/anymul_1.c +++ /dev/null @@ -1,256 +0,0 @@ -/* -Copyright 1996-2002, 2004, 2006-2008 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdlib.h> -#include <string.h> -#include <stdio.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" -#include "tests/tests.h" - -#ifdef OPERATION_mul_1 -#define func __gmpn_mul_1 -#define reffunc refmpn_mul_1 -#define funcname "mpn_mul_1" -#endif - -#ifdef OPERATION_addmul_1 -#define func __gmpn_addmul_1 -#define reffunc refmpn_addmul_1 -#define funcname "mpn_addmul_1" -#endif - -#ifdef OPERATION_submul_1 -#define func __gmpn_submul_1 -#define reffunc refmpn_submul_1 -#define funcname "mpn_submul_1" -#endif - -#if defined (USG) || defined (__SVR4) || defined (_UNICOS) || defined (__hpux) -#include <time.h> - -int -cputime () -{ - if (CLOCKS_PER_SEC < 100000) - return clock () * 1000 / CLOCKS_PER_SEC; - return clock () / (CLOCKS_PER_SEC / 1000); -} -#else -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> - -int -cputime () -{ - struct rusage rus; - - getrusage (0, &rus); - return rus.ru_utime.tv_sec * 1000 + rus.ru_utime.tv_usec / 1000; -} -#endif - -static void print_posneg (mp_limb_t); -static void mpn_print (mp_ptr, mp_size_t); - -#define LXW ((int) (2 * sizeof (mp_limb_t))) -#define M * 1000000 - -#ifndef CLOCK -#error "Don't know CLOCK of your machine" -#endif - -#ifndef OPS -#define OPS (CLOCK/5) -#endif -#ifndef SIZE -#define SIZE 496 -#endif -#ifndef TIMES -#define TIMES OPS/(SIZE+1) -#endif - -int -main (int argc, char **argv) -{ - mp_ptr s1, ref, rp; - mp_limb_t cy_ref, cy_try; - int i; - long t0, t; - unsigned int test; - mp_limb_t xlimb; - mp_size_t size; - double cyc; - unsigned int ntests; - - s1 = malloc (SIZE * sizeof (mp_limb_t)); - ref = malloc (SIZE * sizeof (mp_limb_t)); - rp = malloc ((SIZE + 2) * sizeof (mp_limb_t)); - rp++; - - ntests = ~(unsigned) 0; - if (argc == 2) - ntests = strtol (argv[1], 0, 0); - - for (test = 1; test <= ntests; test++) - { -#if TIMES == 1 && ! defined (PRINT) - if (test % (1 + 0x80000 / (SIZE + 20)) == 0) - { - printf ("\r%u", test); - fflush (stdout); - } -#endif - -#ifdef PLAIN_RANDOM -#define MPN_RANDOM mpn_random -#else -#define MPN_RANDOM mpn_random2 -#endif - -#ifdef RANDOM - size = random () % SIZE + 1; -#else - size = SIZE; -#endif - - rp[-1] = 0x87654321; - rp[size] = 0x12345678; - -#ifdef FIXED_XLIMB - xlimb = FIXED_XLIMB; -#else - MPN_RANDOM (&xlimb, 1); -#endif - -#if TIMES != 1 - mpn_random (s1, size); - mpn_random (rp, size); - - MPN_COPY (ref, rp, size); - t0 = cputime(); - for (i = 0; i < TIMES; i++) - func (ref, s1, size, xlimb); - t = cputime() - t0; - cyc = ((double) t * CLOCK) / (TIMES * size * 1000.0); - printf (funcname ": %5ldms (%.3f cycles/limb) [%.2f Gb/s]\n", - t, cyc, - CLOCK/cyc*GMP_LIMB_BITS*GMP_LIMB_BITS/1e9); -#endif - -#ifndef NOCHECK - MPN_RANDOM (s1, size); -#ifdef ZERO - memset (rp, 0, size * sizeof *rp); -#else - MPN_RANDOM (rp, size); -#endif -#if defined (PRINT) || defined (XPRINT) - printf ("xlimb="); - mpn_print (&xlimb, 1); -#endif -#ifdef PRINT -#ifndef OPERATION_mul_1 - printf ("%*s ", (int) (2 * sizeof(mp_limb_t)), ""); - mpn_print (rp, size); -#endif - printf ("%*s ", (int) (2 * sizeof(mp_limb_t)), ""); - mpn_print (s1, size); -#endif - - MPN_COPY (ref, rp, size); - cy_ref = reffunc (ref, s1, size, xlimb); - cy_try = func (rp, s1, size, xlimb); - -#ifdef PRINT - mpn_print (&cy_ref, 1); - mpn_print (ref, size); - mpn_print (&cy_try, 1); - mpn_print (rp, size); -#endif - - if (cy_ref != cy_try || mpn_cmp (ref, rp, size) != 0 - || rp[-1] != 0x87654321 || rp[size] != 0x12345678) - { - printf ("\n ref%*s try%*s diff\n", LXW - 3, "", 2 * LXW - 6, ""); - for (i = 0; i < size; i++) - { - printf ("%6d: ", i); - printf ("%0*llX ", LXW, (unsigned long long) ref[i]); - printf ("%0*llX ", LXW, (unsigned long long) rp[i]); - print_posneg (rp[i] - ref[i]); - printf ("\n"); - } - printf ("retval: "); - printf ("%0*llX ", LXW, (unsigned long long) cy_ref); - printf ("%0*llX ", LXW, (unsigned long long) cy_try); - print_posneg (cy_try - cy_ref); - printf ("\n"); - if (rp[-1] != 0x87654321) - printf ("clobbered at low end\n"); - if (rp[size] != 0x12345678) - printf ("clobbered at high end\n"); - printf ("TEST NUMBER %u\n", test); - abort(); - } -#endif - } - exit (0); -} - -static void -print_posneg (mp_limb_t d) -{ - char buf[LXW + 2]; - if (d == 0) - printf (" %*X", LXW, 0); - else if (-d < d) - { - sprintf (buf, "%llX", (unsigned long long) -d); - printf ("%*s-%s", LXW - (int) strlen (buf), "", buf); - } - else - { - sprintf (buf, "%llX", (unsigned long long) d); - printf ("%*s+%s", LXW - (int) strlen (buf), "", buf); - } -} - -static void -mpn_print (mp_ptr p, mp_size_t size) -{ - mp_size_t i; - - for (i = size - 1; i >= 0; i--) - { -#ifdef _LONG_LONG_LIMB - printf ("%0*lX%0*lX", (int) (sizeof(mp_limb_t)), - (unsigned long) (p[i] >> (GMP_LIMB_BITS/2)), - (int) (sizeof(mp_limb_t)), (unsigned long) (p[i])); -#else - printf ("%0*lX", (int) (2 * sizeof(mp_limb_t)), p[i]); -#endif -#ifdef SPACE - if (i != 0) - printf (" "); -#endif - } - puts (""); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/devel/aors_n.c b/src/plugins/e-acsl/contrib/libgmp/tests/devel/aors_n.c deleted file mode 100644 index 5112d0a8d94..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/devel/aors_n.c +++ /dev/null @@ -1,263 +0,0 @@ -/* -Copyright 1996-2004, 2009, 2011 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdlib.h> -#include <string.h> -#include <stdio.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#ifdef OPERATION_add_n -#define func __gmpn_add_n -#define reffunc refmpn_add_n -#define funcname "mpn_add_n" -#endif - -#ifdef OPERATION_sub_n -#define func __gmpn_sub_n -#define reffunc refmpn_sub_n -#define funcname "mpn_sub_n" -#endif - -#ifdef OPERATION_addlsh1_n -#define func __gmpn_addlsh1_n -#define reffunc refmpn_addlsh1_n -#define funcname "mpn_addlsh1_n" -#endif - -#ifdef OPERATION_sublsh1_n -#define func __gmpn_sublsh1_n -#define reffunc refmpn_sublsh1_n -#define funcname "mpn_sublsh1_n" -#endif - -#ifdef OPERATION_rsh1add_n -#define func __gmpn_rsh1add_n -#define reffunc refmpn_rsh1add_n -#define funcname "mpn_rsh1add_n" -#endif - -#ifdef OPERATION_rsh1sub_n -#define func __gmpn_rsh1sub_n -#define reffunc refmpn_rsh1sub_n -#define funcname "mpn_rsh1sub_n" -#endif - -#if defined (USG) || defined (__SVR4) || defined (_UNICOS) || defined (__hpux) -#include <time.h> - -int -cputime () -{ - if (CLOCKS_PER_SEC < 100000) - return clock () * 1000 / CLOCKS_PER_SEC; - return clock () / (CLOCKS_PER_SEC / 1000); -} -#else -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> - -int -cputime () -{ - struct rusage rus; - - getrusage (0, &rus); - return rus.ru_utime.tv_sec * 1000 + rus.ru_utime.tv_usec / 1000; -} -#endif - -static void print_posneg (mp_limb_t); -static void mpn_print (mp_ptr, mp_size_t); - -#define LXW ((int) (2 * sizeof (mp_limb_t))) -#define M * 1000000 - -#ifndef CLOCK -#error "Don't know CLOCK of your machine" -#endif - -#ifndef OPS -#define OPS (CLOCK/5) -#endif -#ifndef SIZE -#define SIZE 328 -#endif -#ifndef TIMES -#define TIMES OPS/(SIZE+1) -#endif - -int -main (int argc, char **argv) -{ - mp_ptr s1, s2, dx, dy; - mp_limb_t cyx, cyy; - int i; -#if TIMES != 1 - long t0, t; -#endif - unsigned int test; - mp_size_t size; - unsigned int ntests; - - s1 = malloc (SIZE * sizeof (mp_limb_t)); - s2 = malloc (SIZE * sizeof (mp_limb_t)); - dx = malloc ((SIZE + 2) * sizeof (mp_limb_t)); - dy = malloc ((SIZE + 2) * sizeof (mp_limb_t)); - - ntests = ~(unsigned) 0; - if (argc == 2) - ntests = strtol (argv[1], 0, 0); - - for (test = 1; test <= ntests; test++) - { -#if TIMES == 1 && ! defined (PRINT) - if (test % (SIZE > 100000 ? 1 : 100000 / SIZE) == 0) - { - printf ("\r%u", test); - fflush (stdout); - } -#endif - -#ifdef RANDOM - size = random () % SIZE + 1; -#else - size = SIZE; -#endif - - dx[0] = 0x87654321; - dy[0] = 0x87654321; - dx[size+1] = 0x12345678; - dy[size+1] = 0x12345678; - -#if TIMES != 1 - mpn_random (s1, size); - mpn_random (s2, size); - - t0 = cputime(); - for (i = 0; i < TIMES; i++) - func (dx+1, s1, s2, size); - t = cputime() - t0; - printf (funcname ": %5ldms (%.3f cycles/limb)\n", - t, ((double) t * CLOCK) / (TIMES * size * 1000.0)); -#endif - -#ifndef NOCHECK - mpn_random2 (s1, size); - mpn_random2 (s2, size); - -#ifdef PRINT - mpn_print (s1, size); - mpn_print (s2, size); -#endif - - /* Put garbage in the destination. */ - for (i = 0; i < size; i++) - { - dx[i+1] = 0xdead; - dy[i+1] = 0xbeef; - } - - cyx = reffunc (dx+1, s1, s2, size); - cyy = func (dy+1, s1, s2, size); - -#ifdef PRINT - mpn_print (&cyx, 1); - mpn_print (dx+1, size); - mpn_print (&cyy, 1); - mpn_print (dy+1, size); -#endif - - if (cyx != cyy || mpn_cmp (dx, dy, size+2) != 0 - || dx[0] != 0x87654321 || dx[size+1] != 0x12345678) - { - mp_size_t s, e; - for (s = 0;; s++) - if ((unsigned long long) (dx+1)[s] != (unsigned long long) (dy+1)[s]) - break; - for (e = size - 1;; e--) - if ((unsigned long long) (dx+1)[e] != (unsigned long long) (dy+1)[e]) - break; -#ifndef PRINT - for (i = s; i <= e; i++) - { - printf ("%6d: ", i); - printf ("%0*llX ", LXW, (unsigned long long) (dx+1)[i]); - printf ("%0*llX ", LXW, (unsigned long long) (dy+1)[i]); - print_posneg ((dy+1)[i] - (dx+1)[i]); - printf ("\n"); - } - printf ("%6s: ", "retval"); - printf ("%0*llX ", LXW, (unsigned long long) cyx); - printf ("%0*llX ", LXW, (unsigned long long) cyy); - print_posneg (cyx - cyy); -#endif - printf ("\n"); - if (dy[0] != 0x87654321) - printf ("clobbered at low end\n"); - if (dy[size+1] != 0x12345678) - printf ("clobbered at high end\n"); - printf ("TEST NUMBER %u\n", test); - abort(); - } -#endif - } - exit (0); -} - -static void -print_posneg (mp_limb_t d) -{ - char buf[LXW + 2]; - if (d == 0) - printf (" %*X", LXW, 0); - else if (-d < d) - { - sprintf (buf, "%llX", (unsigned long long) -d); - printf ("%*s-%s", LXW - (int) strlen (buf), "", buf); - } - else - { - sprintf (buf, "%llX", (unsigned long long) d); - printf ("%*s+%s", LXW - (int) strlen (buf), "", buf); - } -} - -static void -mpn_print (mp_ptr p, mp_size_t size) -{ - mp_size_t i; - - for (i = size - 1; i >= 0; i--) - { -#ifdef _LONG_LONG_LIMB - printf ("%0*lX%0*lX", (int) (sizeof(mp_limb_t)), - (unsigned long) (p[i] >> (GMP_LIMB_BITS/2)), - (int) (sizeof(mp_limb_t)), (unsigned long) (p[i])); -#else - printf ("%0*lX", (int) (2 * sizeof(mp_limb_t)), p[i]); -#endif -#ifdef SPACE - if (i != 0) - printf (" "); -#endif - } - puts (""); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/devel/copy.c b/src/plugins/e-acsl/contrib/libgmp/tests/devel/copy.c deleted file mode 100644 index 1f951f5389d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/devel/copy.c +++ /dev/null @@ -1,226 +0,0 @@ -/* -Copyright 1999-2001, 2004, 2009, 2011 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdlib.h> -#include <string.h> -#include <stdio.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#ifdef OPERATION_copyi -#define func MPN_COPY_INCR -#define reffunc refmpn_copyi -#define funcname "MPN_COPY_INCR" -#endif - -#ifdef OPERATION_copyd -#define func MPN_COPY_DECR -#define reffunc refmpn_copyd -#define funcname "MPN_COPY_DECR" -#endif - -#if defined (USG) || defined (__SVR4) || defined (_UNICOS) || defined (__hpux) -#include <time.h> - -int -cputime () -{ - if (CLOCKS_PER_SEC < 100000) - return clock () * 1000 / CLOCKS_PER_SEC; - return clock () / (CLOCKS_PER_SEC / 1000); -} -#else -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> - -int -cputime () -{ - struct rusage rus; - - getrusage (0, &rus); - return rus.ru_utime.tv_sec * 1000 + rus.ru_utime.tv_usec / 1000; -} -#endif - -static void print_posneg (mp_limb_t); -static void mpn_print (mp_ptr, mp_size_t); - -#define LXW ((int) (2 * sizeof (mp_limb_t))) -#define M * 1000000 - -#ifndef CLOCK -#error "Don't know CLOCK of your machine" -#endif - -#ifndef OPS -#define OPS (CLOCK/5) -#endif -#ifndef SIZE -#define SIZE 496 -#endif -#ifndef TIMES -#define TIMES OPS/(SIZE+1) -#endif - -int -main (int argc, char **argv) -{ - mp_ptr s1, dx, dy; - int i; - long t0, t; - unsigned int test; - mp_size_t size; - unsigned int ntests; - - s1 = malloc (SIZE * sizeof (mp_limb_t)); - dx = malloc ((SIZE + 2) * sizeof (mp_limb_t)); - dy = malloc ((SIZE + 2) * sizeof (mp_limb_t)); - - ntests = ~(unsigned) 0; - if (argc == 2) - ntests = strtol (argv[1], 0, 0); - - for (test = 1; test <= ntests; test++) - { -#if TIMES == 1 && ! defined (PRINT) - if (test % (SIZE > 100000 ? 1 : 100000 / SIZE) == 0) - { - printf ("\r%u", test); - fflush (stdout); - } -#endif - -#ifdef RANDOM - size = random () % SIZE + 1; -#else - size = SIZE; -#endif - - dx[0] = 0x87654321; - dy[0] = 0x87654321; - dx[size+1] = 0x12345678; - dy[size+1] = 0x12345678; - -#if TIMES != 1 - mpn_random (s1, size); - - t0 = cputime(); - for (i = 0; i < TIMES; i++) - func (dx+1, s1, size); - t = cputime() - t0; - printf (funcname ": %5ldms (%.3f cycles/limb)\n", - t, ((double) t * CLOCK) / (TIMES * size * 1000.0)); -#endif - -#ifndef NOCHECK - mpn_random2 (s1, size); - -#ifdef PRINT - mpn_print (s1, size); -#endif - - /* Put garbage in the destination. */ - for (i = 0; i < size; i++) - { - dx[i+1] = 0xdead; - dy[i+1] = 0xbeef; - } - - reffunc (dx+1, s1, size); - func (dy+1, s1, size); - -#ifdef PRINT - mpn_print (dx+1, size); - mpn_print (dy+1, size); -#endif - - if (mpn_cmp (dx, dy, size+2) != 0 - || dx[0] != 0x87654321 || dx[size+1] != 0x12345678) - { - mp_size_t s, e; - for (s = 0;; s++) - if ((unsigned long long) (dx+1)[s] != (unsigned long long) (dy+1)[s]) - break; - for (e = size - 1;; e--) - if ((unsigned long long) (dx+1)[e] != (unsigned long long) (dy+1)[e]) - break; -#ifndef PRINT - for (i = s; i <= e; i++) - { - printf ("%6d: ", i); - printf ("%0*llX ", LXW, (unsigned long long) (dx+1)[i]); - printf ("%0*llX ", LXW, (unsigned long long) (dy+1)[i]); - print_posneg ((dy+1)[i] - (dx+1)[i]); - printf ("\n"); - } -#endif - printf ("\n"); - if (dy[0] != 0x87654321) - printf ("clobbered at low end\n"); - if (dy[size+1] != 0x12345678) - printf ("clobbered at high end\n"); - printf ("TEST NUMBER %u\n", test); - abort(); - } -#endif - } - exit (0); -} - -static void -print_posneg (mp_limb_t d) -{ - char buf[LXW + 2]; - if (d == 0) - printf (" %*X", LXW, 0); - else if (-d < d) - { - sprintf (buf, "%llX", (unsigned long long) -d); - printf ("%*s-%s", LXW - (int) strlen (buf), "", buf); - } - else - { - sprintf (buf, "%llX", (unsigned long long) d); - printf ("%*s+%s", LXW - (int) strlen (buf), "", buf); - } -} - -static void -mpn_print (mp_ptr p, mp_size_t size) -{ - mp_size_t i; - - for (i = size - 1; i >= 0; i--) - { -#ifdef _LONG_LONG_LIMB - printf ("%0*lX%0*lX", (int) (sizeof(mp_limb_t)), - (unsigned long) (p[i] >> (GMP_LIMB_BITS/2)), - (int) (sizeof(mp_limb_t)), (unsigned long) (p[i])); -#else - printf ("%0*lX", (int) (2 * sizeof(mp_limb_t)), p[i]); -#endif -#ifdef SPACE - if (i != 0) - printf (" "); -#endif - } - puts (""); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/devel/divmod_1.c b/src/plugins/e-acsl/contrib/libgmp/tests/devel/divmod_1.c deleted file mode 100644 index 54eaf36d965..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/devel/divmod_1.c +++ /dev/null @@ -1,200 +0,0 @@ -/* -Copyright 1996, 1998, 2000, 2001, 2007 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#if defined (USG) || defined (__SVR4) || defined (_UNICOS) || defined (__hpux) -#include <time.h> - -int -cputime () -{ - if (CLOCKS_PER_SEC < 100000) - return clock () * 1000 / CLOCKS_PER_SEC; - return clock () / (CLOCKS_PER_SEC / 1000); -} -#else -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> - -int -cputime () -{ - struct rusage rus; - - getrusage (0, &rus); - return rus.ru_utime.tv_sec * 1000 + rus.ru_utime.tv_usec / 1000; -} -#endif - -static void mpn_print (mp_ptr, mp_size_t); - -#define M * 1000000 - -#ifndef CLOCK -#error "Don't know CLOCK of your machine" -#endif - -#ifndef OPS -#define OPS 20000000 -#endif -#ifndef SIZE -#define SIZE 1000 -#endif -#ifndef TIMES -#define TIMES OPS/SIZE -#endif - -#ifndef FSIZE -#define FSIZE SIZE -#endif - -int -main () -{ - mp_limb_t np[SIZE]; - mp_limb_t dx[SIZE + FSIZE + 2]; - mp_limb_t dy[SIZE + FSIZE + 2]; - mp_limb_t dlimb; - mp_size_t nn, fn; - mp_limb_t retx, rety; - int test; -#if TIMES != 1 - int i; - long t0, t; - double cyc; -#endif - - for (test = 0; ; test++) - { -#if TIMES == 1 && ! defined (PRINT) - if (test % (SIZE > 100000 ? 1 : 100000 / SIZE) == 0) - { - printf ("\r%u", test); - fflush (stdout); - } -#endif - -#ifdef RANDOM - nn = random () % (SIZE + 1); - fn = random () % (FSIZE + 1); -#else - nn = SIZE; - fn = FSIZE; -#endif - - dx[0] = 0x87654321; - dx[nn + fn + 1] = 0x12345678; - dy[0] = 0x87654321; - dy[nn + fn + 1] = 0x12345678; - mpn_random2 (np, nn); - -#ifdef FIXED_DLIMB - dlimb = FIXED_DLIMB; -#else - do - { - mpn_random2 (&dlimb, 1); -#ifdef FORCE_NORM - dlimb |= GMP_NUMB_HIGHBIT; -#endif -#ifdef FORCE_UNNORM - dlimb &= GMP_NUMB_MAX >> 1; -#endif - } - while (dlimb == 0); -#endif - -#if defined (PRINT) || defined (XPRINT) - printf ("N="); - mpn_print (np, nn); - printf ("D="); - mpn_print (&dlimb, 1); - printf ("nn=%ld\n", (long) nn); -#endif - -#if TIMES != 1 - t0 = cputime(); - for (i = 0; i < TIMES; i++) - mpn_divrem_1 (dx + 1, 0L, np, nn, dlimb); - t = cputime() - t0; - cyc = ((double) t * CLOCK) / (TIMES * nn * 1000.0); - printf ("mpn_divrem_1 int: %5ldms (%.3f cycles/limb) [%.2f Gb/s]\n", - t, cyc, - CLOCK/cyc*GMP_LIMB_BITS*GMP_LIMB_BITS/1e9); - t0 = cputime(); - for (i = 0; i < TIMES; i++) - mpn_divrem_1 (dx + 1, fn, np, 0, dlimb); - t = cputime() - t0; - cyc = ((double) t * CLOCK) / (TIMES * fn * 1000.0); - printf ("mpn_divrem_1 frac: %5ldms (%.3f cycles/limb) [%.2f Gb/s]\n", - t, cyc, - CLOCK/cyc*GMP_LIMB_BITS*GMP_LIMB_BITS/1e9); -#endif - - retx = refmpn_divrem_1 (dx + 1, fn, np, nn, dlimb); - rety = mpn_divrem_1 (dy + 1, fn, np, nn, dlimb); - -#ifndef NOCHECK - if (retx != rety || mpn_cmp (dx, dy, fn + nn + 2) != 0) - { - printf ("ERROR in test %d, nn=%ld, fn=%ld\n", test, nn, fn); - mpn_print (np, nn); - mpn_print (&dlimb, 1); - printf ("rq: "); - mpn_print (dx + 1, nn + fn); - printf ("rr: %*lX\n", (int) (2 * sizeof(mp_limb_t)), retx); - printf (" q: "); - mpn_print (dy + 1, nn + fn); - printf (" r: %*lX\n", (int) (2 * sizeof(mp_limb_t)), rety); - if (dy[0] != 0x87654321) - printf ("clobbered at low end %*lX\n", (int) (2 * sizeof(mp_limb_t)), dy[0]); - if (dy[nn + fn + 1] != 0x12345678) - printf ("clobbered at high end\n"); - abort (); - } -#endif - } -} - -static void -mpn_print (mp_ptr p, mp_size_t size) -{ - mp_size_t i; - - for (i = size - 1; i >= 0; i--) - { -#ifdef _LONG_LONG_LIMB - printf ("%0*lX%0*lX", (int) (sizeof(mp_limb_t)), - (unsigned long) (p[i] >> (GMP_LIMB_BITS/2)), - (int) (sizeof(mp_limb_t)), (unsigned long) (p[i])); -#else - printf ("%0*lX", (int) (2 * sizeof(mp_limb_t)), p[i]); -#endif -#ifdef SPACE - if (i != 0) - printf (" "); -#endif - } - puts (""); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/devel/divrem.c b/src/plugins/e-acsl/contrib/libgmp/tests/devel/divrem.c deleted file mode 100644 index 85807890783..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/devel/divrem.c +++ /dev/null @@ -1,119 +0,0 @@ -/* -Copyright 1996-1998, 2000, 2001, 2007, 2009 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" - -#if defined (USG) || defined (__SVR4) || defined (_UNICOS) || defined (__hpux) -#include <time.h> - -int -cputime () -{ - if (CLOCKS_PER_SEC < 100000) - return clock () * 1000 / CLOCKS_PER_SEC; - return clock () / (CLOCKS_PER_SEC / 1000); -} -#else -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> - -int -cputime () -{ - struct rusage rus; - - getrusage (0, &rus); - return rus.ru_utime.tv_sec * 1000 + rus.ru_utime.tv_usec / 1000; -} -#endif - -#define M * 1000000 - -#ifndef CLOCK -#error "Don't know CLOCK of your machine" -#endif - -#ifndef OPS -#define OPS 20000000 -#endif -#ifndef SIZE -#define SIZE 100 -#endif -#ifndef TIMES -#define TIMES OPS/(SIZE+1) -#endif - -int -main () -{ - mp_limb_t nptr[2 * SIZE]; - mp_limb_t dptr[2 * SIZE]; - mp_limb_t qptr[2 * SIZE]; - mp_limb_t pptr[2 * SIZE + 1]; - mp_limb_t rptr[2 * SIZE]; - mp_size_t nsize, dsize, qsize, rsize, psize; - int test; - mp_limb_t qlimb; - - for (test = 0; ; test++) - { - printf ("%d\n", test); -#ifdef RANDOM - nsize = random () % (2 * SIZE) + 1; - dsize = random () % nsize + 1; -#else - nsize = 2 * SIZE; - dsize = SIZE; -#endif - - mpn_random2 (nptr, nsize); - mpn_random2 (dptr, dsize); - dptr[dsize - 1] |= (mp_limb_t) 1 << (GMP_LIMB_BITS - 1); - - MPN_COPY (rptr, nptr, nsize); - qlimb = mpn_divrem (qptr, (mp_size_t) 0, rptr, nsize, dptr, dsize); - rsize = dsize; - qsize = nsize - dsize; - qptr[qsize] = qlimb; - qsize += qlimb; - if (qsize == 0 || qsize > 2 * SIZE) - { - continue; /* bogus */ - } - else - { - mp_limb_t cy; - if (qsize > dsize) - mpn_mul (pptr, qptr, qsize, dptr, dsize); - else - mpn_mul (pptr, dptr, dsize, qptr, qsize); - psize = qsize + dsize; - psize -= pptr[psize - 1] == 0; - cy = mpn_add (pptr, pptr, psize, rptr, rsize); - pptr[psize] = cy; - psize += cy; - } - - if (nsize != psize || mpn_cmp (nptr, pptr, nsize) != 0) - abort (); - } -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/devel/logops_n.c b/src/plugins/e-acsl/contrib/libgmp/tests/devel/logops_n.c deleted file mode 100644 index be53336cf5f..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/devel/logops_n.c +++ /dev/null @@ -1,230 +0,0 @@ -/* -Copyright 1996-2004, 2009 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdlib.h> -#include <stdio.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#ifdef OPERATION_and_n -#define func __gmpn_and_n -#define reffunc refmpn_and_n -#define funcname "mpn_and_n" -#endif - -#ifdef OPERATION_andn_n -#define func __gmpn_andn_n -#define reffunc refmpn_andn_n -#define funcname "mpn_andn_n" -#endif - -#ifdef OPERATION_nand_n -#define func __gmpn_nand_n -#define reffunc refmpn_nand_n -#define funcname "mpn_nand_n" -#endif - -#ifdef OPERATION_ior_n -#define func __gmpn_ior_n -#define reffunc refmpn_ior_n -#define funcname "mpn_ior_n" -#endif - -#ifdef OPERATION_iorn_n -#define func __gmpn_iorn_n -#define reffunc refmpn_iorn_n -#define funcname "mpn_iorn_n" -#endif - -#ifdef OPERATION_nior_n -#define func __gmpn_nior_n -#define reffunc refmpn_nior_n -#define funcname "mpn_nior_n" -#endif - -#ifdef OPERATION_xor_n -#define func __gmpn_xor_n -#define reffunc refmpn_xor_n -#define funcname "mpn_xor_n" -#endif - -#ifdef OPERATION_xnor_n -#define func __gmpn_xnor_n -#define reffunc refmpn_xnor_n -#define funcname "mpn_xnor_n" -#endif - -#if defined (USG) || defined (__SVR4) || defined (_UNICOS) || defined (__hpux) -#include <time.h> - -int -cputime () -{ - if (CLOCKS_PER_SEC < 100000) - return clock () * 1000 / CLOCKS_PER_SEC; - return clock () / (CLOCKS_PER_SEC / 1000); -} -#else -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> - -int -cputime () -{ - struct rusage rus; - - getrusage (0, &rus); - return rus.ru_utime.tv_sec * 1000 + rus.ru_utime.tv_usec / 1000; -} -#endif - -static void mpn_print (mp_ptr, mp_size_t); - -#define M * 1000000 - -#ifndef CLOCK -#error "Don't know CLOCK of your machine" -#endif - -#ifndef OPS -#define OPS (CLOCK/5) -#endif -#ifndef SIZE -#define SIZE 328 -#endif -#ifndef TIMES -#define TIMES OPS/(SIZE+1) -#endif - -int -main (int argc, char **argv) -{ - mp_ptr s1, s2, dx, dy; - int i; - long t0, t; - unsigned int test; - mp_size_t size; - unsigned int ntests; - - s1 = malloc (SIZE * sizeof (mp_limb_t)); - s2 = malloc (SIZE * sizeof (mp_limb_t)); - dx = malloc ((SIZE + 2) * sizeof (mp_limb_t)); - dy = malloc ((SIZE + 2) * sizeof (mp_limb_t)); - - ntests = ~(unsigned) 0; - if (argc == 2) - ntests = strtol (argv[1], 0, 0); - - for (test = 1; test <= ntests; test++) - { -#if TIMES == 1 && ! defined (PRINT) - if (test % (SIZE > 100000 ? 1 : 100000 / SIZE) == 0) - { - printf ("\r%d", test); - fflush (stdout); - } -#endif - -#ifdef RANDOM - size = random () % SIZE + 1; -#else - size = SIZE; -#endif - - dx[0] = 0x87654321; - dy[0] = 0x87654321; - dx[size+1] = 0x12345678; - dy[size+1] = 0x12345678; - -#if TIMES != 1 - mpn_random (s1, size); - mpn_random (s2, size); - - t0 = cputime(); - for (i = 0; i < TIMES; i++) - func (dx+1, s1, s2, size); - t = cputime() - t0; - printf (funcname ": %5ldms (%.3f cycles/limb)\n", - t, ((double) t * CLOCK) / (TIMES * size * 1000.0)); -#endif - -#ifndef NOCHECK - mpn_random2 (s1, size); - mpn_random2 (s2, size); - -#ifdef PRINT - mpn_print (s1, size); - mpn_print (s2, size); -#endif - - /* Put garbage in the destination. */ - for (i = 0; i < size; i++) - { - dx[i+1] = 0xdead; - dy[i+1] = 0xbeef; - } - - reffunc (dx+1, s1, s2, size); - func (dy+1, s1, s2, size); -#ifdef PRINT - mpn_print (dx+1, size); - mpn_print (dy+1, size); -#endif - if (mpn_cmp (dx, dy, size+2) != 0 - || dx[0] != 0x87654321 || dx[size+1] != 0x12345678) - { -#ifndef PRINT - mpn_print (dx+1, size); - mpn_print (dy+1, size); -#endif - printf ("\n"); - if (dy[0] != 0x87654321) - printf ("clobbered at low end\n"); - if (dy[size+1] != 0x12345678) - printf ("clobbered at high end\n"); - printf ("TEST NUMBER %u\n", test); - abort(); - } -#endif - } - exit (0); -} - -static void -mpn_print (mp_ptr p, mp_size_t size) -{ - mp_size_t i; - - for (i = size - 1; i >= 0; i--) - { -#ifdef _LONG_LONG_LIMB - printf ("%0*lX%0*lX", (int) (sizeof(mp_limb_t)), - (unsigned long) (p[i] >> (GMP_LIMB_BITS/2)), - (int) (sizeof(mp_limb_t)), (unsigned long) (p[i])); -#else - printf ("%0*lX", (int) (2 * sizeof(mp_limb_t)), p[i]); -#endif -#ifdef SPACE - if (i != 0) - printf (" "); -#endif - } - puts (""); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/devel/shift.c b/src/plugins/e-acsl/contrib/libgmp/tests/devel/shift.c deleted file mode 100644 index 611a7767765..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/devel/shift.c +++ /dev/null @@ -1,245 +0,0 @@ -/* -Copyright 1996, 1998-2001, 2004, 2007, 2009, 2011 Free Software Foundation, -Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdlib.h> -#include <string.h> -#include <stdio.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#ifdef OPERATION_lshift -#define func __gmpn_lshift -#define reffunc refmpn_lshift -#define funcname "mpn_lshift" -#endif - -#ifdef OPERATION_rshift -#define func __gmpn_rshift -#define reffunc refmpn_rshift -#define funcname "mpn_rshift" -#endif - -#if defined (USG) || defined (__SVR4) || defined (_UNICOS) || defined (__hpux) -#include <time.h> - -int -cputime () -{ - if (CLOCKS_PER_SEC < 100000) - return clock () * 1000 / CLOCKS_PER_SEC; - return clock () / (CLOCKS_PER_SEC / 1000); -} -#else -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> - -int -cputime () -{ - struct rusage rus; - - getrusage (0, &rus); - return rus.ru_utime.tv_sec * 1000 + rus.ru_utime.tv_usec / 1000; -} -#endif - -static void print_posneg (mp_limb_t); -static void mpn_print (mp_ptr, mp_size_t); - -#define LXW ((int) (2 * sizeof (mp_limb_t))) -#define M * 1000000 - -#ifndef CLOCK -#error "Don't know CLOCK of your machine" -#endif - -#ifndef OPS -#define OPS (CLOCK/5) -#endif -#ifndef SIZE -#define SIZE 496 -#endif -#ifndef TIMES -#define TIMES OPS/(SIZE+1) -#endif - -#ifndef CNT -int CNT = 4; -#endif - -int -main (int argc, char **argv) -{ - mp_ptr s1, dx, dy; - mp_limb_t cyx, cyy; - int i; - long t0, t; - unsigned int test; - int cnt = CNT; - mp_size_t size; - unsigned int ntests; - - s1 = malloc (SIZE * sizeof (mp_limb_t)); - dx = malloc ((SIZE + 2) * sizeof (mp_limb_t)); - dy = malloc ((SIZE + 2) * sizeof (mp_limb_t)); - - ntests = ~(unsigned) 0; - if (argc == 2) - ntests = strtol (argv[1], 0, 0); - - for (test = 1; test <= ntests; test++) - { -#if TIMES == 1 && ! defined (PRINT) - if (test % (SIZE > 100000 ? 1 : 100000 / SIZE) == 0) - { - printf ("\r%u", test); - fflush (stdout); - } -#endif - -#if TIMES == 1 - cnt = random () % (GMP_NUMB_BITS - 1) + 1; -#endif - -#ifdef RANDOM - size = random () % SIZE + 1; -#else - size = SIZE; -#endif - - dx[0] = 0x87654321; - dy[0] = 0x87654321; - dx[size+1] = 0x12345678; - dy[size+1] = 0x12345678; - -#if TIMES != 1 - mpn_random (s1, size); - - t0 = cputime(); - for (i = 0; i < TIMES; i++) - func (dx+1, s1, size, cnt); - t = cputime() - t0; - printf (funcname ": %5ldms (%.3f cycles/limb)\n", - t, ((double) t * CLOCK) / (TIMES * size * 1000.0)); -#endif - -#ifndef NOCHECK - mpn_random (s1, size); - -#ifdef PRINT - printf ("cnt=%-*d ", (int) (2 * sizeof(mp_limb_t)) - 4, cnt); - mpn_print (s1, size); -#endif - - /* Put garbage in the destination. */ - for (i = 0; i < size; i++) - { - dx[i+1] = 0xdead; - dy[i+1] = 0xbeef; - } - - cyx = reffunc (dx+1, s1, size, cnt); - cyy = func (dy+1, s1, size, cnt); - -#ifdef PRINT - mpn_print (&cyx, 1); - mpn_print (dx+1, size); - mpn_print (&cyy, 1); - mpn_print (dy+1, size); -#endif - - if (cyx != cyy || mpn_cmp (dx, dy, size+2) != 0 - || dx[0] != 0x87654321 || dx[size+1] != 0x12345678) - { - mp_size_t s, e; - for (s = 0;; s++) - if ((unsigned long long) (dx+1)[s] != (unsigned long long) (dy+1)[s]) - break; - for (e = size - 1;; e--) - if ((unsigned long long) (dx+1)[e] != (unsigned long long) (dy+1)[e]) - break; -#ifndef PRINT - printf ("cnt=%-*d\n", (int) (2 * sizeof(mp_limb_t)) - 4, cnt); - for (i = s; i <= e; i++) - { - printf ("%6d: ", i); - printf ("%0*llX ", LXW, (unsigned long long) (dx+1)[i]); - printf ("%0*llX ", LXW, (unsigned long long) (dy+1)[i]); - print_posneg ((dy+1)[i] - (dx+1)[i]); - printf ("\n"); - } - printf ("%6s: ", "retval"); - printf ("%0*llX ", LXW, (unsigned long long) cyx); - printf ("%0*llX ", LXW, (unsigned long long) cyy); - print_posneg (cyx - cyy); -#endif - printf ("\n"); - if (dy[0] != 0x87654321) - printf ("clobbered at low end\n"); - if (dy[size+1] != 0x12345678) - printf ("clobbered at high end\n"); - printf ("TEST NUMBER %u\n", test); - abort(); - } -#endif - } - exit (0); -} - -static void -print_posneg (mp_limb_t d) -{ - char buf[LXW + 2]; - if (d == 0) - printf (" %*X", LXW, 0); - else if (-d < d) - { - sprintf (buf, "%llX", (unsigned long long) -d); - printf ("%*s-%s", LXW - (int) strlen (buf), "", buf); - } - else - { - sprintf (buf, "%llX", (unsigned long long) d); - printf ("%*s+%s", LXW - (int) strlen (buf), "", buf); - } -} - -static void -mpn_print (mp_ptr p, mp_size_t size) -{ - mp_size_t i; - - for (i = size - 1; i >= 0; i--) - { -#ifdef _LONG_LONG_LIMB - printf ("%0*lX%0*lX", (int) (sizeof(mp_limb_t)), - (unsigned long) (p[i] >> (GMP_LIMB_BITS/2)), - (int) (sizeof(mp_limb_t)), (unsigned long) (p[i])); -#else - printf ("%0*lX", (int) (2 * sizeof(mp_limb_t)), p[i]); -#endif -#ifdef SPACE - if (i != 0) - printf (" "); -#endif - } - puts (""); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/devel/try.c b/src/plugins/e-acsl/contrib/libgmp/tests/devel/try.c deleted file mode 100644 index fe15b2dd897..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/devel/try.c +++ /dev/null @@ -1,3659 +0,0 @@ -/* Run some tests on various mpn routines. - - THIS IS A TEST PROGRAM USED ONLY FOR DEVELOPMENT. IT'S ALMOST CERTAIN TO - BE SUBJECT TO INCOMPATIBLE CHANGES IN FUTURE VERSIONS OF GMP. - -Copyright 2000-2006, 2008, 2009, 2011, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -/* Usage: try [options] <function>... - - For example, "./try mpn_add_n" to run tests of that function. - - Combinations of alignments and overlaps are tested, with redzones above - or below the destinations, and with the sources write-protected. - - The number of tests performed becomes ridiculously large with all the - combinations, and for that reason this can't be a part of a "make check", - it's meant only for development. The code isn't very pretty either. - - During development it can help to disable the redzones, since seeing the - rest of the destination written can show where the wrong part is, or if - the dst pointers are off by 1 or whatever. The magic DEADVAL initial - fill (see below) will show locations never written. - - The -s option can be used to test only certain size operands, which is - useful if some new code doesn't yet support say sizes less than the - unrolling, or whatever. - - When a problem occurs it'll of course be necessary to run the program - under gdb to find out quite where, how and why it's going wrong. Disable - the spinner with the -W option when doing this, or single stepping won't - work. Using the "-1" option to run with simple data can be useful. - - New functions to test can be added in try_array[]. If a new TYPE is - required then add it to the existing constants, set up its parameters in - param_init(), and add it to the call() function. Extra parameter fields - can be added if necessary, or further interpretations given to existing - fields. - - - Portability: - - This program is not designed for use on Cray vector systems under Unicos, - it will fail to compile due to missing _SC_PAGE_SIZE. Those systems - don't really have pages or mprotect. We could arrange to run the tests - without the redzones, but we haven't bothered currently. - - - Enhancements: - - umul_ppmm support is not very good, lots of source data is generated - whereas only two limbs are needed. - - Make a little scheme for interpreting the "SIZE" selections uniformly. - - Make tr->size==SIZE_2 work, for the benefit of find_a which wants just 2 - source limbs. Possibly increase the default repetitions in that case. - - Automatically detect gdb and disable the spinner (use -W for now). - - Make a way to re-run a failing case in the debugger. Have an option to - snapshot each test case before it's run so the data is available if a - segv occurs. (This should be more reliable than the current print_all() - in the signal handler.) - - When alignment means a dst isn't hard against the redzone, check the - space in between remains unchanged. - - When a source overlaps a destination, don't run both s[i].high 0 and 1, - as s[i].high has no effect. Maybe encode s[i].high into overlap->s[i]. - - When partial overlaps aren't done, don't loop over source alignments - during overlaps. - - Try to make the looping code a bit less horrible. Right now it's pretty - hard to see what iterations are actually done. - - Perhaps specific setups and loops for each style of function under test - would be clearer than a parameterized general loop. There's lots of - stuff common to all functions, but the exceptions get messy. - - When there's no overlap, run with both src>dst and src<dst. A subtle - calling-conventions violation occurred in a P6 copy which depended on the - relative location of src and dst. - - multiplier_N is more or less a third source region for the addmul_N - routines, and could be done with the redzoned region scheme. - -*/ - - -/* always do assertion checking */ -#define WANT_ASSERT 1 - -#include "config.h" - -#include <errno.h> -#include <limits.h> -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> - -#if HAVE_UNISTD_H -#include <unistd.h> -#endif - -#if HAVE_SYS_MMAN_H -#include <sys/mman.h> -#endif - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" -#include "tests.h" - - -#if !HAVE_DECL_OPTARG -extern char *optarg; -extern int optind, opterr; -#endif - -#if ! HAVE_DECL_SYS_NERR -extern int sys_nerr; -#endif - -#if ! HAVE_DECL_SYS_ERRLIST -extern char *sys_errlist[]; -#endif - -#if ! HAVE_STRERROR -char * -strerror (int n) -{ - if (n < 0 || n >= sys_nerr) - return "errno out of range"; - else - return sys_errlist[n]; -} -#endif - -/* Rumour has it some systems lack a define of PROT_NONE. */ -#ifndef PROT_NONE -#define PROT_NONE 0 -#endif - -/* Dummy defines for when mprotect doesn't exist. */ -#ifndef PROT_READ -#define PROT_READ 0 -#endif -#ifndef PROT_WRITE -#define PROT_WRITE 0 -#endif - -/* _SC_PAGESIZE is standard, but hpux 9 and possibly other systems have - _SC_PAGE_SIZE instead. */ -#if defined (_SC_PAGE_SIZE) && ! defined (_SC_PAGESIZE) -#define _SC_PAGESIZE _SC_PAGE_SIZE -#endif - - -#ifdef EXTRA_PROTOS -EXTRA_PROTOS -#endif -#ifdef EXTRA_PROTOS2 -EXTRA_PROTOS2 -#endif - - -#define DEFAULT_REPETITIONS 10 - -int option_repetitions = DEFAULT_REPETITIONS; -int option_spinner = 1; -int option_redzones = 1; -int option_firstsize = 0; -int option_lastsize = 500; -int option_firstsize2 = 0; - -#define ALIGNMENTS 4 -#define OVERLAPS 4 -#define CARRY_RANDOMS 5 -#define MULTIPLIER_RANDOMS 5 -#define DIVISOR_RANDOMS 5 -#define FRACTION_COUNT 4 - -int option_print = 0; - -#define DATA_TRAND 0 -#define DATA_ZEROS 1 -#define DATA_SEQ 2 -#define DATA_FFS 3 -#define DATA_2FD 4 -int option_data = DATA_TRAND; - - -mp_size_t pagesize; -#define PAGESIZE_LIMBS (pagesize / GMP_LIMB_BYTES) - -/* must be a multiple of the page size */ -#define REDZONE_BYTES (pagesize * 16) -#define REDZONE_LIMBS (REDZONE_BYTES / GMP_LIMB_BYTES) - - -#define MAX3(x,y,z) (MAX (x, MAX (y, z))) - -#if GMP_LIMB_BITS == 32 -#define DEADVAL CNST_LIMB(0xDEADBEEF) -#else -#define DEADVAL CNST_LIMB(0xDEADBEEFBADDCAFE) -#endif - - -struct region_t { - mp_ptr ptr; - mp_size_t size; -}; - - -#define TRAP_NOWHERE 0 -#define TRAP_REF 1 -#define TRAP_FUN 2 -#define TRAP_SETUPS 3 -int trap_location = TRAP_NOWHERE; - - -#define NUM_SOURCES 5 -#define NUM_DESTS 2 - -struct source_t { - struct region_t region; - int high; - mp_size_t align; - mp_ptr p; -}; - -struct source_t s[NUM_SOURCES]; - -struct dest_t { - int high; - mp_size_t align; - mp_size_t size; -}; - -struct dest_t d[NUM_DESTS]; - -struct source_each_t { - mp_ptr p; -}; - -struct dest_each_t { - struct region_t region; - mp_ptr p; -}; - -mp_size_t size; -mp_size_t size2; -unsigned long shift; -mp_limb_t carry; -mp_limb_t divisor; -mp_limb_t multiplier; -mp_limb_t multiplier_N[8]; - -struct each_t { - const char *name; - struct dest_each_t d[NUM_DESTS]; - struct source_each_t s[NUM_SOURCES]; - mp_limb_t retval; -}; - -struct each_t ref = { "Ref" }; -struct each_t fun = { "Fun" }; - -#define SRC_SIZE(n) ((n) == 1 && tr->size2 ? size2 : size) - -void validate_fail (void); - - -#if HAVE_TRY_NEW_C -#include "try-new.c" -#endif - - -typedef mp_limb_t (*tryfun_t) (ANYARGS); - -struct try_t { - char retval; - - char src[NUM_SOURCES]; - char dst[NUM_DESTS]; - -#define SIZE_YES 1 -#define SIZE_ALLOW_ZERO 2 -#define SIZE_1 3 /* 1 limb */ -#define SIZE_2 4 /* 2 limbs */ -#define SIZE_3 5 /* 3 limbs */ -#define SIZE_4 6 /* 4 limbs */ -#define SIZE_6 7 /* 6 limbs */ -#define SIZE_FRACTION 8 /* size2 is fraction for divrem etc */ -#define SIZE_SIZE2 9 -#define SIZE_PLUS_1 10 -#define SIZE_SUM 11 -#define SIZE_DIFF 12 -#define SIZE_DIFF_PLUS_1 13 -#define SIZE_DIFF_PLUS_3 14 -#define SIZE_RETVAL 15 -#define SIZE_CEIL_HALF 16 -#define SIZE_GET_STR 17 -#define SIZE_PLUS_MSIZE_SUB_1 18 /* size+msize-1 */ -#define SIZE_ODD 19 - char size; - char size2; - char dst_size[NUM_DESTS]; - - /* multiplier_N size in limbs */ - mp_size_t msize; - - char dst_bytes[NUM_DESTS]; - - char dst0_from_src1; - -#define CARRY_BIT 1 /* single bit 0 or 1 */ -#define CARRY_3 2 /* 0, 1, 2 */ -#define CARRY_4 3 /* 0 to 3 */ -#define CARRY_LIMB 4 /* any limb value */ -#define CARRY_DIVISOR 5 /* carry<divisor */ - char carry; - - /* a fudge to tell the output when to print negatives */ - char carry_sign; - - char multiplier; - char shift; - -#define DIVISOR_LIMB 1 -#define DIVISOR_NORM 2 -#define DIVISOR_ODD 3 - char divisor; - -#define DATA_NON_ZERO 1 -#define DATA_GCD 2 -#define DATA_SRC0_ODD 3 -#define DATA_SRC0_HIGHBIT 4 -#define DATA_SRC1_ODD 5 -#define DATA_SRC1_ODD_PRIME 6 -#define DATA_SRC1_HIGHBIT 7 -#define DATA_MULTIPLE_DIVISOR 8 -#define DATA_UDIV_QRNND 9 -#define DATA_DIV_QR_1 10 - char data; - -/* Default is allow full overlap. */ -#define OVERLAP_NONE 1 -#define OVERLAP_LOW_TO_HIGH 2 -#define OVERLAP_HIGH_TO_LOW 3 -#define OVERLAP_NOT_SRCS 4 -#define OVERLAP_NOT_SRC2 8 -#define OVERLAP_NOT_DST2 16 - char overlap; - - tryfun_t reference; - const char *reference_name; - - void (*validate) (void); - const char *validate_name; -}; - -struct try_t *tr; - - -void -validate_mod_34lsub1 (void) -{ -#define CNST_34LSUB1 ((CNST_LIMB(1) << (3 * (GMP_NUMB_BITS / 4))) - 1) - - mp_srcptr ptr = s[0].p; - int error = 0; - mp_limb_t got, got_mod, want, want_mod; - - ASSERT (size >= 1); - - got = fun.retval; - got_mod = got % CNST_34LSUB1; - - want = refmpn_mod_34lsub1 (ptr, size); - want_mod = want % CNST_34LSUB1; - - if (got_mod != want_mod) - { - gmp_printf ("got 0x%MX reduced from 0x%MX\n", got_mod, got); - gmp_printf ("want 0x%MX reduced from 0x%MX\n", want_mod, want); - error = 1; - } - - if (error) - validate_fail (); -} - -void -validate_divexact_1 (void) -{ - mp_srcptr src = s[0].p; - mp_srcptr dst = fun.d[0].p; - int error = 0; - - ASSERT (size >= 1); - - { - mp_ptr tp = refmpn_malloc_limbs (size); - mp_limb_t rem; - - rem = refmpn_divrem_1 (tp, 0, src, size, divisor); - if (rem != 0) - { - gmp_printf ("Remainder a%%d == 0x%MX, mpn_divexact_1 undefined\n", rem); - error = 1; - } - if (! refmpn_equal_anynail (tp, dst, size)) - { - printf ("Quotient a/d wrong\n"); - mpn_trace ("fun ", dst, size); - mpn_trace ("want", tp, size); - error = 1; - } - free (tp); - } - - if (error) - validate_fail (); -} - -void -validate_bdiv_q_1 - (void) -{ - mp_srcptr src = s[0].p; - mp_srcptr dst = fun.d[0].p; - int error = 0; - - ASSERT (size >= 1); - - { - mp_ptr tp = refmpn_malloc_limbs (size + 1); - - refmpn_mul_1 (tp, dst, size, divisor); - /* Set ignored low bits */ - tp[0] |= (src[0] & LOW_ZEROS_MASK (divisor)); - if (! refmpn_equal_anynail (tp, src, size)) - { - printf ("Bdiv wrong: res * divisor != src (mod B^size)\n"); - mpn_trace ("res ", dst, size); - mpn_trace ("src ", src, size); - error = 1; - } - free (tp); - } - - if (error) - validate_fail (); -} - - -void -validate_modexact_1c_odd (void) -{ - mp_srcptr ptr = s[0].p; - mp_limb_t r = fun.retval; - int error = 0; - - ASSERT (size >= 1); - ASSERT (divisor & 1); - - if ((r & GMP_NAIL_MASK) != 0) - printf ("r has non-zero nail\n"); - - if (carry < divisor) - { - if (! (r < divisor)) - { - printf ("Don't have r < divisor\n"); - error = 1; - } - } - else /* carry >= divisor */ - { - if (! (r <= divisor)) - { - printf ("Don't have r <= divisor\n"); - error = 1; - } - } - - { - mp_limb_t c = carry % divisor; - mp_ptr tp = refmpn_malloc_limbs (size+1); - mp_size_t k; - - for (k = size-1; k <= size; k++) - { - /* set {tp,size+1} to r*b^k + a - c */ - refmpn_copyi (tp, ptr, size); - tp[size] = 0; - ASSERT_NOCARRY (refmpn_add_1 (tp+k, tp+k, size+1-k, r)); - if (refmpn_sub_1 (tp, tp, size+1, c)) - ASSERT_CARRY (mpn_add_1 (tp, tp, size+1, divisor)); - - if (refmpn_mod_1 (tp, size+1, divisor) == 0) - goto good_remainder; - } - printf ("Remainder matches neither r*b^(size-1) nor r*b^size\n"); - error = 1; - - good_remainder: - free (tp); - } - - if (error) - validate_fail (); -} - -void -validate_modexact_1_odd (void) -{ - carry = 0; - validate_modexact_1c_odd (); -} - -void -validate_div_qr_1_pi1 (void) -{ - mp_srcptr up = ref.s[0].p; - mp_size_t un = size; - mp_size_t uh = ref.s[1].p[0]; - mp_srcptr qp = fun.d[0].p; - mp_limb_t r = fun.retval; - mp_limb_t cy; - int cmp; - mp_ptr tp; - if (r >= divisor) - { - gmp_printf ("Bad remainder %Md, d = %Md\n", r, divisor); - validate_fail (); - } - tp = refmpn_malloc_limbs (un); - cy = refmpn_mul_1 (tp, qp, un, divisor); - cy += refmpn_add_1 (tp, tp, un, r); - if (cy != uh || refmpn_cmp (tp, up, un) != 0) - { - gmp_printf ("Incorrect result, size %ld.\n" - "d = %Mx, u = %Mx, %Nx\n" - "got: r = %Mx, q = %Nx\n" - "q d + r = %Mx, %Nx", - (long) un, - divisor, uh, up, un, - r, qp, un, - cy, tp, un); - validate_fail (); - } - free (tp); -} - - -void -validate_sqrtrem (void) -{ - mp_srcptr orig_ptr = s[0].p; - mp_size_t orig_size = size; - mp_size_t root_size = (size+1)/2; - mp_srcptr root_ptr = fun.d[0].p; - mp_size_t rem_size = fun.retval; - mp_srcptr rem_ptr = fun.d[1].p; - mp_size_t prod_size = 2*root_size; - mp_ptr p; - int error = 0; - - if (rem_size < 0 || rem_size > size) - { - printf ("Bad remainder size retval %ld\n", (long) rem_size); - validate_fail (); - } - - p = refmpn_malloc_limbs (prod_size); - - p[root_size] = refmpn_lshift (p, root_ptr, root_size, 1); - if (refmpn_cmp_twosizes (p,root_size+1, rem_ptr,rem_size) < 0) - { - printf ("Remainder bigger than 2*root\n"); - error = 1; - } - - refmpn_sqr (p, root_ptr, root_size); - if (rem_size != 0) - refmpn_add (p, p, prod_size, rem_ptr, rem_size); - if (refmpn_cmp_twosizes (p,prod_size, orig_ptr,orig_size) != 0) - { - printf ("root^2+rem != original\n"); - mpn_trace ("prod", p, prod_size); - error = 1; - } - free (p); - - if (error) - validate_fail (); -} - -void -validate_sqrt (void) -{ - mp_srcptr orig_ptr = s[0].p; - mp_size_t orig_size = size; - mp_size_t root_size = (size+1)/2; - mp_srcptr root_ptr = fun.d[0].p; - int perf_pow = (fun.retval == 0); - mp_size_t prod_size = 2*root_size; - mp_ptr p; - int error = 0; - - p = refmpn_malloc_limbs (prod_size); - - refmpn_sqr (p, root_ptr, root_size); - MPN_NORMALIZE (p, prod_size); - if (refmpn_cmp_twosizes (p,prod_size, orig_ptr,orig_size) != - !perf_pow) - { - printf ("root^2 bigger than original, or wrong return value.\n"); - mpn_trace ("prod...", p, prod_size); - error = 1; - } - - refmpn_sub (p, orig_ptr,orig_size, p,prod_size); - MPN_NORMALIZE (p, prod_size); - if (prod_size >= root_size && - refmpn_sub (p, p,prod_size, root_ptr, root_size) == 0 && - refmpn_cmp_twosizes (p, prod_size, root_ptr, root_size) > 0) - { - printf ("(root+1)^2 smaller than original.\n"); - mpn_trace ("prod", p, prod_size); - error = 1; - } - free (p); - - if (error) - validate_fail (); -} - - -/* These types are indexes into the param[] array and are arbitrary so long - as they're all distinct and within the size of param[]. Renumber - whenever necessary or desired. */ - -enum { - TYPE_ADD = 1, TYPE_ADD_N, TYPE_ADD_NC, TYPE_SUB, TYPE_SUB_N, TYPE_SUB_NC, - - TYPE_ADD_ERR1_N, TYPE_ADD_ERR2_N, TYPE_ADD_ERR3_N, - TYPE_SUB_ERR1_N, TYPE_SUB_ERR2_N, TYPE_SUB_ERR3_N, - - TYPE_MUL_1, TYPE_MUL_1C, - - TYPE_MUL_2, TYPE_MUL_3, TYPE_MUL_4, TYPE_MUL_5, TYPE_MUL_6, - - TYPE_ADDMUL_1, TYPE_ADDMUL_1C, TYPE_SUBMUL_1, TYPE_SUBMUL_1C, - - TYPE_ADDMUL_2, TYPE_ADDMUL_3, TYPE_ADDMUL_4, TYPE_ADDMUL_5, TYPE_ADDMUL_6, - TYPE_ADDMUL_7, TYPE_ADDMUL_8, - - TYPE_ADDSUB_N, TYPE_ADDSUB_NC, - - TYPE_RSHIFT, TYPE_LSHIFT, TYPE_LSHIFTC, - - TYPE_COPY, TYPE_COPYI, TYPE_COPYD, TYPE_COM, - - TYPE_ADDLSH1_N, TYPE_ADDLSH2_N, TYPE_ADDLSH_N, - TYPE_ADDLSH1_N_IP1, TYPE_ADDLSH2_N_IP1, TYPE_ADDLSH_N_IP1, - TYPE_ADDLSH1_N_IP2, TYPE_ADDLSH2_N_IP2, TYPE_ADDLSH_N_IP2, - TYPE_SUBLSH1_N, TYPE_SUBLSH2_N, TYPE_SUBLSH_N, - TYPE_SUBLSH1_N_IP1, TYPE_SUBLSH2_N_IP1, TYPE_SUBLSH_N_IP1, - TYPE_RSBLSH1_N, TYPE_RSBLSH2_N, TYPE_RSBLSH_N, - TYPE_RSH1ADD_N, TYPE_RSH1SUB_N, - - TYPE_ADDLSH1_NC, TYPE_ADDLSH2_NC, TYPE_ADDLSH_NC, - TYPE_SUBLSH1_NC, TYPE_SUBLSH2_NC, TYPE_SUBLSH_NC, - TYPE_RSBLSH1_NC, TYPE_RSBLSH2_NC, TYPE_RSBLSH_NC, - - TYPE_ADDCND_N, TYPE_SUBCND_N, - - TYPE_MOD_1, TYPE_MOD_1C, TYPE_DIVMOD_1, TYPE_DIVMOD_1C, TYPE_DIVREM_1, - TYPE_DIVREM_1C, TYPE_PREINV_DIVREM_1, TYPE_DIVREM_2, TYPE_PREINV_MOD_1, - TYPE_DIV_QR_1N_PI1, - TYPE_MOD_34LSUB1, TYPE_UDIV_QRNND, TYPE_UDIV_QRNND_R, - - TYPE_DIVEXACT_1, TYPE_BDIV_Q_1, TYPE_DIVEXACT_BY3, TYPE_DIVEXACT_BY3C, - TYPE_MODEXACT_1_ODD, TYPE_MODEXACT_1C_ODD, - - TYPE_INVERT, TYPE_BINVERT, - - TYPE_GCD, TYPE_GCD_1, TYPE_GCD_FINDA, TYPE_MPZ_JACOBI, TYPE_MPZ_KRONECKER, - TYPE_MPZ_KRONECKER_UI, TYPE_MPZ_KRONECKER_SI, TYPE_MPZ_UI_KRONECKER, - TYPE_MPZ_SI_KRONECKER, TYPE_MPZ_LEGENDRE, - - TYPE_AND_N, TYPE_NAND_N, TYPE_ANDN_N, TYPE_IOR_N, TYPE_IORN_N, TYPE_NIOR_N, - TYPE_XOR_N, TYPE_XNOR_N, - - TYPE_MUL_MN, TYPE_MUL_N, TYPE_SQR, TYPE_UMUL_PPMM, TYPE_UMUL_PPMM_R, - TYPE_MULLO_N, TYPE_SQRLO, TYPE_MULMID_MN, TYPE_MULMID_N, - - TYPE_SBPI1_DIV_QR, TYPE_TDIV_QR, - - TYPE_SQRTREM, TYPE_SQRT, TYPE_ZERO, TYPE_GET_STR, TYPE_POPCOUNT, TYPE_HAMDIST, - - TYPE_EXTRA -}; - -struct try_t param[TYPE_EXTRA]; - - -void -param_init (void) -{ - struct try_t *p; - -#define COPY(index) memcpy (p, ¶m[index], sizeof (*p)) - -#define REFERENCE(fun) \ - p->reference = (tryfun_t) fun; \ - p->reference_name = #fun -#define VALIDATE(fun) \ - p->validate = fun; \ - p->validate_name = #fun - - - p = ¶m[TYPE_ADD_N]; - p->retval = 1; - p->dst[0] = 1; - p->src[0] = 1; - p->src[1] = 1; - REFERENCE (refmpn_add_n); - - p = ¶m[TYPE_ADD_NC]; - COPY (TYPE_ADD_N); - p->carry = CARRY_BIT; - REFERENCE (refmpn_add_nc); - - p = ¶m[TYPE_SUB_N]; - COPY (TYPE_ADD_N); - REFERENCE (refmpn_sub_n); - - p = ¶m[TYPE_SUB_NC]; - COPY (TYPE_ADD_NC); - REFERENCE (refmpn_sub_nc); - - p = ¶m[TYPE_ADD]; - COPY (TYPE_ADD_N); - p->size = SIZE_ALLOW_ZERO; - p->size2 = 1; - REFERENCE (refmpn_add); - - p = ¶m[TYPE_SUB]; - COPY (TYPE_ADD); - REFERENCE (refmpn_sub); - - - p = ¶m[TYPE_ADD_ERR1_N]; - p->retval = 1; - p->dst[0] = 1; - p->dst[1] = 1; - p->src[0] = 1; - p->src[1] = 1; - p->src[2] = 1; - p->dst_size[1] = SIZE_2; - p->carry = CARRY_BIT; - p->overlap = OVERLAP_NOT_DST2; - REFERENCE (refmpn_add_err1_n); - - p = ¶m[TYPE_SUB_ERR1_N]; - COPY (TYPE_ADD_ERR1_N); - REFERENCE (refmpn_sub_err1_n); - - p = ¶m[TYPE_ADD_ERR2_N]; - COPY (TYPE_ADD_ERR1_N); - p->src[3] = 1; - p->dst_size[1] = SIZE_4; - REFERENCE (refmpn_add_err2_n); - - p = ¶m[TYPE_SUB_ERR2_N]; - COPY (TYPE_ADD_ERR2_N); - REFERENCE (refmpn_sub_err2_n); - - p = ¶m[TYPE_ADD_ERR3_N]; - COPY (TYPE_ADD_ERR2_N); - p->src[4] = 1; - p->dst_size[1] = SIZE_6; - REFERENCE (refmpn_add_err3_n); - - p = ¶m[TYPE_SUB_ERR3_N]; - COPY (TYPE_ADD_ERR3_N); - REFERENCE (refmpn_sub_err3_n); - - p = ¶m[TYPE_ADDCND_N]; - COPY (TYPE_ADD_N); - p->carry = CARRY_BIT; - REFERENCE (refmpn_cnd_add_n); - - p = ¶m[TYPE_SUBCND_N]; - COPY (TYPE_ADD_N); - p->carry = CARRY_BIT; - REFERENCE (refmpn_cnd_sub_n); - - - p = ¶m[TYPE_MUL_1]; - p->retval = 1; - p->dst[0] = 1; - p->src[0] = 1; - p->multiplier = 1; - p->overlap = OVERLAP_LOW_TO_HIGH; - REFERENCE (refmpn_mul_1); - - p = ¶m[TYPE_MUL_1C]; - COPY (TYPE_MUL_1); - p->carry = CARRY_LIMB; - REFERENCE (refmpn_mul_1c); - - - p = ¶m[TYPE_MUL_2]; - p->retval = 1; - p->dst[0] = 1; - p->dst_size[0] = SIZE_PLUS_MSIZE_SUB_1; - p->src[0] = 1; - p->src[1] = 1; - p->msize = 2; - p->overlap = OVERLAP_NOT_SRC2; - REFERENCE (refmpn_mul_2); - - p = ¶m[TYPE_MUL_3]; - COPY (TYPE_MUL_2); - p->msize = 3; - REFERENCE (refmpn_mul_3); - - p = ¶m[TYPE_MUL_4]; - COPY (TYPE_MUL_2); - p->msize = 4; - REFERENCE (refmpn_mul_4); - - p = ¶m[TYPE_MUL_5]; - COPY (TYPE_MUL_2); - p->msize = 5; - REFERENCE (refmpn_mul_5); - - p = ¶m[TYPE_MUL_6]; - COPY (TYPE_MUL_2); - p->msize = 6; - REFERENCE (refmpn_mul_6); - - - p = ¶m[TYPE_ADDMUL_1]; - p->retval = 1; - p->dst[0] = 1; - p->src[0] = 1; - p->multiplier = 1; - p->dst0_from_src1 = 1; - REFERENCE (refmpn_addmul_1); - - p = ¶m[TYPE_ADDMUL_1C]; - COPY (TYPE_ADDMUL_1); - p->carry = CARRY_LIMB; - REFERENCE (refmpn_addmul_1c); - - p = ¶m[TYPE_SUBMUL_1]; - COPY (TYPE_ADDMUL_1); - REFERENCE (refmpn_submul_1); - - p = ¶m[TYPE_SUBMUL_1C]; - COPY (TYPE_ADDMUL_1C); - REFERENCE (refmpn_submul_1c); - - - p = ¶m[TYPE_ADDMUL_2]; - p->retval = 1; - p->dst[0] = 1; - p->dst_size[0] = SIZE_PLUS_MSIZE_SUB_1; - p->src[0] = 1; - p->src[1] = 1; - p->msize = 2; - p->dst0_from_src1 = 1; - p->overlap = OVERLAP_NONE; - REFERENCE (refmpn_addmul_2); - - p = ¶m[TYPE_ADDMUL_3]; - COPY (TYPE_ADDMUL_2); - p->msize = 3; - REFERENCE (refmpn_addmul_3); - - p = ¶m[TYPE_ADDMUL_4]; - COPY (TYPE_ADDMUL_2); - p->msize = 4; - REFERENCE (refmpn_addmul_4); - - p = ¶m[TYPE_ADDMUL_5]; - COPY (TYPE_ADDMUL_2); - p->msize = 5; - REFERENCE (refmpn_addmul_5); - - p = ¶m[TYPE_ADDMUL_6]; - COPY (TYPE_ADDMUL_2); - p->msize = 6; - REFERENCE (refmpn_addmul_6); - - p = ¶m[TYPE_ADDMUL_7]; - COPY (TYPE_ADDMUL_2); - p->msize = 7; - REFERENCE (refmpn_addmul_7); - - p = ¶m[TYPE_ADDMUL_8]; - COPY (TYPE_ADDMUL_2); - p->msize = 8; - REFERENCE (refmpn_addmul_8); - - - p = ¶m[TYPE_AND_N]; - p->dst[0] = 1; - p->src[0] = 1; - p->src[1] = 1; - REFERENCE (refmpn_and_n); - - p = ¶m[TYPE_ANDN_N]; - COPY (TYPE_AND_N); - REFERENCE (refmpn_andn_n); - - p = ¶m[TYPE_NAND_N]; - COPY (TYPE_AND_N); - REFERENCE (refmpn_nand_n); - - p = ¶m[TYPE_IOR_N]; - COPY (TYPE_AND_N); - REFERENCE (refmpn_ior_n); - - p = ¶m[TYPE_IORN_N]; - COPY (TYPE_AND_N); - REFERENCE (refmpn_iorn_n); - - p = ¶m[TYPE_NIOR_N]; - COPY (TYPE_AND_N); - REFERENCE (refmpn_nior_n); - - p = ¶m[TYPE_XOR_N]; - COPY (TYPE_AND_N); - REFERENCE (refmpn_xor_n); - - p = ¶m[TYPE_XNOR_N]; - COPY (TYPE_AND_N); - REFERENCE (refmpn_xnor_n); - - - p = ¶m[TYPE_ADDSUB_N]; - p->retval = 1; - p->dst[0] = 1; - p->dst[1] = 1; - p->src[0] = 1; - p->src[1] = 1; - REFERENCE (refmpn_add_n_sub_n); - - p = ¶m[TYPE_ADDSUB_NC]; - COPY (TYPE_ADDSUB_N); - p->carry = CARRY_4; - REFERENCE (refmpn_add_n_sub_nc); - - - p = ¶m[TYPE_COPY]; - p->dst[0] = 1; - p->src[0] = 1; - p->overlap = OVERLAP_NONE; - p->size = SIZE_ALLOW_ZERO; - REFERENCE (refmpn_copy); - - p = ¶m[TYPE_COPYI]; - p->dst[0] = 1; - p->src[0] = 1; - p->overlap = OVERLAP_LOW_TO_HIGH; - p->size = SIZE_ALLOW_ZERO; - REFERENCE (refmpn_copyi); - - p = ¶m[TYPE_COPYD]; - p->dst[0] = 1; - p->src[0] = 1; - p->overlap = OVERLAP_HIGH_TO_LOW; - p->size = SIZE_ALLOW_ZERO; - REFERENCE (refmpn_copyd); - - p = ¶m[TYPE_COM]; - p->dst[0] = 1; - p->src[0] = 1; - REFERENCE (refmpn_com); - - - p = ¶m[TYPE_ADDLSH1_N]; - COPY (TYPE_ADD_N); - REFERENCE (refmpn_addlsh1_n); - - p = ¶m[TYPE_ADDLSH2_N]; - COPY (TYPE_ADD_N); - REFERENCE (refmpn_addlsh2_n); - - p = ¶m[TYPE_ADDLSH_N]; - COPY (TYPE_ADD_N); - p->shift = 1; - REFERENCE (refmpn_addlsh_n); - - p = ¶m[TYPE_ADDLSH1_N_IP1]; - p->retval = 1; - p->dst[0] = 1; - p->src[0] = 1; - p->dst0_from_src1 = 1; - REFERENCE (refmpn_addlsh1_n_ip1); - - p = ¶m[TYPE_ADDLSH2_N_IP1]; - COPY (TYPE_ADDLSH1_N_IP1); - REFERENCE (refmpn_addlsh2_n_ip1); - - p = ¶m[TYPE_ADDLSH_N_IP1]; - COPY (TYPE_ADDLSH1_N_IP1); - p->shift = 1; - REFERENCE (refmpn_addlsh_n_ip1); - - p = ¶m[TYPE_ADDLSH1_N_IP2]; - COPY (TYPE_ADDLSH1_N_IP1); - REFERENCE (refmpn_addlsh1_n_ip2); - - p = ¶m[TYPE_ADDLSH2_N_IP2]; - COPY (TYPE_ADDLSH1_N_IP1); - REFERENCE (refmpn_addlsh2_n_ip2); - - p = ¶m[TYPE_ADDLSH_N_IP2]; - COPY (TYPE_ADDLSH_N_IP1); - REFERENCE (refmpn_addlsh_n_ip2); - - p = ¶m[TYPE_SUBLSH1_N]; - COPY (TYPE_ADD_N); - REFERENCE (refmpn_sublsh1_n); - - p = ¶m[TYPE_SUBLSH2_N]; - COPY (TYPE_ADD_N); - REFERENCE (refmpn_sublsh2_n); - - p = ¶m[TYPE_SUBLSH_N]; - COPY (TYPE_ADDLSH_N); - REFERENCE (refmpn_sublsh_n); - - p = ¶m[TYPE_SUBLSH1_N_IP1]; - COPY (TYPE_ADDLSH1_N_IP1); - REFERENCE (refmpn_sublsh1_n_ip1); - - p = ¶m[TYPE_SUBLSH2_N_IP1]; - COPY (TYPE_ADDLSH1_N_IP1); - REFERENCE (refmpn_sublsh2_n_ip1); - - p = ¶m[TYPE_SUBLSH_N_IP1]; - COPY (TYPE_ADDLSH_N_IP1); - REFERENCE (refmpn_sublsh_n_ip1); - - p = ¶m[TYPE_RSBLSH1_N]; - COPY (TYPE_ADD_N); - REFERENCE (refmpn_rsblsh1_n); - - p = ¶m[TYPE_RSBLSH2_N]; - COPY (TYPE_ADD_N); - REFERENCE (refmpn_rsblsh2_n); - - p = ¶m[TYPE_RSBLSH_N]; - COPY (TYPE_ADDLSH_N); - REFERENCE (refmpn_rsblsh_n); - - p = ¶m[TYPE_RSH1ADD_N]; - COPY (TYPE_ADD_N); - REFERENCE (refmpn_rsh1add_n); - - p = ¶m[TYPE_RSH1SUB_N]; - COPY (TYPE_ADD_N); - REFERENCE (refmpn_rsh1sub_n); - - - p = ¶m[TYPE_ADDLSH1_NC]; - COPY (TYPE_ADDLSH1_N); - p->carry = CARRY_3; - REFERENCE (refmpn_addlsh1_nc); - - p = ¶m[TYPE_ADDLSH2_NC]; - COPY (TYPE_ADDLSH2_N); - p->carry = CARRY_4; /* FIXME */ - REFERENCE (refmpn_addlsh2_nc); - - p = ¶m[TYPE_ADDLSH_NC]; - COPY (TYPE_ADDLSH_N); - p->carry = CARRY_BIT; /* FIXME */ - REFERENCE (refmpn_addlsh_nc); - - p = ¶m[TYPE_SUBLSH1_NC]; - COPY (TYPE_ADDLSH1_NC); - REFERENCE (refmpn_sublsh1_nc); - - p = ¶m[TYPE_SUBLSH2_NC]; - COPY (TYPE_ADDLSH2_NC); - REFERENCE (refmpn_sublsh2_nc); - - p = ¶m[TYPE_SUBLSH_NC]; - COPY (TYPE_ADDLSH_NC); - REFERENCE (refmpn_sublsh_nc); - - p = ¶m[TYPE_RSBLSH1_NC]; - COPY (TYPE_RSBLSH1_N); - p->carry = CARRY_BIT; /* FIXME */ - REFERENCE (refmpn_rsblsh1_nc); - - p = ¶m[TYPE_RSBLSH2_NC]; - COPY (TYPE_RSBLSH2_N); - p->carry = CARRY_4; /* FIXME */ - REFERENCE (refmpn_rsblsh2_nc); - - p = ¶m[TYPE_RSBLSH_NC]; - COPY (TYPE_RSBLSH_N); - p->carry = CARRY_BIT; /* FIXME */ - REFERENCE (refmpn_rsblsh_nc); - - - p = ¶m[TYPE_MOD_1]; - p->retval = 1; - p->src[0] = 1; - p->size = SIZE_ALLOW_ZERO; - p->divisor = DIVISOR_LIMB; - REFERENCE (refmpn_mod_1); - - p = ¶m[TYPE_MOD_1C]; - COPY (TYPE_MOD_1); - p->carry = CARRY_DIVISOR; - REFERENCE (refmpn_mod_1c); - - p = ¶m[TYPE_DIVMOD_1]; - COPY (TYPE_MOD_1); - p->dst[0] = 1; - REFERENCE (refmpn_divmod_1); - - p = ¶m[TYPE_DIVMOD_1C]; - COPY (TYPE_DIVMOD_1); - p->carry = CARRY_DIVISOR; - REFERENCE (refmpn_divmod_1c); - - p = ¶m[TYPE_DIVREM_1]; - COPY (TYPE_DIVMOD_1); - p->size2 = SIZE_FRACTION; - p->dst_size[0] = SIZE_SUM; - REFERENCE (refmpn_divrem_1); - - p = ¶m[TYPE_DIVREM_1C]; - COPY (TYPE_DIVREM_1); - p->carry = CARRY_DIVISOR; - REFERENCE (refmpn_divrem_1c); - - p = ¶m[TYPE_PREINV_DIVREM_1]; - COPY (TYPE_DIVREM_1); - p->size = SIZE_YES; /* ie. no size==0 */ - REFERENCE (refmpn_preinv_divrem_1); - - p = ¶m[TYPE_DIV_QR_1N_PI1]; - p->retval = 1; - p->src[0] = 1; - p->src[1] = 1; - /* SIZE_1 not supported. Always uses low limb only. */ - p->size2 = 1; - p->dst[0] = 1; - p->divisor = DIVISOR_NORM; - p->data = DATA_DIV_QR_1; - VALIDATE (validate_div_qr_1_pi1); - - p = ¶m[TYPE_PREINV_MOD_1]; - p->retval = 1; - p->src[0] = 1; - p->divisor = DIVISOR_NORM; - REFERENCE (refmpn_preinv_mod_1); - - p = ¶m[TYPE_MOD_34LSUB1]; - p->retval = 1; - p->src[0] = 1; - VALIDATE (validate_mod_34lsub1); - - p = ¶m[TYPE_UDIV_QRNND]; - p->retval = 1; - p->src[0] = 1; - p->dst[0] = 1; - p->dst_size[0] = SIZE_1; - p->divisor = UDIV_NEEDS_NORMALIZATION ? DIVISOR_NORM : DIVISOR_LIMB; - p->data = DATA_UDIV_QRNND; - p->overlap = OVERLAP_NONE; - REFERENCE (refmpn_udiv_qrnnd); - - p = ¶m[TYPE_UDIV_QRNND_R]; - COPY (TYPE_UDIV_QRNND); - REFERENCE (refmpn_udiv_qrnnd_r); - - - p = ¶m[TYPE_DIVEXACT_1]; - p->dst[0] = 1; - p->src[0] = 1; - p->divisor = DIVISOR_LIMB; - p->data = DATA_MULTIPLE_DIVISOR; - VALIDATE (validate_divexact_1); - REFERENCE (refmpn_divmod_1); - - p = ¶m[TYPE_BDIV_Q_1]; - p->dst[0] = 1; - p->src[0] = 1; - p->divisor = DIVISOR_LIMB; - VALIDATE (validate_bdiv_q_1); - - p = ¶m[TYPE_DIVEXACT_BY3]; - p->retval = 1; - p->dst[0] = 1; - p->src[0] = 1; - REFERENCE (refmpn_divexact_by3); - - p = ¶m[TYPE_DIVEXACT_BY3C]; - COPY (TYPE_DIVEXACT_BY3); - p->carry = CARRY_3; - REFERENCE (refmpn_divexact_by3c); - - - p = ¶m[TYPE_MODEXACT_1_ODD]; - p->retval = 1; - p->src[0] = 1; - p->divisor = DIVISOR_ODD; - VALIDATE (validate_modexact_1_odd); - - p = ¶m[TYPE_MODEXACT_1C_ODD]; - COPY (TYPE_MODEXACT_1_ODD); - p->carry = CARRY_LIMB; - VALIDATE (validate_modexact_1c_odd); - - - p = ¶m[TYPE_GCD_1]; - p->retval = 1; - p->src[0] = 1; - p->data = DATA_NON_ZERO; - p->divisor = DIVISOR_LIMB; - REFERENCE (refmpn_gcd_1); - - p = ¶m[TYPE_GCD]; - p->retval = 1; - p->dst[0] = 1; - p->src[0] = 1; - p->src[1] = 1; - p->size2 = 1; - p->dst_size[0] = SIZE_RETVAL; - p->overlap = OVERLAP_NOT_SRCS; - p->data = DATA_GCD; - REFERENCE (refmpn_gcd); - - - p = ¶m[TYPE_MPZ_LEGENDRE]; - p->retval = 1; - p->src[0] = 1; - p->size = SIZE_ALLOW_ZERO; - p->src[1] = 1; - p->data = DATA_SRC1_ODD_PRIME; - p->size2 = 1; - p->carry = CARRY_BIT; - p->carry_sign = 1; - REFERENCE (refmpz_legendre); - - p = ¶m[TYPE_MPZ_JACOBI]; - p->retval = 1; - p->src[0] = 1; - p->size = SIZE_ALLOW_ZERO; - p->src[1] = 1; - p->data = DATA_SRC1_ODD; - p->size2 = 1; - p->carry = CARRY_BIT; - p->carry_sign = 1; - REFERENCE (refmpz_jacobi); - - p = ¶m[TYPE_MPZ_KRONECKER]; - p->retval = 1; - p->src[0] = 1; - p->size = SIZE_ALLOW_ZERO; - p->src[1] = 1; - p->data = 0; - p->size2 = 1; - p->carry = CARRY_4; - p->carry_sign = 1; - REFERENCE (refmpz_kronecker); - - - p = ¶m[TYPE_MPZ_KRONECKER_UI]; - p->retval = 1; - p->src[0] = 1; - p->size = SIZE_ALLOW_ZERO; - p->multiplier = 1; - p->carry = CARRY_BIT; - REFERENCE (refmpz_kronecker_ui); - - p = ¶m[TYPE_MPZ_KRONECKER_SI]; - COPY (TYPE_MPZ_KRONECKER_UI); - REFERENCE (refmpz_kronecker_si); - - p = ¶m[TYPE_MPZ_UI_KRONECKER]; - COPY (TYPE_MPZ_KRONECKER_UI); - REFERENCE (refmpz_ui_kronecker); - - p = ¶m[TYPE_MPZ_SI_KRONECKER]; - COPY (TYPE_MPZ_KRONECKER_UI); - REFERENCE (refmpz_si_kronecker); - - - p = ¶m[TYPE_SQR]; - p->dst[0] = 1; - p->src[0] = 1; - p->dst_size[0] = SIZE_SUM; - p->overlap = OVERLAP_NONE; - REFERENCE (refmpn_sqr); - - p = ¶m[TYPE_MUL_N]; - COPY (TYPE_SQR); - p->src[1] = 1; - REFERENCE (refmpn_mul_n); - - p = ¶m[TYPE_MULLO_N]; - COPY (TYPE_MUL_N); - p->dst_size[0] = 0; - REFERENCE (refmpn_mullo_n); - - p = ¶m[TYPE_SQRLO]; - COPY (TYPE_SQR); - p->dst_size[0] = 0; - REFERENCE (refmpn_sqrlo); - - p = ¶m[TYPE_MUL_MN]; - COPY (TYPE_MUL_N); - p->size2 = 1; - REFERENCE (refmpn_mul_basecase); - - p = ¶m[TYPE_MULMID_MN]; - COPY (TYPE_MUL_MN); - p->dst_size[0] = SIZE_DIFF_PLUS_3; - REFERENCE (refmpn_mulmid_basecase); - - p = ¶m[TYPE_MULMID_N]; - COPY (TYPE_MUL_N); - p->size = SIZE_ODD; - p->size2 = SIZE_CEIL_HALF; - p->dst_size[0] = SIZE_DIFF_PLUS_3; - REFERENCE (refmpn_mulmid_n); - - p = ¶m[TYPE_UMUL_PPMM]; - p->retval = 1; - p->src[0] = 1; - p->dst[0] = 1; - p->dst_size[0] = SIZE_1; - p->overlap = OVERLAP_NONE; - REFERENCE (refmpn_umul_ppmm); - - p = ¶m[TYPE_UMUL_PPMM_R]; - COPY (TYPE_UMUL_PPMM); - REFERENCE (refmpn_umul_ppmm_r); - - - p = ¶m[TYPE_RSHIFT]; - p->retval = 1; - p->dst[0] = 1; - p->src[0] = 1; - p->shift = 1; - p->overlap = OVERLAP_LOW_TO_HIGH; - REFERENCE (refmpn_rshift); - - p = ¶m[TYPE_LSHIFT]; - COPY (TYPE_RSHIFT); - p->overlap = OVERLAP_HIGH_TO_LOW; - REFERENCE (refmpn_lshift); - - p = ¶m[TYPE_LSHIFTC]; - COPY (TYPE_RSHIFT); - p->overlap = OVERLAP_HIGH_TO_LOW; - REFERENCE (refmpn_lshiftc); - - - p = ¶m[TYPE_POPCOUNT]; - p->retval = 1; - p->src[0] = 1; - REFERENCE (refmpn_popcount); - - p = ¶m[TYPE_HAMDIST]; - COPY (TYPE_POPCOUNT); - p->src[1] = 1; - REFERENCE (refmpn_hamdist); - - - p = ¶m[TYPE_SBPI1_DIV_QR]; - p->retval = 1; - p->dst[0] = 1; - p->dst[1] = 1; - p->src[0] = 1; - p->src[1] = 1; - p->data = DATA_SRC1_HIGHBIT; - p->size2 = 1; - p->dst_size[0] = SIZE_DIFF; - p->overlap = OVERLAP_NONE; - REFERENCE (refmpn_sb_div_qr); - - p = ¶m[TYPE_TDIV_QR]; - p->dst[0] = 1; - p->dst[1] = 1; - p->src[0] = 1; - p->src[1] = 1; - p->size2 = 1; - p->dst_size[0] = SIZE_DIFF_PLUS_1; - p->dst_size[1] = SIZE_SIZE2; - p->overlap = OVERLAP_NONE; - REFERENCE (refmpn_tdiv_qr); - - p = ¶m[TYPE_SQRTREM]; - p->retval = 1; - p->dst[0] = 1; - p->dst[1] = 1; - p->src[0] = 1; - p->dst_size[0] = SIZE_CEIL_HALF; - p->dst_size[1] = SIZE_RETVAL; - p->overlap = OVERLAP_NONE; - VALIDATE (validate_sqrtrem); - REFERENCE (refmpn_sqrtrem); - - p = ¶m[TYPE_SQRT]; - p->retval = 1; - p->dst[0] = 1; - p->dst[1] = 0; - p->src[0] = 1; - p->dst_size[0] = SIZE_CEIL_HALF; - p->overlap = OVERLAP_NONE; - VALIDATE (validate_sqrt); - - p = ¶m[TYPE_ZERO]; - p->dst[0] = 1; - p->size = SIZE_ALLOW_ZERO; - REFERENCE (refmpn_zero); - - p = ¶m[TYPE_GET_STR]; - p->retval = 1; - p->src[0] = 1; - p->size = SIZE_ALLOW_ZERO; - p->dst[0] = 1; - p->dst[1] = 1; - p->dst_size[0] = SIZE_GET_STR; - p->dst_bytes[0] = 1; - p->overlap = OVERLAP_NONE; - REFERENCE (refmpn_get_str); - - p = ¶m[TYPE_BINVERT]; - p->dst[0] = 1; - p->src[0] = 1; - p->data = DATA_SRC0_ODD; - p->overlap = OVERLAP_NONE; - REFERENCE (refmpn_binvert); - - p = ¶m[TYPE_INVERT]; - p->dst[0] = 1; - p->src[0] = 1; - p->data = DATA_SRC0_HIGHBIT; - p->overlap = OVERLAP_NONE; - REFERENCE (refmpn_invert); - -#ifdef EXTRA_PARAM_INIT - EXTRA_PARAM_INIT -#endif -} - - -/* The following are macros if there's no native versions, so wrap them in - functions that can be in try_array[]. */ - -void -MPN_COPY_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ MPN_COPY (rp, sp, size); } - -void -MPN_COPY_INCR_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ MPN_COPY_INCR (rp, sp, size); } - -void -MPN_COPY_DECR_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ MPN_COPY_DECR (rp, sp, size); } - -void -__GMPN_COPY_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ __GMPN_COPY (rp, sp, size); } - -#ifdef __GMPN_COPY_INCR -void -__GMPN_COPY_INCR_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ __GMPN_COPY_INCR (rp, sp, size); } -#endif - -void -mpn_com_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ mpn_com (rp, sp, size); } - -void -mpn_and_n_fun (mp_ptr rp, mp_srcptr s1, mp_srcptr s2, mp_size_t size) -{ mpn_and_n (rp, s1, s2, size); } - -void -mpn_andn_n_fun (mp_ptr rp, mp_srcptr s1, mp_srcptr s2, mp_size_t size) -{ mpn_andn_n (rp, s1, s2, size); } - -void -mpn_nand_n_fun (mp_ptr rp, mp_srcptr s1, mp_srcptr s2, mp_size_t size) -{ mpn_nand_n (rp, s1, s2, size); } - -void -mpn_ior_n_fun (mp_ptr rp, mp_srcptr s1, mp_srcptr s2, mp_size_t size) -{ mpn_ior_n (rp, s1, s2, size); } - -void -mpn_iorn_n_fun (mp_ptr rp, mp_srcptr s1, mp_srcptr s2, mp_size_t size) -{ mpn_iorn_n (rp, s1, s2, size); } - -void -mpn_nior_n_fun (mp_ptr rp, mp_srcptr s1, mp_srcptr s2, mp_size_t size) -{ mpn_nior_n (rp, s1, s2, size); } - -void -mpn_xor_n_fun (mp_ptr rp, mp_srcptr s1, mp_srcptr s2, mp_size_t size) -{ mpn_xor_n (rp, s1, s2, size); } - -void -mpn_xnor_n_fun (mp_ptr rp, mp_srcptr s1, mp_srcptr s2, mp_size_t size) -{ mpn_xnor_n (rp, s1, s2, size); } - -mp_limb_t -udiv_qrnnd_fun (mp_limb_t *remptr, mp_limb_t n1, mp_limb_t n0, mp_limb_t d) -{ - mp_limb_t q; - udiv_qrnnd (q, *remptr, n1, n0, d); - return q; -} - -mp_limb_t -mpn_divexact_by3_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ - return mpn_divexact_by3 (rp, sp, size); -} - -#if HAVE_NATIVE_mpn_addlsh1_n_ip1 -mp_limb_t -mpn_addlsh1_n_ip1_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ - return mpn_addlsh1_n_ip1 (rp, sp, size); -} -#endif -#if HAVE_NATIVE_mpn_addlsh2_n_ip1 -mp_limb_t -mpn_addlsh2_n_ip1_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ - return mpn_addlsh2_n_ip1 (rp, sp, size); -} -#endif -#if HAVE_NATIVE_mpn_addlsh_n_ip1 -mp_limb_t -mpn_addlsh_n_ip1_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size, unsigned int sh) -{ - return mpn_addlsh_n_ip1 (rp, sp, size, sh); -} -#endif -#if HAVE_NATIVE_mpn_addlsh1_n_ip2 -mp_limb_t -mpn_addlsh1_n_ip2_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ - return mpn_addlsh1_n_ip2 (rp, sp, size); -} -#endif -#if HAVE_NATIVE_mpn_addlsh2_n_ip2 -mp_limb_t -mpn_addlsh2_n_ip2_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ - return mpn_addlsh2_n_ip2 (rp, sp, size); -} -#endif -#if HAVE_NATIVE_mpn_addlsh_n_ip2 -mp_limb_t -mpn_addlsh_n_ip2_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size, unsigned int sh) -{ - return mpn_addlsh_n_ip2 (rp, sp, size, sh); -} -#endif -#if HAVE_NATIVE_mpn_sublsh1_n_ip1 -mp_limb_t -mpn_sublsh1_n_ip1_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ - return mpn_sublsh1_n_ip1 (rp, sp, size); -} -#endif -#if HAVE_NATIVE_mpn_sublsh2_n_ip1 -mp_limb_t -mpn_sublsh2_n_ip1_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ - return mpn_sublsh2_n_ip1 (rp, sp, size); -} -#endif -#if HAVE_NATIVE_mpn_sublsh_n_ip1 -mp_limb_t -mpn_sublsh_n_ip1_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size, unsigned int sh) -{ - return mpn_sublsh_n_ip1 (rp, sp, size, sh); -} -#endif - -mp_limb_t -mpn_modexact_1_odd_fun (mp_srcptr ptr, mp_size_t size, mp_limb_t divisor) -{ - return mpn_modexact_1_odd (ptr, size, divisor); -} - -void -mpn_toom22_mul_fun (mp_ptr dst, mp_srcptr src1, mp_srcptr src2, mp_size_t size) -{ - mp_ptr tspace; - TMP_DECL; - TMP_MARK; - tspace = TMP_ALLOC_LIMBS (mpn_toom22_mul_itch (size, size)); - mpn_toom22_mul (dst, src1, size, src2, size, tspace); - TMP_FREE; -} -void -mpn_toom2_sqr_fun (mp_ptr dst, mp_srcptr src, mp_size_t size) -{ - mp_ptr tspace; - TMP_DECL; - TMP_MARK; - tspace = TMP_ALLOC_LIMBS (mpn_toom2_sqr_itch (size)); - mpn_toom2_sqr (dst, src, size, tspace); - TMP_FREE; -} -void -mpn_toom33_mul_fun (mp_ptr dst, mp_srcptr src1, mp_srcptr src2, mp_size_t size) -{ - mp_ptr tspace; - TMP_DECL; - TMP_MARK; - tspace = TMP_ALLOC_LIMBS (mpn_toom33_mul_itch (size, size)); - mpn_toom33_mul (dst, src1, size, src2, size, tspace); - TMP_FREE; -} -void -mpn_toom3_sqr_fun (mp_ptr dst, mp_srcptr src, mp_size_t size) -{ - mp_ptr tspace; - TMP_DECL; - TMP_MARK; - tspace = TMP_ALLOC_LIMBS (mpn_toom3_sqr_itch (size)); - mpn_toom3_sqr (dst, src, size, tspace); - TMP_FREE; -} -void -mpn_toom44_mul_fun (mp_ptr dst, mp_srcptr src1, mp_srcptr src2, mp_size_t size) -{ - mp_ptr tspace; - TMP_DECL; - TMP_MARK; - tspace = TMP_ALLOC_LIMBS (mpn_toom44_mul_itch (size, size)); - mpn_toom44_mul (dst, src1, size, src2, size, tspace); - TMP_FREE; -} -void -mpn_toom4_sqr_fun (mp_ptr dst, mp_srcptr src, mp_size_t size) -{ - mp_ptr tspace; - TMP_DECL; - TMP_MARK; - tspace = TMP_ALLOC_LIMBS (mpn_toom4_sqr_itch (size)); - mpn_toom4_sqr (dst, src, size, tspace); - TMP_FREE; -} - -void -mpn_toom42_mulmid_fun (mp_ptr dst, mp_srcptr src1, mp_srcptr src2, - mp_size_t size) -{ - mp_ptr tspace; - mp_size_t n; - TMP_DECL; - TMP_MARK; - tspace = TMP_ALLOC_LIMBS (mpn_toom42_mulmid_itch (size)); - mpn_toom42_mulmid (dst, src1, src2, size, tspace); - TMP_FREE; -} - -mp_limb_t -umul_ppmm_fun (mp_limb_t *lowptr, mp_limb_t m1, mp_limb_t m2) -{ - mp_limb_t high; - umul_ppmm (high, *lowptr, m1, m2); - return high; -} - -void -MPN_ZERO_fun (mp_ptr ptr, mp_size_t size) -{ MPN_ZERO (ptr, size); } - -mp_size_t -mpn_sqrt_fun (mp_ptr dst, mp_srcptr src, mp_size_t size) -{ return mpn_sqrtrem (dst, NULL, src, size); } - -struct choice_t { - const char *name; - tryfun_t function; - int type; - mp_size_t minsize; -}; - -#define TRY(fun) #fun, (tryfun_t) fun -#define TRY_FUNFUN(fun) #fun, (tryfun_t) fun##_fun - -const struct choice_t choice_array[] = { - { TRY(mpn_add), TYPE_ADD }, - { TRY(mpn_sub), TYPE_SUB }, - - { TRY(mpn_add_n), TYPE_ADD_N }, - { TRY(mpn_sub_n), TYPE_SUB_N }, - -#if HAVE_NATIVE_mpn_add_nc - { TRY(mpn_add_nc), TYPE_ADD_NC }, -#endif -#if HAVE_NATIVE_mpn_sub_nc - { TRY(mpn_sub_nc), TYPE_SUB_NC }, -#endif - -#if HAVE_NATIVE_mpn_add_n_sub_n - { TRY(mpn_add_n_sub_n), TYPE_ADDSUB_N }, -#endif -#if HAVE_NATIVE_mpn_add_n_sub_nc - { TRY(mpn_add_n_sub_nc), TYPE_ADDSUB_NC }, -#endif - - { TRY(mpn_add_err1_n), TYPE_ADD_ERR1_N }, - { TRY(mpn_sub_err1_n), TYPE_SUB_ERR1_N }, - { TRY(mpn_add_err2_n), TYPE_ADD_ERR2_N }, - { TRY(mpn_sub_err2_n), TYPE_SUB_ERR2_N }, - { TRY(mpn_add_err3_n), TYPE_ADD_ERR3_N }, - { TRY(mpn_sub_err3_n), TYPE_SUB_ERR3_N }, - - { TRY(mpn_addmul_1), TYPE_ADDMUL_1 }, - { TRY(mpn_submul_1), TYPE_SUBMUL_1 }, -#if HAVE_NATIVE_mpn_addmul_1c - { TRY(mpn_addmul_1c), TYPE_ADDMUL_1C }, -#endif -#if HAVE_NATIVE_mpn_submul_1c - { TRY(mpn_submul_1c), TYPE_SUBMUL_1C }, -#endif - -#if HAVE_NATIVE_mpn_addmul_2 - { TRY(mpn_addmul_2), TYPE_ADDMUL_2, 2 }, -#endif -#if HAVE_NATIVE_mpn_addmul_3 - { TRY(mpn_addmul_3), TYPE_ADDMUL_3, 3 }, -#endif -#if HAVE_NATIVE_mpn_addmul_4 - { TRY(mpn_addmul_4), TYPE_ADDMUL_4, 4 }, -#endif -#if HAVE_NATIVE_mpn_addmul_5 - { TRY(mpn_addmul_5), TYPE_ADDMUL_5, 5 }, -#endif -#if HAVE_NATIVE_mpn_addmul_6 - { TRY(mpn_addmul_6), TYPE_ADDMUL_6, 6 }, -#endif -#if HAVE_NATIVE_mpn_addmul_7 - { TRY(mpn_addmul_7), TYPE_ADDMUL_7, 7 }, -#endif -#if HAVE_NATIVE_mpn_addmul_8 - { TRY(mpn_addmul_8), TYPE_ADDMUL_8, 8 }, -#endif - - { TRY_FUNFUN(mpn_com), TYPE_COM }, - - { TRY_FUNFUN(MPN_COPY), TYPE_COPY }, - { TRY_FUNFUN(MPN_COPY_INCR), TYPE_COPYI }, - { TRY_FUNFUN(MPN_COPY_DECR), TYPE_COPYD }, - - { TRY_FUNFUN(__GMPN_COPY), TYPE_COPY }, -#ifdef __GMPN_COPY_INCR - { TRY_FUNFUN(__GMPN_COPY_INCR), TYPE_COPYI }, -#endif - -#if HAVE_NATIVE_mpn_copyi - { TRY(mpn_copyi), TYPE_COPYI }, -#endif -#if HAVE_NATIVE_mpn_copyd - { TRY(mpn_copyd), TYPE_COPYD }, -#endif - - { TRY(mpn_cnd_add_n), TYPE_ADDCND_N }, - { TRY(mpn_cnd_sub_n), TYPE_SUBCND_N }, -#if HAVE_NATIVE_mpn_addlsh1_n == 1 - { TRY(mpn_addlsh1_n), TYPE_ADDLSH1_N }, -#endif -#if HAVE_NATIVE_mpn_addlsh2_n == 1 - { TRY(mpn_addlsh2_n), TYPE_ADDLSH2_N }, -#endif -#if HAVE_NATIVE_mpn_addlsh_n - { TRY(mpn_addlsh_n), TYPE_ADDLSH_N }, -#endif -#if HAVE_NATIVE_mpn_addlsh1_n_ip1 - { TRY_FUNFUN(mpn_addlsh1_n_ip1), TYPE_ADDLSH1_N_IP1 }, -#endif -#if HAVE_NATIVE_mpn_addlsh2_n_ip1 - { TRY_FUNFUN(mpn_addlsh2_n_ip1), TYPE_ADDLSH2_N_IP1 }, -#endif -#if HAVE_NATIVE_mpn_addlsh_n_ip1 - { TRY_FUNFUN(mpn_addlsh_n_ip1), TYPE_ADDLSH_N_IP1 }, -#endif -#if HAVE_NATIVE_mpn_addlsh1_n_ip2 - { TRY_FUNFUN(mpn_addlsh1_n_ip2), TYPE_ADDLSH1_N_IP2 }, -#endif -#if HAVE_NATIVE_mpn_addlsh2_n_ip2 - { TRY_FUNFUN(mpn_addlsh2_n_ip2), TYPE_ADDLSH2_N_IP2 }, -#endif -#if HAVE_NATIVE_mpn_addlsh_n_ip2 - { TRY_FUNFUN(mpn_addlsh_n_ip2), TYPE_ADDLSH_N_IP2 }, -#endif -#if HAVE_NATIVE_mpn_sublsh1_n == 1 - { TRY(mpn_sublsh1_n), TYPE_SUBLSH1_N }, -#endif -#if HAVE_NATIVE_mpn_sublsh2_n == 1 - { TRY(mpn_sublsh2_n), TYPE_SUBLSH2_N }, -#endif -#if HAVE_NATIVE_mpn_sublsh_n - { TRY(mpn_sublsh_n), TYPE_SUBLSH_N }, -#endif -#if HAVE_NATIVE_mpn_sublsh1_n_ip1 - { TRY_FUNFUN(mpn_sublsh1_n_ip1), TYPE_SUBLSH1_N_IP1 }, -#endif -#if HAVE_NATIVE_mpn_sublsh2_n_ip1 - { TRY_FUNFUN(mpn_sublsh2_n_ip1), TYPE_SUBLSH2_N_IP1 }, -#endif -#if HAVE_NATIVE_mpn_sublsh_n_ip1 - { TRY_FUNFUN(mpn_sublsh_n_ip1), TYPE_SUBLSH_N_IP1 }, -#endif -#if HAVE_NATIVE_mpn_rsblsh1_n == 1 - { TRY(mpn_rsblsh1_n), TYPE_RSBLSH1_N }, -#endif -#if HAVE_NATIVE_mpn_rsblsh2_n == 1 - { TRY(mpn_rsblsh2_n), TYPE_RSBLSH2_N }, -#endif -#if HAVE_NATIVE_mpn_rsblsh_n - { TRY(mpn_rsblsh_n), TYPE_RSBLSH_N }, -#endif -#if HAVE_NATIVE_mpn_rsh1add_n - { TRY(mpn_rsh1add_n), TYPE_RSH1ADD_N }, -#endif -#if HAVE_NATIVE_mpn_rsh1sub_n - { TRY(mpn_rsh1sub_n), TYPE_RSH1SUB_N }, -#endif - -#if HAVE_NATIVE_mpn_addlsh1_nc - { TRY(mpn_addlsh1_nc), TYPE_ADDLSH1_NC }, -#endif -#if HAVE_NATIVE_mpn_addlsh2_nc - { TRY(mpn_addlsh2_nc), TYPE_ADDLSH2_NC }, -#endif -#if HAVE_NATIVE_mpn_addlsh_nc - { TRY(mpn_addlsh_nc), TYPE_ADDLSH_NC }, -#endif -#if HAVE_NATIVE_mpn_sublsh1_nc - { TRY(mpn_sublsh1_nc), TYPE_SUBLSH1_NC }, -#endif -#if HAVE_NATIVE_mpn_sublsh2_nc - { TRY(mpn_sublsh2_nc), TYPE_SUBLSH2_NC }, -#endif -#if HAVE_NATIVE_mpn_sublsh_nc - { TRY(mpn_sublsh_nc), TYPE_SUBLSH_NC }, -#endif -#if HAVE_NATIVE_mpn_rsblsh1_nc - { TRY(mpn_rsblsh1_nc), TYPE_RSBLSH1_NC }, -#endif -#if HAVE_NATIVE_mpn_rsblsh2_nc - { TRY(mpn_rsblsh2_nc), TYPE_RSBLSH2_NC }, -#endif -#if HAVE_NATIVE_mpn_rsblsh_nc - { TRY(mpn_rsblsh_nc), TYPE_RSBLSH_NC }, -#endif - - { TRY_FUNFUN(mpn_and_n), TYPE_AND_N }, - { TRY_FUNFUN(mpn_andn_n), TYPE_ANDN_N }, - { TRY_FUNFUN(mpn_nand_n), TYPE_NAND_N }, - { TRY_FUNFUN(mpn_ior_n), TYPE_IOR_N }, - { TRY_FUNFUN(mpn_iorn_n), TYPE_IORN_N }, - { TRY_FUNFUN(mpn_nior_n), TYPE_NIOR_N }, - { TRY_FUNFUN(mpn_xor_n), TYPE_XOR_N }, - { TRY_FUNFUN(mpn_xnor_n), TYPE_XNOR_N }, - - { TRY(mpn_divrem_1), TYPE_DIVREM_1 }, -#if USE_PREINV_DIVREM_1 - { TRY(mpn_preinv_divrem_1), TYPE_PREINV_DIVREM_1 }, -#endif - { TRY(mpn_mod_1), TYPE_MOD_1 }, -#if USE_PREINV_MOD_1 - { TRY(mpn_preinv_mod_1), TYPE_PREINV_MOD_1 }, -#endif -#if HAVE_NATIVE_mpn_divrem_1c - { TRY(mpn_divrem_1c), TYPE_DIVREM_1C }, -#endif -#if HAVE_NATIVE_mpn_mod_1c - { TRY(mpn_mod_1c), TYPE_MOD_1C }, -#endif - { TRY(mpn_div_qr_1n_pi1), TYPE_DIV_QR_1N_PI1 }, -#if GMP_NUMB_BITS % 4 == 0 - { TRY(mpn_mod_34lsub1), TYPE_MOD_34LSUB1 }, -#endif - - { TRY_FUNFUN(udiv_qrnnd), TYPE_UDIV_QRNND, 2 }, -#if HAVE_NATIVE_mpn_udiv_qrnnd - { TRY(mpn_udiv_qrnnd), TYPE_UDIV_QRNND, 2 }, -#endif -#if HAVE_NATIVE_mpn_udiv_qrnnd_r - { TRY(mpn_udiv_qrnnd_r), TYPE_UDIV_QRNND_R, 2 }, -#endif - - { TRY(mpn_divexact_1), TYPE_DIVEXACT_1 }, - { TRY(mpn_bdiv_q_1), TYPE_BDIV_Q_1 }, - { TRY_FUNFUN(mpn_divexact_by3), TYPE_DIVEXACT_BY3 }, - { TRY(mpn_divexact_by3c), TYPE_DIVEXACT_BY3C }, - - { TRY_FUNFUN(mpn_modexact_1_odd), TYPE_MODEXACT_1_ODD }, - { TRY(mpn_modexact_1c_odd), TYPE_MODEXACT_1C_ODD }, - - - { TRY(mpn_sbpi1_div_qr), TYPE_SBPI1_DIV_QR, 3}, - { TRY(mpn_tdiv_qr), TYPE_TDIV_QR }, - - { TRY(mpn_mul_1), TYPE_MUL_1 }, -#if HAVE_NATIVE_mpn_mul_1c - { TRY(mpn_mul_1c), TYPE_MUL_1C }, -#endif -#if HAVE_NATIVE_mpn_mul_2 - { TRY(mpn_mul_2), TYPE_MUL_2, 2 }, -#endif -#if HAVE_NATIVE_mpn_mul_3 - { TRY(mpn_mul_3), TYPE_MUL_3, 3 }, -#endif -#if HAVE_NATIVE_mpn_mul_4 - { TRY(mpn_mul_4), TYPE_MUL_4, 4 }, -#endif -#if HAVE_NATIVE_mpn_mul_5 - { TRY(mpn_mul_5), TYPE_MUL_5, 5 }, -#endif -#if HAVE_NATIVE_mpn_mul_6 - { TRY(mpn_mul_6), TYPE_MUL_6, 6 }, -#endif - - { TRY(mpn_rshift), TYPE_RSHIFT }, - { TRY(mpn_lshift), TYPE_LSHIFT }, - { TRY(mpn_lshiftc), TYPE_LSHIFTC }, - - - { TRY(mpn_mul_basecase), TYPE_MUL_MN }, - { TRY(mpn_mulmid_basecase), TYPE_MULMID_MN }, - { TRY(mpn_mullo_basecase), TYPE_MULLO_N }, - { TRY(mpn_sqrlo_basecase), TYPE_SQRLO }, - { TRY(mpn_sqrlo), TYPE_SQRLO }, -#if SQR_TOOM2_THRESHOLD > 0 - { TRY(mpn_sqr_basecase), TYPE_SQR }, -#endif - - { TRY(mpn_mul), TYPE_MUL_MN }, - { TRY(mpn_mul_n), TYPE_MUL_N }, - { TRY(mpn_sqr), TYPE_SQR }, - - { TRY_FUNFUN(umul_ppmm), TYPE_UMUL_PPMM, 2 }, -#if HAVE_NATIVE_mpn_umul_ppmm - { TRY(mpn_umul_ppmm), TYPE_UMUL_PPMM, 2 }, -#endif -#if HAVE_NATIVE_mpn_umul_ppmm_r - { TRY(mpn_umul_ppmm_r), TYPE_UMUL_PPMM_R, 2 }, -#endif - - { TRY_FUNFUN(mpn_toom22_mul), TYPE_MUL_N, MPN_TOOM22_MUL_MINSIZE }, - { TRY_FUNFUN(mpn_toom2_sqr), TYPE_SQR, MPN_TOOM2_SQR_MINSIZE }, - { TRY_FUNFUN(mpn_toom33_mul), TYPE_MUL_N, MPN_TOOM33_MUL_MINSIZE }, - { TRY_FUNFUN(mpn_toom3_sqr), TYPE_SQR, MPN_TOOM3_SQR_MINSIZE }, - { TRY_FUNFUN(mpn_toom44_mul), TYPE_MUL_N, MPN_TOOM44_MUL_MINSIZE }, - { TRY_FUNFUN(mpn_toom4_sqr), TYPE_SQR, MPN_TOOM4_SQR_MINSIZE }, - - { TRY(mpn_mulmid_n), TYPE_MULMID_N, 1 }, - { TRY(mpn_mulmid), TYPE_MULMID_MN, 1 }, - { TRY_FUNFUN(mpn_toom42_mulmid), TYPE_MULMID_N, - (2 * MPN_TOOM42_MULMID_MINSIZE - 1) }, - - { TRY(mpn_gcd_1), TYPE_GCD_1 }, - { TRY(mpn_gcd), TYPE_GCD }, - { TRY(mpz_legendre), TYPE_MPZ_LEGENDRE }, - { TRY(mpz_jacobi), TYPE_MPZ_JACOBI }, - { TRY(mpz_kronecker), TYPE_MPZ_KRONECKER }, - { TRY(mpz_kronecker_ui), TYPE_MPZ_KRONECKER_UI }, - { TRY(mpz_kronecker_si), TYPE_MPZ_KRONECKER_SI }, - { TRY(mpz_ui_kronecker), TYPE_MPZ_UI_KRONECKER }, - { TRY(mpz_si_kronecker), TYPE_MPZ_SI_KRONECKER }, - - { TRY(mpn_popcount), TYPE_POPCOUNT }, - { TRY(mpn_hamdist), TYPE_HAMDIST }, - - { TRY(mpn_sqrtrem), TYPE_SQRTREM }, - { TRY_FUNFUN(mpn_sqrt), TYPE_SQRT }, - - { TRY_FUNFUN(MPN_ZERO), TYPE_ZERO }, - - { TRY(mpn_get_str), TYPE_GET_STR }, - - { TRY(mpn_binvert), TYPE_BINVERT }, - { TRY(mpn_invert), TYPE_INVERT }, - -#ifdef EXTRA_ROUTINES - EXTRA_ROUTINES -#endif -}; - -const struct choice_t *choice = NULL; - - -void -mprotect_maybe (void *addr, size_t len, int prot) -{ - if (!option_redzones) - return; - -#if HAVE_MPROTECT - if (mprotect (addr, len, prot) != 0) - { - fprintf (stderr, "Cannot mprotect %p 0x%X 0x%X: %s\n", - addr, (unsigned) len, prot, strerror (errno)); - exit (1); - } -#else - { - static int warned = 0; - if (!warned) - { - fprintf (stderr, - "mprotect not available, bounds testing not performed\n"); - warned = 1; - } - } -#endif -} - -/* round "a" up to a multiple of "m" */ -size_t -round_up_multiple (size_t a, size_t m) -{ - unsigned long r; - - r = a % m; - if (r == 0) - return a; - else - return a + (m - r); -} - - -/* On some systems it seems that only an mmap'ed region can be mprotect'ed, - for instance HP-UX 10. - - mmap will almost certainly return a pointer already aligned to a page - boundary, but it's easy enough to share the alignment handling with the - malloc case. */ - -void -malloc_region (struct region_t *r, mp_size_t n) -{ - mp_ptr p; - size_t nbytes; - - ASSERT ((pagesize % GMP_LIMB_BYTES) == 0); - - n = round_up_multiple (n, PAGESIZE_LIMBS); - r->size = n; - - nbytes = n*GMP_LIMB_BYTES + 2*REDZONE_BYTES + pagesize; - -#if defined (MAP_ANONYMOUS) && ! defined (MAP_ANON) -#define MAP_ANON MAP_ANONYMOUS -#endif - -#if HAVE_MMAP && defined (MAP_ANON) - /* note must pass fd=-1 for MAP_ANON on BSD */ - p = (mp_ptr) mmap (NULL, nbytes, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0); - if (p == (void *) -1) - { - fprintf (stderr, "Cannot mmap %#x anon bytes: %s\n", - (unsigned) nbytes, strerror (errno)); - exit (1); - } -#else - p = (mp_ptr) malloc (nbytes); - ASSERT_ALWAYS (p != NULL); -#endif - - p = (mp_ptr) align_pointer (p, pagesize); - - mprotect_maybe (p, REDZONE_BYTES, PROT_NONE); - p += REDZONE_LIMBS; - r->ptr = p; - - mprotect_maybe (p + n, REDZONE_BYTES, PROT_NONE); -} - -void -mprotect_region (const struct region_t *r, int prot) -{ - mprotect_maybe (r->ptr, r->size, prot); -} - - -/* First four entries must be 0,1,2,3 for the benefit of CARRY_BIT, CARRY_3, - and CARRY_4 */ -mp_limb_t carry_array[] = { - 0, 1, 2, 3, - 4, - CNST_LIMB(1) << 8, - CNST_LIMB(1) << 16, - GMP_NUMB_MAX -}; -int carry_index; - -#define CARRY_COUNT \ - ((tr->carry == CARRY_BIT) ? 2 \ - : tr->carry == CARRY_3 ? 3 \ - : tr->carry == CARRY_4 ? 4 \ - : (tr->carry == CARRY_LIMB || tr->carry == CARRY_DIVISOR) \ - ? numberof(carry_array) + CARRY_RANDOMS \ - : 1) - -#define MPN_RANDOM_ALT(index,dst,size) \ - (((index) & 1) ? refmpn_random (dst, size) : refmpn_random2 (dst, size)) - -/* The dummy value after MPN_RANDOM_ALT ensures both sides of the ":" have - the same type */ -#define CARRY_ITERATION \ - for (carry_index = 0; \ - (carry_index < numberof (carry_array) \ - ? (carry = carry_array[carry_index]) \ - : (MPN_RANDOM_ALT (carry_index, &carry, 1), (mp_limb_t) 0)), \ - (tr->carry == CARRY_DIVISOR ? carry %= divisor : 0), \ - carry_index < CARRY_COUNT; \ - carry_index++) - - -mp_limb_t multiplier_array[] = { - 0, 1, 2, 3, - CNST_LIMB(1) << 8, - CNST_LIMB(1) << 16, - GMP_NUMB_MAX - 2, - GMP_NUMB_MAX - 1, - GMP_NUMB_MAX -}; -int multiplier_index; - -mp_limb_t divisor_array[] = { - 1, 2, 3, - CNST_LIMB(1) << 8, - CNST_LIMB(1) << 16, - CNST_LIMB(1) << (GMP_NUMB_BITS/2 - 1), - GMP_NUMB_MAX >> (GMP_NUMB_BITS/2), - GMP_NUMB_HIGHBIT, - GMP_NUMB_HIGHBIT + 1, - GMP_NUMB_MAX - 2, - GMP_NUMB_MAX - 1, - GMP_NUMB_MAX -}; - -int divisor_index; - -/* The dummy value after MPN_RANDOM_ALT ensures both sides of the ":" have - the same type */ -#define ARRAY_ITERATION(var, index, limit, array, randoms, cond) \ - for (index = 0; \ - (index < numberof (array) \ - ? (var = array[index]) \ - : (MPN_RANDOM_ALT (index, &var, 1), (mp_limb_t) 0)), \ - index < limit; \ - index++) - -#define MULTIPLIER_COUNT \ - (tr->multiplier \ - ? numberof (multiplier_array) + MULTIPLIER_RANDOMS \ - : 1) - -#define MULTIPLIER_ITERATION \ - ARRAY_ITERATION(multiplier, multiplier_index, MULTIPLIER_COUNT, \ - multiplier_array, MULTIPLIER_RANDOMS, TRY_MULTIPLIER) - -#define DIVISOR_COUNT \ - (tr->divisor \ - ? numberof (divisor_array) + DIVISOR_RANDOMS \ - : 1) - -#define DIVISOR_ITERATION \ - ARRAY_ITERATION(divisor, divisor_index, DIVISOR_COUNT, divisor_array, \ - DIVISOR_RANDOMS, TRY_DIVISOR) - - -/* overlap_array[].s[i] is where s[i] should be, 0 or 1 means overlapping - d[0] or d[1] respectively, -1 means a separate (write-protected) - location. */ - -struct overlap_t { - int s[NUM_SOURCES]; -} overlap_array[] = { - { { -1, -1, -1, -1, -1 } }, - { { 0, -1, -1, -1, -1 } }, - { { -1, 0, -1, -1, -1 } }, - { { 0, 0, -1, -1, -1 } }, - { { 1, -1, -1, -1, -1 } }, - { { -1, 1, -1, -1, -1 } }, - { { 1, 1, -1, -1, -1 } }, - { { 0, 1, -1, -1, -1 } }, - { { 1, 0, -1, -1, -1 } }, -}; - -struct overlap_t *overlap, *overlap_limit; - -#define OVERLAP_COUNT \ - (tr->overlap & OVERLAP_NONE ? 1 \ - : tr->overlap & OVERLAP_NOT_SRCS ? 3 \ - : tr->overlap & OVERLAP_NOT_SRC2 ? 2 \ - : tr->overlap & OVERLAP_NOT_DST2 ? 4 \ - : tr->dst[1] ? 9 \ - : tr->src[1] ? 4 \ - : tr->dst[0] ? 2 \ - : 1) - -#define OVERLAP_ITERATION \ - for (overlap = &overlap_array[0], \ - overlap_limit = &overlap_array[OVERLAP_COUNT]; \ - overlap < overlap_limit; \ - overlap++) - - -int base = 10; - -#define T_RAND_COUNT 2 -int t_rand; - -void -t_random (mp_ptr ptr, mp_size_t n) -{ - if (n == 0) - return; - - switch (option_data) { - case DATA_TRAND: - switch (t_rand) { - case 0: refmpn_random (ptr, n); break; - case 1: refmpn_random2 (ptr, n); break; - default: abort(); - } - break; - case DATA_SEQ: - { - static mp_limb_t counter = 0; - mp_size_t i; - for (i = 0; i < n; i++) - ptr[i] = ++counter; - } - break; - case DATA_ZEROS: - refmpn_zero (ptr, n); - break; - case DATA_FFS: - refmpn_fill (ptr, n, GMP_NUMB_MAX); - break; - case DATA_2FD: - /* Special value 0x2FFF...FFFD, which divided by 3 gives 0xFFF...FFF, - inducing the q1_ff special case in the mul-by-inverse part of some - versions of divrem_1 and mod_1. */ - refmpn_fill (ptr, n, (mp_limb_t) -1); - ptr[n-1] = 2; - ptr[0] -= 2; - break; - - default: - abort(); - } -} -#define T_RAND_ITERATION \ - for (t_rand = 0; t_rand < T_RAND_COUNT; t_rand++) - - -void -print_each (const struct each_t *e) -{ - int i; - - printf ("%s %s\n", e->name, e == &ref ? tr->reference_name : choice->name); - if (tr->retval) - mpn_trace (" retval", &e->retval, 1); - - for (i = 0; i < NUM_DESTS; i++) - { - if (tr->dst[i]) - { - if (tr->dst_bytes[i]) - byte_tracen (" d[%d]", i, e->d[i].p, d[i].size); - else - mpn_tracen (" d[%d]", i, e->d[i].p, d[i].size); - printf (" located %p\n", (void *) (e->d[i].p)); - } - } - - for (i = 0; i < NUM_SOURCES; i++) - if (tr->src[i]) - printf (" s[%d] located %p\n", i, (void *) (e->s[i].p)); -} - - -void -print_all (void) -{ - int i; - - printf ("\n"); - printf ("size %ld\n", (long) size); - if (tr->size2) - printf ("size2 %ld\n", (long) size2); - - for (i = 0; i < NUM_DESTS; i++) - if (d[i].size != size) - printf ("d[%d].size %ld\n", i, (long) d[i].size); - - if (tr->multiplier) - mpn_trace (" multiplier", &multiplier, 1); - if (tr->divisor) - mpn_trace (" divisor", &divisor, 1); - if (tr->shift) - printf (" shift %lu\n", shift); - if (tr->carry) - mpn_trace (" carry", &carry, 1); - if (tr->msize) - mpn_trace (" multiplier_N", multiplier_N, tr->msize); - - for (i = 0; i < NUM_DESTS; i++) - if (tr->dst[i]) - printf (" d[%d] %s, align %ld, size %ld\n", - i, d[i].high ? "high" : "low", - (long) d[i].align, (long) d[i].size); - - for (i = 0; i < NUM_SOURCES; i++) - { - if (tr->src[i]) - { - printf (" s[%d] %s, align %ld, ", - i, s[i].high ? "high" : "low", (long) s[i].align); - switch (overlap->s[i]) { - case -1: - printf ("no overlap\n"); - break; - default: - printf ("==d[%d]%s\n", - overlap->s[i], - tr->overlap == OVERLAP_LOW_TO_HIGH ? "+a" - : tr->overlap == OVERLAP_HIGH_TO_LOW ? "-a" - : ""); - break; - } - printf (" s[%d]=", i); - if (tr->carry_sign && (carry & (1 << i))) - printf ("-"); - mpn_trace (NULL, s[i].p, SRC_SIZE(i)); - } - } - - if (tr->dst0_from_src1) - mpn_trace (" d[0]", s[1].region.ptr, size); - - if (tr->reference) - print_each (&ref); - print_each (&fun); -} - -void -compare (void) -{ - int error = 0; - int i; - - if (tr->retval && ref.retval != fun.retval) - { - gmp_printf ("Different return values (%Mu, %Mu)\n", - ref.retval, fun.retval); - error = 1; - } - - for (i = 0; i < NUM_DESTS; i++) - { - switch (tr->dst_size[i]) { - case SIZE_RETVAL: - case SIZE_GET_STR: - d[i].size = ref.retval; - break; - } - } - - for (i = 0; i < NUM_DESTS; i++) - { - if (! tr->dst[i]) - continue; - - if (tr->dst_bytes[i]) - { - if (memcmp (ref.d[i].p, fun.d[i].p, d[i].size) != 0) - { - printf ("Different d[%d] data results, low diff at %ld, high diff at %ld\n", - i, - (long) byte_diff_lowest (ref.d[i].p, fun.d[i].p, d[i].size), - (long) byte_diff_highest (ref.d[i].p, fun.d[i].p, d[i].size)); - error = 1; - } - } - else - { - if (d[i].size != 0 - && ! refmpn_equal_anynail (ref.d[i].p, fun.d[i].p, d[i].size)) - { - printf ("Different d[%d] data results, low diff at %ld, high diff at %ld\n", - i, - (long) mpn_diff_lowest (ref.d[i].p, fun.d[i].p, d[i].size), - (long) mpn_diff_highest (ref.d[i].p, fun.d[i].p, d[i].size)); - error = 1; - } - } - } - - if (error) - { - print_all(); - abort(); - } -} - - -/* The functions are cast if the return value should be a long rather than - the default mp_limb_t. This is necessary under _LONG_LONG_LIMB. This - might not be enough if some actual calling conventions checking is - implemented on a long long limb system. */ - -void -call (struct each_t *e, tryfun_t function) -{ - switch (choice->type) { - case TYPE_ADD: - case TYPE_SUB: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, size, e->s[1].p, size2); - break; - - case TYPE_ADD_N: - case TYPE_SUB_N: - case TYPE_ADDLSH1_N: - case TYPE_ADDLSH2_N: - case TYPE_SUBLSH1_N: - case TYPE_SUBLSH2_N: - case TYPE_RSBLSH1_N: - case TYPE_RSBLSH2_N: - case TYPE_RSH1ADD_N: - case TYPE_RSH1SUB_N: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, e->s[1].p, size); - break; - case TYPE_ADDLSH_N: - case TYPE_SUBLSH_N: - case TYPE_RSBLSH_N: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, e->s[1].p, size, shift); - break; - case TYPE_ADDLSH_NC: - case TYPE_SUBLSH_NC: - case TYPE_RSBLSH_NC: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, e->s[1].p, size, shift, carry); - break; - case TYPE_ADDLSH1_NC: - case TYPE_ADDLSH2_NC: - case TYPE_SUBLSH1_NC: - case TYPE_SUBLSH2_NC: - case TYPE_RSBLSH1_NC: - case TYPE_RSBLSH2_NC: - case TYPE_ADD_NC: - case TYPE_SUB_NC: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, e->s[1].p, size, carry); - break; - case TYPE_ADDCND_N: - case TYPE_SUBCND_N: - e->retval = CALLING_CONVENTIONS (function) - (carry, e->d[0].p, e->s[0].p, e->s[1].p, size); - break; - case TYPE_ADD_ERR1_N: - case TYPE_SUB_ERR1_N: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, e->s[1].p, e->d[1].p, e->s[2].p, size, carry); - break; - case TYPE_ADD_ERR2_N: - case TYPE_SUB_ERR2_N: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, e->s[1].p, e->d[1].p, e->s[2].p, e->s[3].p, size, carry); - break; - case TYPE_ADD_ERR3_N: - case TYPE_SUB_ERR3_N: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, e->s[1].p, e->d[1].p, e->s[2].p, e->s[3].p, e->s[4].p, size, carry); - break; - - case TYPE_MUL_1: - case TYPE_ADDMUL_1: - case TYPE_SUBMUL_1: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, size, multiplier); - break; - case TYPE_MUL_1C: - case TYPE_ADDMUL_1C: - case TYPE_SUBMUL_1C: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, size, multiplier, carry); - break; - - case TYPE_MUL_2: - case TYPE_MUL_3: - case TYPE_MUL_4: - case TYPE_MUL_5: - case TYPE_MUL_6: - if (size == 1) - abort (); - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, size, multiplier_N); - break; - - case TYPE_ADDMUL_2: - case TYPE_ADDMUL_3: - case TYPE_ADDMUL_4: - case TYPE_ADDMUL_5: - case TYPE_ADDMUL_6: - case TYPE_ADDMUL_7: - case TYPE_ADDMUL_8: - if (size == 1) - abort (); - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, size, multiplier_N); - break; - - case TYPE_AND_N: - case TYPE_ANDN_N: - case TYPE_NAND_N: - case TYPE_IOR_N: - case TYPE_IORN_N: - case TYPE_NIOR_N: - case TYPE_XOR_N: - case TYPE_XNOR_N: - CALLING_CONVENTIONS (function) (e->d[0].p, e->s[0].p, e->s[1].p, size); - break; - - case TYPE_ADDSUB_N: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->d[1].p, e->s[0].p, e->s[1].p, size); - break; - case TYPE_ADDSUB_NC: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->d[1].p, e->s[0].p, e->s[1].p, size, carry); - break; - - case TYPE_COPY: - case TYPE_COPYI: - case TYPE_COPYD: - case TYPE_COM: - CALLING_CONVENTIONS (function) (e->d[0].p, e->s[0].p, size); - break; - - case TYPE_ADDLSH1_N_IP1: - case TYPE_ADDLSH2_N_IP1: - case TYPE_ADDLSH1_N_IP2: - case TYPE_ADDLSH2_N_IP2: - case TYPE_SUBLSH1_N_IP1: - case TYPE_SUBLSH2_N_IP1: - case TYPE_DIVEXACT_BY3: - e->retval = CALLING_CONVENTIONS (function) (e->d[0].p, e->s[0].p, size); - break; - case TYPE_DIVEXACT_BY3C: - e->retval = CALLING_CONVENTIONS (function) (e->d[0].p, e->s[0].p, size, - carry); - break; - - - case TYPE_DIVMOD_1: - case TYPE_DIVEXACT_1: - case TYPE_BDIV_Q_1: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, size, divisor); - break; - case TYPE_DIVMOD_1C: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, size, divisor, carry); - break; - case TYPE_DIVREM_1: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, size2, e->s[0].p, size, divisor); - break; - case TYPE_DIVREM_1C: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, size2, e->s[0].p, size, divisor, carry); - break; - case TYPE_PREINV_DIVREM_1: - { - mp_limb_t dinv; - unsigned shift; - shift = refmpn_count_leading_zeros (divisor); - dinv = refmpn_invert_limb (divisor << shift); - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, size2, e->s[0].p, size, divisor, dinv, shift); - } - break; - case TYPE_MOD_1: - case TYPE_MODEXACT_1_ODD: - e->retval = CALLING_CONVENTIONS (function) - (e->s[0].p, size, divisor); - break; - case TYPE_MOD_1C: - case TYPE_MODEXACT_1C_ODD: - e->retval = CALLING_CONVENTIONS (function) - (e->s[0].p, size, divisor, carry); - break; - case TYPE_PREINV_MOD_1: - e->retval = CALLING_CONVENTIONS (function) - (e->s[0].p, size, divisor, refmpn_invert_limb (divisor)); - break; - case TYPE_DIV_QR_1N_PI1: - { - mp_limb_t dinv = refmpn_invert_limb (divisor); - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, size, e->s[1].p[0], divisor, dinv); - break; - } - - case TYPE_MOD_34LSUB1: - e->retval = CALLING_CONVENTIONS (function) (e->s[0].p, size); - break; - - case TYPE_UDIV_QRNND: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p[1], e->s[0].p[0], divisor); - break; - case TYPE_UDIV_QRNND_R: - e->retval = CALLING_CONVENTIONS (function) - (e->s[0].p[1], e->s[0].p[0], divisor, e->d[0].p); - break; - - case TYPE_SBPI1_DIV_QR: - { - gmp_pi1_t dinv; - invert_pi1 (dinv, e->s[1].p[size2-1], e->s[1].p[size2-2]); /* FIXME: use refinvert_pi1 */ - refmpn_copyi (e->d[1].p, e->s[0].p, size); /* dividend */ - refmpn_fill (e->d[0].p, size-size2, 0x98765432); /* quotient */ - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->d[1].p, size, e->s[1].p, size2, dinv.inv32); - refmpn_zero (e->d[1].p+size2, size-size2); /* excess over remainder */ - } - break; - - case TYPE_TDIV_QR: - CALLING_CONVENTIONS (function) (e->d[0].p, e->d[1].p, 0, - e->s[0].p, size, e->s[1].p, size2); - break; - - case TYPE_GCD_1: - /* Must have a non-zero src, but this probably isn't the best way to do - it. */ - if (refmpn_zero_p (e->s[0].p, size)) - e->retval = 0; - else - e->retval = CALLING_CONVENTIONS (function) (e->s[0].p, size, divisor); - break; - - case TYPE_GCD: - /* Sources are destroyed, so they're saved and replaced, but a general - approach to this might be better. Note that it's still e->s[0].p and - e->s[1].p that are passed, to get the desired alignments. */ - { - mp_ptr s0 = refmpn_malloc_limbs (size); - mp_ptr s1 = refmpn_malloc_limbs (size2); - refmpn_copyi (s0, e->s[0].p, size); - refmpn_copyi (s1, e->s[1].p, size2); - - mprotect_region (&s[0].region, PROT_READ|PROT_WRITE); - mprotect_region (&s[1].region, PROT_READ|PROT_WRITE); - e->retval = CALLING_CONVENTIONS (function) (e->d[0].p, - e->s[0].p, size, - e->s[1].p, size2); - refmpn_copyi (e->s[0].p, s0, size); - refmpn_copyi (e->s[1].p, s1, size2); - free (s0); - free (s1); - } - break; - - case TYPE_GCD_FINDA: - { - /* FIXME: do this with a flag */ - mp_limb_t c[2]; - c[0] = e->s[0].p[0]; - c[0] += (c[0] == 0); - c[1] = e->s[0].p[0]; - c[1] += (c[1] == 0); - e->retval = CALLING_CONVENTIONS (function) (c); - } - break; - - case TYPE_MPZ_LEGENDRE: - case TYPE_MPZ_JACOBI: - { - mpz_t a, b; - PTR(a) = e->s[0].p; SIZ(a) = (carry==0 ? size : -size); - PTR(b) = e->s[1].p; SIZ(b) = size2; - e->retval = CALLING_CONVENTIONS (function) (a, b); - } - break; - case TYPE_MPZ_KRONECKER: - { - mpz_t a, b; - PTR(a) = e->s[0].p; SIZ(a) = ((carry&1)==0 ? size : -size); - PTR(b) = e->s[1].p; SIZ(b) = ((carry&2)==0 ? size2 : -size2); - e->retval = CALLING_CONVENTIONS (function) (a, b); - } - break; - case TYPE_MPZ_KRONECKER_UI: - { - mpz_t a; - PTR(a) = e->s[0].p; SIZ(a) = (carry==0 ? size : -size); - e->retval = CALLING_CONVENTIONS(function) (a, (unsigned long)multiplier); - } - break; - case TYPE_MPZ_KRONECKER_SI: - { - mpz_t a; - PTR(a) = e->s[0].p; SIZ(a) = (carry==0 ? size : -size); - e->retval = CALLING_CONVENTIONS (function) (a, (long) multiplier); - } - break; - case TYPE_MPZ_UI_KRONECKER: - { - mpz_t b; - PTR(b) = e->s[0].p; SIZ(b) = (carry==0 ? size : -size); - e->retval = CALLING_CONVENTIONS(function) ((unsigned long)multiplier, b); - } - break; - case TYPE_MPZ_SI_KRONECKER: - { - mpz_t b; - PTR(b) = e->s[0].p; SIZ(b) = (carry==0 ? size : -size); - e->retval = CALLING_CONVENTIONS (function) ((long) multiplier, b); - } - break; - - case TYPE_MUL_MN: - case TYPE_MULMID_MN: - CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, size, e->s[1].p, size2); - break; - case TYPE_MUL_N: - case TYPE_MULLO_N: - CALLING_CONVENTIONS (function) (e->d[0].p, e->s[0].p, e->s[1].p, size); - break; - case TYPE_MULMID_N: - CALLING_CONVENTIONS (function) (e->d[0].p, e->s[0].p, e->s[1].p, - (size + 1) / 2); - break; - case TYPE_SQR: - case TYPE_SQRLO: - CALLING_CONVENTIONS (function) (e->d[0].p, e->s[0].p, size); - break; - - case TYPE_UMUL_PPMM: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p[0], e->s[0].p[1]); - break; - case TYPE_UMUL_PPMM_R: - e->retval = CALLING_CONVENTIONS (function) - (e->s[0].p[0], e->s[0].p[1], e->d[0].p); - break; - - case TYPE_ADDLSH_N_IP1: - case TYPE_ADDLSH_N_IP2: - case TYPE_SUBLSH_N_IP1: - case TYPE_LSHIFT: - case TYPE_LSHIFTC: - case TYPE_RSHIFT: - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->s[0].p, size, shift); - break; - - case TYPE_POPCOUNT: - e->retval = (* (unsigned long (*)(ANYARGS)) - CALLING_CONVENTIONS (function)) (e->s[0].p, size); - break; - case TYPE_HAMDIST: - e->retval = (* (unsigned long (*)(ANYARGS)) - CALLING_CONVENTIONS (function)) (e->s[0].p, e->s[1].p, size); - break; - - case TYPE_SQRTREM: - e->retval = (* (long (*)(ANYARGS)) CALLING_CONVENTIONS (function)) - (e->d[0].p, e->d[1].p, e->s[0].p, size); - break; - - case TYPE_SQRT: - e->retval = (* (long (*)(ANYARGS)) CALLING_CONVENTIONS (function)) - (e->d[0].p, e->s[0].p, size); - break; - - case TYPE_ZERO: - CALLING_CONVENTIONS (function) (e->d[0].p, size); - break; - - case TYPE_GET_STR: - { - size_t sizeinbase, fill; - char *dst; - MPN_SIZEINBASE (sizeinbase, e->s[0].p, size, base); - ASSERT_ALWAYS (sizeinbase <= d[0].size); - fill = d[0].size - sizeinbase; - if (d[0].high) - { - memset (e->d[0].p, 0xBA, fill); - dst = (char *) e->d[0].p + fill; - } - else - { - dst = (char *) e->d[0].p; - memset (dst + sizeinbase, 0xBA, fill); - } - if (POW2_P (base)) - { - e->retval = CALLING_CONVENTIONS (function) (dst, base, - e->s[0].p, size); - } - else - { - refmpn_copy (e->d[1].p, e->s[0].p, size); - e->retval = CALLING_CONVENTIONS (function) (dst, base, - e->d[1].p, size); - } - refmpn_zero (e->d[1].p, size); /* clobbered or unused */ - } - break; - - case TYPE_INVERT: - { - mp_ptr scratch; - TMP_DECL; - TMP_MARK; - scratch = TMP_ALLOC_LIMBS (mpn_invert_itch (size)); - CALLING_CONVENTIONS (function) (e->d[0].p, e->s[0].p, size, scratch); - TMP_FREE; - } - break; - case TYPE_BINVERT: - { - mp_ptr scratch; - TMP_DECL; - TMP_MARK; - scratch = TMP_ALLOC_LIMBS (mpn_binvert_itch (size)); - CALLING_CONVENTIONS (function) (e->d[0].p, e->s[0].p, size, scratch); - TMP_FREE; - } - break; - -#ifdef EXTRA_CALL - EXTRA_CALL -#endif - - default: - printf ("Unknown routine type %d\n", choice->type); - abort (); - break; - } -} - - -void -pointer_setup (struct each_t *e) -{ - int i, j; - - for (i = 0; i < NUM_DESTS; i++) - { - switch (tr->dst_size[i]) { - case 0: - case SIZE_RETVAL: /* will be adjusted later */ - d[i].size = size; - break; - - case SIZE_1: - d[i].size = 1; - break; - case SIZE_2: - d[i].size = 2; - break; - case SIZE_3: - d[i].size = 3; - break; - case SIZE_4: - d[i].size = 4; - break; - case SIZE_6: - d[i].size = 6; - break; - - case SIZE_PLUS_1: - d[i].size = size+1; - break; - case SIZE_PLUS_MSIZE_SUB_1: - d[i].size = size + tr->msize - 1; - break; - - case SIZE_SUM: - if (tr->size2) - d[i].size = size + size2; - else - d[i].size = 2*size; - break; - - case SIZE_SIZE2: - d[i].size = size2; - break; - - case SIZE_DIFF: - d[i].size = size - size2; - break; - - case SIZE_DIFF_PLUS_1: - d[i].size = size - size2 + 1; - break; - - case SIZE_DIFF_PLUS_3: - d[i].size = size - size2 + 3; - break; - - case SIZE_CEIL_HALF: - d[i].size = (size+1)/2; - break; - - case SIZE_GET_STR: - { - mp_limb_t ff = GMP_NUMB_MAX; - MPN_SIZEINBASE (d[i].size, &ff - (size-1), size, base); - } - break; - - default: - printf ("Unrecognised dst_size type %d\n", tr->dst_size[i]); - abort (); - } - } - - /* establish e->d[].p destinations */ - for (i = 0; i < NUM_DESTS; i++) - { - mp_size_t offset = 0; - - /* possible room for overlapping sources */ - for (j = 0; j < numberof (overlap->s); j++) - if (overlap->s[j] == i) - offset = MAX (offset, s[j].align); - - if (d[i].high) - { - if (tr->dst_bytes[i]) - { - e->d[i].p = (mp_ptr) - ((char *) (e->d[i].region.ptr + e->d[i].region.size) - - d[i].size - d[i].align); - } - else - { - e->d[i].p = e->d[i].region.ptr + e->d[i].region.size - - d[i].size - d[i].align; - if (tr->overlap == OVERLAP_LOW_TO_HIGH) - e->d[i].p -= offset; - } - } - else - { - if (tr->dst_bytes[i]) - { - e->d[i].p = (mp_ptr) ((char *) e->d[i].region.ptr + d[i].align); - } - else - { - e->d[i].p = e->d[i].region.ptr + d[i].align; - if (tr->overlap == OVERLAP_HIGH_TO_LOW) - e->d[i].p += offset; - } - } - } - - /* establish e->s[].p sources */ - for (i = 0; i < NUM_SOURCES; i++) - { - int o = overlap->s[i]; - switch (o) { - case -1: - /* no overlap */ - e->s[i].p = s[i].p; - break; - case 0: - case 1: - /* overlap with d[o] */ - if (tr->overlap == OVERLAP_HIGH_TO_LOW) - e->s[i].p = e->d[o].p - s[i].align; - else if (tr->overlap == OVERLAP_LOW_TO_HIGH) - e->s[i].p = e->d[o].p + s[i].align; - else if (tr->size2 == SIZE_FRACTION) - e->s[i].p = e->d[o].p + size2; - else - e->s[i].p = e->d[o].p; - break; - default: - abort(); - break; - } - } -} - - -void -validate_fail (void) -{ - if (tr->reference) - { - trap_location = TRAP_REF; - call (&ref, tr->reference); - trap_location = TRAP_NOWHERE; - } - - print_all(); - abort(); -} - - -void -try_one (void) -{ - int i; - - if (option_spinner) - spinner(); - spinner_count++; - - trap_location = TRAP_SETUPS; - - if (tr->divisor == DIVISOR_NORM) - divisor |= GMP_NUMB_HIGHBIT; - if (tr->divisor == DIVISOR_ODD) - divisor |= 1; - - for (i = 0; i < NUM_SOURCES; i++) - { - if (s[i].high) - s[i].p = s[i].region.ptr + s[i].region.size - SRC_SIZE(i) - s[i].align; - else - s[i].p = s[i].region.ptr + s[i].align; - } - - pointer_setup (&ref); - pointer_setup (&fun); - - ref.retval = 0x04152637; - fun.retval = 0x8C9DAEBF; - - t_random (multiplier_N, tr->msize); - - for (i = 0; i < NUM_SOURCES; i++) - { - if (! tr->src[i]) - continue; - - mprotect_region (&s[i].region, PROT_READ|PROT_WRITE); - t_random (s[i].p, SRC_SIZE(i)); - - switch (tr->data) { - case DATA_NON_ZERO: - if (refmpn_zero_p (s[i].p, SRC_SIZE(i))) - s[i].p[0] = 1; - break; - - case DATA_MULTIPLE_DIVISOR: - /* same number of low zero bits as divisor */ - s[i].p[0] &= ~ LOW_ZEROS_MASK (divisor); - refmpn_sub_1 (s[i].p, s[i].p, size, - refmpn_mod_1 (s[i].p, size, divisor)); - break; - - case DATA_GCD: - /* s[1] no more bits than s[0] */ - if (i == 1 && size2 == size) - s[1].p[size-1] &= refmpn_msbone_mask (s[0].p[size-1]); - - /* high limb non-zero */ - s[i].p[SRC_SIZE(i)-1] += (s[i].p[SRC_SIZE(i)-1] == 0); - - /* odd */ - s[i].p[0] |= 1; - break; - - case DATA_SRC0_ODD: - if (i == 0) - s[i].p[0] |= 1; - break; - - case DATA_SRC1_ODD: - if (i == 1) - s[i].p[0] |= 1; - break; - - case DATA_SRC1_ODD_PRIME: - if (i == 1) - { - if (refmpn_zero_p (s[i].p+1, SRC_SIZE(i)-1) - && s[i].p[0] <=3) - s[i].p[0] = 3; - else - { - mpz_t p; - mpz_init (p); - for (;;) - { - _mpz_realloc (p, SRC_SIZE(i)); - MPN_COPY (PTR(p), s[i].p, SRC_SIZE(i)); - SIZ(p) = SRC_SIZE(i); - MPN_NORMALIZE (PTR(p), SIZ(p)); - mpz_nextprime (p, p); - if (mpz_size (p) <= SRC_SIZE(i)) - break; - - t_random (s[i].p, SRC_SIZE(i)); - } - MPN_COPY (s[i].p, PTR(p), SIZ(p)); - if (SIZ(p) < SRC_SIZE(i)) - MPN_ZERO (s[i].p + SIZ(p), SRC_SIZE(i) - SIZ(p)); - mpz_clear (p); - } - } - break; - - case DATA_SRC1_HIGHBIT: - if (i == 1) - { - if (tr->size2) - s[i].p[size2-1] |= GMP_NUMB_HIGHBIT; - else - s[i].p[size-1] |= GMP_NUMB_HIGHBIT; - } - break; - - case DATA_SRC0_HIGHBIT: - if (i == 0) - { - s[i].p[size-1] |= GMP_NUMB_HIGHBIT; - } - break; - - case DATA_UDIV_QRNND: - s[i].p[1] %= divisor; - break; - case DATA_DIV_QR_1: - if (i == 1) - s[i].p[0] %= divisor; - break; - } - - mprotect_region (&s[i].region, PROT_READ); - } - - for (i = 0; i < NUM_DESTS; i++) - { - if (! tr->dst[i]) - continue; - - if (tr->dst0_from_src1 && i==0) - { - mp_size_t copy = MIN (d[0].size, SRC_SIZE(1)); - mp_size_t fill = MAX (0, d[0].size - copy); - MPN_COPY (fun.d[0].p, s[1].region.ptr, copy); - MPN_COPY (ref.d[0].p, s[1].region.ptr, copy); - refmpn_fill (fun.d[0].p + copy, fill, DEADVAL); - refmpn_fill (ref.d[0].p + copy, fill, DEADVAL); - } - else if (tr->dst_bytes[i]) - { - memset (ref.d[i].p, 0xBA, d[i].size); - memset (fun.d[i].p, 0xBA, d[i].size); - } - else - { - refmpn_fill (ref.d[i].p, d[i].size, DEADVAL); - refmpn_fill (fun.d[i].p, d[i].size, DEADVAL); - } - } - - for (i = 0; i < NUM_SOURCES; i++) - { - if (! tr->src[i]) - continue; - - if (ref.s[i].p != s[i].p) - { - refmpn_copyi (ref.s[i].p, s[i].p, SRC_SIZE(i)); - refmpn_copyi (fun.s[i].p, s[i].p, SRC_SIZE(i)); - } - } - - if (option_print) - print_all(); - - if (tr->validate != NULL) - { - trap_location = TRAP_FUN; - call (&fun, choice->function); - trap_location = TRAP_NOWHERE; - - if (! CALLING_CONVENTIONS_CHECK ()) - { - print_all(); - abort(); - } - - (*tr->validate) (); - } - else - { - trap_location = TRAP_REF; - call (&ref, tr->reference); - trap_location = TRAP_FUN; - call (&fun, choice->function); - trap_location = TRAP_NOWHERE; - - if (! CALLING_CONVENTIONS_CHECK ()) - { - print_all(); - abort(); - } - - compare (); - } -} - - -#define SIZE_ITERATION \ - for (size = MAX3 (option_firstsize, \ - choice->minsize, \ - (tr->size == SIZE_ALLOW_ZERO) ? 0 : 1), \ - size += (tr->size == SIZE_ODD) && !(size & 1); \ - size <= option_lastsize; \ - size += (tr->size == SIZE_ODD) ? 2 : 1) - -#define SIZE2_FIRST \ - (tr->size2 == SIZE_2 ? 2 \ - : tr->size2 == SIZE_FRACTION ? option_firstsize2 \ - : tr->size2 == SIZE_CEIL_HALF ? ((size + 1) / 2) \ - : tr->size2 ? \ - MAX (choice->minsize, (option_firstsize2 != 0 \ - ? option_firstsize2 : 1)) \ - : 0) - -#define SIZE2_LAST \ - (tr->size2 == SIZE_2 ? 2 \ - : tr->size2 == SIZE_FRACTION ? FRACTION_COUNT-1 \ - : tr->size2 == SIZE_CEIL_HALF ? ((size + 1) / 2) \ - : tr->size2 ? size \ - : 0) - -#define SIZE2_ITERATION \ - for (size2 = SIZE2_FIRST; size2 <= SIZE2_LAST; size2++) - -#define ALIGN_COUNT(cond) ((cond) ? ALIGNMENTS : 1) -#define ALIGN_ITERATION(w,n,cond) \ - for (w[n].align = 0; w[n].align < ALIGN_COUNT(cond); w[n].align++) - -#define HIGH_LIMIT(cond) ((cond) != 0) -#define HIGH_COUNT(cond) (HIGH_LIMIT (cond) + 1) -#define HIGH_ITERATION(w,n,cond) \ - for (w[n].high = 0; w[n].high <= HIGH_LIMIT(cond); w[n].high++) - -#define SHIFT_LIMIT \ - ((unsigned long) (tr->shift ? GMP_NUMB_BITS -1 : 1)) - -#define SHIFT_ITERATION \ - for (shift = 1; shift <= SHIFT_LIMIT; shift++) - - -void -try_many (void) -{ - int i; - - { - unsigned long total = 1; - - total *= option_repetitions; - total *= option_lastsize; - if (tr->size2 == SIZE_FRACTION) total *= FRACTION_COUNT; - else if (tr->size2) total *= (option_lastsize+1)/2; - - total *= SHIFT_LIMIT; - total *= MULTIPLIER_COUNT; - total *= DIVISOR_COUNT; - total *= CARRY_COUNT; - total *= T_RAND_COUNT; - - total *= HIGH_COUNT (tr->dst[0]); - total *= HIGH_COUNT (tr->dst[1]); - total *= HIGH_COUNT (tr->src[0]); - total *= HIGH_COUNT (tr->src[1]); - - total *= ALIGN_COUNT (tr->dst[0]); - total *= ALIGN_COUNT (tr->dst[1]); - total *= ALIGN_COUNT (tr->src[0]); - total *= ALIGN_COUNT (tr->src[1]); - - total *= OVERLAP_COUNT; - - printf ("%s %lu\n", choice->name, total); - } - - spinner_count = 0; - - for (i = 0; i < option_repetitions; i++) - SIZE_ITERATION - SIZE2_ITERATION - - SHIFT_ITERATION - MULTIPLIER_ITERATION - DIVISOR_ITERATION - CARRY_ITERATION /* must be after divisor */ - T_RAND_ITERATION - - HIGH_ITERATION(d,0, tr->dst[0]) - HIGH_ITERATION(d,1, tr->dst[1]) - HIGH_ITERATION(s,0, tr->src[0]) - HIGH_ITERATION(s,1, tr->src[1]) - - ALIGN_ITERATION(d,0, tr->dst[0]) - ALIGN_ITERATION(d,1, tr->dst[1]) - ALIGN_ITERATION(s,0, tr->src[0]) - ALIGN_ITERATION(s,1, tr->src[1]) - - OVERLAP_ITERATION - try_one(); - - printf("\n"); -} - - -/* Usually print_all() doesn't show much, but it might give a hint as to - where the function was up to when it died. */ -void -trap (int sig) -{ - const char *name = "noname"; - - switch (sig) { - case SIGILL: name = "SIGILL"; break; -#ifdef SIGBUS - case SIGBUS: name = "SIGBUS"; break; -#endif - case SIGSEGV: name = "SIGSEGV"; break; - case SIGFPE: name = "SIGFPE"; break; - } - - printf ("\n\nSIGNAL TRAP: %s\n", name); - - switch (trap_location) { - case TRAP_REF: - printf (" in reference function: %s\n", tr->reference_name); - break; - case TRAP_FUN: - printf (" in test function: %s\n", choice->name); - print_all (); - break; - case TRAP_SETUPS: - printf (" in parameter setups\n"); - print_all (); - break; - default: - printf (" somewhere unknown\n"); - break; - } - exit (1); -} - - -void -try_init (void) -{ -#if HAVE_GETPAGESIZE - /* Prefer getpagesize() over sysconf(), since on SunOS 4 sysconf() doesn't - know _SC_PAGESIZE. */ - pagesize = getpagesize (); -#else -#if HAVE_SYSCONF - if ((pagesize = sysconf (_SC_PAGESIZE)) == -1) - { - /* According to the linux man page, sysconf doesn't set errno */ - fprintf (stderr, "Cannot get sysconf _SC_PAGESIZE\n"); - exit (1); - } -#else -Error, error, cannot get page size -#endif -#endif - - printf ("pagesize is 0x%lX bytes\n", pagesize); - - signal (SIGILL, trap); -#ifdef SIGBUS - signal (SIGBUS, trap); -#endif - signal (SIGSEGV, trap); - signal (SIGFPE, trap); - - { - int i; - - for (i = 0; i < NUM_SOURCES; i++) - { - malloc_region (&s[i].region, 2*option_lastsize+ALIGNMENTS-1); - printf ("s[%d] %p to %p (0x%lX bytes)\n", - i, (void *) (s[i].region.ptr), - (void *) (s[i].region.ptr + s[i].region.size), - (long) s[i].region.size * GMP_LIMB_BYTES); - } - -#define INIT_EACH(e,es) \ - for (i = 0; i < NUM_DESTS; i++) \ - { \ - malloc_region (&e.d[i].region, 2*option_lastsize+ALIGNMENTS-1); \ - printf ("%s d[%d] %p to %p (0x%lX bytes)\n", \ - es, i, (void *) (e.d[i].region.ptr), \ - (void *) (e.d[i].region.ptr + e.d[i].region.size), \ - (long) e.d[i].region.size * GMP_LIMB_BYTES); \ - } - - INIT_EACH(ref, "ref"); - INIT_EACH(fun, "fun"); - } -} - -int -strmatch_wild (const char *pattern, const char *str) -{ - size_t plen, slen; - - /* wildcard at start */ - if (pattern[0] == '*') - { - pattern++; - plen = strlen (pattern); - slen = strlen (str); - return (plen == 0 - || (slen >= plen && memcmp (pattern, str+slen-plen, plen) == 0)); - } - - /* wildcard at end */ - plen = strlen (pattern); - if (plen >= 1 && pattern[plen-1] == '*') - return (memcmp (pattern, str, plen-1) == 0); - - /* no wildcards */ - return (strcmp (pattern, str) == 0); -} - -void -try_name (const char *name) -{ - int found = 0; - int i; - - for (i = 0; i < numberof (choice_array); i++) - { - if (strmatch_wild (name, choice_array[i].name)) - { - choice = &choice_array[i]; - tr = ¶m[choice->type]; - try_many (); - found = 1; - } - } - - if (!found) - { - printf ("%s unknown\n", name); - /* exit (1); */ - } -} - - -void -usage (const char *prog) -{ - int col = 0; - int i; - - printf ("Usage: %s [options] function...\n", prog); - printf (" -1 use limb data 1,2,3,etc\n"); - printf (" -9 use limb data all 0xFF..FFs\n"); - printf (" -a zeros use limb data all zeros\n"); - printf (" -a ffs use limb data all 0xFF..FFs (same as -9)\n"); - printf (" -a 2fd use data 0x2FFF...FFFD\n"); - printf (" -p print each case tried (try this if seg faulting)\n"); - printf (" -R seed random numbers from time()\n"); - printf (" -r reps set repetitions (default %d)\n", DEFAULT_REPETITIONS); - printf (" -s size starting size to test\n"); - printf (" -S size2 starting size2 to test\n"); - printf (" -s s1-s2 range of sizes to test\n"); - printf (" -W don't show the spinner (use this in gdb)\n"); - printf (" -z disable mprotect() redzones\n"); - printf ("Default data is refmpn_random() and refmpn_random2().\n"); - printf ("\n"); - printf ("Functions that can be tested:\n"); - - for (i = 0; i < numberof (choice_array); i++) - { - if (col + 1 + strlen (choice_array[i].name) > 79) - { - printf ("\n"); - col = 0; - } - printf (" %s", choice_array[i].name); - col += 1 + strlen (choice_array[i].name); - } - printf ("\n"); - - exit(1); -} - - -int -main (int argc, char *argv[]) -{ - int i; - - /* unbuffered output */ - setbuf (stdout, NULL); - setbuf (stderr, NULL); - - /* default trace in hex, and in upper-case so can paste into bc */ - mp_trace_base = -16; - - param_init (); - - { - unsigned long seed = 123; - int opt; - - while ((opt = getopt(argc, argv, "19a:b:E:pRr:S:s:Wz")) != EOF) - { - switch (opt) { - case '1': - /* use limb data values 1, 2, 3, ... etc */ - option_data = DATA_SEQ; - break; - case '9': - /* use limb data values 0xFFF...FFF always */ - option_data = DATA_FFS; - break; - case 'a': - if (strcmp (optarg, "zeros") == 0) option_data = DATA_ZEROS; - else if (strcmp (optarg, "seq") == 0) option_data = DATA_SEQ; - else if (strcmp (optarg, "ffs") == 0) option_data = DATA_FFS; - else if (strcmp (optarg, "2fd") == 0) option_data = DATA_2FD; - else - { - fprintf (stderr, "unrecognised data option: %s\n", optarg); - exit (1); - } - break; - case 'b': - mp_trace_base = atoi (optarg); - break; - case 'E': - /* re-seed */ - sscanf (optarg, "%lu", &seed); - printf ("Re-seeding with %lu\n", seed); - break; - case 'p': - option_print = 1; - break; - case 'R': - /* randomize */ - seed = time (NULL); - printf ("Seeding with %lu, re-run using \"-E %lu\"\n", seed, seed); - break; - case 'r': - option_repetitions = atoi (optarg); - break; - case 's': - { - char *p; - option_firstsize = strtol (optarg, 0, 0); - if ((p = strchr (optarg, '-')) != NULL) - option_lastsize = strtol (p+1, 0, 0); - } - break; - case 'S': - /* -S <size> sets the starting size for the second of a two size - routine (like mpn_mul_basecase) */ - option_firstsize2 = strtol (optarg, 0, 0); - break; - case 'W': - /* use this when running in the debugger */ - option_spinner = 0; - break; - case 'z': - /* disable redzones */ - option_redzones = 0; - break; - case '?': - usage (argv[0]); - break; - } - } - - gmp_randinit_default (__gmp_rands); - __gmp_rands_initialized = 1; - gmp_randseed_ui (__gmp_rands, seed); - } - - try_init(); - - if (argc <= optind) - usage (argv[0]); - - for (i = optind; i < argc; i++) - try_name (argv[i]); - - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/devel/tst-addsub.c b/src/plugins/e-acsl/contrib/libgmp/tests/devel/tst-addsub.c deleted file mode 100644 index 50aa3a73b39..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/devel/tst-addsub.c +++ /dev/null @@ -1,98 +0,0 @@ -/* Copyright 1996, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#define ADD 1 -#define SUB 2 - -#ifndef METHOD -#define METHOD ADD -#endif - -#if METHOD == ADD -#define REFCALL refmpn_add_n -#define TESTCALL mpn_add_n -#endif - -#if METHOD == SUB -#define REFCALL refmpn_sub_n -#define TESTCALL mpn_sub_n -#endif - -#define SIZE 100 - -int -main (int argc, char **argv) -{ - mp_size_t alloc_size, max_size, size, i, cumul_size; - mp_ptr s1, s2, dx, dy; - int s1_align, s2_align, d_align; - long pass, n_passes; - mp_limb_t cx, cy; - - max_size = SIZE; - n_passes = 1000000; - - argc--; argv++; - if (argc) - { - max_size = atol (*argv); - argc--; argv++; - } - - alloc_size = max_size + 32; - s1 = malloc (alloc_size * GMP_LIMB_BYTES); - s2 = malloc (alloc_size * GMP_LIMB_BYTES); - dx = malloc (alloc_size * GMP_LIMB_BYTES); - dy = malloc (alloc_size * GMP_LIMB_BYTES); - - cumul_size = 0; - for (pass = 0; pass < n_passes; pass++) - { - size = random () % max_size + 1; - - cumul_size += size; - if (cumul_size >= 1000000) - { - cumul_size -= 1000000; - printf ("\r%ld", pass); fflush (stdout); - } - s1_align = random () % 32; - s2_align = random () % 32; - d_align = random () % 32; - - mpn_random2 (s1 + s1_align, size); - mpn_random2 (s2 + s2_align, size); - - for (i = 0; i < alloc_size; i++) - dx[i] = dy[i] = i + 0x9876500; - - cx = TESTCALL (dx + d_align, s1 + s1_align, s2 + s2_align, size); - cy = REFCALL (dy + d_align, s1 + s1_align, s2 + s2_align, size); - - if (cx != cy || mpn_cmp (dx, dy, alloc_size) != 0) - abort (); - } - - printf ("%ld passes OK\n", n_passes); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/memory.c b/src/plugins/e-acsl/contrib/libgmp/tests/memory.c deleted file mode 100644 index c91813ea082..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/memory.c +++ /dev/null @@ -1,247 +0,0 @@ -/* Memory allocation used during tests. - -Copyright 2001, 2002, 2007, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> /* for abort */ -#include <string.h> /* for memcpy, memcmp */ -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#if GMP_LIMB_BITS == 64 -#define PATTERN1 CNST_LIMB(0xcafebabedeadbeef) -#define PATTERN2 CNST_LIMB(0xabacadabaedeedab) -#else -#define PATTERN1 CNST_LIMB(0xcafebabe) -#define PATTERN2 CNST_LIMB(0xdeadbeef) -#endif - -#if HAVE_INTPTR_T -#define PTRLIMB(p) ((mp_limb_t) (intptr_t) p) -#else -#define PTRLIMB(p) ((mp_limb_t) (size_t) p) -#endif - -/* Each block allocated is a separate malloc, for the benefit of a redzoning - malloc debugger during development or when bug hunting. - - Sizes passed when reallocating or freeing are checked (the default - routines don't care about these). - - Memory leaks are checked by requiring that all blocks have been freed - when tests_memory_end() is called. Test programs must be sure to have - "clear"s for all temporary variables used. */ - - -struct header { - void *ptr; - size_t size; - struct header *next; -}; - -struct header *tests_memory_list = NULL; - -/* Return a pointer to a pointer to the found block (so it can be updated - when unlinking). */ -struct header ** -tests_memory_find (void *ptr) -{ - struct header **hp; - - for (hp = &tests_memory_list; *hp != NULL; hp = &((*hp)->next)) - if ((*hp)->ptr == ptr) - return hp; - - return NULL; -} - -int -tests_memory_valid (void *ptr) -{ - return (tests_memory_find (ptr) != NULL); -} - -void * -tests_allocate (size_t size) -{ - struct header *h; - void *rptr, *ptr; - mp_limb_t PATTERN2_var; - - if (size == 0) - { - fprintf (stderr, "tests_allocate(): attempt to allocate 0 bytes\n"); - abort (); - } - - h = (struct header *) __gmp_default_allocate (sizeof (*h)); - h->next = tests_memory_list; - tests_memory_list = h; - - rptr = __gmp_default_allocate (size + 2 * sizeof (mp_limb_t)); - ptr = (void *) ((gmp_intptr_t) rptr + sizeof (mp_limb_t)); - - *((mp_limb_t *) ((gmp_intptr_t) ptr - sizeof (mp_limb_t))) - = PATTERN1 - PTRLIMB (ptr); - PATTERN2_var = PATTERN2 - PTRLIMB (ptr); - memcpy ((void *) ((gmp_intptr_t) ptr + size), &PATTERN2_var, sizeof (mp_limb_t)); - - h->size = size; - h->ptr = ptr; - return h->ptr; -} - -void * -tests_reallocate (void *ptr, size_t old_size, size_t new_size) -{ - struct header **hp, *h; - void *rptr; - mp_limb_t PATTERN2_var; - - if (new_size == 0) - { - fprintf (stderr, "tests_reallocate(): attempt to reallocate %p to 0 bytes\n", - ptr); - abort (); - } - - hp = tests_memory_find (ptr); - if (hp == NULL) - { - fprintf (stderr, "tests_reallocate(): attempt to reallocate bad pointer %p\n", - ptr); - abort (); - } - h = *hp; - - if (h->size != old_size) - { - fprintf (stderr, "tests_reallocate(): bad old size %lu, should be %lu\n", - (unsigned long) old_size, (unsigned long) h->size); - abort (); - } - - if (*((mp_limb_t *) ((gmp_intptr_t) ptr - sizeof (mp_limb_t))) - != PATTERN1 - PTRLIMB (ptr)) - { - fprintf (stderr, "in realloc: redzone clobbered before block\n"); - abort (); - } - PATTERN2_var = PATTERN2 - PTRLIMB (ptr); - if (memcmp ((void *) ((gmp_intptr_t) ptr + h->size), &PATTERN2_var, sizeof (mp_limb_t))) - { - fprintf (stderr, "in realloc: redzone clobbered after block\n"); - abort (); - } - - rptr = __gmp_default_reallocate ((void *) ((gmp_intptr_t) ptr - sizeof (mp_limb_t)), - old_size + 2 * sizeof (mp_limb_t), - new_size + 2 * sizeof (mp_limb_t)); - ptr = (void *) ((gmp_intptr_t) rptr + sizeof (mp_limb_t)); - - *((mp_limb_t *) ((gmp_intptr_t) ptr - sizeof (mp_limb_t))) - = PATTERN1 - PTRLIMB (ptr); - PATTERN2_var = PATTERN2 - PTRLIMB (ptr); - memcpy ((void *) ((gmp_intptr_t) ptr + new_size), &PATTERN2_var, sizeof (mp_limb_t)); - - h->size = new_size; - h->ptr = ptr; - return h->ptr; -} - -struct header ** -tests_free_find (void *ptr) -{ - struct header **hp = tests_memory_find (ptr); - if (hp == NULL) - { - fprintf (stderr, "tests_free(): attempt to free bad pointer %p\n", - ptr); - abort (); - } - return hp; -} - -void -tests_free_nosize (void *ptr) -{ - struct header **hp = tests_free_find (ptr); - struct header *h = *hp; - mp_limb_t PATTERN2_var; - - *hp = h->next; /* unlink */ - - if (*((mp_limb_t *) ((gmp_intptr_t) ptr - sizeof (mp_limb_t))) - != PATTERN1 - PTRLIMB (ptr)) - { - fprintf (stderr, "in free: redzone clobbered before block\n"); - abort (); - } - PATTERN2_var = PATTERN2 - PTRLIMB (ptr); - if (memcmp ((void *) ((gmp_intptr_t) ptr + h->size), &PATTERN2_var, sizeof (mp_limb_t))) - { - fprintf (stderr, "in free: redzone clobbered after block\n"); - abort (); - } - - __gmp_default_free ((void *) ((gmp_intptr_t) ptr - sizeof(mp_limb_t)), - h->size + 2 * sizeof (mp_limb_t)); - __gmp_default_free (h, sizeof (*h)); -} - -void -tests_free (void *ptr, size_t size) -{ - struct header **hp = tests_free_find (ptr); - struct header *h = *hp; - - if (h->size != size) - { - fprintf (stderr, "tests_free(): bad size %lu, should be %lu\n", - (unsigned long) size, (unsigned long) h->size); - abort (); - } - - tests_free_nosize (ptr); -} - -void -tests_memory_start (void) -{ - mp_set_memory_functions (tests_allocate, tests_reallocate, tests_free); -} - -void -tests_memory_end (void) -{ - if (tests_memory_list != NULL) - { - struct header *h; - unsigned count; - - fprintf (stderr, "tests_memory_end(): not all memory freed\n"); - - count = 0; - for (h = tests_memory_list; h != NULL; h = h->next) - count++; - - fprintf (stderr, " %u blocks remaining\n", count); - abort (); - } -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/misc.c b/src/plugins/e-acsl/contrib/libgmp/tests/misc.c deleted file mode 100644 index 59920c2726e..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/misc.c +++ /dev/null @@ -1,565 +0,0 @@ -/* Miscellaneous test program support routines. - -Copyright 2000-2003, 2005, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <ctype.h> -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> /* for getenv */ -#include <string.h> - -#if HAVE_FLOAT_H -#include <float.h> /* for DBL_MANT_DIG */ -#endif - -#if TIME_WITH_SYS_TIME -# include <sys/time.h> /* for struct timeval */ -# include <time.h> -#else -# if HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif -#endif - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* The various tests setups and final checks, collected up together. */ -void -tests_start (void) -{ - /* don't buffer, so output is not lost if a test causes a segv etc */ - setbuf (stdout, NULL); - setbuf (stderr, NULL); - - tests_memory_start (); - tests_rand_start (); -} -void -tests_end (void) -{ - tests_rand_end (); - tests_memory_end (); -} - - -void -tests_rand_start (void) -{ - gmp_randstate_ptr rands; - char *perform_seed; - unsigned long seed; - - if (__gmp_rands_initialized) - { - printf ("Please let tests_start() initialize the global __gmp_rands.\n"); - printf ("ie. ensure that function is called before the first use of RANDS.\n"); - abort (); - } - - gmp_randinit_default (__gmp_rands); - __gmp_rands_initialized = 1; - rands = __gmp_rands; - - perform_seed = getenv ("GMP_CHECK_RANDOMIZE"); - if (perform_seed != NULL) - { -#ifdef HAVE_STRTOUL - seed = strtoul (perform_seed, 0, 0); -#else - /* This will not work right for seeds >= 2^31 on 64-bit machines. - Perhaps use atol unconditionally? Is that ubiquitous? */ - seed = atoi (perform_seed); -#endif - if (! (seed == 0 || seed == 1)) - { - printf ("Re-seeding with GMP_CHECK_RANDOMIZE=%lu\n", seed); - gmp_randseed_ui (rands, seed); - } - else - { -#if HAVE_GETTIMEOFDAY - struct timeval tv; - gettimeofday (&tv, NULL); - seed = tv.tv_sec ^ (tv.tv_usec << 12); - seed &= 0xffffffff; -#else - time_t tv; - time (&tv); - seed = tv; -#endif - gmp_randseed_ui (rands, seed); - printf ("Seed GMP_CHECK_RANDOMIZE=%lu (include this in bug reports)\n", seed); - } - fflush (stdout); - } -} -void -tests_rand_end (void) -{ - RANDS_CLEAR (); -} - - -/* Only used if CPU calling conventions checking is available. */ -mp_limb_t (*calling_conventions_function) (ANYARGS); - - -/* Return p advanced to the next multiple of "align" bytes. "align" must be - a power of 2. Care is taken not to assume sizeof(int)==sizeof(pointer). - Using "unsigned long" avoids a warning on hpux. */ -void * -align_pointer (void *p, size_t align) -{ - gmp_intptr_t d; - d = ((gmp_intptr_t) p) & (align-1); - d = (d != 0 ? align-d : 0); - return (void *) (((char *) p) + d); -} - - -/* Note that memory allocated with this function can never be freed, because - the start address of the block allocated is lost. */ -void * -__gmp_allocate_func_aligned (size_t bytes, size_t align) -{ - return align_pointer ((*__gmp_allocate_func) (bytes + align-1), align); -} - - -void * -__gmp_allocate_or_reallocate (void *ptr, size_t oldsize, size_t newsize) -{ - if (ptr == NULL) - return (*__gmp_allocate_func) (newsize); - else - return (*__gmp_reallocate_func) (ptr, oldsize, newsize); -} - -char * -__gmp_allocate_strdup (const char *s) -{ - size_t len; - char *t; - len = strlen (s); - t = (char *) (*__gmp_allocate_func) (len+1); - memcpy (t, s, len+1); - return t; -} - - -char * -strtoupper (char *s_orig) -{ - char *s; - for (s = s_orig; *s != '\0'; s++) - if (isascii (*s)) - *s = toupper (*s); - return s_orig; -} - - -void -mpz_set_n (mpz_ptr z, mp_srcptr p, mp_size_t size) -{ - ASSERT (size >= 0); - MPN_NORMALIZE (p, size); - MPZ_REALLOC (z, size); - MPN_COPY (PTR(z), p, size); - SIZ(z) = size; -} - -void -mpz_init_set_n (mpz_ptr z, mp_srcptr p, mp_size_t size) -{ - ASSERT (size >= 0); - - MPN_NORMALIZE (p, size); - ALLOC(z) = MAX (size, 1); - PTR(z) = __GMP_ALLOCATE_FUNC_LIMBS (ALLOC(z)); - SIZ(z) = size; - MPN_COPY (PTR(z), p, size); -} - - -/* Find least significant limb position where p1,size and p2,size differ. */ -mp_size_t -mpn_diff_lowest (mp_srcptr p1, mp_srcptr p2, mp_size_t size) -{ - mp_size_t i; - - for (i = 0; i < size; i++) - if (p1[i] != p2[i]) - return i; - - /* no differences */ - return -1; -} - - -/* Find most significant limb position where p1,size and p2,size differ. */ -mp_size_t -mpn_diff_highest (mp_srcptr p1, mp_srcptr p2, mp_size_t size) -{ - mp_size_t i; - - for (i = size-1; i >= 0; i--) - if (p1[i] != p2[i]) - return i; - - /* no differences */ - return -1; -} - - -/* Find least significant byte position where p1,size and p2,size differ. */ -mp_size_t -byte_diff_lowest (const void *p1, const void *p2, mp_size_t size) -{ - mp_size_t i; - - for (i = 0; i < size; i++) - if (((const char *) p1)[i] != ((const char *) p2)[i]) - return i; - - /* no differences */ - return -1; -} - - -/* Find most significant limb position where p1,size and p2,size differ. */ -mp_size_t -byte_diff_highest (const void *p1, const void *p2, mp_size_t size) -{ - mp_size_t i; - - for (i = size-1; i >= 0; i--) - if (((const char *) p1)[i] != ((const char *) p2)[i]) - return i; - - /* no differences */ - return -1; -} - - -void -mpz_set_str_or_abort (mpz_ptr z, const char *str, int base) -{ - if (mpz_set_str (z, str, base) != 0) - { - fprintf (stderr, "ERROR: mpz_set_str failed\n"); - fprintf (stderr, " str = \"%s\"\n", str); - fprintf (stderr, " base = %d\n", base); - abort(); - } -} - -void -mpq_set_str_or_abort (mpq_ptr q, const char *str, int base) -{ - if (mpq_set_str (q, str, base) != 0) - { - fprintf (stderr, "ERROR: mpq_set_str failed\n"); - fprintf (stderr, " str = \"%s\"\n", str); - fprintf (stderr, " base = %d\n", base); - abort(); - } -} - -void -mpf_set_str_or_abort (mpf_ptr f, const char *str, int base) -{ - if (mpf_set_str (f, str, base) != 0) - { - fprintf (stderr, "ERROR mpf_set_str failed\n"); - fprintf (stderr, " str = \"%s\"\n", str); - fprintf (stderr, " base = %d\n", base); - abort(); - } -} - - -/* Whether the absolute value of z is a power of 2. */ -int -mpz_pow2abs_p (mpz_srcptr z) -{ - mp_size_t size, i; - mp_srcptr ptr; - - size = SIZ (z); - if (size == 0) - return 0; /* zero is not a power of 2 */ - size = ABS (size); - - ptr = PTR (z); - for (i = 0; i < size-1; i++) - if (ptr[i] != 0) - return 0; /* non-zero low limb means not a power of 2 */ - - return POW2_P (ptr[i]); /* high limb power of 2 */ -} - - -/* Exponentially distributed between 0 and 2^nbits-1, meaning the number of - bits in the result is uniformly distributed between 0 and nbits-1. - - FIXME: This is not a proper exponential distribution, since the - probability function will have a stepped shape due to using a uniform - distribution after choosing how many bits. */ - -void -mpz_erandomb (mpz_ptr rop, gmp_randstate_t rstate, unsigned long nbits) -{ - mpz_urandomb (rop, rstate, gmp_urandomm_ui (rstate, nbits)); -} - -void -mpz_erandomb_nonzero (mpz_ptr rop, gmp_randstate_t rstate, unsigned long nbits) -{ - mpz_erandomb (rop, rstate, nbits); - if (mpz_sgn (rop) == 0) - mpz_set_ui (rop, 1L); -} - -void -mpz_errandomb (mpz_ptr rop, gmp_randstate_t rstate, unsigned long nbits) -{ - mpz_rrandomb (rop, rstate, gmp_urandomm_ui (rstate, nbits)); -} - -void -mpz_errandomb_nonzero (mpz_ptr rop, gmp_randstate_t rstate, unsigned long nbits) -{ - mpz_errandomb (rop, rstate, nbits); - if (mpz_sgn (rop) == 0) - mpz_set_ui (rop, 1L); -} - -void -mpz_negrandom (mpz_ptr rop, gmp_randstate_t rstate) -{ - mp_limb_t n; - _gmp_rand (&n, rstate, 1); - if (n != 0) - mpz_neg (rop, rop); -} - -mp_limb_t -urandom (void) -{ -#if GMP_NAIL_BITS == 0 - mp_limb_t n; - _gmp_rand (&n, RANDS, GMP_LIMB_BITS); - return n; -#else - mp_limb_t n[2]; - _gmp_rand (n, RANDS, GMP_LIMB_BITS); - return n[0] + (n[1] << GMP_NUMB_BITS); -#endif -} - - -/* Call (*func)() with various random number generators. */ -void -call_rand_algs (void (*func) (const char *, gmp_randstate_ptr)) -{ - gmp_randstate_t rstate; - mpz_t a; - - mpz_init (a); - - gmp_randinit_default (rstate); - (*func) ("gmp_randinit_default", rstate); - gmp_randclear (rstate); - - gmp_randinit_mt (rstate); - (*func) ("gmp_randinit_mt", rstate); - gmp_randclear (rstate); - - gmp_randinit_lc_2exp_size (rstate, 8L); - (*func) ("gmp_randinit_lc_2exp_size 8", rstate); - gmp_randclear (rstate); - - gmp_randinit_lc_2exp_size (rstate, 16L); - (*func) ("gmp_randinit_lc_2exp_size 16", rstate); - gmp_randclear (rstate); - - gmp_randinit_lc_2exp_size (rstate, 128L); - (*func) ("gmp_randinit_lc_2exp_size 128", rstate); - gmp_randclear (rstate); - - /* degenerate always zeros */ - mpz_set_ui (a, 0L); - gmp_randinit_lc_2exp (rstate, a, 0L, 8L); - (*func) ("gmp_randinit_lc_2exp a=0 c=0 m=8", rstate); - gmp_randclear (rstate); - - /* degenerate always FFs */ - mpz_set_ui (a, 0L); - gmp_randinit_lc_2exp (rstate, a, 0xFFL, 8L); - (*func) ("gmp_randinit_lc_2exp a=0 c=0xFF m=8", rstate); - gmp_randclear (rstate); - - mpz_clear (a); -} - - -/* Return +infinity if available, or 0 if not. - We don't want to use libm, so INFINITY or other system values are not - used here. */ -double -tests_infinity_d (void) -{ -#if _GMP_IEEE_FLOATS - union ieee_double_extract x; - x.s.exp = 2047; - x.s.manl = 0; - x.s.manh = 0; - x.s.sig = 0; - return x.d; -#else - return 0; -#endif -} - - -/* Return non-zero if d is an infinity (either positive or negative). - Don't want libm, so don't use isinf() or other system tests. */ -int -tests_isinf (double d) -{ -#if _GMP_IEEE_FLOATS - union ieee_double_extract x; - x.d = d; - return (x.s.exp == 2047 && x.s.manl == 0 && x.s.manh == 0); -#else - return 0; -#endif -} - - -/* Set the hardware floating point rounding mode. Same mode values as mpfr, - namely 0=nearest, 1=tozero, 2=up, 3=down. Return 1 if successful, 0 if - not. */ -int -tests_hardware_setround (int mode) -{ -#if WANT_ASSEMBLY && HAVE_HOST_CPU_FAMILY_x86 - int rc; - switch (mode) { - case 0: rc = 0; break; /* nearest */ - case 1: rc = 3; break; /* tozero */ - case 2: rc = 2; break; /* up */ - case 3: rc = 1; break; /* down */ - default: - return 0; - } - x86_fldcw ((x86_fstcw () & ~0xC00) | (rc << 10)); - return 1; -#endif - - return 0; -} - -/* Return the hardware floating point rounding mode, or -1 if unknown. */ -int -tests_hardware_getround (void) -{ -#if WANT_ASSEMBLY && HAVE_HOST_CPU_FAMILY_x86 - switch ((x86_fstcw () & ~0xC00) >> 10) { - case 0: return 0; break; /* nearest */ - case 1: return 3; break; /* down */ - case 2: return 2; break; /* up */ - case 3: return 1; break; /* tozero */ - } -#endif - - return -1; -} - - -/* tests_dbl_mant_bits() determines by experiment the number of bits in the - mantissa of a "double". If it's not possible to find a value (perhaps - due to the compiler optimizing too aggressively), then return 0. - - This code is used rather than DBL_MANT_DIG from <float.h> since ancient - systems like SunOS don't have that file, and since one GNU/Linux ARM - system was seen where the float emulation seemed to have only 32 working - bits, not the 53 float.h claimed. */ - -int -tests_dbl_mant_bits (void) -{ - static int n = -1; - volatile double x, y, d; - - if (n != -1) - return n; - - n = 1; - x = 2.0; - for (;;) - { - /* see if 2^(n+1)+1 can be formed without rounding, if so then - continue, if not then "n" is the answer */ - y = x + 1.0; - d = y - x; - if (d != 1.0) - { -#if defined (DBL_MANT_DIG) && DBL_RADIX == 2 - if (n != DBL_MANT_DIG) - printf ("Warning, tests_dbl_mant_bits got %d but DBL_MANT_DIG says %d\n", n, DBL_MANT_DIG); -#endif - break; - } - - x *= 2; - n++; - - if (n > 1000) - { - printf ("Oops, tests_dbl_mant_bits can't determine mantissa size\n"); - n = 0; - break; - } - } - return n; -} - - -/* See tests_setjmp_sigfpe in tests.h. */ - -jmp_buf tests_sigfpe_target; - -RETSIGTYPE -tests_sigfpe_handler (int sig) -{ - longjmp (tests_sigfpe_target, 1); -} - -void -tests_sigfpe_done (void) -{ - signal (SIGFPE, SIG_DFL); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/misc/Makefile.am b/src/plugins/e-acsl/contrib/libgmp/tests/misc/Makefile.am deleted file mode 100644 index 0719de8199d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/misc/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -## Process this file with automake to generate Makefile.in - -# Copyright 2001, 2002 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. - - -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la - -check_PROGRAMS = t-printf t-scanf t-locale -TESTS = $(check_PROGRAMS) - -# Temporary files used by the tests. Removed automatically if the tests -# pass, but ensure they're cleaned if they fail. -# -CLEANFILES = *.tmp - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/misc/Makefile.in b/src/plugins/e-acsl/contrib/libgmp/tests/misc/Makefile.in deleted file mode 100644 index 98fb1f49f93..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/misc/Makefile.in +++ /dev/null @@ -1,1040 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright 2001, 2002 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -check_PROGRAMS = t-printf$(EXEEXT) t-scanf$(EXEEXT) t-locale$(EXEEXT) -subdir = tests/misc -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -t_locale_SOURCES = t-locale.c -t_locale_OBJECTS = t-locale.$(OBJEXT) -t_locale_LDADD = $(LDADD) -t_locale_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -t_printf_SOURCES = t-printf.c -t_printf_OBJECTS = t-printf.$(OBJEXT) -t_printf_LDADD = $(LDADD) -t_printf_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_scanf_SOURCES = t-scanf.c -t_scanf_OBJECTS = t-scanf.$(OBJEXT) -t_scanf_LDADD = $(LDADD) -t_scanf_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = t-locale.c t-printf.c t-scanf.c -DIST_SOURCES = t-locale.c t-printf.c t-scanf.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red='[0;31m'; \ - grn='[0;32m'; \ - lgn='[1;32m'; \ - blu='[1;34m'; \ - mgn='[0;35m'; \ - brg='[1m'; \ - std='[m'; \ - fi; \ -} -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck -TEST_SUITE_LOG = test-suite.log -TEST_EXTENSIONS = @EXEEXT@ .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/test-driver -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ABI = @ABI@ -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -ASMFLAGS = @ASMFLAGS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ -CC = @CC@ -CCAS = @CCAS@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CPP_FOR_BUILD = @CPP_FOR_BUILD@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@ -DEFS = @DEFS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -FGREP = @FGREP@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIMB_BITS = @GMP_LIMB_BITS@ -GMP_NAIL_BITS = @GMP_NAIL_BITS@ -GREP = @GREP@ -HAVE_CLOCK_01 = @HAVE_CLOCK_01@ -HAVE_CPUTIME_01 = @HAVE_CPUTIME_01@ -HAVE_GETRUSAGE_01 = @HAVE_GETRUSAGE_01@ -HAVE_GETTIMEOFDAY_01 = @HAVE_GETTIMEOFDAY_01@ -HAVE_HOST_CPU_FAMILY_power = @HAVE_HOST_CPU_FAMILY_power@ -HAVE_HOST_CPU_FAMILY_powerpc = @HAVE_HOST_CPU_FAMILY_powerpc@ -HAVE_SIGACTION_01 = @HAVE_SIGACTION_01@ -HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@ -HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@ -HAVE_STACK_T_01 = @HAVE_STACK_T_01@ -HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBCURSES = @LIBCURSES@ -LIBGMPXX_LDFLAGS = @LIBGMPXX_LDFLAGS@ -LIBGMP_DLL = @LIBGMP_DLL@ -LIBGMP_LDFLAGS = @LIBGMP_LDFLAGS@ -LIBM = @LIBM@ -LIBM_FOR_BUILD = @LIBM_FOR_BUILD@ -LIBOBJS = @LIBOBJS@ -LIBREADLINE = @LIBREADLINE@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -M4 = @M4@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@ -STRIP = @STRIP@ -TAL_OBJECT = @TAL_OBJECT@ -TUNE_LIBS = @TUNE_LIBS@ -TUNE_SQR_OBJ = @TUNE_SQR_OBJ@ -U_FOR_BUILD = @U_FOR_BUILD@ -VERSION = @VERSION@ -WITH_READLINE_01 = @WITH_READLINE_01@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gmp_srclinks = @gmp_srclinks@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -mpn_objects = @mpn_objects@ -mpn_objs_in_libgmp = @mpn_objs_in_libgmp@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la -TESTS = $(check_PROGRAMS) - -# Temporary files used by the tests. Removed automatically if the tests -# pass, but ensure they're cleaned if they fail. -# -CLEANFILES = *.tmp -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps tests/misc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu --ignore-deps tests/misc/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -t-locale$(EXEEXT): $(t_locale_OBJECTS) $(t_locale_DEPENDENCIES) $(EXTRA_t_locale_DEPENDENCIES) - @rm -f t-locale$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_locale_OBJECTS) $(t_locale_LDADD) $(LIBS) - -t-printf$(EXEEXT): $(t_printf_OBJECTS) $(t_printf_DEPENDENCIES) $(EXTRA_t_printf_DEPENDENCIES) - @rm -f t-printf$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_printf_OBJECTS) $(t_printf_LDADD) $(LIBS) - -t-scanf$(EXEEXT): $(t_scanf_OBJECTS) $(t_scanf_DEPENDENCIES) $(EXTRA_t_scanf_DEPENDENCIES) - @rm -f t-scanf$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_scanf_OBJECTS) $(t_scanf_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(AM_V_CC)$(COMPILE) -c -o $@ $< - -.c.obj: - $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -recheck: all $(check_PROGRAMS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -t-printf.log: t-printf$(EXEEXT) - @p='t-printf$(EXEEXT)'; \ - b='t-printf'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-scanf.log: t-scanf$(EXEEXT) - @p='t-scanf$(EXEEXT)'; \ - b='t-scanf'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-locale.log: t-locale$(EXEEXT) - @p='t-locale$(EXEEXT)'; \ - b='t-locale'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.test$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/misc/t-locale.c b/src/plugins/e-acsl/contrib/libgmp/tests/misc/t-locale.c deleted file mode 100644 index 252fc2bd6c6..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/misc/t-locale.c +++ /dev/null @@ -1,207 +0,0 @@ -/* Test locale support, or attempt to do so. - -Copyright 2001, 2002, 2011, 2014 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#define _GNU_SOURCE /* for DECIMAL_POINT in glibc langinfo.h */ - -#include "config.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#if HAVE_NL_TYPES_H -#include <nl_types.h> /* for nl_item (on netbsd 1.4.1 at least) */ -#endif - -#if HAVE_LANGINFO_H -#include <langinfo.h> /* for nl_langinfo */ -#endif - -#if HAVE_LOCALE_H -#include <locale.h> /* for lconv */ -#endif - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#ifdef __MINGW32__ -int -main (void) -{ - exit (0); -} -#else - -const char *decimal_point; - -/* Replace the libc localeconv with one we can manipulate. */ -#if HAVE_LOCALECONV -struct lconv * -localeconv (void) -#if defined __cplusplus && defined __GLIBC__ - throw() -#endif -{ - static struct lconv l; - l.decimal_point = (char *) decimal_point; - return &l; -} -#endif - -/* Replace the libc nl_langinfo with one we can manipulate. */ -#if HAVE_NL_LANGINFO -char * -nl_langinfo (nl_item n) -#if defined __cplusplus && defined __GLIBC__ - throw() -#endif -{ -#if defined (DECIMAL_POINT) - if (n == DECIMAL_POINT) - return (char *) decimal_point; -#endif -#if defined (RADIXCHAR) - if (n == RADIXCHAR) - return (char *) decimal_point; -#endif - return (char *) ""; -} -#endif - -void -check_input (void) -{ - static const char *point[] = { - ".", ",", "WU", "STR", "ZTV***" - }; - - static const struct { - const char *str; - double d; - } data[] = { - - { "1%s", 1.0 }, - { "1%s0", 1.0 }, - { "1%s00", 1.0 }, - - { "%s5", 0.5 }, - { "0%s5", 0.5 }, - { "00%s5", 0.5 }, - { "00%s50", 0.5 }, - - { "1%s5", 1.5 }, - { "1%s5e1", 15.0 }, - }; - - int i, j, neg, ret; - char str[128]; - mpf_t f; - double d; - - mpf_init (f); - - for (i = 0; i < numberof (point); i++) - { - decimal_point = (const char *) point[i]; - - for (neg = 0; neg <= 1; neg++) - { - for (j = 0; j < numberof (data); j++) - { - strcpy (str, neg ? "-" : ""); - sprintf (str+strlen(str), data[j].str, decimal_point); - - d = data[j].d; - if (neg) - d = -d; - - mpf_set_d (f, 123.0); - if (mpf_set_str (f, str, 10) != 0) - { - printf ("mpf_set_str error\n"); - printf (" point %s\n", decimal_point); - printf (" str %s\n", str); - abort (); - } - if (mpf_cmp_d (f, d) != 0) - { - printf ("mpf_set_str wrong result\n"); - printf (" point %s\n", decimal_point); - printf (" str %s\n", str); - mpf_trace (" f", f); - printf (" d=%g\n", d); - abort (); - } - - mpf_set_d (f, 123.0); - ret = gmp_sscanf (str, "%Ff", f); - if (ret != 1) - { - printf ("gmp_sscanf wrong return value\n"); - printf (" point %s\n", decimal_point); - printf (" str %s\n", str); - printf (" ret %d\n", ret); - abort (); - } - if (mpf_cmp_d (f, d) != 0) - { - printf ("gmp_sscanf wrong result\n"); - printf (" point %s\n", decimal_point); - printf (" str %s\n", str); - mpf_trace (" f", f); - printf (" d=%g\n", d); - abort (); - } - } - } - } - mpf_clear (f); -} - -int -main (void) -{ - /* The localeconv replacement breaks printf "%lu" on SunOS 4, so we can't - print the seed in tests_rand_start(). Nothing random is used in this - program though, so just use the memory tests alone. */ - tests_memory_start (); - - { - mpf_t f; - char buf[128]; - mpf_init (f); - decimal_point = ","; - mpf_set_d (f, 1.5); - gmp_snprintf (buf, sizeof(buf), "%.1Ff", f); - mpf_clear (f); - if (strcmp (buf, "1,5") != 0) - { - printf ("Test skipped, replacing localeconv/nl_langinfo doesn't work\n"); - goto done; - } - } - - check_input (); - - done: - tests_memory_end (); - exit (0); -} -#endif diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/misc/t-printf.c b/src/plugins/e-acsl/contrib/libgmp/tests/misc/t-printf.c deleted file mode 100644 index 8853dcc0ffd..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/misc/t-printf.c +++ /dev/null @@ -1,948 +0,0 @@ -/* Test gmp_printf and related functions. - -Copyright 2001-2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -/* Usage: t-printf [-s] - - -s Check the data against the system printf, where possible. This is - only an option since we don't want to fail if the system printf is - faulty or strange. */ - - -#include "config.h" /* needed for the HAVE_, could also move gmp incls */ - -#include <stdarg.h> -#include <stddef.h> /* for ptrdiff_t */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#if HAVE_OBSTACK_VPRINTF -#define obstack_chunk_alloc tests_allocate -#define obstack_chunk_free tests_free_nosize -#include <obstack.h> -#endif - -#if HAVE_INTTYPES_H -# include <inttypes.h> /* for intmax_t */ -#else -# if HAVE_STDINT_H -# include <stdint.h> -# endif -#endif - -#if HAVE_UNISTD_H -#include <unistd.h> /* for unlink */ -#endif - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -int option_check_printf = 0; - - -#define CHECK_VFPRINTF_FILENAME "t-printf.tmp" -FILE *check_vfprintf_fp; - - -/* From any of the tests run here. */ -#define MAX_OUTPUT 1024 - - -void -check_plain (const char *want, const char *fmt_orig, ...) -{ - char got[MAX_OUTPUT]; - int got_len, want_len; - size_t fmtsize; - char *fmt, *q; - const char *p; - va_list ap; - va_start (ap, fmt_orig); - - if (! option_check_printf) - return; - - fmtsize = strlen (fmt_orig) + 1; - fmt = (char *) (*__gmp_allocate_func) (fmtsize); - - for (p = fmt_orig, q = fmt; *p != '\0'; p++) - { - switch (*p) { - case 'a': - case 'A': - /* The exact value of the exponent isn't guaranteed in glibc, and it - and gmp_printf do slightly different things, so don't compare - directly. */ - goto done; - case 'F': - if (p > fmt_orig && *(p-1) == '.') - goto done; /* don't test the "all digits" cases */ - /* discard 'F' type */ - break; - case 'Z': - /* transmute */ - *q++ = 'l'; - break; - default: - *q++ = *p; - break; - } - } - *q = '\0'; - - want_len = strlen (want); - ASSERT_ALWAYS (want_len < sizeof(got)); - - got_len = vsprintf (got, fmt, ap); - - if (got_len != want_len || strcmp (got, want) != 0) - { - printf ("wanted data doesn't match plain vsprintf\n"); - printf (" fmt |%s|\n", fmt); - printf (" got |%s|\n", got); - printf (" want |%s|\n", want); - printf (" got_len %d\n", got_len); - printf (" want_len %d\n", want_len); - abort (); - } - - done: - (*__gmp_free_func) (fmt, fmtsize); -} - -void -check_vsprintf (const char *want, const char *fmt, va_list ap) -{ - char got[MAX_OUTPUT]; - int got_len, want_len; - - want_len = strlen (want); - got_len = gmp_vsprintf (got, fmt, ap); - - if (got_len != want_len || strcmp (got, want) != 0) - { - printf ("gmp_vsprintf wrong\n"); - printf (" fmt |%s|\n", fmt); - printf (" got |%s|\n", got); - printf (" want |%s|\n", want); - printf (" got_len %d\n", got_len); - printf (" want_len %d\n", want_len); - abort (); - } -} - -void -check_vfprintf (const char *want, const char *fmt, va_list ap) -{ - char got[MAX_OUTPUT]; - int got_len, want_len, fread_len; - long ftell_len; - - want_len = strlen (want); - - rewind (check_vfprintf_fp); - got_len = gmp_vfprintf (check_vfprintf_fp, fmt, ap); - ASSERT_ALWAYS (got_len != -1); - ASSERT_ALWAYS (fflush (check_vfprintf_fp) == 0); - - ftell_len = ftell (check_vfprintf_fp); - ASSERT_ALWAYS (ftell_len != -1); - - rewind (check_vfprintf_fp); - ASSERT_ALWAYS (ftell_len <= sizeof(got)); - fread_len = fread (got, 1, ftell_len, check_vfprintf_fp); - - if (got_len != want_len - || ftell_len != want_len - || fread_len != want_len - || memcmp (got, want, want_len) != 0) - { - printf ("gmp_vfprintf wrong\n"); - printf (" fmt |%s|\n", fmt); - printf (" got |%.*s|\n", fread_len, got); - printf (" want |%s|\n", want); - printf (" got_len %d\n", got_len); - printf (" ftell_len %ld\n", ftell_len); - printf (" fread_len %d\n", fread_len); - printf (" want_len %d\n", want_len); - abort (); - } -} - -void -check_vsnprintf (const char *want, const char *fmt, va_list ap) -{ - char got[MAX_OUTPUT+1]; - int ret, got_len, want_len; - size_t bufsize; - - want_len = strlen (want); - - bufsize = -1; - for (;;) - { - /* do 0 to 5, then want-5 to want+5 */ - bufsize++; - if (bufsize > 5 && bufsize < want_len-5) - bufsize = want_len-5; - if (bufsize > want_len + 5) - break; - ASSERT_ALWAYS (bufsize+1 <= sizeof (got)); - - got[bufsize] = '!'; - ret = gmp_vsnprintf (got, bufsize, fmt, ap); - - got_len = MIN (MAX(1,bufsize)-1, want_len); - - if (got[bufsize] != '!') - { - printf ("gmp_vsnprintf overwrote bufsize sentinel\n"); - goto error; - } - - if (ret != want_len) - { - printf ("gmp_vsnprintf return value wrong\n"); - goto error; - } - - if (bufsize > 0) - { - if (memcmp (got, want, got_len) != 0 || got[got_len] != '\0') - { - printf ("gmp_vsnprintf wrong result string\n"); - error: - printf (" fmt |%s|\n", fmt); - printf (" bufsize %lu\n", (unsigned long) bufsize); - printf (" got |%s|\n", got); - printf (" want |%.*s|\n", got_len, want); - printf (" want full |%s|\n", want); - printf (" ret %d\n", ret); - printf (" want_len %d\n", want_len); - abort (); - } - } - } -} - -void -check_vasprintf (const char *want, const char *fmt, va_list ap) -{ - char *got; - int got_len, want_len; - - want_len = strlen (want); - got_len = gmp_vasprintf (&got, fmt, ap); - - if (got_len != want_len || strcmp (got, want) != 0) - { - printf ("gmp_vasprintf wrong\n"); - printf (" fmt |%s|\n", fmt); - printf (" got |%s|\n", got); - printf (" want |%s|\n", want); - printf (" got_len %d\n", got_len); - printf (" want_len %d\n", want_len); - abort (); - } - (*__gmp_free_func) (got, strlen(got)+1); -} - -void -check_obstack_vprintf (const char *want, const char *fmt, va_list ap) -{ -#if HAVE_OBSTACK_VPRINTF - struct obstack ob; - int got_len, want_len, ob_len; - char *got; - - want_len = strlen (want); - - obstack_init (&ob); - got_len = gmp_obstack_vprintf (&ob, fmt, ap); - got = (char *) obstack_base (&ob); - ob_len = obstack_object_size (&ob); - - if (got_len != want_len - || ob_len != want_len - || memcmp (got, want, want_len) != 0) - { - printf ("gmp_obstack_vprintf wrong\n"); - printf (" fmt |%s|\n", fmt); - printf (" got |%s|\n", got); - printf (" want |%s|\n", want); - printf (" got_len %d\n", got_len); - printf (" ob_len %d\n", ob_len); - printf (" want_len %d\n", want_len); - abort (); - } - obstack_free (&ob, NULL); -#endif -} - - -void -check_one (const char *want, const char *fmt, ...) -{ - va_list ap; - va_start (ap, fmt); - - /* simplest first */ - check_vsprintf (want, fmt, ap); - check_vfprintf (want, fmt, ap); - check_vsnprintf (want, fmt, ap); - check_vasprintf (want, fmt, ap); - check_obstack_vprintf (want, fmt, ap); -} - - -#define hex_or_octal_p(fmt) \ - (strchr (fmt, 'x') != NULL \ - || strchr (fmt, 'X') != NULL \ - || strchr (fmt, 'o') != NULL) - -void -check_z (void) -{ - static const struct { - const char *fmt; - const char *z; - const char *want; - } data[] = { - { "%Zd", "0", "0" }, - { "%Zd", "1", "1" }, - { "%Zd", "123", "123" }, - { "%Zd", "-1", "-1" }, - { "%Zd", "-123", "-123" }, - - { "%+Zd", "0", "+0" }, - { "%+Zd", "123", "+123" }, - { "%+Zd", "-123", "-123" }, - - { "%Zx", "123", "7b" }, - { "%ZX", "123", "7B" }, - { "%Zx", "-123", "-7b" }, - { "%ZX", "-123", "-7B" }, - { "%Zo", "123", "173" }, - { "%Zo", "-123", "-173" }, - - { "%#Zx", "0", "0" }, - { "%#ZX", "0", "0" }, - { "%#Zx", "123", "0x7b" }, - { "%#ZX", "123", "0X7B" }, - { "%#Zx", "-123", "-0x7b" }, - { "%#ZX", "-123", "-0X7B" }, - - { "%#Zo", "0", "0" }, - { "%#Zo", "123", "0173" }, - { "%#Zo", "-123", "-0173" }, - - { "%10Zd", "0", " 0" }, - { "%10Zd", "123", " 123" }, - { "%10Zd", "-123", " -123" }, - - { "%-10Zd", "0", "0 " }, - { "%-10Zd", "123", "123 " }, - { "%-10Zd", "-123", "-123 " }, - - { "%+10Zd", "123", " +123" }, - { "%+-10Zd", "123", "+123 " }, - { "%+10Zd", "-123", " -123" }, - { "%+-10Zd", "-123", "-123 " }, - - { "%08Zd", "0", "00000000" }, - { "%08Zd", "123", "00000123" }, - { "%08Zd", "-123", "-0000123" }, - - { "%+08Zd", "0", "+0000000" }, - { "%+08Zd", "123", "+0000123" }, - { "%+08Zd", "-123", "-0000123" }, - - { "%#08Zx", "0", "00000000" }, - { "%#08Zx", "123", "0x00007b" }, - { "%#08Zx", "-123", "-0x0007b" }, - - { "%+#08Zx", "0", "+0000000" }, - { "%+#08Zx", "123", "+0x0007b" }, - { "%+#08Zx", "-123", "-0x0007b" }, - - { "%.0Zd", "0", "" }, - { "%.1Zd", "0", "0" }, - { "%.2Zd", "0", "00" }, - { "%.3Zd", "0", "000" }, - }; - - int i, j; - mpz_t z; - char *nfmt; - mp_size_t nsize, zeros; - - mpz_init (z); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (z, data[i].z, 0); - - /* don't try negatives or forced sign in hex or octal */ - if (mpz_fits_slong_p (z) - && ! (hex_or_octal_p (data[i].fmt) - && (strchr (data[i].fmt, '+') != NULL || mpz_sgn(z) < 0))) - { - check_plain (data[i].want, data[i].fmt, mpz_get_si (z)); - } - - check_one (data[i].want, data[i].fmt, z); - - /* Same again, with %N and possibly some high zero limbs */ - nfmt = __gmp_allocate_strdup (data[i].fmt); - for (j = 0; nfmt[j] != '\0'; j++) - if (nfmt[j] == 'Z') - nfmt[j] = 'N'; - for (zeros = 0; zeros <= 3; zeros++) - { - nsize = ABSIZ(z)+zeros; - MPZ_REALLOC (z, nsize); - nsize = (SIZ(z) >= 0 ? nsize : -nsize); - refmpn_zero (PTR(z)+ABSIZ(z), zeros); - check_one (data[i].want, nfmt, PTR(z), nsize); - } - __gmp_free_func (nfmt, strlen(nfmt)+1); - } - - mpz_clear (z); -} - -void -check_q (void) -{ - static const struct { - const char *fmt; - const char *q; - const char *want; - } data[] = { - { "%Qd", "0", "0" }, - { "%Qd", "1", "1" }, - { "%Qd", "123", "123" }, - { "%Qd", "-1", "-1" }, - { "%Qd", "-123", "-123" }, - { "%Qd", "3/2", "3/2" }, - { "%Qd", "-3/2", "-3/2" }, - - { "%+Qd", "0", "+0" }, - { "%+Qd", "123", "+123" }, - { "%+Qd", "-123", "-123" }, - { "%+Qd", "5/8", "+5/8" }, - { "%+Qd", "-5/8", "-5/8" }, - - { "%Qx", "123", "7b" }, - { "%QX", "123", "7B" }, - { "%Qx", "15/16", "f/10" }, - { "%QX", "15/16", "F/10" }, - { "%Qx", "-123", "-7b" }, - { "%QX", "-123", "-7B" }, - { "%Qx", "-15/16", "-f/10" }, - { "%QX", "-15/16", "-F/10" }, - { "%Qo", "123", "173" }, - { "%Qo", "-123", "-173" }, - { "%Qo", "16/17", "20/21" }, - { "%Qo", "-16/17", "-20/21" }, - - { "%#Qx", "0", "0" }, - { "%#QX", "0", "0" }, - { "%#Qx", "123", "0x7b" }, - { "%#QX", "123", "0X7B" }, - { "%#Qx", "5/8", "0x5/0x8" }, - { "%#QX", "5/8", "0X5/0X8" }, - { "%#Qx", "-123", "-0x7b" }, - { "%#QX", "-123", "-0X7B" }, - { "%#Qx", "-5/8", "-0x5/0x8" }, - { "%#QX", "-5/8", "-0X5/0X8" }, - { "%#Qo", "0", "0" }, - { "%#Qo", "123", "0173" }, - { "%#Qo", "-123", "-0173" }, - { "%#Qo", "5/7", "05/07" }, - { "%#Qo", "-5/7", "-05/07" }, - - /* zero denominator and showbase */ - { "%#10Qo", "0/0", " 0/0" }, - { "%#10Qd", "0/0", " 0/0" }, - { "%#10Qx", "0/0", " 0/0" }, - { "%#10Qo", "123/0", " 0173/0" }, - { "%#10Qd", "123/0", " 123/0" }, - { "%#10Qx", "123/0", " 0x7b/0" }, - { "%#10QX", "123/0", " 0X7B/0" }, - { "%#10Qo", "-123/0", " -0173/0" }, - { "%#10Qd", "-123/0", " -123/0" }, - { "%#10Qx", "-123/0", " -0x7b/0" }, - { "%#10QX", "-123/0", " -0X7B/0" }, - - { "%10Qd", "0", " 0" }, - { "%-10Qd", "0", "0 " }, - { "%10Qd", "123", " 123" }, - { "%-10Qd", "123", "123 " }, - { "%10Qd", "-123", " -123" }, - { "%-10Qd", "-123", "-123 " }, - - { "%+10Qd", "123", " +123" }, - { "%+-10Qd", "123", "+123 " }, - { "%+10Qd", "-123", " -123" }, - { "%+-10Qd", "-123", "-123 " }, - - { "%08Qd", "0", "00000000" }, - { "%08Qd", "123", "00000123" }, - { "%08Qd", "-123", "-0000123" }, - - { "%+08Qd", "0", "+0000000" }, - { "%+08Qd", "123", "+0000123" }, - { "%+08Qd", "-123", "-0000123" }, - - { "%#08Qx", "0", "00000000" }, - { "%#08Qx", "123", "0x00007b" }, - { "%#08Qx", "-123", "-0x0007b" }, - - { "%+#08Qx", "0", "+0000000" }, - { "%+#08Qx", "123", "+0x0007b" }, - { "%+#08Qx", "-123", "-0x0007b" }, - }; - - int i; - mpq_t q; - - mpq_init (q); - - for (i = 0; i < numberof (data); i++) - { - mpq_set_str_or_abort (q, data[i].q, 0); - check_one (data[i].want, data[i].fmt, q); - } - - mpq_clear (q); -} - -void -check_f (void) -{ - static const struct { - const char *fmt; - const char *f; - const char *want; - - } data[] = { - - { "%Ff", "0", "0.000000" }, - { "%Ff", "123", "123.000000" }, - { "%Ff", "-123", "-123.000000" }, - - { "%+Ff", "0", "+0.000000" }, - { "%+Ff", "123", "+123.000000" }, - { "%+Ff", "-123", "-123.000000" }, - - { "%.0Ff", "0", "0" }, - { "%.0Ff", "123", "123" }, - { "%.0Ff", "-123", "-123" }, - - { "%8.0Ff", "0", " 0" }, - { "%8.0Ff", "123", " 123" }, - { "%8.0Ff", "-123", " -123" }, - - { "%08.0Ff", "0", "00000000" }, - { "%08.0Ff", "123", "00000123" }, - { "%08.0Ff", "-123", "-0000123" }, - - { "%10.2Ff", "0", " 0.00" }, - { "%10.2Ff", "0.25", " 0.25" }, - { "%10.2Ff", "123.25", " 123.25" }, - { "%10.2Ff", "-123.25", " -123.25" }, - - { "%-10.2Ff", "0", "0.00 " }, - { "%-10.2Ff", "0.25", "0.25 " }, - { "%-10.2Ff", "123.25", "123.25 " }, - { "%-10.2Ff", "-123.25", "-123.25 " }, - - { "%.2Ff", "0.00000000000001", "0.00" }, - { "%.2Ff", "0.002", "0.00" }, - { "%.2Ff", "0.008", "0.01" }, - - { "%.0Ff", "123.00000000000001", "123" }, - { "%.0Ff", "123.2", "123" }, - { "%.0Ff", "123.8", "124" }, - - { "%.0Ff", "999999.9", "1000000" }, - { "%.0Ff", "3999999.9", "4000000" }, - - { "%Fe", "0", "0.000000e+00" }, - { "%Fe", "1", "1.000000e+00" }, - { "%Fe", "123", "1.230000e+02" }, - - { "%FE", "0", "0.000000E+00" }, - { "%FE", "1", "1.000000E+00" }, - { "%FE", "123", "1.230000E+02" }, - - { "%Fe", "0", "0.000000e+00" }, - { "%Fe", "1", "1.000000e+00" }, - - { "%.0Fe", "10000000000", "1e+10" }, - { "%.0Fe", "-10000000000", "-1e+10" }, - - { "%.2Fe", "10000000000", "1.00e+10" }, - { "%.2Fe", "-10000000000", "-1.00e+10" }, - - { "%8.0Fe", "10000000000", " 1e+10" }, - { "%8.0Fe", "-10000000000", " -1e+10" }, - - { "%-8.0Fe", "10000000000", "1e+10 " }, - { "%-8.0Fe", "-10000000000", "-1e+10 " }, - - { "%12.2Fe", "10000000000", " 1.00e+10" }, - { "%12.2Fe", "-10000000000", " -1.00e+10" }, - - { "%012.2Fe", "10000000000", "00001.00e+10" }, - { "%012.2Fe", "-10000000000", "-0001.00e+10" }, - - { "%Fg", "0", "0" }, - { "%Fg", "1", "1" }, - { "%Fg", "-1", "-1" }, - - { "%.0Fg", "0", "0" }, - { "%.0Fg", "1", "1" }, - { "%.0Fg", "-1", "-1" }, - - { "%.1Fg", "100", "1e+02" }, - { "%.2Fg", "100", "1e+02" }, - { "%.3Fg", "100", "100" }, - { "%.4Fg", "100", "100" }, - - { "%Fg", "0.001", "0.001" }, - { "%Fg", "0.0001", "0.0001" }, - { "%Fg", "0.00001", "1e-05" }, - { "%Fg", "0.000001", "1e-06" }, - - { "%.4Fg", "1.00000000000001", "1" }, - { "%.4Fg", "100000000000001", "1e+14" }, - - { "%.4Fg", "12345678", "1.235e+07" }, - - { "%Fa", "0","0x0p+0" }, - { "%FA", "0","0X0P+0" }, - - { "%Fa", "1","0x1p+0" }, - { "%Fa", "65535","0xf.fffp+12" }, - { "%Fa", "65536","0x1p+16" }, - { "%F.10a", "65536","0x1.0000000000p+16" }, - { "%F.1a", "65535","0x1.0p+16" }, - { "%F.0a", "65535","0x1p+16" }, - - { "%.2Ff", "0.99609375", "1.00" }, - { "%.Ff", "0.99609375", "0.99609375" }, - { "%.Fe", "0.99609375", "9.9609375e-01" }, - { "%.Fg", "0.99609375", "0.99609375" }, - { "%.20Fg", "1000000", "1000000" }, - { "%.Fg", "1000000", "1000000" }, - - { "%#.0Ff", "1", "1." }, - { "%#.0Fe", "1", "1.e+00" }, - { "%#.0Fg", "1", "1." }, - - { "%#.1Ff", "1", "1.0" }, - { "%#.1Fe", "1", "1.0e+00" }, - { "%#.1Fg", "1", "1." }, - - { "%#.4Ff", "1234", "1234.0000" }, - { "%#.4Fe", "1234", "1.2340e+03" }, - { "%#.4Fg", "1234", "1234." }, - - { "%#.8Ff", "1234", "1234.00000000" }, - { "%#.8Fe", "1234", "1.23400000e+03" }, - { "%#.8Fg", "1234", "1234.0000" }, - - }; - - int i; - mpf_t f; - double d; - - mpf_init2 (f, 256L); - - for (i = 0; i < numberof (data); i++) - { - if (data[i].f[0] == '0' && data[i].f[1] == 'x') - mpf_set_str_or_abort (f, data[i].f, 16); - else - mpf_set_str_or_abort (f, data[i].f, 10); - - /* if mpf->double doesn't truncate, then expect same result */ - d = mpf_get_d (f); - if (mpf_cmp_d (f, d) == 0) - check_plain (data[i].want, data[i].fmt, d); - - check_one (data[i].want, data[i].fmt, f); - } - - mpf_clear (f); -} - - -void -check_limb (void) -{ - int i; - mp_limb_t limb; - mpz_t z; - char *s; - - check_one ("0", "%Md", CNST_LIMB(0)); - check_one ("1", "%Md", CNST_LIMB(1)); - - /* "i" many 1 bits, tested against mpz_get_str in decimal and hex */ - limb = 1; - mpz_init_set_ui (z, 1L); - for (i = 1; i <= GMP_LIMB_BITS; i++) - { - s = mpz_get_str (NULL, 10, z); - check_one (s, "%Mu", limb); - (*__gmp_free_func) (s, strlen (s) + 1); - - s = mpz_get_str (NULL, 16, z); - check_one (s, "%Mx", limb); - (*__gmp_free_func) (s, strlen (s) + 1); - - s = mpz_get_str (NULL, -16, z); - check_one (s, "%MX", limb); - (*__gmp_free_func) (s, strlen (s) + 1); - - limb = 2*limb + 1; - mpz_mul_2exp (z, z, 1L); - mpz_add_ui (z, z, 1L); - } - - mpz_clear (z); -} - - -void -check_n (void) -{ - { - int n = -1; - check_one ("blah", "%nblah", &n); - ASSERT_ALWAYS (n == 0); - } - - { - int n = -1; - check_one ("hello ", "hello %n", &n); - ASSERT_ALWAYS (n == 6); - } - - { - int n = -1; - check_one ("hello world", "hello %n world", &n); - ASSERT_ALWAYS (n == 6); - } - -#define CHECK_N(type, string) \ - do { \ - type x[2]; \ - char fmt[128]; \ - \ - x[0] = ~ (type) 0; \ - x[1] = ~ (type) 0; \ - sprintf (fmt, "%%d%%%sn%%d", string); \ - check_one ("123456", fmt, 123, &x[0], 456); \ - \ - /* should write whole of x[0] and none of x[1] */ \ - ASSERT_ALWAYS (x[0] == 3); \ - ASSERT_ALWAYS (x[1] == (type) ~ (type) 0); \ - \ - } while (0) - - CHECK_N (mp_limb_t, "M"); - CHECK_N (char, "hh"); - CHECK_N (long, "l"); -#if HAVE_LONG_LONG - CHECK_N (long long, "L"); -#endif -#if HAVE_INTMAX_T - CHECK_N (intmax_t, "j"); -#endif -#if HAVE_PTRDIFF_T - CHECK_N (ptrdiff_t, "t"); -#endif - CHECK_N (short, "h"); - CHECK_N (size_t, "z"); - - { - mpz_t x[2]; - mpz_init_set_si (x[0], -987L); - mpz_init_set_si (x[1], 654L); - check_one ("123456", "%d%Zn%d", 123, x[0], 456); - MPZ_CHECK_FORMAT (x[0]); - MPZ_CHECK_FORMAT (x[1]); - ASSERT_ALWAYS (mpz_cmp_ui (x[0], 3L) == 0); - ASSERT_ALWAYS (mpz_cmp_ui (x[1], 654L) == 0); - mpz_clear (x[0]); - mpz_clear (x[1]); - } - - { - mpq_t x[2]; - mpq_init (x[0]); - mpq_init (x[1]); - mpq_set_ui (x[0], 987L, 654L); - mpq_set_ui (x[1], 4115L, 226L); - check_one ("123456", "%d%Qn%d", 123, x[0], 456); - MPQ_CHECK_FORMAT (x[0]); - MPQ_CHECK_FORMAT (x[1]); - ASSERT_ALWAYS (mpq_cmp_ui (x[0], 3L, 1L) == 0); - ASSERT_ALWAYS (mpq_cmp_ui (x[1], 4115L, 226L) == 0); - mpq_clear (x[0]); - mpq_clear (x[1]); - } - - { - mpf_t x[2]; - mpf_init (x[0]); - mpf_init (x[1]); - mpf_set_ui (x[0], 987L); - mpf_set_ui (x[1], 654L); - check_one ("123456", "%d%Fn%d", 123, x[0], 456); - MPF_CHECK_FORMAT (x[0]); - MPF_CHECK_FORMAT (x[1]); - ASSERT_ALWAYS (mpf_cmp_ui (x[0], 3L) == 0); - ASSERT_ALWAYS (mpf_cmp_ui (x[1], 654L) == 0); - mpf_clear (x[0]); - mpf_clear (x[1]); - } - - { - mp_limb_t a[5]; - mp_limb_t a_want[numberof(a)]; - mp_size_t i; - - a[0] = 123; - check_one ("blah", "bl%Nnah", a, (mp_size_t) 0); - ASSERT_ALWAYS (a[0] == 123); - - MPN_ZERO (a_want, numberof (a_want)); - for (i = 1; i < numberof (a); i++) - { - check_one ("blah", "bl%Nnah", a, i); - a_want[0] = 2; - ASSERT_ALWAYS (mpn_cmp (a, a_want, i) == 0); - } - } -} - - -void -check_misc (void) -{ - mpz_t z; - mpf_t f; - - mpz_init (z); - mpf_init2 (f, 128L); - - check_one ("!", "%c", '!'); - - check_one ("hello world", "hello %s", "world"); - check_one ("hello:", "%s:", "hello"); - mpz_set_ui (z, 0L); - check_one ("hello0", "%s%Zd", "hello", z, z); - - { - static char xs[801]; - memset (xs, 'x', sizeof(xs)-1); - check_one (xs, "%s", xs); - } - - mpz_set_ui (z, 12345L); - check_one (" 12345", "%*Zd", 10, z); - check_one ("0000012345", "%0*Zd", 10, z); - check_one ("12345 ", "%*Zd", -10, z); - check_one ("12345 and 678", "%Zd and %d", z, 678); - check_one ("12345,1,12345,2,12345", "%Zd,%d,%Zd,%d,%Zd", z, 1, z, 2, z); - - /* from the glibc info docs */ - mpz_set_si (z, 0L); - check_one ("| 0|0 | +0|+0 | 0|00000| | 00|0|", - "|%5Zd|%-5Zd|%+5Zd|%+-5Zd|% 5Zd|%05Zd|%5.0Zd|%5.2Zd|%Zd|", - /**/ z, z, z, z, z, z, z, z, z); - mpz_set_si (z, 1L); - check_one ("| 1|1 | +1|+1 | 1|00001| 1| 01|1|", - "|%5Zd|%-5Zd|%+5Zd|%+-5Zd|% 5Zd|%05Zd|%5.0Zd|%5.2Zd|%Zd|", - /**/ z, z, z, z, z, z, z, z, z); - mpz_set_si (z, -1L); - check_one ("| -1|-1 | -1|-1 | -1|-0001| -1| -01|-1|", - "|%5Zd|%-5Zd|%+5Zd|%+-5Zd|% 5Zd|%05Zd|%5.0Zd|%5.2Zd|%Zd|", - /**/ z, z, z, z, z, z, z, z, z); - mpz_set_si (z, 100000L); - check_one ("|100000|100000|+100000|+100000| 100000|100000|100000|100000|100000|", - "|%5Zd|%-5Zd|%+5Zd|%+-5Zd|% 5Zd|%05Zd|%5.0Zd|%5.2Zd|%Zd|", - /**/ z, z, z, z, z, z, z, z, z); - mpz_set_si (z, 0L); - check_one ("| 0| 0| 0| 0| 0| 0| 00000000|", - "|%5Zo|%5Zx|%5ZX|%#5Zo|%#5Zx|%#5ZX|%#10.8Zx|", - /**/ z, z, z, z, z, z, z); - mpz_set_si (z, 1L); - check_one ("| 1| 1| 1| 01| 0x1| 0X1|0x00000001|", - "|%5Zo|%5Zx|%5ZX|%#5Zo|%#5Zx|%#5ZX|%#10.8Zx|", - /**/ z, z, z, z, z, z, z); - mpz_set_si (z, 100000L); - check_one ("|303240|186a0|186A0|0303240|0x186a0|0X186A0|0x000186a0|", - "|%5Zo|%5Zx|%5ZX|%#5Zo|%#5Zx|%#5ZX|%#10.8Zx|", - /**/ z, z, z, z, z, z, z); - - /* %zd for size_t won't be available on old systems, and running something - to see if it works might be bad, so only try it on glibc, and only on a - new enough version (glibc 2.0 doesn't have %zd) */ -#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 0) - mpz_set_ui (z, 789L); - check_one ("456 789 blah", "%zd %Zd blah", (size_t) 456, z); -#endif - - mpz_clear (z); - mpf_clear (f); -} - - -int -main (int argc, char *argv[]) -{ - if (argc > 1 && strcmp (argv[1], "-s") == 0) - option_check_printf = 1; - - tests_start (); - check_vfprintf_fp = fopen (CHECK_VFPRINTF_FILENAME, "w+"); - ASSERT_ALWAYS (check_vfprintf_fp != NULL); - - check_z (); - check_q (); - check_f (); - check_limb (); - check_n (); - check_misc (); - - ASSERT_ALWAYS (fclose (check_vfprintf_fp) == 0); - unlink (CHECK_VFPRINTF_FILENAME); - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/misc/t-scanf.c b/src/plugins/e-acsl/contrib/libgmp/tests/misc/t-scanf.c deleted file mode 100644 index e880463fb29..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/misc/t-scanf.c +++ /dev/null @@ -1,1617 +0,0 @@ -/* Test gmp_scanf and related functions. - -Copyright 2001-2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -/* Usage: t-scanf [-s] - - -s Check the data against the system scanf, where possible. This is - only an option since we don't want to fail if the system scanf is - faulty or strange. - - There's some fairly unattractive repetition between check_z, check_q and - check_f, but enough differences to make a common loop or a set of macros - seem like too much trouble. */ - -#include "config.h" /* needed for the HAVE_, could also move gmp incls */ - -#include <stdarg.h> - -#include <stddef.h> /* for ptrdiff_t */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#if HAVE_INTTYPES_H -# include <inttypes.h> /* for intmax_t */ -#else -# if HAVE_STDINT_H -# include <stdint.h> -# endif -#endif - -#if HAVE_UNISTD_H -#include <unistd.h> /* for unlink */ -#endif - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -#define TEMPFILE "t-scanf.tmp" - -int option_libc_scanf = 0; - -typedef int (*fun_t) (const char *, const char *, void *, void *); - - -/* This problem was seen on powerpc7450-apple-darwin7.0.0, sscanf returns 0 - where it should return EOF. A workaround in gmp_sscanf would be a bit - tedious, and since this is a rather obvious libc bug, quite likely - affecting other programs, we'll just suppress affected tests for now. */ -int -test_sscanf_eof_ok (void) -{ - static int result = -1; - - if (result == -1) - { - int x; - if (sscanf ("", "%d", &x) == EOF) - { - result = 1; - } - else - { - printf ("Warning, sscanf(\"\",\"%%d\",&x) doesn't return EOF.\n"); - printf ("This affects gmp_sscanf, tests involving it will be suppressed.\n"); - printf ("You should try to get a fix for your libc.\n"); - result = 0; - } - } - return result; -} - - -/* Convert fmt from a GMP scanf format string to an equivalent for a plain - libc scanf, for example "%Zd" becomes "%ld". Return 1 if this succeeds, - 0 if it cannot (or should not) be done. */ -int -libc_scanf_convert (char *fmt) -{ - char *p = fmt; - - if (! option_libc_scanf) - return 0; - - for ( ; *fmt != '\0'; fmt++) - { - switch (*fmt) { - case 'F': - case 'Q': - case 'Z': - /* transmute */ - *p++ = 'l'; - break; - default: - *p++ = *fmt; - break; - } - } - *p = '\0'; - return 1; -} - - -long got_ftell; -int fromstring_next_c; - -/* Call gmp_fscanf, reading the "input" string data provided. */ -int -fromstring_gmp_fscanf (const char *input, const char *fmt, ...) -{ - va_list ap; - FILE *fp; - int ret; - va_start (ap, fmt); - - fp = fopen (TEMPFILE, "w+"); - ASSERT_ALWAYS (fp != NULL); - ASSERT_ALWAYS (fputs (input, fp) != EOF); - ASSERT_ALWAYS (fflush (fp) == 0); - rewind (fp); - - ret = gmp_vfscanf (fp, fmt, ap); - got_ftell = ftell (fp); - ASSERT_ALWAYS (got_ftell != -1L); - - fromstring_next_c = getc (fp); - - ASSERT_ALWAYS (fclose (fp) == 0); - va_end (ap); - return ret; -} - - -int -fun_gmp_sscanf (const char *input, const char *fmt, void *a1, void *a2) -{ - if (a2 == NULL) - return gmp_sscanf (input, fmt, a1); - else - return gmp_sscanf (input, fmt, a1, a2); -} - -int -fun_gmp_fscanf (const char *input, const char *fmt, void *a1, void *a2) -{ - if (a2 == NULL) - return fromstring_gmp_fscanf (input, fmt, a1); - else - return fromstring_gmp_fscanf (input, fmt, a1, a2); -} - - -int -fun_fscanf (const char *input, const char *fmt, void *a1, void *a2) -{ - FILE *fp; - int ret; - - fp = fopen (TEMPFILE, "w+"); - ASSERT_ALWAYS (fp != NULL); - ASSERT_ALWAYS (fputs (input, fp) != EOF); - ASSERT_ALWAYS (fflush (fp) == 0); - rewind (fp); - - if (a2 == NULL) - ret = fscanf (fp, fmt, a1); - else - ret = fscanf (fp, fmt, a1, a2); - - got_ftell = ftell (fp); - ASSERT_ALWAYS (got_ftell != -1L); - - fromstring_next_c = getc (fp); - - ASSERT_ALWAYS (fclose (fp) == 0); - return ret; -} - - -/* On various old systems, for instance HP-UX 9, the C library sscanf needs - to be able to write into the input string. Ensure that this is possible, - when gcc is putting the test data into a read-only section. - - Actually we ought to only need this under SSCANF_WRITABLE_INPUT from - configure, but it's just as easy to do it unconditionally, and in any - case this code is only executed under the -s option. */ - -int -fun_sscanf (const char *input, const char *fmt, void *a1, void *a2) -{ - char *input_writable; - size_t size; - int ret; - - size = strlen (input) + 1; - input_writable = (char *) (*__gmp_allocate_func) (size); - memcpy (input_writable, input, size); - - if (a2 == NULL) - ret = sscanf (input_writable, fmt, a1); - else - ret = sscanf (input_writable, fmt, a1, a2); - - (*__gmp_free_func) (input_writable, size); - return ret; -} - - -/* whether the format string consists entirely of ignored fields */ -int -fmt_allignore (const char *fmt) -{ - int saw_star = 1; - for ( ; *fmt != '\0'; fmt++) - { - switch (*fmt) { - case '%': - if (! saw_star) - return 0; - saw_star = 0; - break; - case '*': - saw_star = 1; - break; - } - } - return 1; -} - -void -check_z (void) -{ - static const struct { - const char *fmt; - const char *input; - const char *want; - int want_ret; - long want_ftell; - int want_upto; - int not_glibc; - - } data[] = { - - { "%Zd", "0", "0", 1, -1, -1 }, - { "%Zd", "1", "1", 1, -1, -1 }, - { "%Zd", "123", "123", 1, -1, -1 }, - { "%Zd", "+0", "0", 1, -1, -1 }, - { "%Zd", "+1", "1", 1, -1, -1 }, - { "%Zd", "+123", "123", 1, -1, -1 }, - { "%Zd", "-0", "0", 1, -1, -1 }, - { "%Zd", "-1", "-1", 1, -1, -1 }, - { "%Zd", "-123", "-123", 1, -1, -1 }, - - { "%Zo", "0", "0", 1, -1, -1 }, - { "%Zo", "173", "123", 1, -1, -1 }, - { "%Zo", "+0", "0", 1, -1, -1 }, - { "%Zo", "+173", "123", 1, -1, -1 }, - { "%Zo", "-0", "0", 1, -1, -1 }, - { "%Zo", "-173", "-123", 1, -1, -1 }, - - { "%Zx", "0", "0", 1, -1, -1 }, - { "%Zx", "7b", "123", 1, -1, -1 }, - { "%Zx", "7b", "123", 1, -1, -1 }, - { "%Zx", "+0", "0", 1, -1, -1 }, - { "%Zx", "+7b", "123", 1, -1, -1 }, - { "%Zx", "+7b", "123", 1, -1, -1 }, - { "%Zx", "-0", "-0", 1, -1, -1 }, - { "%Zx", "-7b", "-123", 1, -1, -1 }, - { "%Zx", "-7b", "-123", 1, -1, -1 }, - { "%ZX", "0", "0", 1, -1, -1 }, - { "%ZX", "7b", "123", 1, -1, -1 }, - { "%ZX", "7b", "123", 1, -1, -1 }, - { "%ZX", "+0", "0", 1, -1, -1 }, - { "%ZX", "+7b", "123", 1, -1, -1 }, - { "%ZX", "+7b", "123", 1, -1, -1 }, - { "%ZX", "-0", "-0", 1, -1, -1 }, - { "%ZX", "-7b", "-123", 1, -1, -1 }, - { "%ZX", "-7b", "-123", 1, -1, -1 }, - { "%Zx", "0", "0", 1, -1, -1 }, - { "%Zx", "7B", "123", 1, -1, -1 }, - { "%Zx", "7B", "123", 1, -1, -1 }, - { "%Zx", "+0", "0", 1, -1, -1 }, - { "%Zx", "+7B", "123", 1, -1, -1 }, - { "%Zx", "+7B", "123", 1, -1, -1 }, - { "%Zx", "-0", "-0", 1, -1, -1 }, - { "%Zx", "-7B", "-123", 1, -1, -1 }, - { "%Zx", "-7B", "-123", 1, -1, -1 }, - { "%ZX", "0", "0", 1, -1, -1 }, - { "%ZX", "7B", "123", 1, -1, -1 }, - { "%ZX", "7B", "123", 1, -1, -1 }, - { "%ZX", "+0", "0", 1, -1, -1 }, - { "%ZX", "+7B", "123", 1, -1, -1 }, - { "%ZX", "+7B", "123", 1, -1, -1 }, - { "%ZX", "-0", "-0", 1, -1, -1 }, - { "%ZX", "-7B", "-123", 1, -1, -1 }, - { "%ZX", "-7B", "-123", 1, -1, -1 }, - - { "%Zi", "0", "0", 1, -1, -1 }, - { "%Zi", "1", "1", 1, -1, -1 }, - { "%Zi", "123", "123", 1, -1, -1 }, - { "%Zi", "+0", "0", 1, -1, -1 }, - { "%Zi", "+1", "1", 1, -1, -1 }, - { "%Zi", "+123", "123", 1, -1, -1 }, - { "%Zi", "-0", "0", 1, -1, -1 }, - { "%Zi", "-1", "-1", 1, -1, -1 }, - { "%Zi", "-123", "-123", 1, -1, -1 }, - - { "%Zi", "00", "0", 1, -1, -1 }, - { "%Zi", "0173", "123", 1, -1, -1 }, - { "%Zi", "+00", "0", 1, -1, -1 }, - { "%Zi", "+0173", "123", 1, -1, -1 }, - { "%Zi", "-00", "0", 1, -1, -1 }, - { "%Zi", "-0173", "-123", 1, -1, -1 }, - - { "%Zi", "0x0", "0", 1, -1, -1 }, - { "%Zi", "0x7b", "123", 1, -1, -1 }, - { "%Zi", "0x7b", "123", 1, -1, -1 }, - { "%Zi", "+0x0", "0", 1, -1, -1 }, - { "%Zi", "+0x7b", "123", 1, -1, -1 }, - { "%Zi", "+0x7b", "123", 1, -1, -1 }, - { "%Zi", "-0x0", "-0", 1, -1, -1 }, - { "%Zi", "-0x7b", "-123", 1, -1, -1 }, - { "%Zi", "-0x7b", "-123", 1, -1, -1 }, - { "%Zi", "0X0", "0", 1, -1, -1 }, - { "%Zi", "0X7b", "123", 1, -1, -1 }, - { "%Zi", "0X7b", "123", 1, -1, -1 }, - { "%Zi", "+0X0", "0", 1, -1, -1 }, - { "%Zi", "+0X7b", "123", 1, -1, -1 }, - { "%Zi", "+0X7b", "123", 1, -1, -1 }, - { "%Zi", "-0X0", "-0", 1, -1, -1 }, - { "%Zi", "-0X7b", "-123", 1, -1, -1 }, - { "%Zi", "-0X7b", "-123", 1, -1, -1 }, - { "%Zi", "0x0", "0", 1, -1, -1 }, - { "%Zi", "0x7B", "123", 1, -1, -1 }, - { "%Zi", "0x7B", "123", 1, -1, -1 }, - { "%Zi", "+0x0", "0", 1, -1, -1 }, - { "%Zi", "+0x7B", "123", 1, -1, -1 }, - { "%Zi", "+0x7B", "123", 1, -1, -1 }, - { "%Zi", "-0x0", "-0", 1, -1, -1 }, - { "%Zi", "-0x7B", "-123", 1, -1, -1 }, - { "%Zi", "-0x7B", "-123", 1, -1, -1 }, - { "%Zi", "0X0", "0", 1, -1, -1 }, - { "%Zi", "0X7B", "123", 1, -1, -1 }, - { "%Zi", "0X7B", "123", 1, -1, -1 }, - { "%Zi", "+0X0", "0", 1, -1, -1 }, - { "%Zi", "+0X7B", "123", 1, -1, -1 }, - { "%Zi", "+0X7B", "123", 1, -1, -1 }, - { "%Zi", "-0X0", "-0", 1, -1, -1 }, - { "%Zi", "-0X7B", "-123", 1, -1, -1 }, - { "%Zi", "-0X7B", "-123", 1, -1, -1 }, - - { "%Zd", " 0", "0", 1, -1, -1 }, - { "%Zd", " 0", "0", 1, -1, -1 }, - { "%Zd", " 0", "0", 1, -1, -1 }, - { "%Zd", "\t0", "0", 1, -1, -1 }, - { "%Zd", "\t\t0", "0", 1, -1, -1 }, - - { "hello%Zd", "hello0", "0", 1, -1, -1 }, - { "hello%Zd", "hello 0", "0", 1, -1, -1 }, - { "hello%Zd", "hello \t0", "0", 1, -1, -1 }, - { "hello%Zdworld", "hello 0world", "0", 1, -1, -1 }, - - { "hello%*Zd", "hello0", "-999", 0, -1, -1 }, - { "hello%*Zd", "hello 0", "-999", 0, -1, -1 }, - { "hello%*Zd", "hello \t0", "-999", 0, -1, -1 }, - { "hello%*Zdworld", "hello 0world", "-999", 0, -1, -1 }, - - { "%Zd", "", "-999", -1, -1, -555 }, - { "%Zd", " ", "-999", -1, -1, -555 }, - { " %Zd", "", "-999", -1, -1, -555 }, - { "xyz%Zd", "", "-999", -1, -1, -555 }, - - { "%*Zd", "", "-999", -1, -1, -555 }, - { " %*Zd", "", "-999", -1, -1, -555 }, - { "xyz%*Zd", "", "-999", -1, -1, -555 }, - - { "%Zd", "xyz", "0", 0, 0, -555 }, - - /* match something, but invalid */ - { "%Zd", "-", "-999", 0, 1, -555 }, - { "%Zd", "+", "-999", 0, 1, -555 }, - { "xyz%Zd", "xyz-", "-999", 0, 4, -555 }, - { "xyz%Zd", "xyz+", "-999", 0, 4, -555 }, - { "%Zi", "0x", "-999", 0, 2, -555 }, - { "%Zi", "0X", "-999", 0, 2, -555 }, - { "%Zi", "0x-", "-999", 0, 2, -555 }, - { "%Zi", "0X+", "-999", 0, 2, -555 }, - { "%Zi", "-0x", "-999", 0, 3, -555 }, - { "%Zi", "-0X", "-999", 0, 3, -555 }, - { "%Zi", "+0x", "-999", 0, 3, -555 }, - { "%Zi", "+0X", "-999", 0, 3, -555 }, - - { "%1Zi", "1234", "1", 1, 1, 1 }, - { "%2Zi", "1234", "12", 1, 2, 2 }, - { "%3Zi", "1234", "123", 1, 3, 3 }, - { "%4Zi", "1234", "1234", 1, 4, 4 }, - { "%5Zi", "1234", "1234", 1, 4, 4 }, - { "%6Zi", "1234", "1234", 1, 4, 4 }, - - { "%1Zi", "01234", "0", 1, 1, 1 }, - { "%2Zi", "01234", "01", 1, 2, 2 }, - { "%3Zi", "01234", "012", 1, 3, 3 }, - { "%4Zi", "01234", "0123", 1, 4, 4 }, - { "%5Zi", "01234", "01234", 1, 5, 5 }, - { "%6Zi", "01234", "01234", 1, 5, 5 }, - { "%7Zi", "01234", "01234", 1, 5, 5 }, - - { "%1Zi", "0x1234", "0", 1, 1, 1 }, - { "%2Zi", "0x1234", "-999", 0, 2, -555 }, - { "%3Zi", "0x1234", "0x1", 1, 3, 3 }, - { "%4Zi", "0x1234", "0x12", 1, 4, 4 }, - { "%5Zi", "0x1234", "0x123", 1, 5, 5 }, - { "%6Zi", "0x1234", "0x1234", 1, 6, 6 }, - { "%7Zi", "0x1234", "0x1234", 1, 6, 6 }, - { "%8Zi", "0x1234", "0x1234", 1, 6, 6 }, - - { "%%xyz%Zd", "%xyz123", "123", 1, -1, -1 }, - { "12%%34%Zd", "12%34567", "567", 1, -1, -1 }, - { "%%%%%Zd", "%%123", "123", 1, -1, -1 }, - - /* various subtle EOF cases */ - { "x", "", "-999", EOF, 0, -555 }, - { " x", "", "-999", EOF, 0, -555 }, - { "xyz", "", "-999", EOF, 0, -555 }, - { " ", "", "-999", 0, 0, 0 }, - { " ", " ", "-999", 0, 1, 1 }, - { "%*Zd%Zd", "", "-999", EOF, 0, -555 }, - { "%*Zd%Zd", "123", "-999", EOF, 3, -555 }, - { "x", "x", "-999", 0, 1, 1 }, - { "xyz", "x", "-999", EOF, 1, -555 }, - { "xyz", "xy", "-999", EOF, 2, -555 }, - { "xyz", "xyz", "-999", 0, 3, 3 }, - { "%Zn", "", "0", 0, 0, 0 }, - { " %Zn", "", "0", 0, 0, 0 }, - { " x%Zn", "", "-999", EOF, 0, -555 }, - { "xyz%Zn", "", "-999", EOF, 0, -555 }, - { " x%Zn", "", "-999", EOF, 0, -555 }, - { " %Zn x", " ", "-999", EOF, 1, -555 }, - - /* these seem to tickle a bug in glibc 2.2.4 */ - { " x", " ", "-999", EOF, 1, -555, 1 }, - { " xyz", " ", "-999", EOF, 1, -555, 1 }, - { " x%Zn", " ", "-999", EOF, 1, -555, 1 }, - }; - - int i, j, ignore; - int got_ret, want_ret, got_upto, want_upto; - mpz_t got, want; - long got_l, want_ftell; - int error = 0; - fun_t fun; - const char *name; - char fmt[128]; - - mpz_init (got); - mpz_init (want); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (want, data[i].want, 0); - - ASSERT_ALWAYS (strlen (data[i].fmt) + 2 < sizeof (fmt)); - strcpy (fmt, data[i].fmt); - strcat (fmt, "%n"); - - ignore = fmt_allignore (fmt); - - for (j = 0; j <= 3; j++) - { - want_ret = data[i].want_ret; - - want_ftell = data[i].want_ftell; - if (want_ftell == -1) - want_ftell = strlen (data[i].input); - - want_upto = data[i].want_upto; - if (want_upto == -1) - want_upto = strlen (data[i].input); - - switch (j) { - case 0: - name = "gmp_sscanf"; - fun = fun_gmp_sscanf; - break; - case 1: - name = "gmp_fscanf"; - fun = fun_gmp_fscanf; - break; - case 2: -#ifdef __GLIBC__ - if (data[i].not_glibc) - continue; -#endif - if (! libc_scanf_convert (fmt)) - continue; - name = "standard sscanf"; - fun = fun_sscanf; - break; - case 3: -#ifdef __GLIBC__ - if (data[i].not_glibc) - continue; -#endif - if (! libc_scanf_convert (fmt)) - continue; - name = "standard fscanf"; - fun = fun_fscanf; - break; - default: - ASSERT_ALWAYS (0); - break; - } - - got_upto = -555; - got_ftell = -1L; - - switch (j) { - case 0: - case 1: - mpz_set_si (got, -999L); - if (ignore) - got_ret = (*fun) (data[i].input, fmt, &got_upto, NULL); - else - got_ret = (*fun) (data[i].input, fmt, got, &got_upto); - break; - case 2: - case 3: - got_l = -999L; - if (ignore) - got_ret = (*fun) (data[i].input, fmt, &got_upto, NULL); - else - got_ret = (*fun) (data[i].input, fmt, &got_l, &got_upto); - mpz_set_si (got, got_l); - break; - default: - ASSERT_ALWAYS (0); - break; - } - - MPZ_CHECK_FORMAT (got); - - if (got_ret != want_ret) - { - printf ("%s wrong return value\n", name); - error = 1; - } - if (want_ret == 1 && mpz_cmp (want, got) != 0) - { - printf ("%s wrong result\n", name); - error = 1; - } - if (got_upto != want_upto) - { - printf ("%s wrong upto\n", name); - error = 1; - } - if (got_ftell != -1 && want_ftell != -1 && got_ftell != want_ftell) - { - printf ("%s wrong ftell\n", name); - error = 1; - } - if (error) - { - printf (" fmt \"%s\"\n", data[i].fmt); - printf (" input \"%s\"\n", data[i].input); - printf (" ignore %d\n", ignore); - printf (" ret want=%d\n", want_ret); - printf (" got =%d\n", got_ret); - mpz_trace (" value want", want); - mpz_trace (" got ", got); - printf (" upto want =%d\n", want_upto); - printf (" got =%d\n", got_upto); - if (got_ftell != -1) - { - printf (" ftell want =%ld\n", want_ftell); - printf (" got =%ld\n", got_ftell); - } - abort (); - } - } - } - - mpz_clear (got); - mpz_clear (want); -} - -void -check_q (void) -{ - static const struct { - const char *fmt; - const char *input; - const char *want; - int ret; - long ftell; - - } data[] = { - - { "%Qd", "0", "0", 1, -1 }, - { "%Qd", "1", "1", 1, -1 }, - { "%Qd", "123", "123", 1, -1 }, - { "%Qd", "+0", "0", 1, -1 }, - { "%Qd", "+1", "1", 1, -1 }, - { "%Qd", "+123", "123", 1, -1 }, - { "%Qd", "-0", "0", 1, -1 }, - { "%Qd", "-1", "-1", 1, -1 }, - { "%Qd", "-123", "-123", 1, -1 }, - - { "%Qo", "0", "0", 1, -1 }, - { "%Qo", "173", "123", 1, -1 }, - { "%Qo", "+0", "0", 1, -1 }, - { "%Qo", "+173", "123", 1, -1 }, - { "%Qo", "-0", "0", 1, -1 }, - { "%Qo", "-173", "-123", 1, -1 }, - - { "%Qx", "0", "0", 1, -1 }, - { "%Qx", "7b", "123", 1, -1 }, - { "%Qx", "7b", "123", 1, -1 }, - { "%Qx", "+0", "0", 1, -1 }, - { "%Qx", "+7b", "123", 1, -1 }, - { "%Qx", "+7b", "123", 1, -1 }, - { "%Qx", "-0", "-0", 1, -1 }, - { "%Qx", "-7b", "-123", 1, -1 }, - { "%Qx", "-7b", "-123", 1, -1 }, - { "%QX", "0", "0", 1, -1 }, - { "%QX", "7b", "123", 1, -1 }, - { "%QX", "7b", "123", 1, -1 }, - { "%QX", "+0", "0", 1, -1 }, - { "%QX", "+7b", "123", 1, -1 }, - { "%QX", "+7b", "123", 1, -1 }, - { "%QX", "-0", "-0", 1, -1 }, - { "%QX", "-7b", "-123", 1, -1 }, - { "%QX", "-7b", "-123", 1, -1 }, - { "%Qx", "0", "0", 1, -1 }, - { "%Qx", "7B", "123", 1, -1 }, - { "%Qx", "7B", "123", 1, -1 }, - { "%Qx", "+0", "0", 1, -1 }, - { "%Qx", "+7B", "123", 1, -1 }, - { "%Qx", "+7B", "123", 1, -1 }, - { "%Qx", "-0", "-0", 1, -1 }, - { "%Qx", "-7B", "-123", 1, -1 }, - { "%Qx", "-7B", "-123", 1, -1 }, - { "%QX", "0", "0", 1, -1 }, - { "%QX", "7B", "123", 1, -1 }, - { "%QX", "7B", "123", 1, -1 }, - { "%QX", "+0", "0", 1, -1 }, - { "%QX", "+7B", "123", 1, -1 }, - { "%QX", "+7B", "123", 1, -1 }, - { "%QX", "-0", "-0", 1, -1 }, - { "%QX", "-7B", "-123", 1, -1 }, - { "%QX", "-7B", "-123", 1, -1 }, - - { "%Qi", "0", "0", 1, -1 }, - { "%Qi", "1", "1", 1, -1 }, - { "%Qi", "123", "123", 1, -1 }, - { "%Qi", "+0", "0", 1, -1 }, - { "%Qi", "+1", "1", 1, -1 }, - { "%Qi", "+123", "123", 1, -1 }, - { "%Qi", "-0", "0", 1, -1 }, - { "%Qi", "-1", "-1", 1, -1 }, - { "%Qi", "-123", "-123", 1, -1 }, - - { "%Qi", "00", "0", 1, -1 }, - { "%Qi", "0173", "123", 1, -1 }, - { "%Qi", "+00", "0", 1, -1 }, - { "%Qi", "+0173", "123", 1, -1 }, - { "%Qi", "-00", "0", 1, -1 }, - { "%Qi", "-0173", "-123", 1, -1 }, - - { "%Qi", "0x0", "0", 1, -1 }, - { "%Qi", "0x7b", "123", 1, -1 }, - { "%Qi", "0x7b", "123", 1, -1 }, - { "%Qi", "+0x0", "0", 1, -1 }, - { "%Qi", "+0x7b", "123", 1, -1 }, - { "%Qi", "+0x7b", "123", 1, -1 }, - { "%Qi", "-0x0", "-0", 1, -1 }, - { "%Qi", "-0x7b", "-123", 1, -1 }, - { "%Qi", "-0x7b", "-123", 1, -1 }, - { "%Qi", "0X0", "0", 1, -1 }, - { "%Qi", "0X7b", "123", 1, -1 }, - { "%Qi", "0X7b", "123", 1, -1 }, - { "%Qi", "+0X0", "0", 1, -1 }, - { "%Qi", "+0X7b", "123", 1, -1 }, - { "%Qi", "+0X7b", "123", 1, -1 }, - { "%Qi", "-0X0", "-0", 1, -1 }, - { "%Qi", "-0X7b", "-123", 1, -1 }, - { "%Qi", "-0X7b", "-123", 1, -1 }, - { "%Qi", "0x0", "0", 1, -1 }, - { "%Qi", "0x7B", "123", 1, -1 }, - { "%Qi", "0x7B", "123", 1, -1 }, - { "%Qi", "+0x0", "0", 1, -1 }, - { "%Qi", "+0x7B", "123", 1, -1 }, - { "%Qi", "+0x7B", "123", 1, -1 }, - { "%Qi", "-0x0", "-0", 1, -1 }, - { "%Qi", "-0x7B", "-123", 1, -1 }, - { "%Qi", "-0x7B", "-123", 1, -1 }, - { "%Qi", "0X0", "0", 1, -1 }, - { "%Qi", "0X7B", "123", 1, -1 }, - { "%Qi", "0X7B", "123", 1, -1 }, - { "%Qi", "+0X0", "0", 1, -1 }, - { "%Qi", "+0X7B", "123", 1, -1 }, - { "%Qi", "+0X7B", "123", 1, -1 }, - { "%Qi", "-0X0", "-0", 1, -1 }, - { "%Qi", "-0X7B", "-123", 1, -1 }, - { "%Qi", "-0X7B", "-123", 1, -1 }, - - { "%Qd", " 0", "0", 1, -1 }, - { "%Qd", " 0", "0", 1, -1 }, - { "%Qd", " 0", "0", 1, -1 }, - { "%Qd", "\t0", "0", 1, -1 }, - { "%Qd", "\t\t0", "0", 1, -1 }, - - { "%Qd", "3/2", "3/2", 1, -1 }, - { "%Qd", "+3/2", "3/2", 1, -1 }, - { "%Qd", "-3/2", "-3/2", 1, -1 }, - - { "%Qx", "f/10", "15/16", 1, -1 }, - { "%Qx", "F/10", "15/16", 1, -1 }, - { "%QX", "f/10", "15/16", 1, -1 }, - { "%QX", "F/10", "15/16", 1, -1 }, - - { "%Qo", "20/21", "16/17", 1, -1 }, - { "%Qo", "-20/21", "-16/17", 1, -1 }, - - { "%Qi", "10/11", "10/11", 1, -1 }, - { "%Qi", "+10/11", "10/11", 1, -1 }, - { "%Qi", "-10/11", "-10/11", 1, -1 }, - { "%Qi", "010/11", "8/11", 1, -1 }, - { "%Qi", "+010/11", "8/11", 1, -1 }, - { "%Qi", "-010/11", "-8/11", 1, -1 }, - { "%Qi", "0x10/11", "16/11", 1, -1 }, - { "%Qi", "+0x10/11", "16/11", 1, -1 }, - { "%Qi", "-0x10/11", "-16/11", 1, -1 }, - - { "%Qi", "10/011", "10/9", 1, -1 }, - { "%Qi", "+10/011", "10/9", 1, -1 }, - { "%Qi", "-10/011", "-10/9", 1, -1 }, - { "%Qi", "010/011", "8/9", 1, -1 }, - { "%Qi", "+010/011", "8/9", 1, -1 }, - { "%Qi", "-010/011", "-8/9", 1, -1 }, - { "%Qi", "0x10/011", "16/9", 1, -1 }, - { "%Qi", "+0x10/011", "16/9", 1, -1 }, - { "%Qi", "-0x10/011", "-16/9", 1, -1 }, - - { "%Qi", "10/0x11", "10/17", 1, -1 }, - { "%Qi", "+10/0x11", "10/17", 1, -1 }, - { "%Qi", "-10/0x11", "-10/17", 1, -1 }, - { "%Qi", "010/0x11", "8/17", 1, -1 }, - { "%Qi", "+010/0x11", "8/17", 1, -1 }, - { "%Qi", "-010/0x11", "-8/17", 1, -1 }, - { "%Qi", "0x10/0x11", "16/17", 1, -1 }, - { "%Qi", "+0x10/0x11", "16/17", 1, -1 }, - { "%Qi", "-0x10/0x11", "-16/17", 1, -1 }, - - { "hello%Qd", "hello0", "0", 1, -1 }, - { "hello%Qd", "hello 0", "0", 1, -1 }, - { "hello%Qd", "hello \t0", "0", 1, -1 }, - { "hello%Qdworld", "hello 0world", "0", 1, -1 }, - { "hello%Qd", "hello3/2", "3/2", 1, -1 }, - - { "hello%*Qd", "hello0", "-999/121", 0, -1 }, - { "hello%*Qd", "hello 0", "-999/121", 0, -1 }, - { "hello%*Qd", "hello \t0", "-999/121", 0, -1 }, - { "hello%*Qdworld", "hello 0world", "-999/121", 0, -1 }, - { "hello%*Qdworld", "hello3/2world", "-999/121", 0, -1 }, - - { "%Qd", "", "-999/121", -1, -1 }, - { "%Qd", " ", "-999/121", -1, -1 }, - { " %Qd", "", "-999/121", -1, -1 }, - { "xyz%Qd", "", "-999/121", -1, -1 }, - - { "%*Qd", "", "-999/121", -1, -1 }, - { " %*Qd", "", "-999/121", -1, -1 }, - { "xyz%*Qd", "", "-999/121", -1, -1 }, - - /* match something, but invalid */ - { "%Qd", "-", "-999/121", 0, 1 }, - { "%Qd", "+", "-999/121", 0, 1 }, - { "%Qd", "/-", "-999/121", 0, 1 }, - { "%Qd", "/+", "-999/121", 0, 1 }, - { "%Qd", "-/", "-999/121", 0, 1 }, - { "%Qd", "+/", "-999/121", 0, 1 }, - { "%Qd", "-/-", "-999/121", 0, 1 }, - { "%Qd", "-/+", "-999/121", 0, 1 }, - { "%Qd", "+/+", "-999/121", 0, 1 }, - { "%Qd", "/123", "-999/121", 0, 1 }, - { "%Qd", "-/123", "-999/121", 0, 1 }, - { "%Qd", "+/123", "-999/121", 0, 1 }, - { "%Qd", "123/", "-999/121", 0, 1 }, - { "%Qd", "123/-", "-999/121", 0, 1 }, - { "%Qd", "123/+", "-999/121", 0, 1 }, - { "xyz%Qd", "xyz-", "-999/121", 0, 4 }, - { "xyz%Qd", "xyz+", "-999/121", 0, 4 }, - - { "%1Qi", "12/57", "1", 1, 1 }, - { "%2Qi", "12/57", "12", 1, 2 }, - { "%3Qi", "12/57", "-999/121", 0, -1 }, - { "%4Qi", "12/57", "12/5", 1, 4 }, - { "%5Qi", "12/57", "12/57", 1, 5 }, - { "%6Qi", "12/57", "12/57", 1, 5 }, - { "%7Qi", "12/57", "12/57", 1, 5 }, - - { "%1Qi", "012/057", "0", 1, 1 }, - { "%2Qi", "012/057", "01", 1, 2 }, - { "%3Qi", "012/057", "012", 1, 3 }, - { "%4Qi", "012/057", "-999/121", 0, -1 }, - { "%5Qi", "012/057", "012/0", 1, 5 }, - { "%6Qi", "012/057", "012/5", 1, 6 }, - { "%7Qi", "012/057", "012/057", 1, 7 }, - { "%8Qi", "012/057", "012/057", 1, 7 }, - { "%9Qi", "012/057", "012/057", 1, 7 }, - - { "%1Qi", "0x12/0x57", "0", 1, 1 }, - { "%2Qi", "0x12/0x57", "-999", 0, 2 }, - { "%3Qi", "0x12/0x57", "0x1", 1, 3 }, - { "%4Qi", "0x12/0x57", "0x12", 1, 4 }, - { "%5Qi", "0x12/0x57", "-999/121", 0, 5 }, - { "%6Qi", "0x12/0x57", "0x12/0", 1, 6 }, - { "%7Qi", "0x12/0x57", "-999/121", 0, 7 }, - { "%8Qi", "0x12/0x57", "0x12/0x5", 1, 8 }, - { "%9Qi", "0x12/0x57", "0x12/0x57", 1, 9 }, - { "%10Qi", "0x12/0x57", "0x12/0x57", 1, 9 }, - { "%11Qi", "0x12/0x57", "0x12/0x57", 1, 9 }, - - { "%Qd", "xyz", "0", 0, 0 }, - }; - - int i, j, ignore, got_ret, want_ret, got_upto, want_upto; - mpq_t got, want; - long got_l, want_ftell; - int error = 0; - fun_t fun; - const char *name; - char fmt[128]; - - mpq_init (got); - mpq_init (want); - - for (i = 0; i < numberof (data); i++) - { - mpq_set_str_or_abort (want, data[i].want, 0); - - ASSERT_ALWAYS (strlen (data[i].fmt) + 2 < sizeof (fmt)); - strcpy (fmt, data[i].fmt); - strcat (fmt, "%n"); - - ignore = (strchr (fmt, '*') != NULL); - - for (j = 0; j <= 3; j++) - { - want_ret = data[i].ret; - - want_ftell = data[i].ftell; - if (want_ftell == -1) - want_ftell = strlen (data[i].input); - want_upto = want_ftell; - - if (want_ret == -1 || (want_ret == 0 && ! ignore)) - { - want_ftell = -1; - want_upto = -555; - } - - switch (j) { - case 0: - name = "gmp_sscanf"; - fun = fun_gmp_sscanf; - break; - case 1: - name = "gmp_fscanf"; - fun = fun_gmp_fscanf; - break; - case 2: - if (strchr (data[i].input, '/') != NULL) - continue; - if (! libc_scanf_convert (fmt)) - continue; - name = "standard sscanf"; - fun = fun_sscanf; - break; - case 3: - if (strchr (data[i].input, '/') != NULL) - continue; - if (! libc_scanf_convert (fmt)) - continue; - name = "standard fscanf"; - fun = fun_fscanf; - break; - default: - ASSERT_ALWAYS (0); - break; - } - - got_upto = -555; - got_ftell = -1; - - switch (j) { - case 0: - case 1: - mpq_set_si (got, -999L, 121L); - if (ignore) - got_ret = (*fun) (data[i].input, fmt, &got_upto, NULL); - else - got_ret = (*fun) (data[i].input, fmt, got, &got_upto); - break; - case 2: - case 3: - got_l = -999L; - if (ignore) - got_ret = (*fun) (data[i].input, fmt, &got_upto, NULL); - else - got_ret = (*fun) (data[i].input, fmt, &got_l, &got_upto); - mpq_set_si (got, got_l, (got_l == -999L ? 121L : 1L)); - break; - default: - ASSERT_ALWAYS (0); - break; - } - - MPZ_CHECK_FORMAT (mpq_numref (got)); - MPZ_CHECK_FORMAT (mpq_denref (got)); - - if (got_ret != want_ret) - { - printf ("%s wrong return value\n", name); - error = 1; - } - /* use direct mpz compares, since some of the test data is - non-canonical and can trip ASSERTs in mpq_equal */ - if (want_ret == 1 - && ! (mpz_cmp (mpq_numref(want), mpq_numref(got)) == 0 - && mpz_cmp (mpq_denref(want), mpq_denref(got)) == 0)) - { - printf ("%s wrong result\n", name); - error = 1; - } - if (got_upto != want_upto) - { - printf ("%s wrong upto\n", name); - error = 1; - } - if (got_ftell != -1 && want_ftell != -1 && got_ftell != want_ftell) - { - printf ("%s wrong ftell\n", name); - error = 1; - } - if (error) - { - printf (" fmt \"%s\"\n", data[i].fmt); - printf (" input \"%s\"\n", data[i].input); - printf (" ret want=%d\n", want_ret); - printf (" got =%d\n", got_ret); - mpq_trace (" value want", want); - mpq_trace (" got ", got); - printf (" upto want=%d\n", want_upto); - printf (" got =%d\n", got_upto); - if (got_ftell != -1) - { - printf (" ftell want =%ld\n", want_ftell); - printf (" got =%ld\n", got_ftell); - } - abort (); - } - } - } - - mpq_clear (got); - mpq_clear (want); -} - -void -check_f (void) -{ - static const struct { - const char *fmt; - const char *input; - const char *want; - int ret; - long ftell; /* or -1 for length of input string */ - - } data[] = { - - { "%Ff", "0", "0", 1, -1 }, - { "%Fe", "0", "0", 1, -1 }, - { "%FE", "0", "0", 1, -1 }, - { "%Fg", "0", "0", 1, -1 }, - { "%FG", "0", "0", 1, -1 }, - - { "%Ff", "123", "123", 1, -1 }, - { "%Ff", "+123", "123", 1, -1 }, - { "%Ff", "-123", "-123", 1, -1 }, - { "%Ff", "123.", "123", 1, -1 }, - { "%Ff", "+123.", "123", 1, -1 }, - { "%Ff", "-123.", "-123", 1, -1 }, - { "%Ff", "123.0", "123", 1, -1 }, - { "%Ff", "+123.0", "123", 1, -1 }, - { "%Ff", "-123.0", "-123", 1, -1 }, - { "%Ff", "0123", "123", 1, -1 }, - { "%Ff", "-0123", "-123", 1, -1 }, - - { "%Ff", "123.456e3", "123456", 1, -1 }, - { "%Ff", "-123.456e3", "-123456", 1, -1 }, - { "%Ff", "123.456e+3", "123456", 1, -1 }, - { "%Ff", "-123.456e+3", "-123456", 1, -1 }, - { "%Ff", "123000e-3", "123", 1, -1 }, - { "%Ff", "-123000e-3", "-123", 1, -1 }, - { "%Ff", "123000.e-3", "123", 1, -1 }, - { "%Ff", "-123000.e-3", "-123", 1, -1 }, - - { "%Ff", "123.456E3", "123456", 1, -1 }, - { "%Ff", "-123.456E3", "-123456", 1, -1 }, - { "%Ff", "123.456E+3", "123456", 1, -1 }, - { "%Ff", "-123.456E+3", "-123456", 1, -1 }, - { "%Ff", "123000E-3", "123", 1, -1 }, - { "%Ff", "-123000E-3", "-123", 1, -1 }, - { "%Ff", "123000.E-3", "123", 1, -1 }, - { "%Ff", "-123000.E-3", "-123", 1, -1 }, - - { "%Ff", ".456e3", "456", 1, -1 }, - { "%Ff", "-.456e3", "-456", 1, -1 }, - { "%Ff", ".456e+3", "456", 1, -1 }, - { "%Ff", "-.456e+3", "-456", 1, -1 }, - - { "%Ff", " 0", "0", 1, -1 }, - { "%Ff", " 0", "0", 1, -1 }, - { "%Ff", " 0", "0", 1, -1 }, - { "%Ff", "\t0", "0", 1, -1 }, - { "%Ff", "\t\t0", "0", 1, -1 }, - - { "hello%Fg", "hello0", "0", 1, -1 }, - { "hello%Fg", "hello 0", "0", 1, -1 }, - { "hello%Fg", "hello \t0", "0", 1, -1 }, - { "hello%Fgworld", "hello 0world", "0", 1, -1 }, - { "hello%Fg", "hello3.0", "3.0", 1, -1 }, - - { "hello%*Fg", "hello0", "-999", 0, -1 }, - { "hello%*Fg", "hello 0", "-999", 0, -1 }, - { "hello%*Fg", "hello \t0", "-999", 0, -1 }, - { "hello%*Fgworld", "hello 0world", "-999", 0, -1 }, - { "hello%*Fgworld", "hello3.0world", "-999", 0, -1 }, - - { "%Ff", "", "-999", -1, -1 }, - { "%Ff", " ", "-999", -1, -1 }, - { "%Ff", "\t", "-999", -1, -1 }, - { "%Ff", " \t", "-999", -1, -1 }, - { " %Ff", "", "-999", -1, -1 }, - { "xyz%Ff", "", "-999", -1, -1 }, - - { "%*Ff", "", "-999", -1, -1 }, - { " %*Ff", "", "-999", -1, -1 }, - { "xyz%*Ff", "", "-999", -1, -1 }, - - { "%Ff", "xyz", "0", 0 }, - - /* various non-empty but invalid */ - { "%Ff", "-", "-999", 0, 1 }, - { "%Ff", "+", "-999", 0, 1 }, - { "xyz%Ff", "xyz-", "-999", 0, 4 }, - { "xyz%Ff", "xyz+", "-999", 0, 4 }, - { "%Ff", "-.", "-999", 0, 2 }, - { "%Ff", "+.", "-999", 0, 2 }, - { "%Ff", ".e", "-999", 0, 1 }, - { "%Ff", "-.e", "-999", 0, 2 }, - { "%Ff", "+.e", "-999", 0, 2 }, - { "%Ff", ".E", "-999", 0, 1 }, - { "%Ff", "-.E", "-999", 0, 2 }, - { "%Ff", "+.E", "-999", 0, 2 }, - { "%Ff", ".e123", "-999", 0, 1 }, - { "%Ff", "-.e123", "-999", 0, 2 }, - { "%Ff", "+.e123", "-999", 0, 2 }, - { "%Ff", "123e", "-999", 0, 4 }, - { "%Ff", "-123e", "-999", 0, 5 }, - { "%Ff", "123e-", "-999", 0, 5 }, - { "%Ff", "-123e-", "-999", 0, 6 }, - { "%Ff", "123e+", "-999", 0, 5 }, - { "%Ff", "-123e+", "-999", 0, 6 }, - { "%Ff", "123e-Z", "-999", 0, 5 }, - - /* hex floats */ - { "%Ff", "0x123p0", "291", 1, -1 }, - { "%Ff", "0x123P0", "291", 1, -1 }, - { "%Ff", "0X123p0", "291", 1, -1 }, - { "%Ff", "0X123P0", "291", 1, -1 }, - { "%Ff", "-0x123p0", "-291", 1, -1 }, - { "%Ff", "+0x123p0", "291", 1, -1 }, - { "%Ff", "0x123.p0", "291", 1, -1 }, - { "%Ff", "0x12.3p4", "291", 1, -1 }, - { "%Ff", "-0x12.3p4", "-291", 1, -1 }, - { "%Ff", "+0x12.3p4", "291", 1, -1 }, - { "%Ff", "0x1230p-4", "291", 1, -1 }, - { "%Ff", "-0x1230p-4", "-291", 1, -1 }, - { "%Ff", "+0x1230p-4", "291", 1, -1 }, - { "%Ff", "+0x.1230p12", "291", 1, -1 }, - { "%Ff", "+0x123000p-12", "291", 1, -1 }, - { "%Ff", "0x123 p12", "291", 1, 5 }, - { "%Ff", "0x9 9", "9", 1, 3 }, - { "%Ff", "0x01", "1", 1, 4 }, - { "%Ff", "0x23", "35", 1, 4 }, - { "%Ff", "0x45", "69", 1, 4 }, - { "%Ff", "0x67", "103", 1, 4 }, - { "%Ff", "0x89", "137", 1, 4 }, - { "%Ff", "0xAB", "171", 1, 4 }, - { "%Ff", "0xCD", "205", 1, 4 }, - { "%Ff", "0xEF", "239", 1, 4 }, - { "%Ff", "0xab", "171", 1, 4 }, - { "%Ff", "0xcd", "205", 1, 4 }, - { "%Ff", "0xef", "239", 1, 4 }, - { "%Ff", "0x100p0A", "256", 1, 7 }, - { "%Ff", "0x1p9", "512", 1, -1 }, - - /* invalid hex floats */ - { "%Ff", "0x", "-999", 0, 2 }, - { "%Ff", "-0x", "-999", 0, 3 }, - { "%Ff", "+0x", "-999", 0, 3 }, - { "%Ff", "0x-", "-999", 0, 2 }, - { "%Ff", "0x+", "-999", 0, 2 }, - { "%Ff", "0x.", "-999", 0, 3 }, - { "%Ff", "-0x.", "-999", 0, 4 }, - { "%Ff", "+0x.", "-999", 0, 4 }, - { "%Ff", "0x.p", "-999", 0, 3 }, - { "%Ff", "-0x.p", "-999", 0, 4 }, - { "%Ff", "+0x.p", "-999", 0, 4 }, - { "%Ff", "0x.P", "-999", 0, 3 }, - { "%Ff", "-0x.P", "-999", 0, 4 }, - { "%Ff", "+0x.P", "-999", 0, 4 }, - { "%Ff", ".p123", "-999", 0, 1 }, - { "%Ff", "-.p123", "-999", 0, 2 }, - { "%Ff", "+.p123", "-999", 0, 2 }, - { "%Ff", "0x1p", "-999", 0, 4 }, - { "%Ff", "0x1p-", "-999", 0, 5 }, - { "%Ff", "0x1p+", "-999", 0, 5 }, - { "%Ff", "0x123p 12", "291", 0, 6 }, - { "%Ff", "0x 123p12", "291", 0, 2 }, - - }; - - int i, j, ignore, got_ret, want_ret, got_upto, want_upto; - mpf_t got, want; - double got_d; - long want_ftell; - int error = 0; - fun_t fun; - const char *name; - char fmt[128]; - - mpf_init (got); - mpf_init (want); - - for (i = 0; i < numberof (data); i++) - { - mpf_set_str_or_abort (want, data[i].want, 10); - - ASSERT_ALWAYS (strlen (data[i].fmt) + 2 < sizeof (fmt)); - strcpy (fmt, data[i].fmt); - strcat (fmt, "%n"); - - ignore = (strchr (fmt, '*') != NULL); - - for (j = 0; j <= 3; j++) - { - want_ret = data[i].ret; - - want_ftell = data[i].ftell; - if (want_ftell == -1) - want_ftell = strlen (data[i].input); - want_upto = want_ftell; - - if (want_ret == -1 || (want_ret == 0 && ! ignore)) - want_upto = -555; - - switch (j) { - case 0: - name = "gmp_sscanf"; - fun = fun_gmp_sscanf; - break; - case 1: - name = "gmp_fscanf"; - fun = fun_gmp_fscanf; - break; - case 2: - if (! libc_scanf_convert (fmt)) - continue; - name = "standard sscanf"; - fun = fun_sscanf; - break; - case 3: - if (! libc_scanf_convert (fmt)) - continue; - name = "standard fscanf"; - fun = fun_fscanf; - break; - default: - ASSERT_ALWAYS (0); - break; - } - - got_upto = -555; - got_ftell = -1; - - switch (j) { - case 0: - case 1: - mpf_set_si (got, -999L); - if (ignore) - got_ret = (*fun) (data[i].input, fmt, &got_upto, NULL); - else - got_ret = (*fun) (data[i].input, fmt, got, &got_upto); - break; - case 2: - case 3: - got_d = -999L; - if (ignore) - got_ret = (*fun) (data[i].input, fmt, &got_upto, NULL); - else - got_ret = (*fun) (data[i].input, fmt, &got_d, &got_upto); - mpf_set_d (got, got_d); - break; - default: - ASSERT_ALWAYS (0); - break; - } - - MPF_CHECK_FORMAT (got); - - if (got_ret != want_ret) - { - printf ("%s wrong return value\n", name); - error = 1; - } - if (want_ret == 1 && mpf_cmp (want, got) != 0) - { - printf ("%s wrong result\n", name); - error = 1; - } - if (got_upto != want_upto) - { - printf ("%s wrong upto\n", name); - error = 1; - } - if (got_ftell != -1 && want_ftell != -1 && got_ftell != want_ftell) - { - printf ("%s wrong ftell\n", name); - error = 1; - } - if (error) - { - printf (" fmt \"%s\"\n", data[i].fmt); - printf (" input \"%s\"\n", data[i].input); - printf (" ret want=%d\n", want_ret); - printf (" got =%d\n", got_ret); - mpf_trace (" value want", want); - mpf_trace (" got ", got); - printf (" upto want=%d\n", want_upto); - printf (" got =%d\n", got_upto); - if (got_ftell != -1) - { - printf (" ftell want =%ld\n", want_ftell); - printf (" got =%ld\n", got_ftell); - } - abort (); - } - } - } - - mpf_clear (got); - mpf_clear (want); -} - - -void -check_n (void) -{ - int ret; - - /* %n suppressed */ - { - int n = 123; - gmp_sscanf (" ", " %*n", &n); - ASSERT_ALWAYS (n == 123); - } - { - int n = 123; - fromstring_gmp_fscanf (" ", " %*n", &n); - ASSERT_ALWAYS (n == 123); - } - - -#define CHECK_N(type, string) \ - do { \ - type x[2]; \ - char fmt[128]; \ - int ret; \ - \ - x[0] = ~ (type) 0; \ - x[1] = ~ (type) 0; \ - sprintf (fmt, "abc%%%sn", string); \ - ret = gmp_sscanf ("abc", fmt, &x[0]); \ - \ - ASSERT_ALWAYS (ret == 0); \ - \ - /* should write whole of x[0] and none of x[1] */ \ - ASSERT_ALWAYS (x[0] == 3); \ - ASSERT_ALWAYS (x[1] == (type) ~ (type) 0); \ - \ - } while (0) - - CHECK_N (char, "hh"); - CHECK_N (long, "l"); -#if HAVE_LONG_LONG - CHECK_N (long long, "L"); -#endif -#if HAVE_INTMAX_T - CHECK_N (intmax_t, "j"); -#endif -#if HAVE_PTRDIFF_T - CHECK_N (ptrdiff_t, "t"); -#endif - CHECK_N (short, "h"); - CHECK_N (size_t, "z"); - - /* %Zn */ - { - mpz_t x[2]; - mpz_init_set_si (x[0], -987L); - mpz_init_set_si (x[1], 654L); - ret = gmp_sscanf ("xyz ", "xyz%Zn", x[0]); - MPZ_CHECK_FORMAT (x[0]); - MPZ_CHECK_FORMAT (x[1]); - ASSERT_ALWAYS (ret == 0); - ASSERT_ALWAYS (mpz_cmp_ui (x[0], 3L) == 0); - ASSERT_ALWAYS (mpz_cmp_ui (x[1], 654L) == 0); - mpz_clear (x[0]); - mpz_clear (x[1]); - } - { - mpz_t x; - mpz_init (x); - ret = fromstring_gmp_fscanf ("xyz ", "xyz%Zn", x); - ASSERT_ALWAYS (ret == 0); - ASSERT_ALWAYS (mpz_cmp_ui (x, 3L) == 0); - mpz_clear (x); - } - - /* %Qn */ - { - mpq_t x[2]; - mpq_init (x[0]); - mpq_init (x[1]); - mpq_set_ui (x[0], 987L, 654L); - mpq_set_ui (x[1], 4115L, 226L); - ret = gmp_sscanf ("xyz ", "xyz%Qn", x[0]); - MPQ_CHECK_FORMAT (x[0]); - MPQ_CHECK_FORMAT (x[1]); - ASSERT_ALWAYS (ret == 0); - ASSERT_ALWAYS (mpq_cmp_ui (x[0], 3L, 1L) == 0); - ASSERT_ALWAYS (mpq_cmp_ui (x[1], 4115L, 226L) == 0); - mpq_clear (x[0]); - mpq_clear (x[1]); - } - { - mpq_t x; - mpq_init (x); - ret = fromstring_gmp_fscanf ("xyz ", "xyz%Qn", x); - ASSERT_ALWAYS (ret == 0); - ASSERT_ALWAYS (mpq_cmp_ui (x, 3L, 1L) == 0); - mpq_clear (x); - } - - /* %Fn */ - { - mpf_t x[2]; - mpf_init (x[0]); - mpf_init (x[1]); - mpf_set_ui (x[0], 987L); - mpf_set_ui (x[1], 654L); - ret = gmp_sscanf ("xyz ", "xyz%Fn", x[0]); - MPF_CHECK_FORMAT (x[0]); - MPF_CHECK_FORMAT (x[1]); - ASSERT_ALWAYS (ret == 0); - ASSERT_ALWAYS (mpf_cmp_ui (x[0], 3L) == 0); - ASSERT_ALWAYS (mpf_cmp_ui (x[1], 654L) == 0); - mpf_clear (x[0]); - mpf_clear (x[1]); - } - { - mpf_t x; - mpf_init (x); - ret = fromstring_gmp_fscanf ("xyz ", "xyz%Fn", x); - ASSERT_ALWAYS (ret == 0); - ASSERT_ALWAYS (mpf_cmp_ui (x, 3L) == 0); - mpf_clear (x); - } -} - - -void -check_misc (void) -{ - int ret, cmp; - { - int a=9, b=8, c=7, n=66; - mpz_t z; - mpz_init (z); - ret = gmp_sscanf ("1 2 3 4", "%d %d %d %Zd%n", - &a, &b, &c, z, &n); - ASSERT_ALWAYS (ret == 4); - ASSERT_ALWAYS (a == 1); - ASSERT_ALWAYS (b == 2); - ASSERT_ALWAYS (c == 3); - ASSERT_ALWAYS (n == 7); - ASSERT_ALWAYS (mpz_cmp_ui (z, 4L) == 0); - mpz_clear (z); - } - { - int a=9, b=8, c=7, n=66; - mpz_t z; - mpz_init (z); - ret = fromstring_gmp_fscanf ("1 2 3 4", "%d %d %d %Zd%n", - &a, &b, &c, z, &n); - ASSERT_ALWAYS (ret == 4); - ASSERT_ALWAYS (a == 1); - ASSERT_ALWAYS (b == 2); - ASSERT_ALWAYS (c == 3); - ASSERT_ALWAYS (mpz_cmp_ui (z, 4L) == 0); - ASSERT_ALWAYS (n == 7); - ASSERT_ALWAYS (got_ftell == 7); - mpz_clear (z); - } - - { - int a=9, n=8; - mpz_t z; - mpz_init (z); - ret = gmp_sscanf ("1 2 3 4", "%d %*d %*d %Zd%n", &a, z, &n); - ASSERT_ALWAYS (ret == 2); - ASSERT_ALWAYS (a == 1); - ASSERT_ALWAYS (mpz_cmp_ui (z, 4L) == 0); - ASSERT_ALWAYS (n == 7); - mpz_clear (z); - } - { - int a=9, n=8; - mpz_t z; - mpz_init (z); - ret = fromstring_gmp_fscanf ("1 2 3 4", "%d %*d %*d %Zd%n", - &a, z, &n); - ASSERT_ALWAYS (ret == 2); - ASSERT_ALWAYS (a == 1); - ASSERT_ALWAYS (mpz_cmp_ui (z, 4L) == 0); - ASSERT_ALWAYS (n == 7); - ASSERT_ALWAYS (got_ftell == 7); - mpz_clear (z); - } - - /* EOF for no matching */ - { - char buf[128]; - ret = gmp_sscanf (" ", "%s", buf); - ASSERT_ALWAYS (ret == EOF); - ret = fromstring_gmp_fscanf (" ", "%s", buf); - ASSERT_ALWAYS (ret == EOF); - if (option_libc_scanf) - { - ret = sscanf (" ", "%s", buf); - ASSERT_ALWAYS (ret == EOF); - ret = fun_fscanf (" ", "%s", buf, NULL); - ASSERT_ALWAYS (ret == EOF); - } - } - - /* suppressed field, then eof */ - { - int x; - if (test_sscanf_eof_ok ()) - { - ret = gmp_sscanf ("123", "%*d%d", &x); - ASSERT_ALWAYS (ret == EOF); - } - ret = fromstring_gmp_fscanf ("123", "%*d%d", &x); - ASSERT_ALWAYS (ret == EOF); - if (option_libc_scanf) - { - ret = sscanf ("123", "%*d%d", &x); - ASSERT_ALWAYS (ret == EOF); - ret = fun_fscanf ("123", "%*d%d", &x, NULL); - ASSERT_ALWAYS (ret == EOF); - } - } - { - mpz_t x; - mpz_init (x); - ret = gmp_sscanf ("123", "%*Zd%Zd", x); - ASSERT_ALWAYS (ret == EOF); - ret = fromstring_gmp_fscanf ("123", "%*Zd%Zd", x); - ASSERT_ALWAYS (ret == EOF); - mpz_clear (x); - } - - /* %[...], glibc only */ -#ifdef __GLIBC__ - { - char buf[128]; - int n = -1; - buf[0] = '\0'; - ret = gmp_sscanf ("abcdefgh", "%[a-d]ef%n", buf, &n); - ASSERT_ALWAYS (ret == 1); - cmp = strcmp (buf, "abcd"); - ASSERT_ALWAYS (cmp == 0); - ASSERT_ALWAYS (n == 6); - } - { - char buf[128]; - int n = -1; - buf[0] = '\0'; - ret = gmp_sscanf ("xyza", "%[^a]a%n", buf, &n); - ASSERT_ALWAYS (ret == 1); - cmp = strcmp (buf, "xyz"); - ASSERT_ALWAYS (cmp == 0); - ASSERT_ALWAYS (n == 4); - } - { - char buf[128]; - int n = -1; - buf[0] = '\0'; - ret = gmp_sscanf ("ab]ab]", "%[]ab]%n", buf, &n); - ASSERT_ALWAYS (ret == 1); - cmp = strcmp (buf, "ab]ab]"); - ASSERT_ALWAYS (cmp == 0); - ASSERT_ALWAYS (n == 6); - } - { - char buf[128]; - int n = -1; - buf[0] = '\0'; - ret = gmp_sscanf ("xyzb", "%[^]ab]b%n", buf, &n); - ASSERT_ALWAYS (ret == 1); - cmp = strcmp (buf, "xyz"); - ASSERT_ALWAYS (cmp == 0); - ASSERT_ALWAYS (n == 4); - } -#endif - - /* %zd etc won't be accepted by sscanf on old systems, and running - something to see if they work might be bad, so only try it on glibc, - and only on a new enough version (glibc 2.0 doesn't have %zd) */ -#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 0) - { - mpz_t z; - size_t s = -1; - mpz_init (z); - ret = gmp_sscanf ("456 789", "%zd %Zd", &s, z); - ASSERT_ALWAYS (ret == 2); - ASSERT_ALWAYS (s == 456); - ASSERT_ALWAYS (mpz_cmp_ui (z, 789L) == 0); - mpz_clear (z); - } - { - mpz_t z; - ptrdiff_t d = -1; - mpz_init (z); - ret = gmp_sscanf ("456 789", "%td %Zd", &d, z); - ASSERT_ALWAYS (ret == 2); - ASSERT_ALWAYS (d == 456); - ASSERT_ALWAYS (mpz_cmp_ui (z, 789L) == 0); - mpz_clear (z); - } - { - mpz_t z; - long long ll = -1; - mpz_init (z); - ret = gmp_sscanf ("456 789", "%Ld %Zd", &ll, z); - ASSERT_ALWAYS (ret == 2); - ASSERT_ALWAYS (ll == 456); - ASSERT_ALWAYS (mpz_cmp_ui (z, 789L) == 0); - mpz_clear (z); - } -#endif -} - -int -main (int argc, char *argv[]) -{ - if (argc > 1 && strcmp (argv[1], "-s") == 0) - option_libc_scanf = 1; - - tests_start (); - - mp_trace_base = 16; - - check_z (); - check_q (); - check_f (); - check_n (); - check_misc (); - - unlink (TEMPFILE); - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/Makefile.am b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/Makefile.am deleted file mode 100644 index 08630ddf9b8..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -## Process this file with automake to generate Makefile.in - -# Copyright 1996, 1999-2004, 2015 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. - - -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la - -check_PROGRAMS = t-dm2exp t-conv t-add t-sub t-sqrt t-sqrt_ui t-muldiv reuse \ - t-cmp_d t-cmp_si t-div t-fits t-get_d t-get_d_2exp \ - t-get_si t-get_ui t-gsprec t-inp_str t-int_p t-mul_ui \ - t-set t-set_q t-set_si t-set_ui t-trunc t-ui_div t-eq t-pow_ui -TESTS = $(check_PROGRAMS) - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/Makefile.in b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/Makefile.in deleted file mode 100644 index 4747f13bdac..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/Makefile.in +++ /dev/null @@ -1,1451 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright 1996, 1999-2004, 2015 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -check_PROGRAMS = t-dm2exp$(EXEEXT) t-conv$(EXEEXT) t-add$(EXEEXT) \ - t-sub$(EXEEXT) t-sqrt$(EXEEXT) t-sqrt_ui$(EXEEXT) \ - t-muldiv$(EXEEXT) reuse$(EXEEXT) t-cmp_d$(EXEEXT) \ - t-cmp_si$(EXEEXT) t-div$(EXEEXT) t-fits$(EXEEXT) \ - t-get_d$(EXEEXT) t-get_d_2exp$(EXEEXT) t-get_si$(EXEEXT) \ - t-get_ui$(EXEEXT) t-gsprec$(EXEEXT) t-inp_str$(EXEEXT) \ - t-int_p$(EXEEXT) t-mul_ui$(EXEEXT) t-set$(EXEEXT) \ - t-set_q$(EXEEXT) t-set_si$(EXEEXT) t-set_ui$(EXEEXT) \ - t-trunc$(EXEEXT) t-ui_div$(EXEEXT) t-eq$(EXEEXT) \ - t-pow_ui$(EXEEXT) -subdir = tests/mpf -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -reuse_SOURCES = reuse.c -reuse_OBJECTS = reuse.$(OBJEXT) -reuse_LDADD = $(LDADD) -reuse_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -t_add_SOURCES = t-add.c -t_add_OBJECTS = t-add.$(OBJEXT) -t_add_LDADD = $(LDADD) -t_add_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_cmp_d_SOURCES = t-cmp_d.c -t_cmp_d_OBJECTS = t-cmp_d.$(OBJEXT) -t_cmp_d_LDADD = $(LDADD) -t_cmp_d_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_cmp_si_SOURCES = t-cmp_si.c -t_cmp_si_OBJECTS = t-cmp_si.$(OBJEXT) -t_cmp_si_LDADD = $(LDADD) -t_cmp_si_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_conv_SOURCES = t-conv.c -t_conv_OBJECTS = t-conv.$(OBJEXT) -t_conv_LDADD = $(LDADD) -t_conv_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_div_SOURCES = t-div.c -t_div_OBJECTS = t-div.$(OBJEXT) -t_div_LDADD = $(LDADD) -t_div_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_dm2exp_SOURCES = t-dm2exp.c -t_dm2exp_OBJECTS = t-dm2exp.$(OBJEXT) -t_dm2exp_LDADD = $(LDADD) -t_dm2exp_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_eq_SOURCES = t-eq.c -t_eq_OBJECTS = t-eq.$(OBJEXT) -t_eq_LDADD = $(LDADD) -t_eq_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_fits_SOURCES = t-fits.c -t_fits_OBJECTS = t-fits.$(OBJEXT) -t_fits_LDADD = $(LDADD) -t_fits_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_get_d_SOURCES = t-get_d.c -t_get_d_OBJECTS = t-get_d.$(OBJEXT) -t_get_d_LDADD = $(LDADD) -t_get_d_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_get_d_2exp_SOURCES = t-get_d_2exp.c -t_get_d_2exp_OBJECTS = t-get_d_2exp.$(OBJEXT) -t_get_d_2exp_LDADD = $(LDADD) -t_get_d_2exp_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_get_si_SOURCES = t-get_si.c -t_get_si_OBJECTS = t-get_si.$(OBJEXT) -t_get_si_LDADD = $(LDADD) -t_get_si_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_get_ui_SOURCES = t-get_ui.c -t_get_ui_OBJECTS = t-get_ui.$(OBJEXT) -t_get_ui_LDADD = $(LDADD) -t_get_ui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_gsprec_SOURCES = t-gsprec.c -t_gsprec_OBJECTS = t-gsprec.$(OBJEXT) -t_gsprec_LDADD = $(LDADD) -t_gsprec_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_inp_str_SOURCES = t-inp_str.c -t_inp_str_OBJECTS = t-inp_str.$(OBJEXT) -t_inp_str_LDADD = $(LDADD) -t_inp_str_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_int_p_SOURCES = t-int_p.c -t_int_p_OBJECTS = t-int_p.$(OBJEXT) -t_int_p_LDADD = $(LDADD) -t_int_p_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_mul_ui_SOURCES = t-mul_ui.c -t_mul_ui_OBJECTS = t-mul_ui.$(OBJEXT) -t_mul_ui_LDADD = $(LDADD) -t_mul_ui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_muldiv_SOURCES = t-muldiv.c -t_muldiv_OBJECTS = t-muldiv.$(OBJEXT) -t_muldiv_LDADD = $(LDADD) -t_muldiv_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_pow_ui_SOURCES = t-pow_ui.c -t_pow_ui_OBJECTS = t-pow_ui.$(OBJEXT) -t_pow_ui_LDADD = $(LDADD) -t_pow_ui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_set_SOURCES = t-set.c -t_set_OBJECTS = t-set.$(OBJEXT) -t_set_LDADD = $(LDADD) -t_set_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_set_q_SOURCES = t-set_q.c -t_set_q_OBJECTS = t-set_q.$(OBJEXT) -t_set_q_LDADD = $(LDADD) -t_set_q_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_set_si_SOURCES = t-set_si.c -t_set_si_OBJECTS = t-set_si.$(OBJEXT) -t_set_si_LDADD = $(LDADD) -t_set_si_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_set_ui_SOURCES = t-set_ui.c -t_set_ui_OBJECTS = t-set_ui.$(OBJEXT) -t_set_ui_LDADD = $(LDADD) -t_set_ui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_sqrt_SOURCES = t-sqrt.c -t_sqrt_OBJECTS = t-sqrt.$(OBJEXT) -t_sqrt_LDADD = $(LDADD) -t_sqrt_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_sqrt_ui_SOURCES = t-sqrt_ui.c -t_sqrt_ui_OBJECTS = t-sqrt_ui.$(OBJEXT) -t_sqrt_ui_LDADD = $(LDADD) -t_sqrt_ui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_sub_SOURCES = t-sub.c -t_sub_OBJECTS = t-sub.$(OBJEXT) -t_sub_LDADD = $(LDADD) -t_sub_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_trunc_SOURCES = t-trunc.c -t_trunc_OBJECTS = t-trunc.$(OBJEXT) -t_trunc_LDADD = $(LDADD) -t_trunc_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_ui_div_SOURCES = t-ui_div.c -t_ui_div_OBJECTS = t-ui_div.$(OBJEXT) -t_ui_div_LDADD = $(LDADD) -t_ui_div_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = reuse.c t-add.c t-cmp_d.c t-cmp_si.c t-conv.c t-div.c \ - t-dm2exp.c t-eq.c t-fits.c t-get_d.c t-get_d_2exp.c t-get_si.c \ - t-get_ui.c t-gsprec.c t-inp_str.c t-int_p.c t-mul_ui.c \ - t-muldiv.c t-pow_ui.c t-set.c t-set_q.c t-set_si.c t-set_ui.c \ - t-sqrt.c t-sqrt_ui.c t-sub.c t-trunc.c t-ui_div.c -DIST_SOURCES = reuse.c t-add.c t-cmp_d.c t-cmp_si.c t-conv.c t-div.c \ - t-dm2exp.c t-eq.c t-fits.c t-get_d.c t-get_d_2exp.c t-get_si.c \ - t-get_ui.c t-gsprec.c t-inp_str.c t-int_p.c t-mul_ui.c \ - t-muldiv.c t-pow_ui.c t-set.c t-set_q.c t-set_si.c t-set_ui.c \ - t-sqrt.c t-sqrt_ui.c t-sub.c t-trunc.c t-ui_div.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red='[0;31m'; \ - grn='[0;32m'; \ - lgn='[1;32m'; \ - blu='[1;34m'; \ - mgn='[0;35m'; \ - brg='[1m'; \ - std='[m'; \ - fi; \ -} -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck -TEST_SUITE_LOG = test-suite.log -TEST_EXTENSIONS = @EXEEXT@ .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/test-driver -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ABI = @ABI@ -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -ASMFLAGS = @ASMFLAGS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ -CC = @CC@ -CCAS = @CCAS@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CPP_FOR_BUILD = @CPP_FOR_BUILD@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@ -DEFS = @DEFS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -FGREP = @FGREP@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIMB_BITS = @GMP_LIMB_BITS@ -GMP_NAIL_BITS = @GMP_NAIL_BITS@ -GREP = @GREP@ -HAVE_CLOCK_01 = @HAVE_CLOCK_01@ -HAVE_CPUTIME_01 = @HAVE_CPUTIME_01@ -HAVE_GETRUSAGE_01 = @HAVE_GETRUSAGE_01@ -HAVE_GETTIMEOFDAY_01 = @HAVE_GETTIMEOFDAY_01@ -HAVE_HOST_CPU_FAMILY_power = @HAVE_HOST_CPU_FAMILY_power@ -HAVE_HOST_CPU_FAMILY_powerpc = @HAVE_HOST_CPU_FAMILY_powerpc@ -HAVE_SIGACTION_01 = @HAVE_SIGACTION_01@ -HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@ -HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@ -HAVE_STACK_T_01 = @HAVE_STACK_T_01@ -HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBCURSES = @LIBCURSES@ -LIBGMPXX_LDFLAGS = @LIBGMPXX_LDFLAGS@ -LIBGMP_DLL = @LIBGMP_DLL@ -LIBGMP_LDFLAGS = @LIBGMP_LDFLAGS@ -LIBM = @LIBM@ -LIBM_FOR_BUILD = @LIBM_FOR_BUILD@ -LIBOBJS = @LIBOBJS@ -LIBREADLINE = @LIBREADLINE@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -M4 = @M4@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@ -STRIP = @STRIP@ -TAL_OBJECT = @TAL_OBJECT@ -TUNE_LIBS = @TUNE_LIBS@ -TUNE_SQR_OBJ = @TUNE_SQR_OBJ@ -U_FOR_BUILD = @U_FOR_BUILD@ -VERSION = @VERSION@ -WITH_READLINE_01 = @WITH_READLINE_01@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gmp_srclinks = @gmp_srclinks@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -mpn_objects = @mpn_objects@ -mpn_objs_in_libgmp = @mpn_objs_in_libgmp@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la -TESTS = $(check_PROGRAMS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps tests/mpf/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu --ignore-deps tests/mpf/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -reuse$(EXEEXT): $(reuse_OBJECTS) $(reuse_DEPENDENCIES) $(EXTRA_reuse_DEPENDENCIES) - @rm -f reuse$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(reuse_OBJECTS) $(reuse_LDADD) $(LIBS) - -t-add$(EXEEXT): $(t_add_OBJECTS) $(t_add_DEPENDENCIES) $(EXTRA_t_add_DEPENDENCIES) - @rm -f t-add$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_add_OBJECTS) $(t_add_LDADD) $(LIBS) - -t-cmp_d$(EXEEXT): $(t_cmp_d_OBJECTS) $(t_cmp_d_DEPENDENCIES) $(EXTRA_t_cmp_d_DEPENDENCIES) - @rm -f t-cmp_d$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_cmp_d_OBJECTS) $(t_cmp_d_LDADD) $(LIBS) - -t-cmp_si$(EXEEXT): $(t_cmp_si_OBJECTS) $(t_cmp_si_DEPENDENCIES) $(EXTRA_t_cmp_si_DEPENDENCIES) - @rm -f t-cmp_si$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_cmp_si_OBJECTS) $(t_cmp_si_LDADD) $(LIBS) - -t-conv$(EXEEXT): $(t_conv_OBJECTS) $(t_conv_DEPENDENCIES) $(EXTRA_t_conv_DEPENDENCIES) - @rm -f t-conv$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_conv_OBJECTS) $(t_conv_LDADD) $(LIBS) - -t-div$(EXEEXT): $(t_div_OBJECTS) $(t_div_DEPENDENCIES) $(EXTRA_t_div_DEPENDENCIES) - @rm -f t-div$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_div_OBJECTS) $(t_div_LDADD) $(LIBS) - -t-dm2exp$(EXEEXT): $(t_dm2exp_OBJECTS) $(t_dm2exp_DEPENDENCIES) $(EXTRA_t_dm2exp_DEPENDENCIES) - @rm -f t-dm2exp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_dm2exp_OBJECTS) $(t_dm2exp_LDADD) $(LIBS) - -t-eq$(EXEEXT): $(t_eq_OBJECTS) $(t_eq_DEPENDENCIES) $(EXTRA_t_eq_DEPENDENCIES) - @rm -f t-eq$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_eq_OBJECTS) $(t_eq_LDADD) $(LIBS) - -t-fits$(EXEEXT): $(t_fits_OBJECTS) $(t_fits_DEPENDENCIES) $(EXTRA_t_fits_DEPENDENCIES) - @rm -f t-fits$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_fits_OBJECTS) $(t_fits_LDADD) $(LIBS) - -t-get_d$(EXEEXT): $(t_get_d_OBJECTS) $(t_get_d_DEPENDENCIES) $(EXTRA_t_get_d_DEPENDENCIES) - @rm -f t-get_d$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_get_d_OBJECTS) $(t_get_d_LDADD) $(LIBS) - -t-get_d_2exp$(EXEEXT): $(t_get_d_2exp_OBJECTS) $(t_get_d_2exp_DEPENDENCIES) $(EXTRA_t_get_d_2exp_DEPENDENCIES) - @rm -f t-get_d_2exp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_get_d_2exp_OBJECTS) $(t_get_d_2exp_LDADD) $(LIBS) - -t-get_si$(EXEEXT): $(t_get_si_OBJECTS) $(t_get_si_DEPENDENCIES) $(EXTRA_t_get_si_DEPENDENCIES) - @rm -f t-get_si$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_get_si_OBJECTS) $(t_get_si_LDADD) $(LIBS) - -t-get_ui$(EXEEXT): $(t_get_ui_OBJECTS) $(t_get_ui_DEPENDENCIES) $(EXTRA_t_get_ui_DEPENDENCIES) - @rm -f t-get_ui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_get_ui_OBJECTS) $(t_get_ui_LDADD) $(LIBS) - -t-gsprec$(EXEEXT): $(t_gsprec_OBJECTS) $(t_gsprec_DEPENDENCIES) $(EXTRA_t_gsprec_DEPENDENCIES) - @rm -f t-gsprec$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_gsprec_OBJECTS) $(t_gsprec_LDADD) $(LIBS) - -t-inp_str$(EXEEXT): $(t_inp_str_OBJECTS) $(t_inp_str_DEPENDENCIES) $(EXTRA_t_inp_str_DEPENDENCIES) - @rm -f t-inp_str$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_inp_str_OBJECTS) $(t_inp_str_LDADD) $(LIBS) - -t-int_p$(EXEEXT): $(t_int_p_OBJECTS) $(t_int_p_DEPENDENCIES) $(EXTRA_t_int_p_DEPENDENCIES) - @rm -f t-int_p$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_int_p_OBJECTS) $(t_int_p_LDADD) $(LIBS) - -t-mul_ui$(EXEEXT): $(t_mul_ui_OBJECTS) $(t_mul_ui_DEPENDENCIES) $(EXTRA_t_mul_ui_DEPENDENCIES) - @rm -f t-mul_ui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_mul_ui_OBJECTS) $(t_mul_ui_LDADD) $(LIBS) - -t-muldiv$(EXEEXT): $(t_muldiv_OBJECTS) $(t_muldiv_DEPENDENCIES) $(EXTRA_t_muldiv_DEPENDENCIES) - @rm -f t-muldiv$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_muldiv_OBJECTS) $(t_muldiv_LDADD) $(LIBS) - -t-pow_ui$(EXEEXT): $(t_pow_ui_OBJECTS) $(t_pow_ui_DEPENDENCIES) $(EXTRA_t_pow_ui_DEPENDENCIES) - @rm -f t-pow_ui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_pow_ui_OBJECTS) $(t_pow_ui_LDADD) $(LIBS) - -t-set$(EXEEXT): $(t_set_OBJECTS) $(t_set_DEPENDENCIES) $(EXTRA_t_set_DEPENDENCIES) - @rm -f t-set$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_set_OBJECTS) $(t_set_LDADD) $(LIBS) - -t-set_q$(EXEEXT): $(t_set_q_OBJECTS) $(t_set_q_DEPENDENCIES) $(EXTRA_t_set_q_DEPENDENCIES) - @rm -f t-set_q$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_set_q_OBJECTS) $(t_set_q_LDADD) $(LIBS) - -t-set_si$(EXEEXT): $(t_set_si_OBJECTS) $(t_set_si_DEPENDENCIES) $(EXTRA_t_set_si_DEPENDENCIES) - @rm -f t-set_si$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_set_si_OBJECTS) $(t_set_si_LDADD) $(LIBS) - -t-set_ui$(EXEEXT): $(t_set_ui_OBJECTS) $(t_set_ui_DEPENDENCIES) $(EXTRA_t_set_ui_DEPENDENCIES) - @rm -f t-set_ui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_set_ui_OBJECTS) $(t_set_ui_LDADD) $(LIBS) - -t-sqrt$(EXEEXT): $(t_sqrt_OBJECTS) $(t_sqrt_DEPENDENCIES) $(EXTRA_t_sqrt_DEPENDENCIES) - @rm -f t-sqrt$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_sqrt_OBJECTS) $(t_sqrt_LDADD) $(LIBS) - -t-sqrt_ui$(EXEEXT): $(t_sqrt_ui_OBJECTS) $(t_sqrt_ui_DEPENDENCIES) $(EXTRA_t_sqrt_ui_DEPENDENCIES) - @rm -f t-sqrt_ui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_sqrt_ui_OBJECTS) $(t_sqrt_ui_LDADD) $(LIBS) - -t-sub$(EXEEXT): $(t_sub_OBJECTS) $(t_sub_DEPENDENCIES) $(EXTRA_t_sub_DEPENDENCIES) - @rm -f t-sub$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_sub_OBJECTS) $(t_sub_LDADD) $(LIBS) - -t-trunc$(EXEEXT): $(t_trunc_OBJECTS) $(t_trunc_DEPENDENCIES) $(EXTRA_t_trunc_DEPENDENCIES) - @rm -f t-trunc$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_trunc_OBJECTS) $(t_trunc_LDADD) $(LIBS) - -t-ui_div$(EXEEXT): $(t_ui_div_OBJECTS) $(t_ui_div_DEPENDENCIES) $(EXTRA_t_ui_div_DEPENDENCIES) - @rm -f t-ui_div$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_ui_div_OBJECTS) $(t_ui_div_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(AM_V_CC)$(COMPILE) -c -o $@ $< - -.c.obj: - $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -recheck: all $(check_PROGRAMS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -t-dm2exp.log: t-dm2exp$(EXEEXT) - @p='t-dm2exp$(EXEEXT)'; \ - b='t-dm2exp'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-conv.log: t-conv$(EXEEXT) - @p='t-conv$(EXEEXT)'; \ - b='t-conv'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-add.log: t-add$(EXEEXT) - @p='t-add$(EXEEXT)'; \ - b='t-add'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-sub.log: t-sub$(EXEEXT) - @p='t-sub$(EXEEXT)'; \ - b='t-sub'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-sqrt.log: t-sqrt$(EXEEXT) - @p='t-sqrt$(EXEEXT)'; \ - b='t-sqrt'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-sqrt_ui.log: t-sqrt_ui$(EXEEXT) - @p='t-sqrt_ui$(EXEEXT)'; \ - b='t-sqrt_ui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-muldiv.log: t-muldiv$(EXEEXT) - @p='t-muldiv$(EXEEXT)'; \ - b='t-muldiv'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -reuse.log: reuse$(EXEEXT) - @p='reuse$(EXEEXT)'; \ - b='reuse'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-cmp_d.log: t-cmp_d$(EXEEXT) - @p='t-cmp_d$(EXEEXT)'; \ - b='t-cmp_d'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-cmp_si.log: t-cmp_si$(EXEEXT) - @p='t-cmp_si$(EXEEXT)'; \ - b='t-cmp_si'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-div.log: t-div$(EXEEXT) - @p='t-div$(EXEEXT)'; \ - b='t-div'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-fits.log: t-fits$(EXEEXT) - @p='t-fits$(EXEEXT)'; \ - b='t-fits'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-get_d.log: t-get_d$(EXEEXT) - @p='t-get_d$(EXEEXT)'; \ - b='t-get_d'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-get_d_2exp.log: t-get_d_2exp$(EXEEXT) - @p='t-get_d_2exp$(EXEEXT)'; \ - b='t-get_d_2exp'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-get_si.log: t-get_si$(EXEEXT) - @p='t-get_si$(EXEEXT)'; \ - b='t-get_si'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-get_ui.log: t-get_ui$(EXEEXT) - @p='t-get_ui$(EXEEXT)'; \ - b='t-get_ui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-gsprec.log: t-gsprec$(EXEEXT) - @p='t-gsprec$(EXEEXT)'; \ - b='t-gsprec'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-inp_str.log: t-inp_str$(EXEEXT) - @p='t-inp_str$(EXEEXT)'; \ - b='t-inp_str'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-int_p.log: t-int_p$(EXEEXT) - @p='t-int_p$(EXEEXT)'; \ - b='t-int_p'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-mul_ui.log: t-mul_ui$(EXEEXT) - @p='t-mul_ui$(EXEEXT)'; \ - b='t-mul_ui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-set.log: t-set$(EXEEXT) - @p='t-set$(EXEEXT)'; \ - b='t-set'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-set_q.log: t-set_q$(EXEEXT) - @p='t-set_q$(EXEEXT)'; \ - b='t-set_q'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-set_si.log: t-set_si$(EXEEXT) - @p='t-set_si$(EXEEXT)'; \ - b='t-set_si'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-set_ui.log: t-set_ui$(EXEEXT) - @p='t-set_ui$(EXEEXT)'; \ - b='t-set_ui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-trunc.log: t-trunc$(EXEEXT) - @p='t-trunc$(EXEEXT)'; \ - b='t-trunc'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-ui_div.log: t-ui_div$(EXEEXT) - @p='t-ui_div$(EXEEXT)'; \ - b='t-ui_div'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-eq.log: t-eq$(EXEEXT) - @p='t-eq$(EXEEXT)'; \ - b='t-eq'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-pow_ui.log: t-pow_ui$(EXEEXT) - @p='t-pow_ui$(EXEEXT)'; \ - b='t-pow_ui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.test$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/reuse.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/reuse.c deleted file mode 100644 index 3a382530b60..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/reuse.c +++ /dev/null @@ -1,219 +0,0 @@ -/* Test that routines allow reusing a source variable as destination. - -Copyright 1996, 2000-2002, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#if __GMP_LIBGMP_DLL - -/* FIXME: When linking to a DLL libgmp, mpf_add etc can't be used as - initializers for global variables because they're effectively global - variables (function pointers) themselves. Perhaps calling a test - function successively with mpf_add etc would be better. */ - -int -main (void) -{ - printf ("Test suppressed for windows DLL\n"); - exit (0); -} - - -#else /* ! DLL_EXPORT */ - -#ifndef SIZE -#define SIZE 16 -#endif - -#ifndef EXPO -#define EXPO 32 -#endif - -void dump_abort (const char *, mpf_t, mpf_t); - -typedef void (*dss_func) (mpf_ptr, mpf_srcptr, mpf_srcptr); - -dss_func dss_funcs[] = -{ - mpf_div, mpf_add, mpf_mul, mpf_sub, -}; - -const char *dss_func_names[] = -{ - "mpf_div", "mpf_add", "mpf_mul", "mpf_sub", -}; - -typedef void (*dsi_func) (mpf_ptr, mpf_srcptr, unsigned long int); - -dsi_func dsi_funcs[] = -{ - mpf_div_ui, mpf_add_ui, mpf_mul_ui, mpf_sub_ui, - mpf_mul_2exp, mpf_div_2exp, mpf_pow_ui -}; - -const char *dsi_func_names[] = -{ - "mpf_div_ui", "mpf_add_ui", "mpf_mul_ui", "mpf_sub_ui", - "mpf_mul_2exp", "mpf_div_2exp", "mpf_pow_ui" -}; - -typedef void (*dis_func) (mpf_ptr, unsigned long int, mpf_srcptr); - -dis_func dis_funcs[] = -{ - mpf_ui_div, mpf_ui_sub, -}; - -const char *dis_func_names[] = -{ - "mpf_ui_div", "mpf_ui_sub", -}; - -int -main (int argc, char **argv) -{ - int i; - int pass, reps = 10000; - mpf_t in1, in2, out1; - unsigned long int in1i, in2i; - mpf_t res1, res2, res3; - mp_size_t bprec = 100; - - tests_start (); - - if (argc > 1) - { - reps = strtol (argv[1], 0, 0); - if (argc > 2) - bprec = strtol (argv[2], 0, 0); - } - - mpf_set_default_prec (bprec); - - mpf_init (in1); - mpf_init (in2); - mpf_init (out1); - mpf_init (res1); - mpf_init (res2); - mpf_init (res3); - - for (pass = 1; pass <= reps; pass++) - { - mpf_random2 (in1, urandom () % SIZE - SIZE/2, urandom () % EXPO); - mpf_random2 (in2, urandom () % SIZE - SIZE/2, urandom () % EXPO); - - for (i = 0; i < sizeof (dss_funcs) / sizeof (dss_func); i++) - { - /* Don't divide by 0. */ - if (i == 0 && mpf_cmp_ui (in2, 0) == 0) - continue; - - (dss_funcs[i]) (res1, in1, in2); - - mpf_set (out1, in1); - (dss_funcs[i]) (out1, out1, in2); - mpf_set (res2, out1); - - mpf_set (out1, in2); - (dss_funcs[i]) (out1, in1, out1); - mpf_set (res3, out1); - - if (mpf_cmp (res1, res2) != 0) - dump_abort (dss_func_names[i], res1, res2); - if (mpf_cmp (res1, res3) != 0) - dump_abort (dss_func_names[i], res1, res3); - } - - in2i = urandom (); - for (i = 0; i < sizeof (dsi_funcs) / sizeof (dsi_func); i++) - { - unsigned long this_in2i = in2i; - - /* Don't divide by 0. */ - if (dsi_funcs[i] == mpf_div_ui && this_in2i == 0) - continue; - - /* Avoid overflow/underflow in the exponent. */ - if (dsi_funcs[i] == mpf_mul_2exp || dsi_funcs[i] == mpf_div_2exp) - this_in2i %= 0x100000; - else if (dsi_funcs[i] == mpf_pow_ui) - this_in2i %= 0x1000; - - (dsi_funcs[i]) (res1, in1, this_in2i); - - mpf_set (out1, in1); - (dsi_funcs[i]) (out1, out1, this_in2i); - mpf_set (res2, out1); - - if (mpf_cmp (res1, res2) != 0) - dump_abort (dsi_func_names[i], res1, res2); - } - - in1i = urandom (); - for (i = 0; i < sizeof (dis_funcs) / sizeof (dis_func); i++) - { - /* Don't divide by 0. */ - if (dis_funcs[i] == mpf_ui_div - && mpf_cmp_ui (in2, 0) == 0) - continue; - - (dis_funcs[i]) (res1, in1i, in2); - - mpf_set (out1, in2); - (dis_funcs[i]) (out1, in1i, out1); - mpf_set (res2, out1); - - if (mpf_cmp (res1, res2) != 0) - dump_abort (dis_func_names[i], res1, res2); - } - - } - - mpf_clear (in1); - mpf_clear (in2); - mpf_clear (out1); - mpf_clear (res1); - mpf_clear (res2); - mpf_clear (res3); - - tests_end (); - exit (0); -} - -void -dump_abort (const char *name, mpf_t res1, mpf_t res2) -{ - printf ("failure in %s:\n", name); - mpf_dump (res1); - mpf_dump (res2); - abort (); -} - -#if 0 -void mpf_abs (mpf_ptr, mpf_srcptr); -void mpf_sqrt (mpf_ptr, mpf_srcptr); -void mpf_neg (mpf_ptr, mpf_srcptr); -#endif - -#endif /* ! DLL_EXPORT */ diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-add.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-add.c deleted file mode 100644 index dacc6382e44..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-add.c +++ /dev/null @@ -1,108 +0,0 @@ -/* Test mpf_add. - -Copyright 1996, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#ifndef SIZE -#define SIZE 16 -#endif - -int -main (int argc, char **argv) -{ - mp_size_t size; - mp_exp_t exp; - int reps = 20000; - int i; - mpf_t u, v, w, wref; - mp_size_t bprec = 100; - mpf_t rerr, max_rerr, limit_rerr; - - tests_start (); - - if (argc > 1) - { - reps = strtol (argv[1], 0, 0); - if (argc > 2) - bprec = strtol (argv[2], 0, 0); - } - - mpf_set_default_prec (bprec); - - mpf_init_set_ui (limit_rerr, 1); - mpf_div_2exp (limit_rerr, limit_rerr, bprec); -#if VERBOSE - mpf_dump (limit_rerr); -#endif - mpf_init (rerr); - mpf_init_set_ui (max_rerr, 0); - - mpf_init (u); - mpf_init (v); - mpf_init (w); - mpf_init (wref); - for (i = 0; i < reps; i++) - { - size = urandom () % (2 * SIZE) - SIZE; - exp = urandom () % SIZE; - mpf_random2 (u, size, exp); - - size = urandom () % (2 * SIZE) - SIZE; - exp = urandom () % SIZE; - mpf_random2 (v, size, exp); - - mpf_add (w, u, v); - refmpf_add (wref, u, v); - - mpf_reldiff (rerr, w, wref); - if (mpf_cmp (rerr, max_rerr) > 0) - { - mpf_set (max_rerr, rerr); -#if VERBOSE - mpf_dump (max_rerr); -#endif - if (mpf_cmp (rerr, limit_rerr) > 0) - { - printf ("ERROR after %d tests\n", i); - printf (" u = "); mpf_dump (u); - printf (" v = "); mpf_dump (v); - printf ("wref = "); mpf_dump (wref); - printf (" w = "); mpf_dump (w); - abort (); - } - } - } - - mpf_clear (limit_rerr); - mpf_clear (rerr); - mpf_clear (max_rerr); - - mpf_clear (u); - mpf_clear (v); - mpf_clear (w); - mpf_clear (wref); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-cmp_d.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-cmp_d.c deleted file mode 100644 index a1cbbadb172..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-cmp_d.c +++ /dev/null @@ -1,104 +0,0 @@ -/* Test mpf_cmp_d. - -Copyright 2001, 2003, 2003, 2005 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -#define SGN(n) ((n) > 0 ? 1 : (n) < 0 ? -1 : 0) - -void -check_one (const char *name, mpf_srcptr x, double y, int cmp) -{ - int got; - - got = mpf_cmp_d (x, y); - if (SGN(got) != cmp) - { - int i; - printf ("mpf_cmp_d wrong (from %s)\n", name); - printf (" got %d\n", got); - printf (" want %d\n", cmp); - mpf_trace (" x", x); - printf (" y %g\n", y); - mp_trace_base=-16; - mpf_trace (" x", x); - printf (" y %g\n", y); - printf (" y"); - for (i = 0; i < sizeof(y); i++) - printf (" %02X", (unsigned) ((unsigned char *) &y)[i]); - printf ("\n"); - abort (); - } -} - -void -check_infinity (void) -{ - mpf_t x; - double y = tests_infinity_d (); - if (y == 0.0) - return; - - mpf_init (x); - - /* 0 cmp inf */ - mpf_set_ui (x, 0L); - check_one ("check_infinity", x, y, -1); - check_one ("check_infinity", x, -y, 1); - - /* 123 cmp inf */ - mpf_set_ui (x, 123L); - check_one ("check_infinity", x, y, -1); - check_one ("check_infinity", x, -y, 1); - - /* -123 cmp inf */ - mpf_set_si (x, -123L); - check_one ("check_infinity", x, y, -1); - check_one ("check_infinity", x, -y, 1); - - /* 2^5000 cmp inf */ - mpf_set_ui (x, 1L); - mpf_mul_2exp (x, x, 5000L); - check_one ("check_infinity", x, y, -1); - check_one ("check_infinity", x, -y, 1); - - /* -2^5000 cmp inf */ - mpf_neg (x, x); - check_one ("check_infinity", x, y, -1); - check_one ("check_infinity", x, -y, 1); - - mpf_clear (x); -} - -int -main (int argc, char *argv[]) -{ - tests_start (); - - check_infinity (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-cmp_si.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-cmp_si.c deleted file mode 100644 index e8e38c265ce..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-cmp_si.c +++ /dev/null @@ -1,135 +0,0 @@ -/* Test mpf_cmp_si and mpf_cmp_z. - -Copyright 2000, 2001, 2004, 2015 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#define SGN(x) ((x) < 0 ? -1 : (x) == 0 ? 0 : 1) - -void -check_data (void) -{ - static const struct { - int a_base; - const char *a; - const char *b; - int want; - } data[] = { - { 10, "0", "1", -1 }, - { 10, "0", "0", 0 }, - { 10, "0", "-1", 1 }, - - { 10, "1", "1", 0 }, - { 10, "1", "0", 1 }, - { 10, "1", "-1", 1 }, - - { 10, "-1", "1", -1 }, - { 10, "-1", "0", -1 }, - { 10, "-1", "-1", 0 }, - - { 10, "1.5", "2", -1 }, - { 10, "1.5", "1", 1 }, - { 10, "0.5", "1", -1 }, - - { 10, "-1.5", "-2", 1 }, - { 10, "-1.5", "-1", -1 }, - { 10, "-0.5", "-1", 1 }, - - { 16, "0", "-0x80000000", 1 }, - { 16, "80000000", "-0x80000000", 1 }, - { 16, "80000001", "-0x80000000", 1 }, - { 16, "-80000000", "-0x80000000", 0 }, - { 16, "-80000001", "-0x80000000", -1 }, - { 16, "-FF0080000001", "-0x80000000", -1 }, - - { 16, "0", "-0x8000000000000000", 1 }, - { 16, "8000000000000000", "-0x8000000000000000", 1 }, - { 16, "8000000000000001", "-0x8000000000000000", 1 }, - { 16, "-8000000000000000", "-0x8000000000000000", 0 }, - { 16, "-8000000000000000.1", "-0x8000000000000000", -1 }, - { 16, "-FF008000000000000001", "-0x8000000000000000", -1 }, - - { 16, "0", "-0x876543210FEDCBA9876543210000000", 1 }, - { 16, "876543210FEDCBA9876543210000000", "-0x876543210FEDCBA9876543210000000", 1 }, - { 16, "876543210FEDCBA9876543210000001", "-0x876543210FEDCBA9876543210000000", 1 }, - { 16, "-876543210FEDCBA9876543210000000", "-0x876543210FEDCBA9876543210000000", 0 }, - { 16, "-876543210FEDCBA9876543210000000.1", "-0x876543210FEDCBA9876543210000000", -1 }, - { 16, "-FF00876543210FEDCBA9876543210000000", "-0x876543210FEDCBA9876543210000000", -1 }, - }; - - mpf_t a; - mpz_t bz; - long b; - int got; - int i; - - mpf_init2 (a, 128); - mpz_init (bz); - for (i = 0; i < numberof (data); i++) - { - mpf_set_str_or_abort (a, data[i].a, data[i].a_base); - mpz_set_str_or_abort (bz, data[i].b, 0); - - if (mpz_fits_slong_p (bz)) - { - b = mpz_get_si (bz); - got = mpf_cmp_si (a, b); - if (SGN (got) != data[i].want) - { - printf ("mpf_cmp_si wrong on data[%d]\n", i); - printf (" a="); mpf_out_str (stdout, 10, 0, a); - printf (" (%s)\n", data[i].a); - printf (" b=%ld (%s)\n", b, data[i].b); - printf (" got=%d\n", got); - printf (" want=%d\n", data[i].want); - abort(); - } - } - - got = mpf_cmp_z (a, bz); - if (SGN (got) != data[i].want) - { - b = mpz_get_si (bz); - printf ("mpf_cmp_z wrong on data[%d]\n", i); - printf (" a="); mpf_out_str (stdout, 10, 0, a); - printf (" (%s)\n", data[i].a); - printf (" b=%ld (%s)\n", b, data[i].b); - printf (" got=%d\n", got); - printf (" want=%d\n", data[i].want); - abort(); - } - } - - mpf_clear (a); - mpz_clear (bz); -} - -int -main (void) -{ - tests_start (); - - check_data (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-conv.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-conv.c deleted file mode 100644 index 3b478660611..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-conv.c +++ /dev/null @@ -1,143 +0,0 @@ -/* Test mpf_get_str and mpf_set_str. - -Copyright 1996, 2000, 2001, 2008 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> /* for strlen */ - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#ifndef SIZE -#define SIZE 10 -#endif - -#ifndef EXPO -#define EXPO 200 -#endif - -int -main (int argc, char **argv) -{ - mpf_t x, y; - int reps = 20000; - int i; - mp_size_t bprec = 100; - mpf_t d, rerr, max_rerr, limit_rerr; - char *str; - mp_exp_t bexp; - long size, exp; - int base; - char buf[SIZE * GMP_LIMB_BITS + 5]; - - tests_start (); - - if (argc > 1) - { - reps = strtol (argv[1], 0, 0); - if (argc > 2) - bprec = strtol (argv[2], 0, 0); - } - - mpf_set_default_prec (bprec); - - mpf_init_set_ui (limit_rerr, 1); - mpf_div_2exp (limit_rerr, limit_rerr, bprec); -#if VERBOSE - mpf_dump (limit_rerr); -#endif - mpf_init (rerr); - mpf_init_set_ui (max_rerr, 0); - - mpf_init (x); - mpf_init (y); - mpf_init (d); - - /* First test some specific values. */ - - mpf_set_str (y, "1.23456e1000", 0); - - mpf_set_str (x, "1.23456e1000", 10); - if (mpf_cmp (x, y) != 0) - abort (); - mpf_set_str (x, "1.23456e+1000", 0); - if (mpf_cmp (x, y) != 0) - abort (); - mpf_set_str (x, "1.23456e+1000", 10); - if (mpf_cmp (x, y) != 0) - abort (); - - /* Now test random values. */ - - for (i = 0; i < reps; i++) - { - if (i == 0) - { - /* exercise the special case in get_str for for x==0 */ - mpf_set_ui (x, 0L); - base = 10; - } - else - { - size = urandom () % (2 * SIZE) - SIZE; - exp = urandom () % EXPO; - mpf_random2 (x, size, exp); - base = urandom () % 61 + 2; - } - - str = mpf_get_str (0, &bexp, base, 0, x); - - if (str[0] == '-') - sprintf (buf, "-0.%s@%ld", str + 1, bexp); - else - sprintf (buf, "0.%s@%ld", str, bexp); - - mpf_set_str_or_abort (y, buf, -base); - (*__gmp_free_func) (str, strlen (str) + 1); - - mpf_reldiff (rerr, x, y); - if (mpf_cmp (rerr, max_rerr) > 0) - { - mpf_set (max_rerr, rerr); -#if VERBOSE - mpf_dump (max_rerr); -#endif - if (mpf_cmp (rerr, limit_rerr) > 0) - { - printf ("ERROR after %d tests\n", i); - printf ("base = %d\n", base); - printf (" x = "); mpf_dump (x); - printf (" y = "); mpf_dump (y); - abort (); - } - } - } - - mpf_clear (limit_rerr); - mpf_clear (rerr); - mpf_clear (max_rerr); - - mpf_clear (x); - mpf_clear (y); - mpf_clear (d); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-div.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-div.c deleted file mode 100644 index 2f34eabaca2..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-div.c +++ /dev/null @@ -1,186 +0,0 @@ -/* Test mpf_div. - -Copyright 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_one (const char *desc, mpf_ptr got, mpf_srcptr u, mpf_srcptr v) -{ - if (! refmpf_validate_division ("mpf_div", got, u, v)) - { - mp_trace_base = -16; - mpf_trace (" u", u); - mpf_trace (" v", v); - printf (" %s\n", desc); - abort (); - } -} - -void -check_rand (void) -{ - unsigned long min_prec = __GMPF_BITS_TO_PREC (1); - gmp_randstate_ptr rands = RANDS; - unsigned long prec; - mpf_t got, u, v; - int i; - - mpf_init (got); - mpf_init (u); - mpf_init (v); - - /* separate */ - for (i = 0; i < 100; i++) - { - /* got precision */ - prec = min_prec + gmp_urandomm_ui (rands, 15L); - refmpf_set_prec_limbs (got, prec); - - /* u */ - prec = min_prec + gmp_urandomm_ui (rands, 15L); - refmpf_set_prec_limbs (u, prec); - do { - mpf_random2 (u, PREC(u), (mp_exp_t) 20); - } while (SIZ(u) == 0); - if (gmp_urandomb_ui (rands, 1L)) - mpf_neg (u, u); - - /* v */ - prec = min_prec + gmp_urandomm_ui (rands, 15L); - refmpf_set_prec_limbs (v, prec); - do { - mpf_random2 (v, PREC(v), (mp_exp_t) 20); - } while (SIZ(v) == 0); - if (gmp_urandomb_ui (rands, 1L)) - mpf_neg (v, v); - - switch (i % 3) { - case 0: - mpf_div (got, u, v); - check_one ("separate", got, u, v); - break; - case 1: - prec = refmpf_set_overlap (got, u); - mpf_div (got, got, v); - check_one ("dst == u", got, u, v); - mpf_set_prec_raw (got, prec); - break; - case 2: - prec = refmpf_set_overlap (got, v); - mpf_div (got, u, got); - check_one ("dst == v", got, u, v); - mpf_set_prec_raw (got, prec); - break; - } - } - - mpf_clear (got); - mpf_clear (u); - mpf_clear (v); -} - -/* Exercise calls mpf(x,x,x) */ -void -check_reuse_three (void) -{ - unsigned long min_prec = __GMPF_BITS_TO_PREC (1); - gmp_randstate_ptr rands = RANDS; - unsigned long result_prec, input_prec, set_prec; - mpf_t got; - int i; - - mpf_init (got); - - for (i = 0; i < 8; i++) - { - result_prec = min_prec + gmp_urandomm_ui (rands, 15L); - input_prec = min_prec + gmp_urandomm_ui (rands, 15L); - - set_prec = MAX (result_prec, input_prec); - refmpf_set_prec_limbs (got, set_prec); - - /* input, non-zero, possibly negative */ - PREC(got) = input_prec; - do { - mpf_random2 (got, input_prec, (mp_exp_t) 20); - } while (SIZ(got) == 0); - if (gmp_urandomb_ui (rands, 1L)) - mpf_neg (got, got); - - PREC(got) = result_prec; - - mpf_div (got, got, got); - - /* expect exactly 1.0 always */ - ASSERT_ALWAYS (mpf_cmp_ui (got, 1L) == 0); - - PREC(got) = set_prec; - } - - mpf_clear (got); -} - -void -check_various (void) -{ - mpf_t got, u, v; - - mpf_init (got); - mpf_init (u); - mpf_init (v); - - /* 100/4 == 25 */ - mpf_set_prec (got, 20L); - mpf_set_ui (u, 100L); - mpf_set_ui (v, 4L); - mpf_div (got, u, v); - MPF_CHECK_FORMAT (got); - ASSERT_ALWAYS (mpf_cmp_ui (got, 25L) == 0); - - /* 1/(2^n+1), a case where truncating the divisor would be wrong */ - mpf_set_prec (got, 500L); - mpf_set_prec (v, 900L); - mpf_set_ui (v, 1L); - mpf_mul_2exp (v, v, 800L); - mpf_add_ui (v, v, 1L); - mpf_div (got, u, v); - check_one ("1/2^n+1, separate", got, u, v); - - mpf_clear (got); - mpf_clear (u); - mpf_clear (v); -} - -int -main (void) -{ - tests_start (); - - check_various (); - check_rand (); - check_reuse_three (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-dm2exp.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-dm2exp.c deleted file mode 100644 index 90e4c18f165..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-dm2exp.c +++ /dev/null @@ -1,119 +0,0 @@ -/* Test mpf_div, mpf_div_2exp, mpf_mul_2exp. - -Copyright 1996, 2000, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#ifndef SIZE -#define SIZE 16 -#endif - -int -main (int argc, char **argv) -{ - int reps = 100000; - int i; - mpf_t u, v, w1, w2, w3; - mp_size_t bprec = 100; - mpf_t rerr, limit_rerr; - mp_size_t un; - mp_exp_t ue; - - tests_start (); - - if (argc > 1) - { - reps = strtol (argv[1], 0, 0); - if (argc > 2) - bprec = strtol (argv[2], 0, 0); - } - - mpf_set_default_prec (bprec); - - mpf_init (rerr); - mpf_init (limit_rerr); - - mpf_init (u); - mpf_init (v); - mpf_init (w1); - mpf_init (w2); - mpf_init (w3); - - for (i = 0; i < reps; i++) - { - unsigned long int res_prec; - unsigned long int pow2; - - res_prec = urandom () % (bprec + 100); - mpf_set_prec (w1, res_prec); - mpf_set_prec (w2, res_prec); - mpf_set_prec (w3, res_prec); - - mpf_set_ui (limit_rerr, 1); - mpf_div_2exp (limit_rerr, limit_rerr, res_prec); - - pow2 = urandom () % 0x10000; - mpf_set_ui (v, 1); - mpf_mul_2exp (v, v, pow2); - - un = urandom () % (2 * SIZE) - SIZE; - ue = urandom () % SIZE; - mpf_random2 (u, un, ue); - - mpf_div_2exp (w1, u, pow2); - mpf_div (w2, u, v); - mpf_reldiff (rerr, w1, w2); - if (mpf_cmp (rerr, limit_rerr) > 0) - { - printf ("ERROR in mpf_div or mpf_div_2exp after %d tests\n", i); - printf (" u = "); mpf_dump (u); - printf (" v = "); mpf_dump (v); - printf (" w1 = "); mpf_dump (w1); - printf (" w2 = "); mpf_dump (w2); - abort (); - } - mpf_mul_2exp (w3, w1, pow2); - mpf_reldiff (rerr, u, w3); - if (mpf_cmp (rerr, limit_rerr) > 0) - { - printf ("ERROR in mpf_mul_2exp after %d tests\n", i); - printf (" u = "); mpf_dump (u); - printf (" v = "); mpf_dump (v); - printf (" w1 = "); mpf_dump (w1); - printf (" w3 = "); mpf_dump (w3); - abort (); - } - } - - mpf_clear (rerr); - mpf_clear (limit_rerr); - - mpf_clear (u); - mpf_clear (v); - mpf_clear (w1); - mpf_clear (w2); - mpf_clear (w3); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-eq.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-eq.c deleted file mode 100644 index 359fec9316a..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-eq.c +++ /dev/null @@ -1,218 +0,0 @@ -/* Test mpf_eq. - -Copyright 2009, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#define SZ (2 * sizeof(mp_limb_t)) - -void insert_random_low_zero_limbs (mpf_t, gmp_randstate_ptr); -void dump_abort (mpf_t, mpf_t, int, int, int, int, int, long); -void hexdump (mpf_t); - -void -check_data (void) -{ - static const struct - { - struct { - int exp, size; - mp_limb_t d[10]; - } x, y; - mp_bitcnt_t bits; - int want; - - } data[] = { - { { 0, 0, { 0 } }, { 0, 0, { 0 } }, 0, 1 }, - - { { 0, 1, { 7 } }, { 0, 1, { 7 } }, 0, 1 }, - { { 0, 1, { 7 } }, { 0, 1, { 7 } }, 17, 1 }, - { { 0, 1, { 7 } }, { 0, 1, { 7 } }, 4711, 1 }, - - { { 0, 1, { 7 } }, { 0, 1, { 6 } }, 0, 1 }, - { { 0, 1, { 7 } }, { 0, 1, { 6 } }, 2, 1 }, - { { 0, 1, { 7 } }, { 0, 1, { 6 } }, 3, 0 }, - - { { 0, 0, { 0 } }, { 0, 1, { 1 } }, 0, 0 }, - { { 0, 1, { 1 } }, { 0,-1 ,{ 1 } }, 0, 0 }, - { { 1, 1, { 1 } }, { 0, 1, { 1 } }, 0, 0 }, - - { { 0, 1, { 8 } }, { 0, 1, { 4 } }, 0, 0 }, - - { { 0, 2, { 0, 3 } }, { 0, 1, { 3 } }, 1000, 1 }, - }; - - mpf_t x, y; - int got, got_swapped; - int i; - mp_trace_base = 16; - - for (i = 0; i < numberof (data); i++) - { - PTR(x) = (mp_ptr) data[i].x.d; - SIZ(x) = data[i].x.size; - EXP(x) = data[i].x.exp; - PREC(x) = numberof (data[i].x.d); - MPF_CHECK_FORMAT (x); - - PTR(y) = (mp_ptr) data[i].y.d; - SIZ(y) = data[i].y.size; - EXP(y) = data[i].y.exp; - PREC(y) = numberof (data[i].y.d); - MPF_CHECK_FORMAT (y); - - got = mpf_eq (x, y, data[i].bits); - got_swapped = mpf_eq (y, x, data[i].bits); - - if (got != got_swapped || got != data[i].want) - { - printf ("check_data() wrong result at data[%d]\n", i); - mpf_trace ("x ", x); - mpf_trace ("y ", y); - printf ("got %d\n", got); - printf ("got_swapped %d\n", got_swapped); - printf ("want %d\n", data[i].want); - abort (); - } - } -} - -void -check_random (long reps) -{ - unsigned long test; - gmp_randstate_ptr rands = RANDS; - mpf_t a, b, x; - mpz_t ds; - int hibits, lshift1, lshift2; - int xtra; - -#define HIBITS 10 -#define LSHIFT1 10 -#define LSHIFT2 10 - - mpf_set_default_prec ((1 << HIBITS) + (1 << LSHIFT1) + (1 << LSHIFT2)); - - mpz_init (ds); - mpf_inits (a, b, x, NULL); - - for (test = 0; test < reps; test++) - { - mpz_urandomb (ds, rands, HIBITS); - hibits = mpz_get_ui (ds) + 1; - mpz_urandomb (ds, rands, hibits); - mpz_setbit (ds, hibits - 1); /* make sure msb is set */ - mpf_set_z (a, ds); - mpf_set_z (b, ds); - - mpz_urandomb (ds, rands, LSHIFT1); - lshift1 = mpz_get_ui (ds); - mpf_mul_2exp (a, a, lshift1 + 1); - mpf_mul_2exp (b, b, lshift1 + 1); - mpf_add_ui (a, a, 1); /* make a one-bit difference */ - - mpz_urandomb (ds, rands, LSHIFT2); - lshift2 = mpz_get_ui (ds); - mpf_mul_2exp (a, a, lshift2); - mpf_mul_2exp (b, b, lshift2); - mpz_urandomb (ds, rands, lshift2); - mpf_set_z (x, ds); - mpf_add (a, a, x); - mpf_add (b, b, x); - - insert_random_low_zero_limbs (a, rands); - insert_random_low_zero_limbs (b, rands); - - if (mpf_eq (a, b, lshift1 + hibits) == 0 || - mpf_eq (b, a, lshift1 + hibits) == 0) - { - dump_abort (a, b, lshift1 + hibits, lshift1, lshift2, hibits, 1, test); - } - for (xtra = 1; xtra < 100; xtra++) - if (mpf_eq (a, b, lshift1 + hibits + xtra) != 0 || - mpf_eq (b, a, lshift1 + hibits + xtra) != 0) - { - dump_abort (a, b, lshift1 + hibits + xtra, lshift1, lshift2, hibits, 0, test); - } - } - - mpf_clears (a, b, x, NULL); - mpz_clear (ds); -} - -void -insert_random_low_zero_limbs (mpf_t x, gmp_randstate_ptr rands) -{ - mp_size_t max = PREC(x) - SIZ(x); - mp_size_t s; - mpz_t ds; mpz_init (ds); - mpz_urandomb (ds, rands, 32); - s = mpz_get_ui (ds) % (max + 1); - MPN_COPY_DECR (PTR(x) + s, PTR(x), SIZ(x)); - MPN_ZERO (PTR(x), s); - SIZ(x) += s; - mpz_clear (ds); -} - -void -dump_abort (mpf_t a, mpf_t b, int cmp_prec, int lshift1, int lshift2, int hibits, int want, long test) -{ - printf ("ERROR in test %ld\n", test); - printf ("want %d got %d from mpf_eq\n", want, 1-want); - printf ("cmp_prec = %d\n", cmp_prec); - printf ("lshift1 = %d\n", lshift1); - printf ("lshift2 = %d\n", lshift2); - printf ("hibits = %d\n", hibits); - hexdump (a); puts (""); - hexdump (b); puts (""); - abort (); -} - -void -hexdump (mpf_t x) -{ - mp_size_t i; - for (i = ABSIZ(x) - 1; i >= 0; i--) - { - gmp_printf ("%0*MX", SZ, PTR(x)[i]); - if (i != 0) - printf (" "); - } -} - -int -main (int argc, char *argv[]) -{ - long reps = 10000; - - if (argc == 2) - reps = strtol (argv[1], 0, 0); - - tests_start (); - - check_data (); - check_random (reps); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-fits.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-fits.c deleted file mode 100644 index a890b398fb2..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-fits.c +++ /dev/null @@ -1,328 +0,0 @@ -/* Test mpf_fits_*_p - -Copyright 2001, 2002, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* Nothing sophisticated here, just exercise mpf_fits_*_p on a small amount - of data. */ - -#define EXPECT_S(fun,name,answer) \ - got = fun (f); \ - if (got != answer) \ - { \ - printf ("%s (%s) got %d want %d\n", name, expr, got, answer); \ - printf (" f size %d exp %ld\n", SIZ(f), EXP(f)); \ - printf (" f dec "); mpf_out_str (stdout, 10, 0, f); printf ("\n"); \ - printf (" f hex "); mpf_out_str (stdout, 16, 0, f); printf ("\n"); \ - error = 1; \ - } - -#define EXPECT(fun,answer) EXPECT_S(fun,#fun,answer) - -int -main (void) -{ - mpf_t f, f0p5; - int got; - const char *expr; - int error = 0; - - tests_start (); - mpf_init2 (f, 200L); - mpf_init2 (f0p5, 200L); - - /* 0.5 */ - mpf_set_ui (f0p5, 1L); - mpf_div_2exp (f0p5, f0p5, 1L); - - mpf_set_ui (f, 0L); - expr = "0"; - EXPECT (mpf_fits_ulong_p, 1); - EXPECT (mpf_fits_uint_p, 1); - EXPECT (mpf_fits_ushort_p, 1); - EXPECT (mpf_fits_slong_p, 1); - EXPECT (mpf_fits_sint_p, 1); - EXPECT (mpf_fits_sshort_p, 1); - - mpf_set_ui (f, 1L); - expr = "1"; - EXPECT (mpf_fits_ulong_p, 1); - EXPECT (mpf_fits_uint_p, 1); - EXPECT (mpf_fits_ushort_p, 1); - EXPECT (mpf_fits_slong_p, 1); - EXPECT (mpf_fits_sint_p, 1); - EXPECT (mpf_fits_sshort_p, 1); - - mpf_set_si (f, -1L); - expr = "-1"; - EXPECT (mpf_fits_ulong_p, 0); - EXPECT (mpf_fits_uint_p, 0); - EXPECT (mpf_fits_ushort_p, 0); - EXPECT (mpf_fits_slong_p, 1); - EXPECT (mpf_fits_sint_p, 1); - EXPECT (mpf_fits_sshort_p, 1); - - - mpf_set_ui (f, (unsigned long) USHRT_MAX); - expr = "USHRT_MAX"; - EXPECT (mpf_fits_ulong_p, 1); - EXPECT (mpf_fits_uint_p, 1); - EXPECT (mpf_fits_ushort_p, 1); - - mpf_set_ui (f, (unsigned long) USHRT_MAX); - mpf_add (f, f, f0p5); - expr = "USHRT_MAX + 0.5"; - EXPECT (mpf_fits_ulong_p, 1); - EXPECT (mpf_fits_uint_p, 1); - EXPECT (mpf_fits_ushort_p, 1); - - mpf_set_ui (f, (unsigned long) USHRT_MAX); - mpf_add_ui (f, f, 1L); - expr = "USHRT_MAX + 1"; - EXPECT (mpf_fits_ushort_p, 0); - - - mpf_set_ui (f, (unsigned long) UINT_MAX); - expr = "UINT_MAX"; - EXPECT (mpf_fits_ulong_p, 1); - EXPECT (mpf_fits_uint_p, 1); - - mpf_set_ui (f, (unsigned long) UINT_MAX); - mpf_add (f, f, f0p5); - expr = "UINT_MAX + 0.5"; - EXPECT (mpf_fits_ulong_p, 1); - EXPECT (mpf_fits_uint_p, 1); - - mpf_set_ui (f, (unsigned long) UINT_MAX); - mpf_add_ui (f, f, 1L); - expr = "UINT_MAX + 1"; - EXPECT (mpf_fits_uint_p, 0); - - - mpf_set_ui (f, ULONG_MAX); - expr = "ULONG_MAX"; - EXPECT (mpf_fits_ulong_p, 1); - - mpf_set_ui (f, ULONG_MAX); - mpf_add (f, f, f0p5); - expr = "ULONG_MAX + 0.5"; - EXPECT (mpf_fits_ulong_p, 1); - - mpf_set_ui (f, ULONG_MAX); - mpf_add_ui (f, f, 1L); - expr = "ULONG_MAX + 1"; - EXPECT (mpf_fits_ulong_p, 0); - - - mpf_set_si (f, (long) SHRT_MAX); - expr = "SHRT_MAX"; - EXPECT (mpf_fits_slong_p, 1); - EXPECT (mpf_fits_sint_p, 1); - EXPECT (mpf_fits_sshort_p, 1); - - mpf_set_si (f, (long) SHRT_MAX); - expr = "SHRT_MAX + 0.5"; - mpf_add (f, f, f0p5); - EXPECT (mpf_fits_slong_p, 1); - EXPECT (mpf_fits_sint_p, 1); - EXPECT (mpf_fits_sshort_p, 1); - - mpf_set_si (f, (long) SHRT_MAX); - mpf_add_ui (f, f, 1L); - expr = "SHRT_MAX + 1"; - EXPECT (mpf_fits_sshort_p, 0); - - - mpf_set_si (f, (long) INT_MAX); - expr = "INT_MAX"; - EXPECT (mpf_fits_slong_p, 1); - EXPECT (mpf_fits_sint_p, 1); - - mpf_set_si (f, (long) INT_MAX); - mpf_add (f, f, f0p5); - expr = "INT_MAX + 0.5"; - EXPECT (mpf_fits_slong_p, 1); - EXPECT (mpf_fits_sint_p, 1); - - mpf_set_si (f, (long) INT_MAX); - mpf_add_ui (f, f, 1L); - expr = "INT_MAX + 1"; - EXPECT (mpf_fits_sint_p, 0); - - - mpf_set_si (f, LONG_MAX); - expr = "LONG_MAX"; - EXPECT (mpf_fits_slong_p, 1); - - mpf_set_si (f, LONG_MAX); - mpf_add (f, f, f0p5); - expr = "LONG_MAX + 0.5"; - EXPECT (mpf_fits_slong_p, 1); - - mpf_set_si (f, LONG_MAX); - mpf_add_ui (f, f, 1L); - expr = "LONG_MAX + 1"; - EXPECT (mpf_fits_slong_p, 0); - - - mpf_set_si (f, (long) SHRT_MIN); - expr = "SHRT_MIN"; - EXPECT (mpf_fits_slong_p, 1); - EXPECT (mpf_fits_sint_p, 1); - EXPECT (mpf_fits_sshort_p, 1); - - mpf_set_si (f, (long) SHRT_MIN); - mpf_sub (f, f, f0p5); - expr = "SHRT_MIN - 0.5"; - EXPECT (mpf_fits_slong_p, 1); - EXPECT (mpf_fits_sint_p, 1); - EXPECT (mpf_fits_sshort_p, 1); - - mpf_set_si (f, (long) SHRT_MIN); - mpf_sub_ui (f, f, 1L); - expr = "SHRT_MIN - 1"; - EXPECT (mpf_fits_sshort_p, 0); - - - mpf_set_si (f, (long) INT_MIN); - expr = "INT_MIN"; - EXPECT (mpf_fits_slong_p, 1); - EXPECT (mpf_fits_sint_p, 1); - - mpf_set_si (f, (long) INT_MIN); - mpf_sub (f, f, f0p5); - expr = "INT_MIN - 0.5"; - EXPECT (mpf_fits_slong_p, 1); - EXPECT (mpf_fits_sint_p, 1); - - mpf_set_si (f, (long) INT_MIN); - mpf_sub_ui (f, f, 1L); - expr = "INT_MIN - 1"; - EXPECT (mpf_fits_sint_p, 0); - - - mpf_set_si (f, LONG_MIN); - expr = "LONG_MIN"; - EXPECT (mpf_fits_slong_p, 1); - - mpf_set_si (f, LONG_MIN); - mpf_sub (f, f, f0p5); - expr = "LONG_MIN - 0.5"; - EXPECT (mpf_fits_slong_p, 1); - - mpf_set_si (f, LONG_MIN); - mpf_sub_ui (f, f, 1L); - expr = "LONG_MIN - 1"; - EXPECT (mpf_fits_slong_p, 0); - - - mpf_set_str_or_abort (f, "0.5", 10); - expr = "0.5"; - EXPECT (mpf_fits_ulong_p, 1); - EXPECT (mpf_fits_uint_p, 1); - EXPECT (mpf_fits_ushort_p, 1); - EXPECT (mpf_fits_slong_p, 1); - EXPECT (mpf_fits_sint_p, 1); - EXPECT (mpf_fits_sshort_p, 1); - - mpf_set_str_or_abort (f, "-0.5", 10); - expr = "-0.5"; - EXPECT (mpf_fits_ulong_p, 1); - EXPECT (mpf_fits_uint_p, 1); - EXPECT (mpf_fits_ushort_p, 1); - EXPECT (mpf_fits_slong_p, 1); - EXPECT (mpf_fits_sint_p, 1); - EXPECT (mpf_fits_sshort_p, 1); - - mpf_set_str_or_abort (f, "-1.5", 10); - expr = "-1.5"; - EXPECT (mpf_fits_ulong_p, 0); - EXPECT (mpf_fits_uint_p, 0); - EXPECT (mpf_fits_ushort_p, 0); - EXPECT (mpf_fits_slong_p, 1); - EXPECT (mpf_fits_sint_p, 1); - EXPECT (mpf_fits_sshort_p, 1); - - - mpf_set_str_or_abort (f, "1.000000000000000000000000000000000001", 16); - expr = "1.000000000000000000000000000000000001 base 16"; - EXPECT (mpf_fits_ulong_p, 1); - EXPECT (mpf_fits_uint_p, 1); - EXPECT (mpf_fits_ushort_p, 1); - EXPECT (mpf_fits_slong_p, 1); - EXPECT (mpf_fits_sint_p, 1); - EXPECT (mpf_fits_sshort_p, 1); - - mpf_set_str_or_abort (f, "1@1000", 16); - expr = "1@1000 base 16"; - EXPECT (mpf_fits_ulong_p, 0); - EXPECT (mpf_fits_uint_p, 0); - EXPECT (mpf_fits_ushort_p, 0); - EXPECT (mpf_fits_slong_p, 0); - EXPECT (mpf_fits_sint_p, 0); - EXPECT (mpf_fits_sshort_p, 0); - - - mpf_set_ui (f, 1L); - mpf_mul_2exp (f, f, BITS_PER_ULONG + 1); - mpf_sub_ui (f, f, 1L); - expr = "2^(BITS_PER_ULONG+1) - 1"; - EXPECT (mpf_fits_ulong_p, 0); - EXPECT (mpf_fits_uint_p, 0); - EXPECT (mpf_fits_ushort_p, 0); - EXPECT (mpf_fits_slong_p, 0); - EXPECT (mpf_fits_sint_p, 0); - EXPECT (mpf_fits_sshort_p, 0); - - mpf_set_ui (f, 1L); - mpf_mul_2exp (f, f, BITS_PER_ULONG + 1); - mpf_ui_sub (f, 1L, f); - expr = "- (2^(BITS_PER_ULONG+1) - 1)"; - EXPECT (mpf_fits_ulong_p, 0); - EXPECT (mpf_fits_uint_p, 0); - EXPECT (mpf_fits_ushort_p, 0); - EXPECT (mpf_fits_slong_p, 0); - EXPECT (mpf_fits_sint_p, 0); - EXPECT (mpf_fits_sshort_p, 0); - - mpf_set_ui (f, 1L); - mpf_mul_2exp (f, f, BITS_PER_ULONG + 5); - mpf_sub_ui (f, f, 1L); - expr = "2^(BITS_PER_ULONG+5) - 1"; - EXPECT (mpf_fits_ulong_p, 0); - EXPECT (mpf_fits_uint_p, 0); - EXPECT (mpf_fits_ushort_p, 0); - EXPECT (mpf_fits_slong_p, 0); - EXPECT (mpf_fits_sint_p, 0); - EXPECT (mpf_fits_sshort_p, 0); - - - if (error) - abort (); - - mpf_clear (f); - mpf_clear (f0p5); - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-get_d.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-get_d.c deleted file mode 100644 index 66b9623f905..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-get_d.c +++ /dev/null @@ -1,106 +0,0 @@ -/* Test mpf_get_d and mpf_set_d. - -Copyright 1996, 1999-2001, 2009 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "tests.h" - -#if defined (__vax) || defined (__vax__) -#define LOW_BOUND 1e-38 -#define HIGH_BOUND 8e37 -#endif - -#if defined (_CRAY) && ! defined (_CRAYIEEE) -/* The range varies mysteriously between Cray version. On an SV1, - the range seem to be 1e-600..1e603, but a cfp (non-ieee) T90 - has a much smaller range of 1e-240..1e240. */ -#define LOW_BOUND 1e-240 -#define HIGH_BOUND 1e240 -#endif - -#if ! defined (LOW_BOUND) -#define LOW_BOUND 1e-300 -#define HIGH_BOUND 1e300 -#endif - -void -test_denorms (int prc) -{ -#ifdef _GMP_IEEE_FLOATS - double d1, d2; - mpf_t f; - int i; - - mpf_set_default_prec (prc); - - mpf_init (f); - - d1 = 1.9; - for (i = 0; i < 820; i++) - { - mpf_set_d (f, d1); - d2 = mpf_get_d (f); - if (d1 != d2) - abort (); - d1 *= 0.4; - } - - mpf_clear (f); -#endif -} - -int -main (int argc, char **argv) -{ - double d, e, r; - mpf_t u, v; - - tests_start (); - mpf_init (u); - mpf_init (v); - - mpf_set_d (u, LOW_BOUND); - for (d = 2.0 * LOW_BOUND; d < HIGH_BOUND; d *= 1.01) - { - mpf_set_d (v, d); - if (mpf_cmp (u, v) >= 0) - abort (); - e = mpf_get_d (v); - r = e/d; - if (r < 0.99999999999999 || r > 1.00000000000001) - { - fprintf (stderr, "should be one ulp from 1: %.16f\n", r); - abort (); - } - mpf_set (u, v); - } - - mpf_clear (u); - mpf_clear (v); - - test_denorms (10); - test_denorms (32); - test_denorms (64); - test_denorms (100); - test_denorms (200); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-get_d_2exp.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-get_d_2exp.c deleted file mode 100644 index 891e51d5a5c..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-get_d_2exp.c +++ /dev/null @@ -1,121 +0,0 @@ -/* Test mpf_get_d_2exp. - -Copyright 2002, 2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -static void -check_onebit (void) -{ - static const long data[] = { - -513, -512, -511, -65, -64, -63, -32, -1, - 0, 1, 32, 53, 54, 64, 128, 256, 511, 512, 513 - }; - mpf_t f; - double got, want; - long got_exp, want_exp; - int i; - - mpf_init2 (f, 1024L); - - for (i = 0; i < numberof (data); i++) - { - mpf_set_ui (f, 1L); - if (data[i] >= 0) - mpf_mul_2exp (f, f, data[i]); - else - mpf_div_2exp (f, f, -data[i]); - want = 0.5; - want_exp = data[i] + 1; - - got = mpf_get_d_2exp (&got_exp, f); - if (got != want || got_exp != want_exp) - { - printf ("mpf_get_d_2exp wrong on 2**%ld\n", data[i]); - mpf_trace (" f ", f); - d_trace (" want ", want); - d_trace (" got ", got); - printf (" want exp %ld\n", want_exp); - printf (" got exp %ld\n", got_exp); - abort(); - } - } - mpf_clear (f); -} - -/* Check that hardware rounding doesn't make mpf_get_d_2exp return a value - outside its defined range. */ -static void -check_round (void) -{ - static const unsigned long data[] = { 1, 32, 53, 54, 64, 128, 256, 512 }; - mpf_t f; - double got; - long got_exp; - int i, rnd_mode, old_rnd_mode; - - mpf_init2 (f, 1024L); - old_rnd_mode = tests_hardware_getround (); - - for (rnd_mode = 0; rnd_mode < 4; rnd_mode++) - { - tests_hardware_setround (rnd_mode); - - for (i = 0; i < numberof (data); i++) - { - mpf_set_ui (f, 1L); - mpf_mul_2exp (f, f, data[i]); - mpf_sub_ui (f, f, 1L); - - got = mpf_get_d_2exp (&got_exp, f); - if (got < 0.5 || got >= 1.0) - { - printf ("mpf_get_d_2exp bad on 2**%lu-1\n", data[i]); - printf ("result out of range, expect 0.5 <= got < 1.0\n"); - printf (" rnd_mode = %d\n", rnd_mode); - printf (" data[i] = %lu\n", data[i]); - mpf_trace (" f ", f); - d_trace (" got ", got); - printf (" got exp %ld\n", got_exp); - abort(); - } - } - } - - mpf_clear (f); - tests_hardware_setround (old_rnd_mode); -} - - -int -main (void) -{ - tests_start (); - mp_trace_base = 16; - - check_onebit (); - check_round (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-get_si.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-get_si.c deleted file mode 100644 index 71ec15fd75d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-get_si.c +++ /dev/null @@ -1,223 +0,0 @@ -/* Exercise mpz_get_si. - -Copyright 2000, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_data (void) -{ - static const struct { - int base; - const char *f; - long want; - } data[] = { - { 10, "0", 0L }, - { 10, "1", 1L }, - { 10, "-1", -1L }, - { 10, "2", 2L }, - { 10, "-2", -2L }, - { 10, "12345", 12345L }, - { 10, "-12345", -12345L }, - - /* fraction bits ignored */ - { 10, "0.5", 0L }, - { 10, "-0.5", 0L }, - { 10, "1.1", 1L }, - { 10, "-1.1", -1L }, - { 10, "1.9", 1L }, - { 10, "-1.9", -1L }, - { 16, "1.000000000000000000000000000000000000000000000000001", 1L }, - { 16, "-1.000000000000000000000000000000000000000000000000001", -1L }, - - /* low bits extracted (this is undocumented) */ - { 16, "1000000000000000000000000000000000000000000000000001", 1L }, - { 16, "-1000000000000000000000000000000000000000000000000001", -1L }, - }; - - int i; - mpf_t f; - long got; - - mpf_init2 (f, 2000L); - for (i = 0; i < numberof (data); i++) - { - mpf_set_str_or_abort (f, data[i].f, data[i].base); - - got = mpf_get_si (f); - if (got != data[i].want) - { - printf ("mpf_get_si wrong at data[%d]\n", i); - printf (" f \"%s\"\n", data[i].f); - printf (" dec "); mpf_out_str (stdout, 10, 0, f); printf ("\n"); - printf (" hex "); mpf_out_str (stdout, 16, 0, f); printf ("\n"); - printf (" size %ld\n", (long) SIZ(f)); - printf (" exp %ld\n", (long) EXP(f)); - printf (" got %ld (0x%lX)\n", got, got); - printf (" want %ld (0x%lX)\n", data[i].want, data[i].want); - abort(); - } - } - mpf_clear (f); -} - - -void -check_max (void) -{ - mpf_t f; - long want; - long got; - - mpf_init2 (f, 200L); - -#define CHECK_MAX(name) \ - if (got != want) \ - { \ - printf ("mpf_get_si wrong on %s\n", name); \ - printf (" f "); \ - mpf_out_str (stdout, 10, 0, f); printf (", hex "); \ - mpf_out_str (stdout, 16, 0, f); printf ("\n"); \ - printf (" got %ld, hex %lX\n", got, got); \ - printf (" want %ld, hex %lX\n", want, want); \ - abort(); \ - } - - want = LONG_MAX; - mpf_set_si (f, want); - got = mpf_get_si (f); - CHECK_MAX ("LONG_MAX"); - - want = LONG_MIN; - mpf_set_si (f, want); - got = mpf_get_si (f); - CHECK_MAX ("LONG_MIN"); - - mpf_clear (f); -} - - -void -check_limbdata (void) -{ -#define M GMP_NUMB_MAX - - static const struct { - mp_exp_t exp; - mp_size_t size; - mp_limb_t d[10]; - unsigned long want; - - } data[] = { - - /* in the comments here, a "_" indicates a digit (ie. limb) position not - included in the d data, and therefore zero */ - - { 0, 0, { 0 }, 0L }, /* 0 */ - - { 1, 1, { 1 }, 1L }, /* 1 */ - { 1, -1, { 1 }, -1UL }, /* -1 */ - - { 0, 1, { 1 }, 0L }, /* .1 */ - { 0, -1, { 1 }, 0L }, /* -.1 */ - - { -1, 1, { 1 }, 0L }, /* ._1 */ - { -1, -1, { 1 }, 0L }, /* -._1 */ - - { -999, 1, { 1 }, 0L }, /* .___1 small */ - { MP_EXP_T_MIN, 1, { 1 }, 0L }, /* .____1 very small */ - - { 999, 1, { 1 }, 0L }, /* 1____. big */ - { MP_EXP_T_MAX, 1, { 1 }, 0L }, /* 1_____. very big */ - - { 1, 2, { 999, 2 }, 2L }, /* 2.9 */ - { 5, 8, { 7, 8, 9, 3, 0, 0, 0, 1 }, 3L }, /* 10003.987 */ - - { 2, 2, { M, M }, LONG_MAX }, /* FF. */ - { 2, 2, { M, M, M }, LONG_MAX }, /* FF.F */ - { 3, 3, { M, M, M }, LONG_MAX }, /* FFF. */ - -#if GMP_NUMB_BITS >= BITS_PER_ULONG - /* normal case, numb bigger than long */ - { 2, 1, { 1 }, 0L }, /* 1_. */ - { 2, 2, { 0, 1 }, 0L }, /* 10. */ - { 2, 2, { 999, 1 }, 999L }, /* 19. */ - { 3, 2, { 999, 1 }, 0L }, /* 19_. */ - -#else - /* nails case, numb smaller than long */ - { 2, 1, { 1 }, 1L << GMP_NUMB_BITS }, /* 1_. */ - { 3, 1, { 1 }, 0L }, /* 1__. */ - - { 2, 2, { 99, 1 }, 99L + (1L << GMP_NUMB_BITS) }, /* 19. */ - { 3, 2, { 1, 99 }, 1L << GMP_NUMB_BITS }, /* 91_. */ - { 3, 3, { 0, 1, 99 }, 1L << GMP_NUMB_BITS }, /* 910. */ - -#endif - }; - - mpf_t f; - unsigned long got; - int i; - mp_limb_t buf[20 + numberof(data[i].d)]; - - for (i = 0; i < numberof (data); i++) - { - refmpn_fill (buf, 10, CNST_LIMB(0xDEADBEEF)); - refmpn_copy (buf+10, data[i].d, ABS(data[i].size)); - refmpn_fill (buf+10+ABS(data[i].size), 10, CNST_LIMB(0xDEADBEEF)); - - PTR(f) = buf+10; - EXP(f) = data[i].exp; - SIZ(f) = data[i].size; - PREC(f) = numberof (data[i].d); - MPF_CHECK_FORMAT (f); - - got = mpf_get_si (f); - if (got != data[i].want) - { - printf ("mpf_get_si wrong at limb data[%d]\n", i); - mpf_trace (" f", f); - mpn_trace (" d", data[i].d, data[i].size); - printf (" size %ld\n", (long) data[i].size); - printf (" exp %ld\n", (long) data[i].exp); - printf (" got %lu (0x%lX)\n", got, got); - printf (" want %lu (0x%lX)\n", data[i].want, data[i].want); - abort(); - } - } -} - - -int -main (void) -{ - tests_start (); - - check_data (); - check_max (); - check_limbdata (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-get_ui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-get_ui.c deleted file mode 100644 index 2950cadaa51..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-get_ui.c +++ /dev/null @@ -1,128 +0,0 @@ -/* Exercise mpf_get_ui. - -Copyright 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_limbdata (void) -{ -#define M GMP_NUMB_MAX - - static const struct { - mp_exp_t exp; - mp_size_t size; - mp_limb_t d[10]; - unsigned long want; - - } data[] = { - - /* in the comments here, a "_" indicates a digit (ie. limb) position not - included in the d data, and therefore zero */ - - { 0, 0, { 0 }, 0L }, /* 0 */ - - { 1, 1, { 1 }, 1L }, /* 1 */ - { 1, -1, { 1 }, 1L }, /* -1 */ - - { 0, 1, { 1 }, 0L }, /* .1 */ - { 0, -1, { 1 }, 0L }, /* -.1 */ - - { -1, 1, { 1 }, 0L }, /* ._1 */ - { -1, -1, { 1 }, 0L }, /* -._1 */ - - { -999, 1, { 1 }, 0L }, /* .___1 small */ - { MP_EXP_T_MIN, 1, { 1 }, 0L }, /* .____1 very small */ - - { 999, 1, { 1 }, 0L }, /* 1____. big */ - { MP_EXP_T_MAX, 1, { 1 }, 0L }, /* 1_____. very big */ - - { 1, 2, { 999, 2 }, 2L }, /* 2.9 */ - { 5, 8, { 7, 8, 9, 3, 0, 0, 0, 1 }, 3L }, /* 10003.987 */ - - { 2, 2, { M, M }, ULONG_MAX }, /* FF. */ - { 2, 2, { M, M, M }, ULONG_MAX }, /* FF.F */ - { 3, 3, { M, M, M }, ULONG_MAX }, /* FFF. */ - -#if GMP_NUMB_BITS >= BITS_PER_ULONG - /* normal case, numb bigger than long */ - { 2, 1, { 1 }, 0L }, /* 1_. */ - { 2, 2, { 0, 1 }, 0L }, /* 10. */ - { 2, 2, { 999, 1 }, 999L }, /* 19. */ - { 3, 2, { 999, 1 }, 0L }, /* 19_. */ - -#else - /* nails case, numb smaller than long */ - { 2, 1, { 1 }, 1L << GMP_NUMB_BITS }, /* 1_. */ - { 3, 1, { 1 }, 0L }, /* 1__. */ - - { 2, 2, { 99, 1 }, 99L + (1L << GMP_NUMB_BITS) }, /* 19. */ - { 3, 2, { 1, 99 }, 1L << GMP_NUMB_BITS }, /* 91_. */ - { 3, 3, { 0, 1, 99 }, 1L << GMP_NUMB_BITS }, /* 910. */ - -#endif - }; - - mpf_t f; - unsigned long got; - int i; - mp_limb_t buf[20 + numberof(data[i].d)]; - - for (i = 0; i < numberof (data); i++) - { - refmpn_fill (buf, 10, CNST_LIMB(0xDEADBEEF)); - refmpn_copy (buf+10, data[i].d, ABS(data[i].size)); - refmpn_fill (buf+10+ABS(data[i].size), 10, CNST_LIMB(0xDEADBEEF)); - - PTR(f) = buf+10; - EXP(f) = data[i].exp; - SIZ(f) = data[i].size; - PREC(f) = numberof (data[i].d); - MPF_CHECK_FORMAT (f); - - got = mpf_get_ui (f); - if (got != data[i].want) - { - printf ("mpf_get_ui wrong at limb data[%d]\n", i); - mpf_trace (" f", f); - mpn_trace (" d", data[i].d, data[i].size); - printf (" size %ld\n", (long) data[i].size); - printf (" exp %ld\n", (long) data[i].exp); - printf (" got %lu (0x%lX)\n", got, got); - printf (" want %lu (0x%lX)\n", data[i].want, data[i].want); - abort(); - } - } -} - -int -main (void) -{ - tests_start (); - mp_trace_base = 16; - - check_limbdata (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-gsprec.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-gsprec.c deleted file mode 100644 index 5a7615fc261..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-gsprec.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Test mpf_get_prec and mpf_set_prec. - -Copyright 2000, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void -check_consistency (void) -{ - mpf_t x; - unsigned long i, a, b; - - mpf_init (x); - - for (i = 1; i < 2000; i++) - { - mpf_set_prec (x, i); - a = mpf_get_prec (x); - mpf_set_prec (x, a); - b = mpf_get_prec (x); - if (a != b) - { - printf ("mpf_get_prec / mpf_set_prec inconsistent\n"); - printf (" set %lu gives %lu, but then set %lu gives %lu\n", - i, a, - a, b); - abort (); - } - } - - mpf_clear (x); -} - -int -main (void) -{ - tests_start (); - - check_consistency (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-inp_str.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-inp_str.c deleted file mode 100644 index 38b54e6a0da..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-inp_str.c +++ /dev/null @@ -1,192 +0,0 @@ -/* Test mpf_inp_str. - -Copyright 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#if HAVE_UNISTD_H -#include <unistd.h> /* for unlink */ -#endif - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -#define FILENAME "t-inp_str.tmp" - - -void -check_data (void) -{ - static const struct { - const char *inp; - int base; - const char *want; - int want_nread; - - } data[] = { - - { "0", 10, "0", 1 }, - - { "abc", 10, "0", 0 }, - { "ghi", 16, "0", 0 }, - - { "125", 10, "125", 3 }, - { "125e1", 10, "1250", 5 }, - { "12e+2", 10, "1200", 5 }, - { "125e-1", 10, "12.5", 6 }, - - { "ff", 16, "255", 2 }, - { "-ff", 16, "-255", 3 }, - { "FF", 16, "255", 2 }, - { "-FF", 16, "-255", 3 }, - - { "100", 16, "256", 3 }, - { "100@1", 16, "4096", 5 }, - { "100@10", 16, "4722366482869645213696", 6 }, - { "100@10", -16, "281474976710656", 6 }, - { "100@-1", 16, "16", 6 }, - { "10000000000000000@-10", 16, "1", 21 }, - { "10000000000@-10", -16, "1", 15 }, - - { "z", 36, "35", 1 }, - { "Z", 36, "35", 1 }, - { "z@1", 36, "1260", 3 }, - { "Z@1", 36, "1260", 3 }, - - { "0", 0, "0", 1 }, - }; - - mpf_t got, want; - long ftell_nread; - int i, pre, post, j, got_nread, want_nread; - FILE *fp; - - mpf_init (got); - mpf_init (want); - - for (i = 0; i < numberof (data); i++) - { - for (pre = 0; pre <= 3; pre++) - { - for (post = 0; post <= 2; post++) - { - mpf_set_str_or_abort (want, data[i].want, 10); - MPF_CHECK_FORMAT (want); - - /* create the file new each time to ensure its length is what - we want */ - fp = fopen (FILENAME, "w+"); - ASSERT_ALWAYS (fp != NULL); - for (j = 0; j < pre; j++) - putc (' ', fp); - fputs (data[i].inp, fp); - for (j = 0; j < post; j++) - putc (' ', fp); - fflush (fp); - ASSERT_ALWAYS (! ferror(fp)); - - rewind (fp); - got_nread = mpf_inp_str (got, fp, data[i].base); - - if (got_nread != 0) - { - ftell_nread = ftell (fp); - if (got_nread != ftell_nread) - { - printf ("mpf_inp_str nread wrong\n"); - printf (" inp \"%s\"\n", data[i].inp); - printf (" base %d\n", data[i].base); - printf (" pre %d\n", pre); - printf (" post %d\n", post); - printf (" got_nread %d\n", got_nread); - printf (" ftell_nread %ld\n", ftell_nread); - abort (); - } - } - - /* if data[i].inp is a whole string to read and there's no post - whitespace then expect to have EOF */ - if (post == 0 && data[i].want_nread == strlen(data[i].inp)) - { - int c = getc(fp); - if (c != EOF) - { - printf ("mpf_inp_str didn't read to EOF\n"); - printf (" inp \"%s\"\n", data[i].inp); - printf (" base %d\n", data[i].base); - printf (" pre %d\n", pre); - printf (" post %d\n", post); - printf (" c '%c' %#x\n", c, c); - abort (); - } - } - - /* only expect "pre" included in the count when non-zero */ - want_nread = data[i].want_nread; - if (want_nread != 0) - want_nread += pre; - - if (got_nread != want_nread) - { - printf ("mpf_inp_str nread wrong\n"); - printf (" inp \"%s\"\n", data[i].inp); - printf (" base %d\n", data[i].base); - printf (" pre %d\n", pre); - printf (" post %d\n", post); - printf (" got_nread %d\n", got_nread); - printf (" want_nread %d\n", want_nread); - abort (); - } - - MPF_CHECK_FORMAT (got); - - if (mpf_cmp (got, want) != 0) - { - printf ("mpf_inp_str wrong result\n"); - printf (" inp \"%s\"\n", data[i].inp); - printf (" base %d\n", data[i].base); - mpf_trace (" got ", got); - mpf_trace (" want", want); - abort (); - } - - ASSERT_ALWAYS (fclose (fp) == 0); - } - } - } - - mpf_clear (got); - mpf_clear (want); -} - -int -main (void) -{ - tests_start (); - - check_data (); - - unlink (FILENAME); - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-int_p.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-int_p.c deleted file mode 100644 index 08b6aa3c7ba..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-int_p.c +++ /dev/null @@ -1,91 +0,0 @@ -/* Test mpf_integer_p. - -Copyright 2001, 2014 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -one (mpf_srcptr f, int want) -{ - int got; - got = mpf_integer_p (f); - if (got != want) - { - printf ("mpf_integer_p got %d want %d\n", got, want); - mpf_trace (" f", f); - abort (); - } -} - -void -all (mpf_ptr f, int want) -{ - one (f, want); - mpf_neg (f, f); - one (f, want); -} - -int -main (void) -{ - mpf_t f; - - tests_start (); - mpf_init2 (f, 200L); - - mpf_set_ui (f, 0L); - one (f, 1); - - mpf_set_ui (f, 1L); - all (f, 1); - - mpf_set_ui (f, 1L); - mpf_div_2exp (f, f, 1L); - all (f, 0); - - mpf_set_ui (f, 1L); - mpf_div_2exp (f, f, 5000L); - all (f, 0); - - mpf_set_ui (f, 1L); - mpf_mul_2exp (f, f, 5000L); - all (f, 1); - - mpf_set_str (f, "0.5", 10); - all (f, 0); - - mpf_set_str (f, "2.5", 10); - all (f, 0); - - mpf_set_ui (f, 1L); - mpf_div_ui (f, f, 3L); - all (f, 0); - - mpf_set_ui (f, 7L); - mpf_div_ui (f, f, 3L); - all (f, 0); - - mpf_clear (f); - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-mul_ui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-mul_ui.c deleted file mode 100644 index 6a25c794777..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-mul_ui.c +++ /dev/null @@ -1,165 +0,0 @@ -/* Exercise mpf_mul_ui. - -Copyright 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_one (const char *desc, mpf_ptr got, mpf_srcptr u, unsigned long v) -{ - mp_size_t usize, usign; - mp_ptr wp; - mpf_t want; - - MPF_CHECK_FORMAT (got); - - /* this code not nailified yet */ - ASSERT_ALWAYS (BITS_PER_ULONG <= GMP_NUMB_BITS); - usign = SIZ (u); - usize = ABS (usign); - wp = refmpn_malloc_limbs (usize + 1); - wp[usize] = mpn_mul_1 (wp, PTR(u), usize, (mp_limb_t) v); - - PTR(want) = wp; - SIZ(want) = (usign >= 0 ? usize+1 : -(usize+1)); - EXP(want) = EXP(u) + 1; - refmpf_normalize (want); - - if (! refmpf_validate ("mpf_mul_ui", got, want)) - { - mp_trace_base = -16; - printf (" %s\n", desc); - mpf_trace (" u", u); - printf (" v %ld 0x%lX\n", v, v); - abort (); - } - - free (wp); -} - -void -check_rand (void) -{ - unsigned long min_prec = __GMPF_BITS_TO_PREC (1); - gmp_randstate_ptr rands = RANDS; - mpf_t got, u; - unsigned long prec, v; - int i; - - /* The nails code in mpf_mul_ui currently isn't exact, so suppress these - tests for now. */ - if (BITS_PER_ULONG > GMP_NUMB_BITS) - return; - - mpf_init (got); - mpf_init (u); - - for (i = 0; i < 200; i++) - { - /* got precision */ - prec = min_prec + gmp_urandomm_ui (rands, 15L); - refmpf_set_prec_limbs (got, prec); - - /* u precision */ - prec = min_prec + gmp_urandomm_ui (rands, 15L); - refmpf_set_prec_limbs (u, prec); - - /* u, possibly negative */ - mpf_random2 (u, PREC(u), (mp_exp_t) 20); - if (gmp_urandomb_ui (rands, 1L)) - mpf_neg (u, u); - - /* v, 0 to BITS_PER_ULONG bits (inclusive) */ - prec = gmp_urandomm_ui (rands, BITS_PER_ULONG+1); - v = gmp_urandomb_ui (rands, prec); - - if ((i % 2) == 0) - { - /* separate */ - mpf_mul_ui (got, u, v); - check_one ("separate", got, u, v); - } - else - { - /* overlap */ - prec = refmpf_set_overlap (got, u); - mpf_mul_ui (got, got, v); - check_one ("overlap src==dst", got, u, v); - - mpf_set_prec_raw (got, prec); - } - } - - mpf_clear (got); - mpf_clear (u); -} - -void -check_various (void) -{ - mpf_t u, got, want; - const char *s; - - mpf_init2 (u, 2*8*sizeof(long)); - mpf_init2 (got, 2*8*sizeof(long)); - mpf_init2 (want, 2*8*sizeof(long)); - - s = "0 * ULONG_MAX"; - mpf_set_ui (u, 0L); - mpf_mul_ui (got, u, ULONG_MAX); - MPF_CHECK_FORMAT (got); - mpf_set_ui (want, 0L); - if (mpf_cmp (got, want) != 0) - { - error: - printf ("Wrong result from %s\n", s); - mpf_trace ("u ", u); - mpf_trace ("got ", got); - mpf_trace ("want", want); - abort (); - } - - s = "1 * ULONG_MAX"; - mpf_set_ui (u, 1L); - mpf_mul_ui (got, u, ULONG_MAX); - MPF_CHECK_FORMAT (got); - mpf_set_ui (want, ULONG_MAX); - if (mpf_cmp (got, want) != 0) - goto error; - - mpf_clear (u); - mpf_clear (got); - mpf_clear (want); -} - -int -main (void) -{ - tests_start (); - - check_various (); - check_rand (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-muldiv.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-muldiv.c deleted file mode 100644 index 2751bb9dad9..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-muldiv.c +++ /dev/null @@ -1,159 +0,0 @@ -/* Test mpf_mul, mpf_div, mpf_ui_div, and mpf_div_ui. - -Copyright 1996, 2000, 2001, 2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#ifndef SIZE -#define SIZE 16 -#endif - -int -main (int argc, char **argv) -{ - mp_size_t size; - mp_exp_t exp; - int reps = 10000; - int i; - mpf_t u, v, w, x; - mp_size_t bprec = SIZE * GMP_LIMB_BITS; - mpf_t rerr, limit_rerr; - unsigned long ulimb, vlimb; - int single_flag; - - tests_start (); - - if (argc > 1) - { - reps = strtol (argv[1], 0, 0); - if (argc > 2) - bprec = strtol (argv[2], 0, 0); - } - - mpf_set_default_prec (bprec); - - mpf_init (rerr); - mpf_init (limit_rerr); - - mpf_init (u); - mpf_init (v); - mpf_init (w); - mpf_init (x); - - for (i = 0; i < reps; i++) - { - mp_size_t res_prec; - - res_prec = urandom () % bprec + 1; - mpf_set_prec (w, res_prec); - mpf_set_prec (x, res_prec); - - mpf_set_ui (limit_rerr, 1); - mpf_div_2exp (limit_rerr, limit_rerr, res_prec - 1); - - single_flag = 0; - - if ((urandom () & 1) != 0) - { - size = urandom () % (2 * SIZE) - SIZE; - exp = urandom () % SIZE; - mpf_random2 (u, size, exp); - } - else - { - ulimb = urandom (); - mpf_set_ui (u, ulimb); - single_flag = 1; - } - - if ((urandom () & 1) != 0) - { - size = urandom () % (2 * SIZE) - SIZE; - exp = urandom () % SIZE; - mpf_random2 (v, size, exp); - } - else - { - vlimb = urandom (); - mpf_set_ui (v, vlimb); - single_flag = 2; - } - - if (mpf_sgn (v) == 0) - continue; - - mpf_div (w, u, v); - mpf_mul (x, w, v); - mpf_reldiff (rerr, u, x); - if (mpf_cmp (rerr, limit_rerr) > 0) - { - printf ("ERROR in mpf_mul or mpf_div after %d tests\n", i); - printf (" u = "); mpf_dump (u); - printf (" v = "); mpf_dump (v); - printf (" x = "); mpf_dump (x); - printf (" w = "); mpf_dump (w); - abort (); - } - - if (single_flag == 2) - { - mpf_div_ui (x, u, vlimb); - mpf_reldiff (rerr, w, x); - if (mpf_cmp (rerr, limit_rerr) > 0) - { - printf ("ERROR in mpf_div or mpf_div_ui after %d tests\n", i); - printf (" u = "); mpf_dump (u); - printf (" v = "); mpf_dump (v); - printf (" x = "); mpf_dump (x); - printf (" w = "); mpf_dump (w); - abort (); - } - } - - if (single_flag == 1) - { - mpf_ui_div (x, ulimb, v); - mpf_reldiff (rerr, w, x); - if (mpf_cmp (rerr, limit_rerr) > 0) - { - printf ("ERROR in mpf_div or mpf_ui_div after %d tests\n", i); - printf (" u = "); mpf_dump (u); - printf (" v = "); mpf_dump (v); - printf (" x = "); mpf_dump (x); - printf (" w = "); mpf_dump (w); - abort (); - } - } - } - - mpf_clear (rerr); - mpf_clear (limit_rerr); - - mpf_clear (u); - mpf_clear (v); - mpf_clear (w); - mpf_clear (x); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-pow_ui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-pow_ui.c deleted file mode 100644 index d70b17cf441..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-pow_ui.c +++ /dev/null @@ -1,70 +0,0 @@ -/* Test mpf_pow_ui - -Copyright 2015 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void -check_data (void) -{ - unsigned int b, e; - mpf_t b1, r, r2, limit; - - mpf_inits (b1, r, r2, NULL); - mpf_init_set_ui (limit, 1); - mpf_mul_2exp (limit, limit, MAX (GMP_NUMB_BITS, 53)); - - /* This test just test integers with results that fit in a single - limb or 53 bits. This avoids any rounding. */ - - for (b = 0; b <= 400; b++) - { - mpf_set_ui (b1, b); - mpf_set_ui (r2, 1); - for (e = 0; e <= GMP_LIMB_BITS; e++) - { - mpf_pow_ui (r, b1, e); - - if (mpf_cmp (r, r2)) - abort (); - - mpf_mul_ui (r2, r2, b); - - if (mpf_cmp (r2, limit) >= 0) - break; - } - } - - mpf_clears (b1, r, r2, limit, NULL); -} - -int -main (int argc, char **argv) -{ - tests_start (); - - check_data (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-set.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-set.c deleted file mode 100644 index 3846d501a1c..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-set.c +++ /dev/null @@ -1,113 +0,0 @@ -/* Test mpf_set, mpf_init_set. - -Copyright 2004, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void -check_reuse (void) -{ - /* Try mpf_set(f,f) when f is bigger than prec. In the past this had - resulted in an MPN_COPY with invalid operand overlap. */ - mpf_t f; - mp_size_t limbs = 20; - unsigned long bits = limbs * GMP_NUMB_BITS; - mpf_init2 (f, bits); - refmpf_fill (f, limbs, GMP_NUMB_MAX); - mpf_set_prec_raw (f, bits / 2); - mpf_set (f, f); - MPF_CHECK_FORMAT (f); - mpf_set_prec_raw (f, bits); - mpf_clear (f); -} - -void -check_random (long reps) -{ - unsigned long test; - gmp_randstate_ptr rands; - mpf_t a, b; - mpz_t z; - int precbits; - -#define PRECBITS 10 - - rands = RANDS; - - mpz_init (z); - mpf_init2 (a, 1 << PRECBITS); - - for (test = 0; test < reps; test++) - { - mpz_urandomb (z, rands, PRECBITS + 1); - precbits = mpz_get_ui (z) + 1; - mpz_urandomb (z, rands, precbits); - mpz_setbit (z, precbits - 1); /* make sure msb is set */ - mpf_set_z (a, z); - if (precbits & 1) - mpf_neg (a, a); - mpz_urandomb (z, rands, PRECBITS); - mpf_div_2exp (a, a, mpz_get_ui (z) + 1); - mpz_urandomb (z, rands, PRECBITS); - precbits -= mpz_get_ui (z); - if (precbits <= 0) - precbits = 1 - precbits; - mpf_set_default_prec (precbits); - - mpf_init_set (b, a); - MPF_CHECK_FORMAT (b); - if (!mpf_eq (a, b, precbits)) - { - printf ("mpf_init_set wrong.\n"); - abort(); - } - - mpf_set_ui (b, 0); - mpf_set (b, a); - MPF_CHECK_FORMAT (b); - if (!mpf_eq (a, b, precbits)) - { - printf ("mpf_set wrong.\n"); - abort(); - } - - mpf_clear (b); - } - - mpf_clear (a); - mpz_clear (z); -} - -int -main (int argc, char *argv[]) -{ - long reps = 10000; - - tests_start (); - TESTS_REPS (reps, argv, argc); - - check_reuse (); - check_random (reps); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-set_q.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-set_q.c deleted file mode 100644 index 2c48b277da1..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-set_q.c +++ /dev/null @@ -1,127 +0,0 @@ -/* Test mpf_set_q. - -Copyright 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_one (mpf_ptr got, mpq_srcptr q) -{ - mpf_t n, d; - - mpf_set_q (got, q); - - PTR(n) = PTR(&q->_mp_num); - SIZ(n) = SIZ(&q->_mp_num); - EXP(n) = ABSIZ(&q->_mp_num); - - PTR(d) = PTR(&q->_mp_den); - SIZ(d) = SIZ(&q->_mp_den); - EXP(d) = ABSIZ(&q->_mp_den); - - if (! refmpf_validate_division ("mpf_set_q", got, n, d)) - { - mp_trace_base = -16; - mpq_trace (" q", q); - abort (); - } -} - -void -check_rand (void) -{ - unsigned long min_prec = __GMPF_BITS_TO_PREC (1); - gmp_randstate_ptr rands = RANDS; - unsigned long prec; - mpf_t got; - mpq_t q; - int i; - - mpf_init (got); - mpq_init (q); - - for (i = 0; i < 400; i++) - { - /* result precision */ - prec = min_prec + gmp_urandomm_ui (rands, 20L); - refmpf_set_prec_limbs (got, prec); - - /* num */ - prec = gmp_urandomm_ui (rands, 20L * GMP_NUMB_BITS); - mpz_rrandomb (mpq_numref(q), rands, prec); - - /* possibly negative num */ - if (gmp_urandomb_ui (rands, 1L)) - mpz_neg (mpq_numref(q), mpq_numref(q)); - - /* den, non-zero */ - do { - prec = gmp_urandomm_ui (rands, 20L * GMP_NUMB_BITS); - mpz_rrandomb (mpq_denref(q), rands, prec); - } while (mpz_sgn (mpq_denref(q)) <= 0); - - check_one (got, q); - } - - mpf_clear (got); - mpq_clear (q); -} - -void -check_various (void) -{ - mpf_t got; - mpq_t q; - - mpf_init (got); - mpq_init (q); - - /* 1/1 == 1 */ - mpf_set_prec (got, 20L); - mpq_set_ui (q, 1L, 1L); - mpf_set_q (got, q); - MPF_CHECK_FORMAT (got); - ASSERT_ALWAYS (mpf_cmp_ui (got, 1L) == 0); - - /* 1/(2^n+1), a case where truncating the divisor would be wrong */ - mpf_set_prec (got, 500L); - mpq_set_ui (q, 1L, 1L); - mpz_mul_2exp (mpq_denref(q), mpq_denref(q), 800L); - mpz_add_ui (mpq_denref(q), mpq_denref(q), 1L); - check_one (got, q); - - mpf_clear (got); - mpq_clear (q); -} - -int -main (void) -{ - tests_start (); - - check_various (); - check_rand (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-set_si.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-set_si.c deleted file mode 100644 index 8975be7bedb..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-set_si.c +++ /dev/null @@ -1,91 +0,0 @@ -/* Test mpf_set_si and mpf_init_set_si. - -Copyright 2000, 2001, 2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void -check_data (void) -{ - static const struct { - long x; - mp_size_t want_size; - mp_limb_t want_data[2]; - } data[] = { - - { 0L, 0 }, - { 1L, 1, { 1 } }, - { -1L, -1, { 1 } }, - -#if GMP_NUMB_BITS >= BITS_PER_ULONG - { LONG_MAX, 1, { LONG_MAX, 0 } }, - { -LONG_MAX, -1, { LONG_MAX, 0 } }, - { LONG_HIGHBIT, -1, { ULONG_HIGHBIT, 0 } }, -#else - { LONG_MAX, 2, { LONG_MAX & GMP_NUMB_MASK, LONG_MAX >> GMP_NUMB_BITS } }, - { -LONG_MAX, -2, { LONG_MAX & GMP_NUMB_MASK, LONG_MAX >> GMP_NUMB_BITS }}, - { LONG_HIGHBIT, -2, { 0, ULONG_HIGHBIT >> GMP_NUMB_BITS } }, -#endif - }; - - mpf_t x; - int i; - - for (i = 0; i < numberof (data); i++) - { - mpf_init (x); - mpf_set_si (x, data[i].x); - MPF_CHECK_FORMAT (x); - if (x->_mp_size != data[i].want_size - || refmpn_cmp_allowzero (x->_mp_d, data[i].want_data, - ABS (data[i].want_size)) != 0 - || x->_mp_exp != ABS (data[i].want_size)) - { - printf ("mpf_set_si wrong on data[%d]\n", i); - abort(); - } - mpf_clear (x); - - mpf_init_set_si (x, data[i].x); - MPF_CHECK_FORMAT (x); - if (x->_mp_size != data[i].want_size - || refmpn_cmp_allowzero (x->_mp_d, data[i].want_data, - ABS (data[i].want_size)) != 0 - || x->_mp_exp != ABS (data[i].want_size)) - { - printf ("mpf_init_set_si wrong on data[%d]\n", i); - abort(); - } - mpf_clear (x); - } -} - -int -main (void) -{ - tests_start (); - - check_data (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-set_ui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-set_ui.c deleted file mode 100644 index 8c49e91e679..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-set_ui.c +++ /dev/null @@ -1,90 +0,0 @@ -/* Test mpf_set_ui and mpf_init_set_ui. - -Copyright 2000, 2001, 2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void -check_data (void) -{ - static const struct { - unsigned long x; - mp_size_t want_size; - mp_limb_t want_data[2]; - } data[] = { - - { 0L, 0 }, - { 1L, 1, { 1 } }, - -#if GMP_NUMB_BITS >= BITS_PER_ULONG - { ULONG_MAX, 1, { ULONG_MAX, 0 } }, - { ULONG_HIGHBIT, 1, { ULONG_HIGHBIT, 0 } }, -#else - { ULONG_MAX, 2, { ULONG_MAX & GMP_NUMB_MASK, - ULONG_MAX >> GMP_NUMB_BITS } }, - { ULONG_HIGHBIT, 2, { 0, - ULONG_HIGHBIT >> GMP_NUMB_BITS } }, -#endif - }; - - mpf_t x; - int i; - - for (i = 0; i < numberof (data); i++) - { - mpf_init (x); - mpf_set_ui (x, data[i].x); - MPF_CHECK_FORMAT (x); - if (x->_mp_size != data[i].want_size - || refmpn_cmp_allowzero (x->_mp_d, data[i].want_data, - ABS (data[i].want_size)) != 0 - || x->_mp_exp != ABS (data[i].want_size)) - { - printf ("mpf_set_ui wrong on data[%d]\n", i); - abort(); - } - mpf_clear (x); - - mpf_init_set_ui (x, data[i].x); - MPF_CHECK_FORMAT (x); - if (x->_mp_size != data[i].want_size - || refmpn_cmp_allowzero (x->_mp_d, data[i].want_data, - ABS (data[i].want_size)) != 0 - || x->_mp_exp != ABS (data[i].want_size)) - { - printf ("mpf_init_set_ui wrong on data[%d]\n", i); - abort(); - } - mpf_clear (x); - } -} - -int -main (void) -{ - tests_start (); - - check_data (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-sqrt.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-sqrt.c deleted file mode 100644 index 16a823d9a4d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-sqrt.c +++ /dev/null @@ -1,194 +0,0 @@ -/* Test mpf_sqrt, mpf_mul. - -Copyright 1996, 2001, 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#ifndef SIZE -#define SIZE 16 -#endif - -void -check_rand1 (int argc, char **argv) -{ - mp_size_t size; - mp_exp_t exp; - int reps = 20000; - int i; - mpf_t x, y, y2; - mp_size_t bprec = 100; - mpf_t rerr, max_rerr, limit_rerr; - - if (argc > 1) - { - reps = strtol (argv[1], 0, 0); - if (argc > 2) - bprec = strtol (argv[2], 0, 0); - } - - mpf_set_default_prec (bprec); - - mpf_init_set_ui (limit_rerr, 1); - mpf_div_2exp (limit_rerr, limit_rerr, bprec); -#if VERBOSE - mpf_dump (limit_rerr); -#endif - mpf_init (rerr); - mpf_init_set_ui (max_rerr, 0); - - mpf_init (x); - mpf_init (y); - mpf_init (y2); - for (i = 0; i < reps; i++) - { - size = urandom () % SIZE; - exp = urandom () % SIZE; - mpf_random2 (x, size, exp); - - mpf_sqrt (y, x); - MPF_CHECK_FORMAT (y); - mpf_mul (y2, y, y); - - mpf_reldiff (rerr, x, y2); - if (mpf_cmp (rerr, max_rerr) > 0) - { - mpf_set (max_rerr, rerr); -#if VERBOSE - mpf_dump (max_rerr); -#endif - if (mpf_cmp (rerr, limit_rerr) > 0) - { - printf ("ERROR after %d tests\n", i); - printf (" x = "); mpf_dump (x); - printf (" y = "); mpf_dump (y); - printf (" y2 = "); mpf_dump (y2); - printf (" rerr = "); mpf_dump (rerr); - printf (" limit_rerr = "); mpf_dump (limit_rerr); - printf ("in hex:\n"); - mp_trace_base = 16; - mpf_trace (" x ", x); - mpf_trace (" y ", y); - mpf_trace (" y2 ", y2); - mpf_trace (" rerr ", rerr); - mpf_trace (" limit_rerr", limit_rerr); - abort (); - } - } - } - - mpf_clear (limit_rerr); - mpf_clear (rerr); - mpf_clear (max_rerr); - - mpf_clear (x); - mpf_clear (y); - mpf_clear (y2); -} - -void -check_rand2 (void) -{ - unsigned long max_prec = 20; - unsigned long min_prec = __GMPF_BITS_TO_PREC (1); - gmp_randstate_ptr rands = RANDS; - unsigned long x_prec, r_prec; - mpf_t x, r, s; - int i; - - mpf_init (x); - mpf_init (r); - mpf_init (s); - refmpf_set_prec_limbs (s, 2*max_prec+10); - - for (i = 0; i < 500; i++) - { - /* input precision */ - x_prec = gmp_urandomm_ui (rands, max_prec-min_prec) + min_prec; - refmpf_set_prec_limbs (x, x_prec); - - /* result precision */ - r_prec = gmp_urandomm_ui (rands, max_prec-min_prec) + min_prec; - refmpf_set_prec_limbs (r, r_prec); - - mpf_random2 (x, x_prec, 1000); - - mpf_sqrt (r, x); - MPF_CHECK_FORMAT (r); - - /* Expect to prec limbs of result. - In the current implementation there's no stripping of low zero - limbs in mpf_sqrt, so size should be exactly prec. */ - if (SIZ(r) != r_prec) - { - printf ("mpf_sqrt wrong number of result limbs\n"); - mpf_trace (" x", x); - mpf_trace (" r", r); - printf (" r_prec=%lu\n", r_prec); - printf (" SIZ(r) %ld\n", (long) SIZ(r)); - printf (" PREC(r) %ld\n", (long) PREC(r)); - abort (); - } - - /* Must have r^2 <= x, since r has been truncated. */ - mpf_mul (s, r, r); - if (! (mpf_cmp (s, x) <= 0)) - { - printf ("mpf_sqrt result too big\n"); - mpf_trace (" x", x); - printf (" r_prec=%lu\n", r_prec); - mpf_trace (" r", r); - mpf_trace (" s", s); - abort (); - } - - /* Must have (r+ulp)^2 > x, or else r is too small. */ - refmpf_add_ulp (r); - mpf_mul (s, r, r); - if (! (mpf_cmp (s, x) > 0)) - { - printf ("mpf_sqrt result too small\n"); - mpf_trace (" x", x); - printf (" r_prec=%lu\n", r_prec); - mpf_trace (" r+ulp", r); - mpf_trace (" s", s); - abort (); - } - } - - mpf_clear (x); - mpf_clear (r); - mpf_clear (s); -} - -int -main (int argc, char **argv) -{ - tests_start (); - mp_trace_base = -16; - - check_rand1 (argc, argv); - check_rand2 (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-sqrt_ui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-sqrt_ui.c deleted file mode 100644 index 72b32e564cd..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-sqrt_ui.c +++ /dev/null @@ -1,126 +0,0 @@ -/* Test mpf_sqrt_ui. - -Copyright 2004, 2015 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_rand (void) -{ - unsigned long max_prec = 15; - unsigned long min_prec = __GMPF_BITS_TO_PREC (1); - gmp_randstate_ptr rands = RANDS; - unsigned long x, prec; - mpf_t r, s; - int i; - - mpf_init (r); - mpf_init (s); - refmpf_set_prec_limbs (s, 2*max_prec+10); - - for (x = 0; x < 2; x++) - { - mpf_sqrt_ui (r, x); - MPF_CHECK_FORMAT (r); - if (mpf_cmp_ui (r, x) != 0) - { - printf ("mpf_sqrt_ui wrong for special case:\n"); - printf (" x=%lu\n", x); - mpf_trace (" r", r); - abort (); - } - } - - for (i = 0; i < 50; i++) - { - /* input, a random non-zero ulong, exponentially distributed */ - do { - x = gmp_urandomb_ui (rands, - gmp_urandomm_ui (rands, BITS_PER_ULONG) + 1); - } while (x <= 1); - - /* result precision */ - prec = gmp_urandomm_ui (rands, max_prec-min_prec) + min_prec; - refmpf_set_prec_limbs (r, prec); - - mpf_sqrt_ui (r, x); - MPF_CHECK_FORMAT (r); - - /* Expect to prec limbs of result. - In the current implementation there's no stripping of low zero - limbs in mpf_sqrt_ui, not even on perfect squares, so size should - be exactly prec. */ - if (SIZ(r) != prec) - { - printf ("mpf_sqrt_ui result not enough result limbs\n"); - printf (" x=%lu\n", x); - printf (" want prec=%lu\n", prec); - mpf_trace (" r", r); - printf (" r size %ld\n", (long) SIZ(r)); - printf (" r prec %ld\n", (long) PREC(r)); - abort (); - } - - /* Must have r^2 <= x, since r has been truncated. */ - mpf_mul (s, r, r); - if (! (mpf_cmp_ui (s, x) <= 0)) - { - printf ("mpf_sqrt_ui result too big\n"); - printf (" x=%lu\n", x); - printf (" want prec=%lu\n", prec); - mpf_trace (" r", r); - mpf_trace (" s", s); - abort (); - } - - /* Must have (r+ulp)^2 > x. - No overflow from refmpf_add_ulp since r is only prec limbs. */ - refmpf_add_ulp (r); - mpf_mul (s, r, r); - if (! (mpf_cmp_ui (s, x) > 0)) - { - printf ("mpf_sqrt_ui result too small\n"); - printf (" x=%lu\n", x); - printf (" want prec=%lu\n", prec); - mpf_trace (" r+ulp", r); - mpf_trace (" s", s); - abort (); - } - } - - mpf_clear (r); - mpf_clear (s); -} - -int -main (int argc, char **argv) -{ - tests_start (); - mp_trace_base = -16; - - check_rand (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-sub.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-sub.c deleted file mode 100644 index ee0d6ba19a9..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-sub.c +++ /dev/null @@ -1,288 +0,0 @@ -/* Test mpf_sub. - -Copyright 1996, 2001, 2004, 2014 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#ifndef SIZE -#define SIZE 16 -#endif - -void -check_rand (int argc, char **argv) -{ - mp_size_t size; - mp_exp_t exp; - int reps = 20000; - int i; - mpf_t u, v, w, wref; - mp_size_t bprec = 100; - mpf_t rerr, max_rerr, limit_rerr; - - if (argc > 1) - { - reps = strtol (argv[1], 0, 0); - if (argc > 2) - bprec = strtol (argv[2], 0, 0); - } - - mpf_set_default_prec (bprec); - - mpf_init_set_ui (limit_rerr, 1); - mpf_div_2exp (limit_rerr, limit_rerr, bprec); -#if VERBOSE - mpf_dump (limit_rerr); -#endif - mpf_init (rerr); - mpf_init_set_ui (max_rerr, 0); - - mpf_init (u); - mpf_init (v); - mpf_init (w); - mpf_init (wref); - for (i = 0; i < reps; i++) - { - size = urandom () % (2 * SIZE) - SIZE; - exp = urandom () % SIZE; - mpf_random2 (u, size, exp); - - size = urandom () % (2 * SIZE) - SIZE; - exp = urandom () % SIZE; - mpf_random2 (v, size, exp); - - if ((urandom () & 1) != 0) - mpf_add_ui (u, v, 1); - else if ((urandom () & 1) != 0) - mpf_sub_ui (u, v, 1); - - mpf_sub (w, u, v); - refmpf_sub (wref, u, v); - - mpf_reldiff (rerr, w, wref); - if (mpf_cmp (rerr, max_rerr) > 0) - { - mpf_set (max_rerr, rerr); -#if VERBOSE - mpf_dump (max_rerr); -#endif - if (mpf_cmp (rerr, limit_rerr) > 0) - { - printf ("ERROR after %d tests\n", i); - printf (" u = "); mpf_dump (u); - printf (" v = "); mpf_dump (v); - printf ("wref = "); mpf_dump (wref); - printf (" w = "); mpf_dump (w); - abort (); - } - } - } - - mpf_clear (limit_rerr); - mpf_clear (rerr); - mpf_clear (max_rerr); - - mpf_clear (u); - mpf_clear (v); - mpf_clear (w); - mpf_clear (wref); -} - -#define W GMP_NUMB_MAX - -void -check_data (void) -{ - static const struct { - struct { - int exp, size; - mp_limb_t d[10]; - } x, y, want; - - } data[] = { - { { 123, 2, { 8, 9 } }, { 123, 1, { 9 } }, { 122, 1, { 8 } } }, - { { 1, 1, { 9 } }, { 1, 1, { 8 } }, { 1, 1, { 1 } } }, - { { 1, 1, { 9 } }, { 1, -1, { 6 } }, { 1, 1, { 15 } } }, - { { 1, 2, { 8, 9 } }, { 1, 1, { 8 } }, { 1, 2, { 8, 1 } } }, - { { 2, 2, { 8, 1 } }, { 1, 1, { 9 } }, { 1, 1, { W } } }, - { { 2, 2, { 9, 8 } }, { 1, 1, { 9 } }, { 2, 1, { 8 } } }, - { { 2, 1, { 1 } }, { 1, 1, { 1 } }, { 1, 1, { W } } }, - { { 2, 1, { 9 } }, { 1, 1, { W } }, { 2, 2, { 1, 8 } } }, - - { { 1, 2, { W, 8 } }, { 1, 1, { 9 } }, { 0, -1, { 1 } } }, - { { 1, 2, { W, 7 } }, { 1, 1, { 9 } }, { 1, -2, { 1, 1 } } }, - { { 1, 2, { 1, 8 } }, { 1, 1, { 9 } }, { 0, -1, { W } } }, - { { 1, 2, { 1, 7 } }, { 1, 1, { 9 } }, { 1, -2, { W, 1 } } }, - { { 1, 2, { 0, 8 } }, { 1, 1, { 9 } }, { 1, -1, { 1 } } }, - { { 2, 3, { 5, 8, 1 } }, { 1, 1, { 9 } }, { 1, 2, { 5, W } } }, - { { 3, 1, { 1 } }, { 1, 1, { 1 } }, { 2, 2, { W, W } } }, - { { 1, 6, { W, W, W, W, W, 8 } }, { 1, 1, { 9 } }, { -4, -1, { 1 } } }, - { { 5, 5, { W-6, W, W, W, W } }, { 6, 1, { 1 } }, { 1, -1, { 7 } } }, - - /* f - f == 0, various sizes. - These exercise a past problem (gmp 4.1.3 and earlier) where the - result exponent was not zeroed on a zero result like this. */ - { { 0, 0 }, { 0, 0 }, { 0, 0 } }, - { { 99, 3, { 0, 0, 1 } }, { 99, 1, { 1 } }, { 0, 0 } }, - { { 99, 3, { 0, 123, 456 } }, { 99, 2, { 123, 456 } }, { 0, 0 } }, - { { 99, 3, { 123, 456, 789 } }, { 99, 3, { 123, 456, 789 } }, { 0, 0 } }, - - /* High limbs cancel, leaving just the low limbs of the longer operand. - This exercises a past problem (gmp 4.1.3 and earlier) where high zero - limbs on the remainder were not stripped before truncating to the - destination, causing loss of precision. */ - { { 123, 2, { 8, 9 } }, { 123, 1, { 9 } }, { 122, 1, { 8 } } }, - { { 123, 3, { 8, 0, 9 } }, { 123, 1, { 9 } }, { 121, 1, { 8 } } }, - { { 123, 4, { 8, 0, 0, 9 } }, { 123, 1, { 9 } }, { 120, 1, { 8 } } }, - { { 123, 5, { 8, 0, 0, 0, 9 } }, { 123, 1, { 9 } }, { 119, 1, { 8 } } }, - { { 123, 6, { 8, 0, 0, 0, 0, 9 } }, { 123, 1, { 9 } }, { 118, 1, { 8 } } }, - /* { { 123, 6, { 8, 0, 0, 0, 0, 9 } }, { 123, 6, { 9, 0, 0, 0, 0, 8 } }, { 122, 5, { W, W, W, W, W } } }, */ - - }; - - mpf_t x, y, got, want; - int i, swap, fail; - - fail = 0; - mp_trace_base = 16; - mpf_init (got); - - for (i = 0; i < numberof (data); i++) - { - for (swap = 0; swap <= 7; swap++) - { - PTR(x) = (mp_ptr) data[i].x.d; - SIZ(x) = data[i].x.size; - EXP(x) = data[i].x.exp; - PREC(x) = numberof (data[i].x.d); - MPF_CHECK_FORMAT (x); - - PTR(y) = (mp_ptr) data[i].y.d; - SIZ(y) = data[i].y.size; - EXP(y) = data[i].y.exp; - PREC(y) = numberof (data[i].y.d); - MPF_CHECK_FORMAT (y); - - PTR(want) = (mp_ptr) data[i].want.d; - SIZ(want) = data[i].want.size; - EXP(want) = data[i].want.exp; - PREC(want) = numberof (data[i].want.d); - MPF_CHECK_FORMAT (want); - - if (swap & 4) - { - mpf_swap (want, y); - } - - if ((SIZ (x) ^ SIZ (y)) < 0) - continue; /* It's an addition, not a subtraction (TO BE REMOVED) */ - - if (swap & 1) - { - mpf_swap (x, y); - SIZ(want) = - SIZ(want); - } - - if (swap & 2) - { - SIZ(want) = - SIZ(want); - SIZ(x) = - SIZ(x); - SIZ(y) = - SIZ(y); - } - - mpf_sub (got, x, y); -/* MPF_CHECK_FORMAT (got); */ - - if (! refmpf_validate ("mpf_sub", got, want)) - { - printf ("check_data() wrong result at data[%d] (operands%s swapped)\n", i, swap ? "" : " not"); - mpf_trace ("x ", x); - mpf_trace ("y ", y); - mpf_trace ("got ", got); - mpf_trace ("want", want); - fail = 1; - } - - if (SIZ (x) == 1 || SIZ (x) == 0 ) - { - if (SIZ (y)) EXP (y) -= EXP (x) - (mp_exp_t) SIZ (x); - if (SIZ (want)) EXP (want) -= EXP (x) - (mp_exp_t) SIZ (x); - EXP (x) = (mp_exp_t) SIZ (x); - - if (mpf_fits_uint_p (x)) - { - mpf_ui_sub (got, mpf_get_ui (x), y); - - if (! refmpf_validate ("mpf_ui_sub", got, want)) - { - printf ("check_data() wrong result at data[%d] (operands%s swapped)\n", i, swap ? "" : " not"); - mpf_trace ("x ", x); - mpf_trace ("y ", y); - mpf_trace ("got ", got); - mpf_trace ("want", want); - fail = 1; - } - } - } - - if (SIZ (y) == 1 || SIZ (y) == 0) - { - if (SIZ (x)) EXP (x) -= EXP (y) - (mp_exp_t) SIZ (y); - if (SIZ (want)) EXP (want) -= EXP (y) - (mp_exp_t) SIZ (y); - EXP (y) = (mp_exp_t) SIZ (y); - - if (mpf_fits_uint_p (x)) - { - mpf_sub_ui (got, x, mpf_get_ui (y)); - - if (! refmpf_validate ("mpf_sub_ui", got, want)) - { - printf ("check_data() wrong result at data[%d] (operands%s swapped)\n", i, swap ? "" : " not"); - mpf_trace ("x ", x); - mpf_trace ("y ", y); - mpf_trace ("got ", got); - mpf_trace ("want", want); - fail = 1; - } - } - } - - } - } - - mpf_clear (got); - if (fail) - abort (); -} - - -int -main (int argc, char **argv) -{ - tests_start (); - - check_data (); - check_rand (argc, argv); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-trunc.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-trunc.c deleted file mode 100644 index 2eef414b00d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-trunc.c +++ /dev/null @@ -1,271 +0,0 @@ -/* Test mpf_trunc, mpf_ceil, mpf_floor. - -Copyright 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_print (mpf_srcptr src, mpf_srcptr got, mpf_srcptr want) -{ - mp_trace_base = 16; - mpf_trace ("src ", src); - mpf_trace ("got ", got); - mpf_trace ("want", want); - - printf ("got size=%d exp=%ld\n", SIZ(got), EXP(got)); - mpn_trace (" limbs=", PTR(got), (mp_size_t) ABSIZ(got)); - - printf ("want size=%d exp=%ld\n", SIZ(want), EXP(want)); - mpn_trace (" limbs=", PTR(want), (mp_size_t) ABSIZ(want)); -} - -void -check_one (mpf_srcptr src, mpf_srcptr trunc, mpf_srcptr ceil, mpf_srcptr floor) -{ - mpf_t got; - - mpf_init2 (got, mpf_get_prec (trunc)); - ASSERT_ALWAYS (PREC(got) == PREC(trunc)); - ASSERT_ALWAYS (PREC(got) == PREC(ceil)); - ASSERT_ALWAYS (PREC(got) == PREC(floor)); - -#define CHECK_SEP(name, fun, want) \ - mpf_set_ui (got, 54321L); /* initial junk */ \ - fun (got, src); \ - MPF_CHECK_FORMAT (got); \ - if (mpf_cmp (got, want) != 0) \ - { \ - printf ("%s wrong\n", name); \ - check_print (src, got, want); \ - abort (); \ - } - - CHECK_SEP ("mpf_trunc", mpf_trunc, trunc); - CHECK_SEP ("mpf_ceil", mpf_ceil, ceil); - CHECK_SEP ("mpf_floor", mpf_floor, floor); - -#define CHECK_INPLACE(name, fun, want) \ - mpf_set (got, src); \ - fun (got, got); \ - MPF_CHECK_FORMAT (got); \ - if (mpf_cmp (got, want) != 0) \ - { \ - printf ("%s wrong\n", name); \ - check_print (src, got, want); \ - abort (); \ - } - - CHECK_INPLACE ("mpf_trunc", mpf_trunc, trunc); - - /* Can't do these unconditionally in case truncation by mpf_set strips - some low non-zero limbs which would have rounded the result. */ - if (ABSIZ(src) <= PREC(trunc)+1) - { - CHECK_INPLACE ("mpf_ceil", mpf_ceil, ceil); - CHECK_INPLACE ("mpf_floor", mpf_floor, floor); - } - - mpf_clear (got); -} - -void -check_all (mpf_ptr src, mpf_ptr trunc, mpf_ptr ceil, mpf_ptr floor) -{ - /* some of these values are generated with direct field assignments */ - MPF_CHECK_FORMAT (src); - MPF_CHECK_FORMAT (trunc); - MPF_CHECK_FORMAT (ceil); - MPF_CHECK_FORMAT (floor); - - check_one (src, trunc, ceil, floor); - - mpf_neg (src, src); - mpf_neg (trunc, trunc); - mpf_neg (ceil, ceil); - mpf_neg (floor, floor); - check_one (src, trunc, floor, ceil); -} - -void -check_various (void) -{ - mpf_t src, trunc, ceil, floor; - int n, i; - - mpf_init2 (src, 512L); - mpf_init2 (trunc, 256L); - mpf_init2 (ceil, 256L); - mpf_init2 (floor, 256L); - - /* 0 */ - mpf_set_ui (src, 0L); - mpf_set_ui (trunc, 0L); - mpf_set_ui (ceil, 0L); - mpf_set_ui (floor, 0L); - check_all (src, trunc, ceil, floor); - - /* 1 */ - mpf_set_ui (src, 1L); - mpf_set_ui (trunc, 1L); - mpf_set_ui (ceil, 1L); - mpf_set_ui (floor, 1L); - check_all (src, trunc, ceil, floor); - - /* 2^1024 */ - mpf_set_ui (src, 1L); - mpf_mul_2exp (src, src, 1024L); - mpf_set (trunc, src); - mpf_set (ceil, src); - mpf_set (floor, src); - check_all (src, trunc, ceil, floor); - - /* 1/2^1024, fraction only */ - mpf_set_ui (src, 1L); - mpf_div_2exp (src, src, 1024L); - mpf_set_si (trunc, 0L); - mpf_set_si (ceil, 1L); - mpf_set_si (floor, 0L); - check_all (src, trunc, ceil, floor); - - /* 1/2 */ - mpf_set_ui (src, 1L); - mpf_div_2exp (src, src, 1L); - mpf_set_si (trunc, 0L); - mpf_set_si (ceil, 1L); - mpf_set_si (floor, 0L); - check_all (src, trunc, ceil, floor); - - /* 123+1/2^64 */ - mpf_set_ui (src, 1L); - mpf_div_2exp (src, src, 64L); - mpf_add_ui (src, src, 123L); - mpf_set_si (trunc, 123L); - mpf_set_si (ceil, 124L); - mpf_set_si (floor, 123L); - check_all (src, trunc, ceil, floor); - - /* integer of full prec+1 limbs, unchanged */ - n = PREC(trunc)+1; - ASSERT_ALWAYS (n <= PREC(src)+1); - EXP(src) = n; - SIZ(src) = n; - for (i = 0; i < SIZ(src); i++) - PTR(src)[i] = i+100; - mpf_set (trunc, src); - mpf_set (ceil, src); - mpf_set (floor, src); - check_all (src, trunc, ceil, floor); - - /* full prec+1 limbs, 1 trimmed for integer */ - n = PREC(trunc)+1; - ASSERT_ALWAYS (n <= PREC(src)+1); - EXP(src) = n-1; - SIZ(src) = n; - for (i = 0; i < SIZ(src); i++) - PTR(src)[i] = i+200; - EXP(trunc) = n-1; - SIZ(trunc) = n-1; - for (i = 0; i < SIZ(trunc); i++) - PTR(trunc)[i] = i+201; - mpf_set (floor, trunc); - mpf_add_ui (ceil, trunc, 1L); - check_all (src, trunc, ceil, floor); - - /* prec+3 limbs, 2 trimmed for size */ - n = PREC(trunc)+3; - ASSERT_ALWAYS (n <= PREC(src)+1); - EXP(src) = n; - SIZ(src) = n; - for (i = 0; i < SIZ(src); i++) - PTR(src)[i] = i+300; - EXP(trunc) = n; - SIZ(trunc) = n-2; - for (i = 0; i < SIZ(trunc); i++) - PTR(trunc)[i] = i+302; - mpf_set (floor, trunc); - mpf_set (ceil, trunc); - PTR(ceil)[0]++; - check_all (src, trunc, ceil, floor); - - /* prec+4 limbs, 2 trimmed for size, 1 trimmed for integer */ - n = PREC(trunc)+4; - ASSERT_ALWAYS (n <= PREC(src)+1); - EXP(src) = n-1; - SIZ(src) = n; - for (i = 0; i < SIZ(src); i++) - PTR(src)[i] = i+400; - EXP(trunc) = n-1; - SIZ(trunc) = n-3; - for (i = 0; i < SIZ(trunc); i++) - PTR(trunc)[i] = i+403; - mpf_set (floor, trunc); - mpf_set (ceil, trunc); - PTR(ceil)[0]++; - check_all (src, trunc, ceil, floor); - - /* F.F, carry out of ceil */ - EXP(src) = 1; - SIZ(src) = 2; - PTR(src)[0] = GMP_NUMB_MAX; - PTR(src)[1] = GMP_NUMB_MAX; - EXP(trunc) = 1; - SIZ(trunc) = 1; - PTR(trunc)[0] = GMP_NUMB_MAX; - mpf_set (floor, trunc); - EXP(ceil) = 2; - SIZ(ceil) = 1; - PTR(ceil)[0] = 1; - check_all (src, trunc, ceil, floor); - - /* FF.F, carry out of ceil */ - EXP(src) = 2; - SIZ(src) = 3; - PTR(src)[0] = GMP_NUMB_MAX; - PTR(src)[1] = GMP_NUMB_MAX; - PTR(src)[2] = GMP_NUMB_MAX; - EXP(trunc) = 2; - SIZ(trunc) = 2; - PTR(trunc)[0] = GMP_NUMB_MAX; - PTR(trunc)[1] = GMP_NUMB_MAX; - mpf_set (floor, trunc); - EXP(ceil) = 3; - SIZ(ceil) = 1; - PTR(ceil)[0] = 1; - check_all (src, trunc, ceil, floor); - - mpf_clear (src); - mpf_clear (trunc); - mpf_clear (ceil); - mpf_clear (floor); -} - -int -main (void) -{ - tests_start (); - - check_various (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-ui_div.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-ui_div.c deleted file mode 100644 index 3024efdbc42..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpf/t-ui_div.c +++ /dev/null @@ -1,152 +0,0 @@ -/* Test mpf_ui_div. - -Copyright 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_one (const char *desc, mpf_ptr got, unsigned long u, mpf_srcptr v) -{ - mpf_t uf; - mp_limb_t ulimbs[2]; - mp_size_t usize; - - ulimbs[0] = u & GMP_NUMB_MASK; - usize = (u != 0); -#if BITS_PER_ULONG > GMP_NUMB_BITS - u >>= GMP_NUMB_BITS; - ulimbs[1] = u; - usize += (u != 0); -#endif - PTR(uf) = ulimbs; - SIZ(uf) = usize; - EXP(uf) = usize; - - if (! refmpf_validate_division ("mpf_ui_div", got, uf, v)) - { - mp_trace_base = -16; - printf (" u 0x%lX (%lu)\n", u, u); - mpf_trace (" v", v); - printf (" %s\n", desc); - abort (); - } -} - -void -check_rand (void) -{ - unsigned long min_prec = __GMPF_BITS_TO_PREC (1); - gmp_randstate_ptr rands = RANDS; - unsigned long prec, u; - mpf_t got, v; - int i; - - mpf_init (got); - mpf_init (v); - - for (i = 0; i < 200; i++) - { - /* got precision */ - prec = min_prec + gmp_urandomm_ui (rands, 15L); - refmpf_set_prec_limbs (got, prec); - - /* u */ - prec = gmp_urandomm_ui (rands, BITS_PER_ULONG+1); - u = gmp_urandomb_ui (rands, prec); - - /* v precision */ - prec = min_prec + gmp_urandomm_ui (rands, 15L); - refmpf_set_prec_limbs (v, prec); - - /* v, non-zero */ - do { - mpf_random2 (v, PREC(v), (mp_exp_t) 20); - } while (SIZ(v) == 0); - - /* v possibly negative */ - if (gmp_urandomb_ui (rands, 1L)) - mpf_neg (v, v); - - if ((i % 2) == 0) - { - /* src != dst */ - mpf_ui_div (got, u, v); - check_one ("separate", got, u, v); - } - else - { - /* src == dst */ - prec = refmpf_set_overlap (got, v); - mpf_ui_div (got, u, got); - check_one ("overlap src==dst", got, u, v); - - mpf_set_prec_raw (got, prec); - } - } - - mpf_clear (got); - mpf_clear (v); -} - -void -check_various (void) -{ - mpf_t got, v; - - mpf_init (got); - mpf_init (v); - - /* 100/4 == 25 */ - mpf_set_prec (got, 20L); - mpf_set_ui (v, 4L); - mpf_ui_div (got, 100L, v); - MPF_CHECK_FORMAT (got); - ASSERT_ALWAYS (mpf_cmp_ui (got, 25L) == 0); - - { - /* 1/(2^n+1), a case where truncating the divisor would be wrong */ - unsigned long u = 1L; - mpf_set_prec (got, 500L); - mpf_set_prec (v, 900L); - mpf_set_ui (v, 1L); - mpf_mul_2exp (v, v, 800L); - mpf_add_ui (v, v, 1L); - mpf_ui_div (got, u, v); - check_one ("1/2^n+1, separate", got, u, v); - } - - mpf_clear (got); - mpf_clear (v); -} - -int -main (void) -{ - tests_start (); - - check_various (); - check_rand (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/Makefile.am b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/Makefile.am deleted file mode 100644 index 3af0b685a40..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -## Process this file with automake to generate Makefile.in - -# Copyright 2001-2003, 2009-2014 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. - - -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la - -check_PROGRAMS = t-asmtype t-aors_1 t-divrem_1 t-mod_1 t-fat t-get_d \ - t-instrument t-iord_u t-mp_bases t-perfsqr t-scan logic \ - t-toom22 t-toom32 t-toom33 t-toom42 t-toom43 t-toom44 \ - t-toom52 t-toom53 t-toom54 t-toom62 t-toom63 t-toom6h t-toom8h \ - t-toom2-sqr t-toom3-sqr t-toom4-sqr t-toom6-sqr t-toom8-sqr \ - t-div t-mul t-mullo t-sqrlo t-mulmod_bnm1 t-sqrmod_bnm1 t-mulmid \ - t-hgcd t-hgcd_appr t-matrix22 t-invert t-bdiv \ - t-broot t-brootinv t-minvert t-sizeinbase - -EXTRA_DIST = toom-shared.h toom-sqr-shared.h - -TESTS = $(check_PROGRAMS) - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/Makefile.in b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/Makefile.in deleted file mode 100644 index a19941a7237..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/Makefile.in +++ /dev/null @@ -1,1756 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright 2001-2003, 2009-2014 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -check_PROGRAMS = t-asmtype$(EXEEXT) t-aors_1$(EXEEXT) \ - t-divrem_1$(EXEEXT) t-mod_1$(EXEEXT) t-fat$(EXEEXT) \ - t-get_d$(EXEEXT) t-instrument$(EXEEXT) t-iord_u$(EXEEXT) \ - t-mp_bases$(EXEEXT) t-perfsqr$(EXEEXT) t-scan$(EXEEXT) \ - logic$(EXEEXT) t-toom22$(EXEEXT) t-toom32$(EXEEXT) \ - t-toom33$(EXEEXT) t-toom42$(EXEEXT) t-toom43$(EXEEXT) \ - t-toom44$(EXEEXT) t-toom52$(EXEEXT) t-toom53$(EXEEXT) \ - t-toom54$(EXEEXT) t-toom62$(EXEEXT) t-toom63$(EXEEXT) \ - t-toom6h$(EXEEXT) t-toom8h$(EXEEXT) t-toom2-sqr$(EXEEXT) \ - t-toom3-sqr$(EXEEXT) t-toom4-sqr$(EXEEXT) t-toom6-sqr$(EXEEXT) \ - t-toom8-sqr$(EXEEXT) t-div$(EXEEXT) t-mul$(EXEEXT) \ - t-mullo$(EXEEXT) t-sqrlo$(EXEEXT) t-mulmod_bnm1$(EXEEXT) \ - t-sqrmod_bnm1$(EXEEXT) t-mulmid$(EXEEXT) t-hgcd$(EXEEXT) \ - t-hgcd_appr$(EXEEXT) t-matrix22$(EXEEXT) t-invert$(EXEEXT) \ - t-bdiv$(EXEEXT) t-broot$(EXEEXT) t-brootinv$(EXEEXT) \ - t-minvert$(EXEEXT) t-sizeinbase$(EXEEXT) -subdir = tests/mpn -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -logic_SOURCES = logic.c -logic_OBJECTS = logic.$(OBJEXT) -logic_LDADD = $(LDADD) -logic_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -t_aors_1_SOURCES = t-aors_1.c -t_aors_1_OBJECTS = t-aors_1.$(OBJEXT) -t_aors_1_LDADD = $(LDADD) -t_aors_1_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_asmtype_SOURCES = t-asmtype.c -t_asmtype_OBJECTS = t-asmtype.$(OBJEXT) -t_asmtype_LDADD = $(LDADD) -t_asmtype_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_bdiv_SOURCES = t-bdiv.c -t_bdiv_OBJECTS = t-bdiv.$(OBJEXT) -t_bdiv_LDADD = $(LDADD) -t_bdiv_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_broot_SOURCES = t-broot.c -t_broot_OBJECTS = t-broot.$(OBJEXT) -t_broot_LDADD = $(LDADD) -t_broot_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_brootinv_SOURCES = t-brootinv.c -t_brootinv_OBJECTS = t-brootinv.$(OBJEXT) -t_brootinv_LDADD = $(LDADD) -t_brootinv_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_div_SOURCES = t-div.c -t_div_OBJECTS = t-div.$(OBJEXT) -t_div_LDADD = $(LDADD) -t_div_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_divrem_1_SOURCES = t-divrem_1.c -t_divrem_1_OBJECTS = t-divrem_1.$(OBJEXT) -t_divrem_1_LDADD = $(LDADD) -t_divrem_1_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_fat_SOURCES = t-fat.c -t_fat_OBJECTS = t-fat.$(OBJEXT) -t_fat_LDADD = $(LDADD) -t_fat_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_get_d_SOURCES = t-get_d.c -t_get_d_OBJECTS = t-get_d.$(OBJEXT) -t_get_d_LDADD = $(LDADD) -t_get_d_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_hgcd_SOURCES = t-hgcd.c -t_hgcd_OBJECTS = t-hgcd.$(OBJEXT) -t_hgcd_LDADD = $(LDADD) -t_hgcd_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_hgcd_appr_SOURCES = t-hgcd_appr.c -t_hgcd_appr_OBJECTS = t-hgcd_appr.$(OBJEXT) -t_hgcd_appr_LDADD = $(LDADD) -t_hgcd_appr_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_instrument_SOURCES = t-instrument.c -t_instrument_OBJECTS = t-instrument.$(OBJEXT) -t_instrument_LDADD = $(LDADD) -t_instrument_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_invert_SOURCES = t-invert.c -t_invert_OBJECTS = t-invert.$(OBJEXT) -t_invert_LDADD = $(LDADD) -t_invert_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_iord_u_SOURCES = t-iord_u.c -t_iord_u_OBJECTS = t-iord_u.$(OBJEXT) -t_iord_u_LDADD = $(LDADD) -t_iord_u_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_matrix22_SOURCES = t-matrix22.c -t_matrix22_OBJECTS = t-matrix22.$(OBJEXT) -t_matrix22_LDADD = $(LDADD) -t_matrix22_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_minvert_SOURCES = t-minvert.c -t_minvert_OBJECTS = t-minvert.$(OBJEXT) -t_minvert_LDADD = $(LDADD) -t_minvert_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_mod_1_SOURCES = t-mod_1.c -t_mod_1_OBJECTS = t-mod_1.$(OBJEXT) -t_mod_1_LDADD = $(LDADD) -t_mod_1_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_mp_bases_SOURCES = t-mp_bases.c -t_mp_bases_OBJECTS = t-mp_bases.$(OBJEXT) -t_mp_bases_LDADD = $(LDADD) -t_mp_bases_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_mul_SOURCES = t-mul.c -t_mul_OBJECTS = t-mul.$(OBJEXT) -t_mul_LDADD = $(LDADD) -t_mul_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_mullo_SOURCES = t-mullo.c -t_mullo_OBJECTS = t-mullo.$(OBJEXT) -t_mullo_LDADD = $(LDADD) -t_mullo_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_mulmid_SOURCES = t-mulmid.c -t_mulmid_OBJECTS = t-mulmid.$(OBJEXT) -t_mulmid_LDADD = $(LDADD) -t_mulmid_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_mulmod_bnm1_SOURCES = t-mulmod_bnm1.c -t_mulmod_bnm1_OBJECTS = t-mulmod_bnm1.$(OBJEXT) -t_mulmod_bnm1_LDADD = $(LDADD) -t_mulmod_bnm1_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_perfsqr_SOURCES = t-perfsqr.c -t_perfsqr_OBJECTS = t-perfsqr.$(OBJEXT) -t_perfsqr_LDADD = $(LDADD) -t_perfsqr_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_scan_SOURCES = t-scan.c -t_scan_OBJECTS = t-scan.$(OBJEXT) -t_scan_LDADD = $(LDADD) -t_scan_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_sizeinbase_SOURCES = t-sizeinbase.c -t_sizeinbase_OBJECTS = t-sizeinbase.$(OBJEXT) -t_sizeinbase_LDADD = $(LDADD) -t_sizeinbase_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_sqrlo_SOURCES = t-sqrlo.c -t_sqrlo_OBJECTS = t-sqrlo.$(OBJEXT) -t_sqrlo_LDADD = $(LDADD) -t_sqrlo_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_sqrmod_bnm1_SOURCES = t-sqrmod_bnm1.c -t_sqrmod_bnm1_OBJECTS = t-sqrmod_bnm1.$(OBJEXT) -t_sqrmod_bnm1_LDADD = $(LDADD) -t_sqrmod_bnm1_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom2_sqr_SOURCES = t-toom2-sqr.c -t_toom2_sqr_OBJECTS = t-toom2-sqr.$(OBJEXT) -t_toom2_sqr_LDADD = $(LDADD) -t_toom2_sqr_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom22_SOURCES = t-toom22.c -t_toom22_OBJECTS = t-toom22.$(OBJEXT) -t_toom22_LDADD = $(LDADD) -t_toom22_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom3_sqr_SOURCES = t-toom3-sqr.c -t_toom3_sqr_OBJECTS = t-toom3-sqr.$(OBJEXT) -t_toom3_sqr_LDADD = $(LDADD) -t_toom3_sqr_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom32_SOURCES = t-toom32.c -t_toom32_OBJECTS = t-toom32.$(OBJEXT) -t_toom32_LDADD = $(LDADD) -t_toom32_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom33_SOURCES = t-toom33.c -t_toom33_OBJECTS = t-toom33.$(OBJEXT) -t_toom33_LDADD = $(LDADD) -t_toom33_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom4_sqr_SOURCES = t-toom4-sqr.c -t_toom4_sqr_OBJECTS = t-toom4-sqr.$(OBJEXT) -t_toom4_sqr_LDADD = $(LDADD) -t_toom4_sqr_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom42_SOURCES = t-toom42.c -t_toom42_OBJECTS = t-toom42.$(OBJEXT) -t_toom42_LDADD = $(LDADD) -t_toom42_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom43_SOURCES = t-toom43.c -t_toom43_OBJECTS = t-toom43.$(OBJEXT) -t_toom43_LDADD = $(LDADD) -t_toom43_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom44_SOURCES = t-toom44.c -t_toom44_OBJECTS = t-toom44.$(OBJEXT) -t_toom44_LDADD = $(LDADD) -t_toom44_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom52_SOURCES = t-toom52.c -t_toom52_OBJECTS = t-toom52.$(OBJEXT) -t_toom52_LDADD = $(LDADD) -t_toom52_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom53_SOURCES = t-toom53.c -t_toom53_OBJECTS = t-toom53.$(OBJEXT) -t_toom53_LDADD = $(LDADD) -t_toom53_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom54_SOURCES = t-toom54.c -t_toom54_OBJECTS = t-toom54.$(OBJEXT) -t_toom54_LDADD = $(LDADD) -t_toom54_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom6_sqr_SOURCES = t-toom6-sqr.c -t_toom6_sqr_OBJECTS = t-toom6-sqr.$(OBJEXT) -t_toom6_sqr_LDADD = $(LDADD) -t_toom6_sqr_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom62_SOURCES = t-toom62.c -t_toom62_OBJECTS = t-toom62.$(OBJEXT) -t_toom62_LDADD = $(LDADD) -t_toom62_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom63_SOURCES = t-toom63.c -t_toom63_OBJECTS = t-toom63.$(OBJEXT) -t_toom63_LDADD = $(LDADD) -t_toom63_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom6h_SOURCES = t-toom6h.c -t_toom6h_OBJECTS = t-toom6h.$(OBJEXT) -t_toom6h_LDADD = $(LDADD) -t_toom6h_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom8_sqr_SOURCES = t-toom8-sqr.c -t_toom8_sqr_OBJECTS = t-toom8-sqr.$(OBJEXT) -t_toom8_sqr_LDADD = $(LDADD) -t_toom8_sqr_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_toom8h_SOURCES = t-toom8h.c -t_toom8h_OBJECTS = t-toom8h.$(OBJEXT) -t_toom8h_LDADD = $(LDADD) -t_toom8h_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = logic.c t-aors_1.c t-asmtype.c t-bdiv.c t-broot.c \ - t-brootinv.c t-div.c t-divrem_1.c t-fat.c t-get_d.c t-hgcd.c \ - t-hgcd_appr.c t-instrument.c t-invert.c t-iord_u.c \ - t-matrix22.c t-minvert.c t-mod_1.c t-mp_bases.c t-mul.c \ - t-mullo.c t-mulmid.c t-mulmod_bnm1.c t-perfsqr.c t-scan.c \ - t-sizeinbase.c t-sqrlo.c t-sqrmod_bnm1.c t-toom2-sqr.c \ - t-toom22.c t-toom3-sqr.c t-toom32.c t-toom33.c t-toom4-sqr.c \ - t-toom42.c t-toom43.c t-toom44.c t-toom52.c t-toom53.c \ - t-toom54.c t-toom6-sqr.c t-toom62.c t-toom63.c t-toom6h.c \ - t-toom8-sqr.c t-toom8h.c -DIST_SOURCES = logic.c t-aors_1.c t-asmtype.c t-bdiv.c t-broot.c \ - t-brootinv.c t-div.c t-divrem_1.c t-fat.c t-get_d.c t-hgcd.c \ - t-hgcd_appr.c t-instrument.c t-invert.c t-iord_u.c \ - t-matrix22.c t-minvert.c t-mod_1.c t-mp_bases.c t-mul.c \ - t-mullo.c t-mulmid.c t-mulmod_bnm1.c t-perfsqr.c t-scan.c \ - t-sizeinbase.c t-sqrlo.c t-sqrmod_bnm1.c t-toom2-sqr.c \ - t-toom22.c t-toom3-sqr.c t-toom32.c t-toom33.c t-toom4-sqr.c \ - t-toom42.c t-toom43.c t-toom44.c t-toom52.c t-toom53.c \ - t-toom54.c t-toom6-sqr.c t-toom62.c t-toom63.c t-toom6h.c \ - t-toom8-sqr.c t-toom8h.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red='[0;31m'; \ - grn='[0;32m'; \ - lgn='[1;32m'; \ - blu='[1;34m'; \ - mgn='[0;35m'; \ - brg='[1m'; \ - std='[m'; \ - fi; \ -} -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck -TEST_SUITE_LOG = test-suite.log -TEST_EXTENSIONS = @EXEEXT@ .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/test-driver -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ABI = @ABI@ -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -ASMFLAGS = @ASMFLAGS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ -CC = @CC@ -CCAS = @CCAS@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CPP_FOR_BUILD = @CPP_FOR_BUILD@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@ -DEFS = @DEFS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -FGREP = @FGREP@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIMB_BITS = @GMP_LIMB_BITS@ -GMP_NAIL_BITS = @GMP_NAIL_BITS@ -GREP = @GREP@ -HAVE_CLOCK_01 = @HAVE_CLOCK_01@ -HAVE_CPUTIME_01 = @HAVE_CPUTIME_01@ -HAVE_GETRUSAGE_01 = @HAVE_GETRUSAGE_01@ -HAVE_GETTIMEOFDAY_01 = @HAVE_GETTIMEOFDAY_01@ -HAVE_HOST_CPU_FAMILY_power = @HAVE_HOST_CPU_FAMILY_power@ -HAVE_HOST_CPU_FAMILY_powerpc = @HAVE_HOST_CPU_FAMILY_powerpc@ -HAVE_SIGACTION_01 = @HAVE_SIGACTION_01@ -HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@ -HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@ -HAVE_STACK_T_01 = @HAVE_STACK_T_01@ -HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBCURSES = @LIBCURSES@ -LIBGMPXX_LDFLAGS = @LIBGMPXX_LDFLAGS@ -LIBGMP_DLL = @LIBGMP_DLL@ -LIBGMP_LDFLAGS = @LIBGMP_LDFLAGS@ -LIBM = @LIBM@ -LIBM_FOR_BUILD = @LIBM_FOR_BUILD@ -LIBOBJS = @LIBOBJS@ -LIBREADLINE = @LIBREADLINE@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -M4 = @M4@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@ -STRIP = @STRIP@ -TAL_OBJECT = @TAL_OBJECT@ -TUNE_LIBS = @TUNE_LIBS@ -TUNE_SQR_OBJ = @TUNE_SQR_OBJ@ -U_FOR_BUILD = @U_FOR_BUILD@ -VERSION = @VERSION@ -WITH_READLINE_01 = @WITH_READLINE_01@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gmp_srclinks = @gmp_srclinks@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -mpn_objects = @mpn_objects@ -mpn_objs_in_libgmp = @mpn_objs_in_libgmp@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la -EXTRA_DIST = toom-shared.h toom-sqr-shared.h -TESTS = $(check_PROGRAMS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps tests/mpn/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu --ignore-deps tests/mpn/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -logic$(EXEEXT): $(logic_OBJECTS) $(logic_DEPENDENCIES) $(EXTRA_logic_DEPENDENCIES) - @rm -f logic$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(logic_OBJECTS) $(logic_LDADD) $(LIBS) - -t-aors_1$(EXEEXT): $(t_aors_1_OBJECTS) $(t_aors_1_DEPENDENCIES) $(EXTRA_t_aors_1_DEPENDENCIES) - @rm -f t-aors_1$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_aors_1_OBJECTS) $(t_aors_1_LDADD) $(LIBS) - -t-asmtype$(EXEEXT): $(t_asmtype_OBJECTS) $(t_asmtype_DEPENDENCIES) $(EXTRA_t_asmtype_DEPENDENCIES) - @rm -f t-asmtype$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_asmtype_OBJECTS) $(t_asmtype_LDADD) $(LIBS) - -t-bdiv$(EXEEXT): $(t_bdiv_OBJECTS) $(t_bdiv_DEPENDENCIES) $(EXTRA_t_bdiv_DEPENDENCIES) - @rm -f t-bdiv$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_bdiv_OBJECTS) $(t_bdiv_LDADD) $(LIBS) - -t-broot$(EXEEXT): $(t_broot_OBJECTS) $(t_broot_DEPENDENCIES) $(EXTRA_t_broot_DEPENDENCIES) - @rm -f t-broot$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_broot_OBJECTS) $(t_broot_LDADD) $(LIBS) - -t-brootinv$(EXEEXT): $(t_brootinv_OBJECTS) $(t_brootinv_DEPENDENCIES) $(EXTRA_t_brootinv_DEPENDENCIES) - @rm -f t-brootinv$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_brootinv_OBJECTS) $(t_brootinv_LDADD) $(LIBS) - -t-div$(EXEEXT): $(t_div_OBJECTS) $(t_div_DEPENDENCIES) $(EXTRA_t_div_DEPENDENCIES) - @rm -f t-div$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_div_OBJECTS) $(t_div_LDADD) $(LIBS) - -t-divrem_1$(EXEEXT): $(t_divrem_1_OBJECTS) $(t_divrem_1_DEPENDENCIES) $(EXTRA_t_divrem_1_DEPENDENCIES) - @rm -f t-divrem_1$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_divrem_1_OBJECTS) $(t_divrem_1_LDADD) $(LIBS) - -t-fat$(EXEEXT): $(t_fat_OBJECTS) $(t_fat_DEPENDENCIES) $(EXTRA_t_fat_DEPENDENCIES) - @rm -f t-fat$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_fat_OBJECTS) $(t_fat_LDADD) $(LIBS) - -t-get_d$(EXEEXT): $(t_get_d_OBJECTS) $(t_get_d_DEPENDENCIES) $(EXTRA_t_get_d_DEPENDENCIES) - @rm -f t-get_d$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_get_d_OBJECTS) $(t_get_d_LDADD) $(LIBS) - -t-hgcd$(EXEEXT): $(t_hgcd_OBJECTS) $(t_hgcd_DEPENDENCIES) $(EXTRA_t_hgcd_DEPENDENCIES) - @rm -f t-hgcd$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_hgcd_OBJECTS) $(t_hgcd_LDADD) $(LIBS) - -t-hgcd_appr$(EXEEXT): $(t_hgcd_appr_OBJECTS) $(t_hgcd_appr_DEPENDENCIES) $(EXTRA_t_hgcd_appr_DEPENDENCIES) - @rm -f t-hgcd_appr$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_hgcd_appr_OBJECTS) $(t_hgcd_appr_LDADD) $(LIBS) - -t-instrument$(EXEEXT): $(t_instrument_OBJECTS) $(t_instrument_DEPENDENCIES) $(EXTRA_t_instrument_DEPENDENCIES) - @rm -f t-instrument$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_instrument_OBJECTS) $(t_instrument_LDADD) $(LIBS) - -t-invert$(EXEEXT): $(t_invert_OBJECTS) $(t_invert_DEPENDENCIES) $(EXTRA_t_invert_DEPENDENCIES) - @rm -f t-invert$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_invert_OBJECTS) $(t_invert_LDADD) $(LIBS) - -t-iord_u$(EXEEXT): $(t_iord_u_OBJECTS) $(t_iord_u_DEPENDENCIES) $(EXTRA_t_iord_u_DEPENDENCIES) - @rm -f t-iord_u$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_iord_u_OBJECTS) $(t_iord_u_LDADD) $(LIBS) - -t-matrix22$(EXEEXT): $(t_matrix22_OBJECTS) $(t_matrix22_DEPENDENCIES) $(EXTRA_t_matrix22_DEPENDENCIES) - @rm -f t-matrix22$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_matrix22_OBJECTS) $(t_matrix22_LDADD) $(LIBS) - -t-minvert$(EXEEXT): $(t_minvert_OBJECTS) $(t_minvert_DEPENDENCIES) $(EXTRA_t_minvert_DEPENDENCIES) - @rm -f t-minvert$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_minvert_OBJECTS) $(t_minvert_LDADD) $(LIBS) - -t-mod_1$(EXEEXT): $(t_mod_1_OBJECTS) $(t_mod_1_DEPENDENCIES) $(EXTRA_t_mod_1_DEPENDENCIES) - @rm -f t-mod_1$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_mod_1_OBJECTS) $(t_mod_1_LDADD) $(LIBS) - -t-mp_bases$(EXEEXT): $(t_mp_bases_OBJECTS) $(t_mp_bases_DEPENDENCIES) $(EXTRA_t_mp_bases_DEPENDENCIES) - @rm -f t-mp_bases$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_mp_bases_OBJECTS) $(t_mp_bases_LDADD) $(LIBS) - -t-mul$(EXEEXT): $(t_mul_OBJECTS) $(t_mul_DEPENDENCIES) $(EXTRA_t_mul_DEPENDENCIES) - @rm -f t-mul$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_mul_OBJECTS) $(t_mul_LDADD) $(LIBS) - -t-mullo$(EXEEXT): $(t_mullo_OBJECTS) $(t_mullo_DEPENDENCIES) $(EXTRA_t_mullo_DEPENDENCIES) - @rm -f t-mullo$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_mullo_OBJECTS) $(t_mullo_LDADD) $(LIBS) - -t-mulmid$(EXEEXT): $(t_mulmid_OBJECTS) $(t_mulmid_DEPENDENCIES) $(EXTRA_t_mulmid_DEPENDENCIES) - @rm -f t-mulmid$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_mulmid_OBJECTS) $(t_mulmid_LDADD) $(LIBS) - -t-mulmod_bnm1$(EXEEXT): $(t_mulmod_bnm1_OBJECTS) $(t_mulmod_bnm1_DEPENDENCIES) $(EXTRA_t_mulmod_bnm1_DEPENDENCIES) - @rm -f t-mulmod_bnm1$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_mulmod_bnm1_OBJECTS) $(t_mulmod_bnm1_LDADD) $(LIBS) - -t-perfsqr$(EXEEXT): $(t_perfsqr_OBJECTS) $(t_perfsqr_DEPENDENCIES) $(EXTRA_t_perfsqr_DEPENDENCIES) - @rm -f t-perfsqr$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_perfsqr_OBJECTS) $(t_perfsqr_LDADD) $(LIBS) - -t-scan$(EXEEXT): $(t_scan_OBJECTS) $(t_scan_DEPENDENCIES) $(EXTRA_t_scan_DEPENDENCIES) - @rm -f t-scan$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_scan_OBJECTS) $(t_scan_LDADD) $(LIBS) - -t-sizeinbase$(EXEEXT): $(t_sizeinbase_OBJECTS) $(t_sizeinbase_DEPENDENCIES) $(EXTRA_t_sizeinbase_DEPENDENCIES) - @rm -f t-sizeinbase$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_sizeinbase_OBJECTS) $(t_sizeinbase_LDADD) $(LIBS) - -t-sqrlo$(EXEEXT): $(t_sqrlo_OBJECTS) $(t_sqrlo_DEPENDENCIES) $(EXTRA_t_sqrlo_DEPENDENCIES) - @rm -f t-sqrlo$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_sqrlo_OBJECTS) $(t_sqrlo_LDADD) $(LIBS) - -t-sqrmod_bnm1$(EXEEXT): $(t_sqrmod_bnm1_OBJECTS) $(t_sqrmod_bnm1_DEPENDENCIES) $(EXTRA_t_sqrmod_bnm1_DEPENDENCIES) - @rm -f t-sqrmod_bnm1$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_sqrmod_bnm1_OBJECTS) $(t_sqrmod_bnm1_LDADD) $(LIBS) - -t-toom2-sqr$(EXEEXT): $(t_toom2_sqr_OBJECTS) $(t_toom2_sqr_DEPENDENCIES) $(EXTRA_t_toom2_sqr_DEPENDENCIES) - @rm -f t-toom2-sqr$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom2_sqr_OBJECTS) $(t_toom2_sqr_LDADD) $(LIBS) - -t-toom22$(EXEEXT): $(t_toom22_OBJECTS) $(t_toom22_DEPENDENCIES) $(EXTRA_t_toom22_DEPENDENCIES) - @rm -f t-toom22$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom22_OBJECTS) $(t_toom22_LDADD) $(LIBS) - -t-toom3-sqr$(EXEEXT): $(t_toom3_sqr_OBJECTS) $(t_toom3_sqr_DEPENDENCIES) $(EXTRA_t_toom3_sqr_DEPENDENCIES) - @rm -f t-toom3-sqr$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom3_sqr_OBJECTS) $(t_toom3_sqr_LDADD) $(LIBS) - -t-toom32$(EXEEXT): $(t_toom32_OBJECTS) $(t_toom32_DEPENDENCIES) $(EXTRA_t_toom32_DEPENDENCIES) - @rm -f t-toom32$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom32_OBJECTS) $(t_toom32_LDADD) $(LIBS) - -t-toom33$(EXEEXT): $(t_toom33_OBJECTS) $(t_toom33_DEPENDENCIES) $(EXTRA_t_toom33_DEPENDENCIES) - @rm -f t-toom33$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom33_OBJECTS) $(t_toom33_LDADD) $(LIBS) - -t-toom4-sqr$(EXEEXT): $(t_toom4_sqr_OBJECTS) $(t_toom4_sqr_DEPENDENCIES) $(EXTRA_t_toom4_sqr_DEPENDENCIES) - @rm -f t-toom4-sqr$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom4_sqr_OBJECTS) $(t_toom4_sqr_LDADD) $(LIBS) - -t-toom42$(EXEEXT): $(t_toom42_OBJECTS) $(t_toom42_DEPENDENCIES) $(EXTRA_t_toom42_DEPENDENCIES) - @rm -f t-toom42$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom42_OBJECTS) $(t_toom42_LDADD) $(LIBS) - -t-toom43$(EXEEXT): $(t_toom43_OBJECTS) $(t_toom43_DEPENDENCIES) $(EXTRA_t_toom43_DEPENDENCIES) - @rm -f t-toom43$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom43_OBJECTS) $(t_toom43_LDADD) $(LIBS) - -t-toom44$(EXEEXT): $(t_toom44_OBJECTS) $(t_toom44_DEPENDENCIES) $(EXTRA_t_toom44_DEPENDENCIES) - @rm -f t-toom44$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom44_OBJECTS) $(t_toom44_LDADD) $(LIBS) - -t-toom52$(EXEEXT): $(t_toom52_OBJECTS) $(t_toom52_DEPENDENCIES) $(EXTRA_t_toom52_DEPENDENCIES) - @rm -f t-toom52$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom52_OBJECTS) $(t_toom52_LDADD) $(LIBS) - -t-toom53$(EXEEXT): $(t_toom53_OBJECTS) $(t_toom53_DEPENDENCIES) $(EXTRA_t_toom53_DEPENDENCIES) - @rm -f t-toom53$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom53_OBJECTS) $(t_toom53_LDADD) $(LIBS) - -t-toom54$(EXEEXT): $(t_toom54_OBJECTS) $(t_toom54_DEPENDENCIES) $(EXTRA_t_toom54_DEPENDENCIES) - @rm -f t-toom54$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom54_OBJECTS) $(t_toom54_LDADD) $(LIBS) - -t-toom6-sqr$(EXEEXT): $(t_toom6_sqr_OBJECTS) $(t_toom6_sqr_DEPENDENCIES) $(EXTRA_t_toom6_sqr_DEPENDENCIES) - @rm -f t-toom6-sqr$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom6_sqr_OBJECTS) $(t_toom6_sqr_LDADD) $(LIBS) - -t-toom62$(EXEEXT): $(t_toom62_OBJECTS) $(t_toom62_DEPENDENCIES) $(EXTRA_t_toom62_DEPENDENCIES) - @rm -f t-toom62$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom62_OBJECTS) $(t_toom62_LDADD) $(LIBS) - -t-toom63$(EXEEXT): $(t_toom63_OBJECTS) $(t_toom63_DEPENDENCIES) $(EXTRA_t_toom63_DEPENDENCIES) - @rm -f t-toom63$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom63_OBJECTS) $(t_toom63_LDADD) $(LIBS) - -t-toom6h$(EXEEXT): $(t_toom6h_OBJECTS) $(t_toom6h_DEPENDENCIES) $(EXTRA_t_toom6h_DEPENDENCIES) - @rm -f t-toom6h$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom6h_OBJECTS) $(t_toom6h_LDADD) $(LIBS) - -t-toom8-sqr$(EXEEXT): $(t_toom8_sqr_OBJECTS) $(t_toom8_sqr_DEPENDENCIES) $(EXTRA_t_toom8_sqr_DEPENDENCIES) - @rm -f t-toom8-sqr$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom8_sqr_OBJECTS) $(t_toom8_sqr_LDADD) $(LIBS) - -t-toom8h$(EXEEXT): $(t_toom8h_OBJECTS) $(t_toom8h_DEPENDENCIES) $(EXTRA_t_toom8h_DEPENDENCIES) - @rm -f t-toom8h$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_toom8h_OBJECTS) $(t_toom8h_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(AM_V_CC)$(COMPILE) -c -o $@ $< - -.c.obj: - $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -recheck: all $(check_PROGRAMS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -t-asmtype.log: t-asmtype$(EXEEXT) - @p='t-asmtype$(EXEEXT)'; \ - b='t-asmtype'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-aors_1.log: t-aors_1$(EXEEXT) - @p='t-aors_1$(EXEEXT)'; \ - b='t-aors_1'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-divrem_1.log: t-divrem_1$(EXEEXT) - @p='t-divrem_1$(EXEEXT)'; \ - b='t-divrem_1'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-mod_1.log: t-mod_1$(EXEEXT) - @p='t-mod_1$(EXEEXT)'; \ - b='t-mod_1'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-fat.log: t-fat$(EXEEXT) - @p='t-fat$(EXEEXT)'; \ - b='t-fat'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-get_d.log: t-get_d$(EXEEXT) - @p='t-get_d$(EXEEXT)'; \ - b='t-get_d'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-instrument.log: t-instrument$(EXEEXT) - @p='t-instrument$(EXEEXT)'; \ - b='t-instrument'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-iord_u.log: t-iord_u$(EXEEXT) - @p='t-iord_u$(EXEEXT)'; \ - b='t-iord_u'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-mp_bases.log: t-mp_bases$(EXEEXT) - @p='t-mp_bases$(EXEEXT)'; \ - b='t-mp_bases'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-perfsqr.log: t-perfsqr$(EXEEXT) - @p='t-perfsqr$(EXEEXT)'; \ - b='t-perfsqr'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-scan.log: t-scan$(EXEEXT) - @p='t-scan$(EXEEXT)'; \ - b='t-scan'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -logic.log: logic$(EXEEXT) - @p='logic$(EXEEXT)'; \ - b='logic'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom22.log: t-toom22$(EXEEXT) - @p='t-toom22$(EXEEXT)'; \ - b='t-toom22'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom32.log: t-toom32$(EXEEXT) - @p='t-toom32$(EXEEXT)'; \ - b='t-toom32'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom33.log: t-toom33$(EXEEXT) - @p='t-toom33$(EXEEXT)'; \ - b='t-toom33'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom42.log: t-toom42$(EXEEXT) - @p='t-toom42$(EXEEXT)'; \ - b='t-toom42'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom43.log: t-toom43$(EXEEXT) - @p='t-toom43$(EXEEXT)'; \ - b='t-toom43'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom44.log: t-toom44$(EXEEXT) - @p='t-toom44$(EXEEXT)'; \ - b='t-toom44'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom52.log: t-toom52$(EXEEXT) - @p='t-toom52$(EXEEXT)'; \ - b='t-toom52'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom53.log: t-toom53$(EXEEXT) - @p='t-toom53$(EXEEXT)'; \ - b='t-toom53'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom54.log: t-toom54$(EXEEXT) - @p='t-toom54$(EXEEXT)'; \ - b='t-toom54'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom62.log: t-toom62$(EXEEXT) - @p='t-toom62$(EXEEXT)'; \ - b='t-toom62'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom63.log: t-toom63$(EXEEXT) - @p='t-toom63$(EXEEXT)'; \ - b='t-toom63'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom6h.log: t-toom6h$(EXEEXT) - @p='t-toom6h$(EXEEXT)'; \ - b='t-toom6h'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom8h.log: t-toom8h$(EXEEXT) - @p='t-toom8h$(EXEEXT)'; \ - b='t-toom8h'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom2-sqr.log: t-toom2-sqr$(EXEEXT) - @p='t-toom2-sqr$(EXEEXT)'; \ - b='t-toom2-sqr'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom3-sqr.log: t-toom3-sqr$(EXEEXT) - @p='t-toom3-sqr$(EXEEXT)'; \ - b='t-toom3-sqr'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom4-sqr.log: t-toom4-sqr$(EXEEXT) - @p='t-toom4-sqr$(EXEEXT)'; \ - b='t-toom4-sqr'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom6-sqr.log: t-toom6-sqr$(EXEEXT) - @p='t-toom6-sqr$(EXEEXT)'; \ - b='t-toom6-sqr'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-toom8-sqr.log: t-toom8-sqr$(EXEEXT) - @p='t-toom8-sqr$(EXEEXT)'; \ - b='t-toom8-sqr'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-div.log: t-div$(EXEEXT) - @p='t-div$(EXEEXT)'; \ - b='t-div'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-mul.log: t-mul$(EXEEXT) - @p='t-mul$(EXEEXT)'; \ - b='t-mul'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-mullo.log: t-mullo$(EXEEXT) - @p='t-mullo$(EXEEXT)'; \ - b='t-mullo'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-sqrlo.log: t-sqrlo$(EXEEXT) - @p='t-sqrlo$(EXEEXT)'; \ - b='t-sqrlo'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-mulmod_bnm1.log: t-mulmod_bnm1$(EXEEXT) - @p='t-mulmod_bnm1$(EXEEXT)'; \ - b='t-mulmod_bnm1'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-sqrmod_bnm1.log: t-sqrmod_bnm1$(EXEEXT) - @p='t-sqrmod_bnm1$(EXEEXT)'; \ - b='t-sqrmod_bnm1'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-mulmid.log: t-mulmid$(EXEEXT) - @p='t-mulmid$(EXEEXT)'; \ - b='t-mulmid'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-hgcd.log: t-hgcd$(EXEEXT) - @p='t-hgcd$(EXEEXT)'; \ - b='t-hgcd'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-hgcd_appr.log: t-hgcd_appr$(EXEEXT) - @p='t-hgcd_appr$(EXEEXT)'; \ - b='t-hgcd_appr'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-matrix22.log: t-matrix22$(EXEEXT) - @p='t-matrix22$(EXEEXT)'; \ - b='t-matrix22'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-invert.log: t-invert$(EXEEXT) - @p='t-invert$(EXEEXT)'; \ - b='t-invert'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-bdiv.log: t-bdiv$(EXEEXT) - @p='t-bdiv$(EXEEXT)'; \ - b='t-bdiv'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-broot.log: t-broot$(EXEEXT) - @p='t-broot$(EXEEXT)'; \ - b='t-broot'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-brootinv.log: t-brootinv$(EXEEXT) - @p='t-brootinv$(EXEEXT)'; \ - b='t-brootinv'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-minvert.log: t-minvert$(EXEEXT) - @p='t-minvert$(EXEEXT)'; \ - b='t-minvert'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-sizeinbase.log: t-sizeinbase$(EXEEXT) - @p='t-sizeinbase$(EXEEXT)'; \ - b='t-sizeinbase'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.test$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/logic.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/logic.c deleted file mode 100644 index 18d655f5865..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/logic.c +++ /dev/null @@ -1,134 +0,0 @@ -/* Test mpn_and, mpn_ior, mpn_xor, mpn_andn, mpn_iorn, mpn_xnor, mpn_nand, and - mpn_nior. - -Copyright 2011-2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdlib.h> -#include <stdio.h> - -/* Fake native prevalence of the tested operations, so that we actually test - the compiled functions, i.e., the ones which users will reach. The inlined - variants will be tested through tests/mpz/logic.c. */ -#define HAVE_NATIVE_mpn_com 1 -#define HAVE_NATIVE_mpn_and_n 1 -#define HAVE_NATIVE_mpn_andn_n 1 -#define HAVE_NATIVE_mpn_nand_n 1 -#define HAVE_NATIVE_mpn_ior_n 1 -#define HAVE_NATIVE_mpn_iorn_n 1 -#define HAVE_NATIVE_mpn_nior_n 1 -#define HAVE_NATIVE_mpn_xor_n 1 -#define HAVE_NATIVE_mpn_xnor_n 1 - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_one (mp_srcptr refp, mp_srcptr rp, mp_srcptr ap, mp_srcptr bp, mp_size_t n, const char *funcname) -{ - if (mpn_cmp (refp, rp, n)) - { - printf ("ERROR in mpn_%s\n", funcname); - printf ("a: "); mpn_dump (ap, n); - printf ("b: "); mpn_dump (bp, n); - printf ("r: "); mpn_dump (rp, n); - printf ("ref: "); mpn_dump (refp, n); - abort(); - } -} - -int -main (int argc, char **argv) -{ - mpz_t a, b; - mp_ptr ap, bp, rp, refp; - mp_size_t max_n, n, i; - gmp_randstate_ptr rands; - long test, reps = 1000; - TMP_DECL; - TMP_MARK; - - tests_start (); - TESTS_REPS (reps, argv, argc); - - mpz_inits (a, b, NULL); - - rands = RANDS; /* FIXME: not used */ - - max_n = 100; - - rp = TMP_ALLOC_LIMBS (1 + max_n * 8 / GMP_LIMB_BITS); - refp = TMP_ALLOC_LIMBS (1 + max_n * 8 / GMP_LIMB_BITS); - - for (test = 0; test < reps; test++) - { - for (i = 1; i <= max_n; i++) - { - mpz_rrandomb (a, rands, i * 8); - mpz_rrandomb (b, rands, i * 8); - mpz_setbit (a, i * 8 - 1); - mpz_setbit (b, i * 8 - 1); - ap = PTR(a); - bp = PTR(b); - n = SIZ(a); - - refmpn_and_n (refp, ap, bp, n); - mpn_and_n (rp, ap, bp, n); - check_one (refp, rp, ap, bp, n, "and_n"); - - refmpn_ior_n (refp, ap, bp, n); - mpn_ior_n (rp, ap, bp, n); - check_one (refp, rp, ap, bp, n, "ior_n"); - - refmpn_xor_n (refp, ap, bp, n); - mpn_xor_n (rp, ap, bp, n); - check_one (refp, rp, ap, bp, n, "xor_n"); - - refmpn_andn_n (refp, ap, bp, n); - mpn_andn_n (rp, ap, bp, n); - check_one (refp, rp, ap, bp, n, "andn_n"); - - refmpn_iorn_n (refp, ap, bp, n); - mpn_iorn_n (rp, ap, bp, n); - check_one (refp, rp, ap, bp, n, "iorn_n"); - - refmpn_nand_n (refp, ap, bp, n); - mpn_nand_n (rp, ap, bp, n); - check_one (refp, rp, ap, bp, n, "nand_n"); - - refmpn_nior_n (refp, ap, bp, n); - mpn_nior_n (rp, ap, bp, n); - check_one (refp, rp, ap, bp, n, "nior_n"); - - refmpn_xnor_n (refp, ap, bp, n); - mpn_xnor_n (rp, ap, bp, n); - check_one (refp, rp, ap, bp, n, "xnor_n"); - - refmpn_com (refp, ap, n); - mpn_com (rp, ap, n); - check_one (refp, rp, ap, bp, n, "com"); - } - } - - TMP_FREE; - mpz_clears (a, b, NULL); - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-aors_1.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-aors_1.c deleted file mode 100644 index 6a946f2d572..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-aors_1.c +++ /dev/null @@ -1,311 +0,0 @@ -/* Test mpn_add_1 and mpn_sub_1. - -Copyright 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -#define M GMP_NUMB_MAX -#define ASIZE 10 -#define MAGIC 0x1234 - -#define SETUP() \ - do { \ - refmpn_random (got, data[i].size); \ - got[data[i].size] = MAGIC; \ - } while (0) - -#define SETUP_INPLACE() \ - do { \ - refmpn_copyi (got, data[i].src, data[i].size); \ - got[data[i].size] = MAGIC; \ - } while (0) - -#define VERIFY(name) \ - do { \ - verify (name, i, data[i].src, data[i].n, \ - got_c, data[i].want_c, \ - got, data[i].want, data[i].size); \ - } while (0) - -typedef mp_limb_t (*mpn_aors_1_t) (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); -mpn_aors_1_t fudge (mpn_aors_1_t); - - -void -verify (const char *name, int i, - mp_srcptr src, mp_limb_t n, - mp_limb_t got_c, mp_limb_t want_c, - mp_srcptr got, mp_srcptr want, mp_size_t size) -{ - if (got[size] != MAGIC) - { - printf ("Overwrite at %s i=%d\n", name, i); - abort (); - } - - if (got_c != want_c || ! refmpn_equal_anynail (got, want, size)) - { - printf ("Wrong at %s i=%d size=%ld\n", name, i, size); - mpn_trace (" src", src, size); - mpn_trace (" n", &n, (mp_size_t) 1); - mpn_trace (" got", got, size); - mpn_trace (" want", want, size); - mpn_trace (" got c", &got_c, (mp_size_t) 1); - mpn_trace ("want c", &want_c, (mp_size_t) 1); - abort (); - } -} - - -void -check_add_1 (void) -{ - static const struct { - mp_size_t size; - mp_limb_t n; - const mp_limb_t src[ASIZE]; - mp_limb_t want_c; - const mp_limb_t want[ASIZE]; - } data[] = { - { 1, 0, { 0 }, 0, { 0 } }, - { 1, 0, { 1 }, 0, { 1 } }, - { 1, 1, { 0 }, 0, { 1 } }, - { 1, 0, { M }, 0, { M } }, - { 1, M, { 0 }, 0, { M } }, - { 1, 1, { 123 }, 0, { 124 } }, - - { 1, 1, { M }, 1, { 0 } }, - { 1, M, { 1 }, 1, { 0 } }, - { 1, M, { M }, 1, { M-1 } }, - - { 2, 0, { 0, 0 }, 0, { 0, 0 } }, - { 2, 0, { 1, 0 }, 0, { 1, 0 } }, - { 2, 1, { 0, 0 }, 0, { 1, 0 } }, - { 2, 0, { M, 0 }, 0, { M, 0 } }, - { 2, M, { 0, 0 }, 0, { M, 0 } }, - { 2, 1, { M, 0 }, 0, { 0, 1 } }, - { 2, M, { 1, 0 }, 0, { 0, 1 } }, - { 2, M, { M, 0 }, 0, { M-1, 1 } }, - { 2, M, { M, 0 }, 0, { M-1, 1 } }, - - { 2, 1, { M, M }, 1, { 0, 0 } }, - { 2, M, { 1, M }, 1, { 0, 0 } }, - { 2, M, { M, M }, 1, { M-1, 0 } }, - { 2, M, { M, M }, 1, { M-1, 0 } }, - - { 3, 1, { M, M, M }, 1, { 0, 0, 0 } }, - { 3, M, { 1, M, M }, 1, { 0, 0, 0 } }, - { 3, M, { M, M, M }, 1, { M-1, 0, 0 } }, - { 3, M, { M, M, M }, 1, { M-1, 0, 0 } }, - - { 4, 1, { M, M, M, M }, 1, { 0, 0, 0, 0 } }, - { 4, M, { 1, M, M, M }, 1, { 0, 0, 0, 0 } }, - { 4, M, { M, M, M, M }, 1, { M-1, 0, 0, 0 } }, - { 4, M, { M, M, M, M }, 1, { M-1, 0, 0, 0 } }, - - { 4, M, { M, 0, M, M }, 0, { M-1, 1, M, M } }, - { 4, M, { M, M-1, M, M }, 0, { M-1, M, M, M } }, - - { 4, M, { M, M, 0, M }, 0, { M-1, 0, 1, M } }, - { 4, M, { M, M, M-1, M }, 0, { M-1, 0, M, M } }, - }; - - mp_limb_t got[ASIZE]; - mp_limb_t got_c; - /* mpn_sec_add_a_itch(n) <= n */ - mp_limb_t scratch[ASIZE]; - int i; - - for (i = 0; i < numberof (data); i++) - { - SETUP (); - got_c = mpn_add_1 (got, data[i].src, data[i].size, data[i].n); - VERIFY ("check_add_1 (separate)"); - - SETUP_INPLACE (); - got_c = mpn_add_1 (got, got, data[i].size, data[i].n); - VERIFY ("check_add_1 (in-place)"); - - SETUP (); - scratch [mpn_sec_add_1_itch(data[i].size)] = MAGIC; - got_c = mpn_sec_add_1 (got, data[i].src, data[i].size, data[i].n, scratch); - got_c ^= scratch [mpn_sec_add_1_itch(data[i].size)] ^ MAGIC; - VERIFY ("check_sec_add_1 (separate)"); - - SETUP_INPLACE (); - got_c = mpn_sec_add_1 (got, got, data[i].size, data[i].n, scratch); - VERIFY ("check_sec_add_1 (in-place)"); - - if (data[i].n == 1) - { - SETUP (); - got_c = mpn_add_1 (got, data[i].src, data[i].size, CNST_LIMB(1)); - VERIFY ("check_add_1 (separate, const 1)"); - - SETUP_INPLACE (); - got_c = mpn_add_1 (got, got, data[i].size, CNST_LIMB(1)); - VERIFY ("check_add_1 (in-place, const 1)"); - - SETUP (); - got_c = mpn_sec_add_1 (got, data[i].src, data[i].size, - CNST_LIMB(1), scratch); - VERIFY ("check_sec_add_1 (separate, const 1)"); - - SETUP_INPLACE (); - got_c = mpn_sec_add_1 (got, got, data[i].size, - CNST_LIMB(1), scratch); - VERIFY ("check_sec_add_1 (in-place, const 1)"); - } - - /* Same again on functions, not inlines. */ - SETUP (); - got_c = (*fudge(mpn_add_1)) (got, data[i].src, data[i].size, data[i].n); - VERIFY ("check_add_1 (function, separate)"); - - SETUP_INPLACE (); - got_c = (*fudge(mpn_add_1)) (got, got, data[i].size, data[i].n); - VERIFY ("check_add_1 (function, in-place)"); - } -} - -void -check_sub_1 (void) -{ - static const struct { - mp_size_t size; - mp_limb_t n; - const mp_limb_t src[ASIZE]; - mp_limb_t want_c; - const mp_limb_t want[ASIZE]; - } data[] = { - { 1, 0, { 0 }, 0, { 0 } }, - { 1, 0, { 1 }, 0, { 1 } }, - { 1, 1, { 1 }, 0, { 0 } }, - { 1, 0, { M }, 0, { M } }, - { 1, 1, { M }, 0, { M-1 } }, - { 1, 1, { 123 }, 0, { 122 } }, - - { 1, 1, { 0 }, 1, { M } }, - { 1, M, { 0 }, 1, { 1 } }, - - { 2, 0, { 0, 0 }, 0, { 0, 0 } }, - { 2, 0, { 1, 0 }, 0, { 1, 0 } }, - { 2, 1, { 1, 0 }, 0, { 0, 0 } }, - { 2, 0, { M, 0 }, 0, { M, 0 } }, - { 2, 1, { M, 0 }, 0, { M-1, 0 } }, - { 2, 1, { 123, 0 }, 0, { 122, 0 } }, - - { 2, 1, { 0, 0 }, 1, { M, M } }, - { 2, M, { 0, 0 }, 1, { 1, M } }, - - { 3, 0, { 0, 0, 0 }, 0, { 0, 0, 0 } }, - { 3, 0, { 123, 0, 0 }, 0, { 123, 0, 0 } }, - - { 3, 1, { 0, 0, 0 }, 1, { M, M, M } }, - { 3, M, { 0, 0, 0 }, 1, { 1, M, M } }, - - { 4, 1, { 0, 0, 0, 0 }, 1, { M, M, M, M } }, - { 4, M, { 0, 0, 0, 0 }, 1, { 1, M, M, M } }, - - { 4, 1, { 0, 0, 1, 42 }, 0, { M, M, 0, 42 } }, - { 4, M, { 0, 0, 123, 24 }, 0, { 1, M, 122, 24 } }, - }; - - mp_limb_t got[ASIZE]; - mp_limb_t got_c; - /* mpn_sec_sub_1_itch(n) <= n */ - mp_limb_t scratch[ASIZE]; - int i; - - for (i = 0; i < numberof (data); i++) - { - SETUP (); - got_c = mpn_sub_1 (got, data[i].src, data[i].size, data[i].n); - VERIFY ("check_sub_1 (separate)"); - - SETUP_INPLACE (); - got_c = mpn_sub_1 (got, got, data[i].size, data[i].n); - VERIFY ("check_sub_1 (in-place)"); - - SETUP (); - scratch [mpn_sec_sub_1_itch(data[i].size)] = MAGIC; - got_c = mpn_sec_sub_1 (got, data[i].src, data[i].size, data[i].n, scratch); - got_c ^= scratch [mpn_sec_sub_1_itch(data[i].size)] ^ MAGIC; - VERIFY ("check_sec_sub_1 (separate)"); - - SETUP_INPLACE (); - got_c = mpn_sec_sub_1 (got, got, data[i].size, data[i].n, scratch); - VERIFY ("check_sec_sub_1 (in-place)"); - - if (data[i].n == 1) - { - SETUP (); - got_c = mpn_sub_1 (got, data[i].src, data[i].size, CNST_LIMB(1)); - VERIFY ("check_sub_1 (separate, const 1)"); - - SETUP_INPLACE (); - got_c = mpn_sub_1 (got, got, data[i].size, CNST_LIMB(1)); - VERIFY ("check_sub_1 (in-place, const 1)"); - - SETUP (); - got_c = mpn_sec_sub_1 (got, data[i].src, data[i].size, - CNST_LIMB(1), scratch); - VERIFY ("check_sec_sub_1 (separate, const 1)"); - - SETUP_INPLACE (); - got_c = mpn_sec_sub_1 (got, got, data[i].size, - CNST_LIMB(1), scratch); - VERIFY ("check_sec_sub_1 (in-place, const 1)"); - } - - /* Same again on functions, not inlines. */ - SETUP (); - got_c = (*fudge(mpn_sub_1)) (got, data[i].src, data[i].size, data[i].n); - VERIFY ("check_sub_1 (function, separate)"); - - SETUP_INPLACE (); - got_c = (*fudge(mpn_sub_1)) (got, got, data[i].size, data[i].n); - VERIFY ("check_sub_1 (function, in-place)"); - } -} - -/* Try to prevent the optimizer inlining. */ -mpn_aors_1_t -fudge (mpn_aors_1_t f) -{ - return f; -} - -int -main (void) -{ - tests_start (); - mp_trace_base = -16; - - check_add_1 (); - check_sub_1 (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-asmtype.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-asmtype.c deleted file mode 100644 index 93960f7aef1..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-asmtype.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Test .type directives on assembler functions. - -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" - -#include "tests.h" - - -/* This apparently trivial test is designed to detect missing .type and - .size directives in asm code, per the problem described under - GMP_ASM_TYPE in acinclude.m4. - - A failure can be provoked in a shared or shared+static build by making - TYPE and SIZE in config.m4 empty, either by editing it or by configuring - with - - ./configure gmp_cv_asm_type= gmp_cv_asm_size= - - mpn_add_n is used for the test because normally it's implemented in - assembler on a CPU that has any asm code. - - Enhancement: As noted with GMP_ASM_TYPE, if .type is wrong but .size is - right then everything works, but uses code copied down to the mainline - data area. Maybe we could detect that if we built a test library with an - object that had .size deliberately disabled. */ - -int -main (void) -{ - static const mp_limb_t x[3] = { 1, 2, 3 }; - static const mp_limb_t y[3] = { 4, 5, 6 }; - static const mp_limb_t want[3] = { 5, 7, 9 }; - mp_limb_t got[3]; - - mpn_add_n (got, x, y, (mp_size_t) 3); - - if (refmpn_cmp (got, want, (mp_size_t) 3) != 0) - { - printf ("Wrong result from mpn_add_n\n"); - abort (); - } - - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-bdiv.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-bdiv.c deleted file mode 100644 index e13b1665d6f..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-bdiv.c +++ /dev/null @@ -1,368 +0,0 @@ -/* Copyright 2006, 2007, 2009, 2010 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdlib.h> /* for strtol */ -#include <stdio.h> /* for printf */ - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" -#include "tests/tests.h" - - -static void -dumpy (mp_srcptr p, mp_size_t n) -{ - mp_size_t i; - if (n > 20) - { - for (i = n - 1; i >= n - 4; i--) - { - printf ("%0*lx", (int) (2 * sizeof (mp_limb_t)), p[i]); - printf (" "); - } - printf ("... "); - for (i = 3; i >= 0; i--) - { - printf ("%0*lx", (int) (2 * sizeof (mp_limb_t)), p[i]); - printf (i == 0 ? "" : " "); - } - } - else - { - for (i = n - 1; i >= 0; i--) - { - printf ("%0*lx", (int) (2 * sizeof (mp_limb_t)), p[i]); - printf (i == 0 ? "" : " "); - } - } - puts (""); -} - -static unsigned long test; - -void -check_one (mp_ptr qp, mp_srcptr rp, mp_limb_t rh, - mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, const char *fname) -{ - mp_size_t qn; - int cmp; - mp_ptr tp; - mp_limb_t cy = 4711; /* silence warnings */ - TMP_DECL; - - qn = nn - dn; - - if (qn == 0) - return; - - TMP_MARK; - - tp = TMP_ALLOC_LIMBS (nn + 1); - - if (dn >= qn) - mpn_mul (tp, dp, dn, qp, qn); - else - mpn_mul (tp, qp, qn, dp, dn); - - if (rp != NULL) - { - cy = mpn_add_n (tp + qn, tp + qn, rp, dn); - cmp = cy != rh || mpn_cmp (tp, np, nn) != 0; - } - else - cmp = mpn_cmp (tp, np, nn - dn) != 0; - - if (cmp != 0) - { - printf ("\r*******************************************************************************\n"); - printf ("%s inconsistent in test %lu\n", fname, test); - printf ("N= "); dumpy (np, nn); - printf ("D= "); dumpy (dp, dn); - printf ("Q= "); dumpy (qp, qn); - if (rp != NULL) - { - printf ("R= "); dumpy (rp, dn); - printf ("Rb= %d, Cy=%d\n", (int) cy, (int) rh); - } - printf ("T= "); dumpy (tp, nn); - printf ("nn = %ld, dn = %ld, qn = %ld", nn, dn, qn); - printf ("\n*******************************************************************************\n"); - abort (); - } - - TMP_FREE; -} - - -/* These are *bit* sizes. */ -#define SIZE_LOG 16 -#define MAX_DN (1L << SIZE_LOG) -#define MAX_NN (1L << (SIZE_LOG + 1)) - -#define COUNT 500 - -mp_limb_t -random_word (gmp_randstate_ptr rs) -{ - mpz_t x; - mp_limb_t r; - TMP_DECL; - TMP_MARK; - - MPZ_TMP_INIT (x, 2); - mpz_urandomb (x, rs, 32); - r = mpz_get_ui (x); - TMP_FREE; - return r; -} - -int -main (int argc, char **argv) -{ - gmp_randstate_ptr rands; - unsigned long maxnbits, maxdbits, nbits, dbits; - mpz_t n, d, tz; - mp_size_t maxnn, maxdn, nn, dn, clearn, i; - mp_ptr np, dp, qp, rp; - mp_limb_t rh; - mp_limb_t t; - mp_limb_t dinv; - int count = COUNT; - mp_ptr scratch; - mp_limb_t ran; - mp_size_t alloc, itch; - mp_limb_t rran0, rran1, qran0, qran1; - TMP_DECL; - - if (argc > 1) - { - char *end; - count = strtol (argv[1], &end, 0); - if (*end || count <= 0) - { - fprintf (stderr, "Invalid test count: %s.\n", argv[1]); - return 1; - } - } - - - maxdbits = MAX_DN; - maxnbits = MAX_NN; - - tests_start (); - rands = RANDS; - - mpz_init (n); - mpz_init (d); - mpz_init (tz); - - maxnn = maxnbits / GMP_NUMB_BITS + 1; - maxdn = maxdbits / GMP_NUMB_BITS + 1; - - TMP_MARK; - - qp = TMP_ALLOC_LIMBS (maxnn + 2) + 1; - rp = TMP_ALLOC_LIMBS (maxnn + 2) + 1; - - alloc = 1; - scratch = __GMP_ALLOCATE_FUNC_LIMBS (alloc); - - for (test = 0; test < count;) - { - nbits = random_word (rands) % (maxnbits - GMP_NUMB_BITS) + 2 * GMP_NUMB_BITS; - if (maxdbits > nbits) - dbits = random_word (rands) % nbits + 1; - else - dbits = random_word (rands) % maxdbits + 1; - -#if RAND_UNIFORM -#define RANDFUNC mpz_urandomb -#else -#define RANDFUNC mpz_rrandomb -#endif - - do - { - RANDFUNC (n, rands, nbits); - do - { - RANDFUNC (d, rands, dbits); - } - while (mpz_sgn (d) == 0); - - np = PTR (n); - dp = PTR (d); - nn = SIZ (n); - dn = SIZ (d); - } - while (nn < dn); - - dp[0] |= 1; - - mpz_urandomb (tz, rands, 32); - t = mpz_get_ui (tz); - - if (t % 17 == 0) - dp[0] = GMP_NUMB_MAX; - - switch ((int) t % 16) - { - case 0: - clearn = random_word (rands) % nn; - for (i = 0; i <= clearn; i++) - np[i] = 0; - break; - case 1: - mpn_sub_1 (np + nn - dn, dp, dn, random_word (rands)); - break; - case 2: - mpn_add_1 (np + nn - dn, dp, dn, random_word (rands)); - break; - } - - test++; - - binvert_limb (dinv, dp[0]); - - rran0 = random_word (rands); - rran1 = random_word (rands); - qran0 = random_word (rands); - qran1 = random_word (rands); - - qp[-1] = qran0; - qp[nn - dn + 1] = qran1; - rp[-1] = rran0; - - ran = random_word (rands); - - if ((double) (nn - dn) * dn < 1e5) - { - if (nn > dn) - { - /* Test mpn_sbpi1_bdiv_qr */ - MPN_ZERO (qp, nn - dn); - MPN_ZERO (rp, dn); - MPN_COPY (rp, np, nn); - rh = mpn_sbpi1_bdiv_qr (qp, rp, nn, dp, dn, -dinv); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); - ASSERT_ALWAYS (rp[-1] == rran0); - check_one (qp, rp + nn - dn, rh, np, nn, dp, dn, "mpn_sbpi1_bdiv_qr"); - } - - if (nn > dn) - { - /* Test mpn_sbpi1_bdiv_q */ - MPN_COPY (rp, np, nn); - MPN_ZERO (qp, nn - dn); - mpn_sbpi1_bdiv_q (qp, rp, nn - dn, dp, MIN(dn,nn-dn), -dinv); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); - ASSERT_ALWAYS (rp[-1] == rran0); - check_one (qp, NULL, 0, np, nn, dp, dn, "mpn_sbpi1_bdiv_q"); - } - } - - if (dn >= 4 && nn - dn >= 2) - { - /* Test mpn_dcpi1_bdiv_qr */ - MPN_COPY (rp, np, nn); - MPN_ZERO (qp, nn - dn); - rh = mpn_dcpi1_bdiv_qr (qp, rp, nn, dp, dn, -dinv); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); - ASSERT_ALWAYS (rp[-1] == rran0); - check_one (qp, rp + nn - dn, rh, np, nn, dp, dn, "mpn_dcpi1_bdiv_qr"); - } - - if (dn >= 4 && nn - dn >= 2) - { - /* Test mpn_dcpi1_bdiv_q */ - MPN_COPY (rp, np, nn); - MPN_ZERO (qp, nn - dn); - mpn_dcpi1_bdiv_q (qp, rp, nn - dn, dp, MIN(dn,nn-dn), -dinv); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); - ASSERT_ALWAYS (rp[-1] == rran0); - check_one (qp, NULL, 0, np, nn, dp, dn, "mpn_dcpi1_bdiv_q"); - } - - if (nn > dn) - { - /* Test mpn_bdiv_qr */ - itch = mpn_bdiv_qr_itch (nn, dn); - if (itch + 1 > alloc) - { - scratch = __GMP_REALLOCATE_FUNC_LIMBS (scratch, alloc, itch + 1); - alloc = itch + 1; - } - scratch[itch] = ran; - MPN_ZERO (qp, nn - dn); - MPN_ZERO (rp, dn); - rp[dn] = rran1; - rh = mpn_bdiv_qr (qp, rp, np, nn, dp, dn, scratch); - ASSERT_ALWAYS (ran == scratch[itch]); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); - ASSERT_ALWAYS (rp[-1] == rran0); ASSERT_ALWAYS (rp[dn] == rran1); - - check_one (qp, rp, rh, np, nn, dp, dn, "mpn_bdiv_qr"); - } - - if (nn - dn < 2 || dn < 2) - continue; - - /* Test mpn_mu_bdiv_qr */ - itch = mpn_mu_bdiv_qr_itch (nn, dn); - if (itch + 1 > alloc) - { - scratch = __GMP_REALLOCATE_FUNC_LIMBS (scratch, alloc, itch + 1); - alloc = itch + 1; - } - scratch[itch] = ran; - MPN_ZERO (qp, nn - dn); - MPN_ZERO (rp, dn); - rp[dn] = rran1; - rh = mpn_mu_bdiv_qr (qp, rp, np, nn, dp, dn, scratch); - ASSERT_ALWAYS (ran == scratch[itch]); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); - ASSERT_ALWAYS (rp[-1] == rran0); ASSERT_ALWAYS (rp[dn] == rran1); - check_one (qp, rp, rh, np, nn, dp, dn, "mpn_mu_bdiv_qr"); - - /* Test mpn_mu_bdiv_q */ - itch = mpn_mu_bdiv_q_itch (nn, dn); - if (itch + 1 > alloc) - { - scratch = __GMP_REALLOCATE_FUNC_LIMBS (scratch, alloc, itch + 1); - alloc = itch + 1; - } - scratch[itch] = ran; - MPN_ZERO (qp, nn - dn + 1); - mpn_mu_bdiv_q (qp, np, nn - dn, dp, dn, scratch); - ASSERT_ALWAYS (ran == scratch[itch]); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); - check_one (qp, NULL, 0, np, nn, dp, dn, "mpn_mu_bdiv_q"); - } - - __GMP_FREE_FUNC_LIMBS (scratch, alloc); - - TMP_FREE; - - mpz_clear (n); - mpz_clear (d); - mpz_clear (tz); - - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-broot.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-broot.c deleted file mode 100644 index 4b0906b4658..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-broot.c +++ /dev/null @@ -1,118 +0,0 @@ -/* Copyright 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdlib.h> /* for strtol */ -#include <stdio.h> /* for printf */ - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" -#include "tests/tests.h" - -#define MAX_LIMBS 150 -#define COUNT 500 - -int -main (int argc, char **argv) -{ - gmp_randstate_ptr rands; - - mp_ptr ap, rp, pp, scratch; - int count = COUNT; - unsigned i; - TMP_DECL; - - TMP_MARK; - - if (argc > 1) - { - char *end; - count = strtol (argv[1], &end, 0); - if (*end || count <= 0) - { - fprintf (stderr, "Invalid test count: %s.\n", argv[1]); - return 1; - } - } - - tests_start (); - rands = RANDS; - - ap = TMP_ALLOC_LIMBS (MAX_LIMBS); - rp = TMP_ALLOC_LIMBS (MAX_LIMBS); - pp = TMP_ALLOC_LIMBS (MAX_LIMBS); - scratch = TMP_ALLOC_LIMBS (3*MAX_LIMBS); /* For mpn_powlo */ - - for (i = 0; i < count; i++) - { - mp_size_t n; - mp_limb_t k; - int c; - - n = 1 + gmp_urandomm_ui (rands, MAX_LIMBS); - - if (i & 1) - mpn_random2 (ap, n); - else - mpn_random (ap, n); - - ap[0] |= 1; - - if (i < 100) - k = 3 + 2*i; - else - { - mpn_random (&k, 1); - if (k < 3) - k = 3; - else - k |= 1; - } - mpn_broot (rp, ap, n, k); - mpn_powlo (pp, rp, &k, 1, n, scratch); - - MPN_CMP (c, ap, pp, n); - if (c != 0) - { - gmp_fprintf (stderr, - "mpn_broot returned bad result: %u limbs\n", - (unsigned) n); - gmp_fprintf (stderr, "k = %Mx\n", k); - gmp_fprintf (stderr, "a = %Nx\n", ap, n); - gmp_fprintf (stderr, "r = %Nx\n", rp, n); - gmp_fprintf (stderr, "r^k = %Nx\n", pp, n); - abort (); - } - } - - mpn_broot (rp, ap, MAX_LIMBS, 1); - if (mpn_cmp (ap, rp, MAX_LIMBS) != 0) - { - gmp_fprintf (stderr, - "mpn_broot returned bad result: %u limbs\n", - (unsigned) MAX_LIMBS); - gmp_fprintf (stderr, "k = %Mx\n", 1); - gmp_fprintf (stderr, "a = %Nx\n", ap, MAX_LIMBS); - gmp_fprintf (stderr, "r = %Nx\n", rp, MAX_LIMBS); - abort (); - } - - TMP_FREE; - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-brootinv.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-brootinv.c deleted file mode 100644 index 3200d3f72bf..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-brootinv.c +++ /dev/null @@ -1,106 +0,0 @@ -/* Copyright 2012, 2015 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdlib.h> /* for strtol */ -#include <stdio.h> /* for printf */ - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" -#include "tests/tests.h" - -#define MAX_LIMBS 150 -#define COUNT 500 - -int -main (int argc, char **argv) -{ - gmp_randstate_ptr rands; - - mp_ptr ap, rp, pp, app, scratch; - int count = COUNT; - unsigned i; - TMP_DECL; - - TMP_MARK; - - if (argc > 1) - { - char *end; - count = strtol (argv[1], &end, 0); - if (*end || count <= 0) - { - fprintf (stderr, "Invalid test count: %s.\n", argv[1]); - return 1; - } - } - - tests_start (); - rands = RANDS; - - ap = TMP_ALLOC_LIMBS (MAX_LIMBS); - rp = TMP_ALLOC_LIMBS (MAX_LIMBS); - pp = TMP_ALLOC_LIMBS (MAX_LIMBS); - app = TMP_ALLOC_LIMBS (MAX_LIMBS); - scratch = TMP_ALLOC_LIMBS (5*MAX_LIMBS); - - for (i = 0; i < count; i++) - { - mp_size_t n; - mp_limb_t k; - - n = 1 + gmp_urandomm_ui (rands, MAX_LIMBS); - - if (i & 1) - mpn_random2 (ap, n); - else - mpn_random (ap, n); - - ap[0] |= 1; - - if (i < 100) - k = 3 + 2*i; - else - { - mpn_random (&k, 1); - if (k < 3) - k = 3; - else - k |= 1; - } - mpn_brootinv (rp, ap, n, k, scratch); - mpn_powlo (pp, rp, &k, 1, n, scratch); - mpn_mullo_n (app, ap, pp, n); - - if (app[0] != 1 || !(n == 1 || mpn_zero_p (app+1, n-1))) - { - gmp_fprintf (stderr, - "mpn_brootinv returned bad result: %u limbs\n", - (unsigned) n); - gmp_fprintf (stderr, "k = %Mx\n", k); - gmp_fprintf (stderr, "a = %Nx\n", ap, n); - gmp_fprintf (stderr, "r = %Nx\n", rp, n); - gmp_fprintf (stderr, "r^n = %Nx\n", pp, n); - gmp_fprintf (stderr, "a r^n = %Nx\n", app, n); - abort (); - } - } - TMP_FREE; - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-div.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-div.c deleted file mode 100644 index 59e89c757ef..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-div.c +++ /dev/null @@ -1,505 +0,0 @@ -/* Copyright 2006, 2007, 2009, 2010, 2013-2015 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdlib.h> /* for strtol */ -#include <stdio.h> /* for printf */ - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" -#include "tests/tests.h" - - -static void -dumpy (mp_srcptr p, mp_size_t n) -{ - mp_size_t i; - if (n > 20) - { - for (i = n - 1; i >= n - 4; i--) - { - printf ("%0*lx", (int) (2 * sizeof (mp_limb_t)), p[i]); - printf (" "); - } - printf ("... "); - for (i = 3; i >= 0; i--) - { - printf ("%0*lx", (int) (2 * sizeof (mp_limb_t)), p[i]); - printf (i == 0 ? "" : " "); - } - } - else - { - for (i = n - 1; i >= 0; i--) - { - printf ("%0*lx", (int) (2 * sizeof (mp_limb_t)), p[i]); - printf (i == 0 ? "" : " "); - } - } - puts (""); -} - -static signed long test; - -static void -check_one (mp_ptr qp, mp_srcptr rp, - mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, - const char *fname, mp_limb_t q_allowed_err) -{ - mp_size_t qn = nn - dn + 1; - mp_ptr tp; - const char *msg; - const char *tvalue; - mp_limb_t i; - TMP_DECL; - TMP_MARK; - - tp = TMP_ALLOC_LIMBS (nn + 1); - if (dn >= qn) - refmpn_mul (tp, dp, dn, qp, qn); - else - refmpn_mul (tp, qp, qn, dp, dn); - - for (i = 0; i < q_allowed_err && (tp[nn] > 0 || mpn_cmp (tp, np, nn) > 0); i++) - ASSERT_NOCARRY (refmpn_sub (tp, tp, nn+1, dp, dn)); - - if (tp[nn] > 0 || mpn_cmp (tp, np, nn) > 0) - { - msg = "q too large"; - tvalue = "Q*D"; - error: - printf ("\r*******************************************************************************\n"); - printf ("%s failed test %ld: %s\n", fname, test, msg); - printf ("N= "); dumpy (np, nn); - printf ("D= "); dumpy (dp, dn); - printf ("Q= "); dumpy (qp, qn); - if (rp) - { printf ("R= "); dumpy (rp, dn); } - printf ("%5s=", tvalue); dumpy (tp, nn+1); - printf ("nn = %ld, dn = %ld, qn = %ld\n", nn, dn, qn); - abort (); - } - - ASSERT_NOCARRY (refmpn_sub_n (tp, np, tp, nn)); - tvalue = "N-Q*D"; - if (!(nn == dn || mpn_zero_p (tp + dn, nn - dn)) || mpn_cmp (tp, dp, dn) >= 0) - { - msg = "q too small"; - goto error; - } - - if (rp && mpn_cmp (rp, tp, dn) != 0) - { - msg = "r incorrect"; - goto error; - } - - TMP_FREE; -} - - -/* These are *bit* sizes. */ -#ifndef SIZE_LOG -#define SIZE_LOG 17 -#endif -#define MAX_DN (1L << SIZE_LOG) -#define MAX_NN (1L << (SIZE_LOG + 1)) - -#define COUNT 200 - -int -main (int argc, char **argv) -{ - gmp_randstate_ptr rands; - unsigned long maxnbits, maxdbits, nbits, dbits; - mpz_t n, d, q, r, tz, junk; - mp_size_t maxnn, maxdn, nn, dn, clearn, i; - mp_ptr np, dup, dnp, qp, rp, junkp; - mp_limb_t t; - gmp_pi1_t dinv; - long count = COUNT; - mp_ptr scratch; - mp_limb_t ran; - mp_size_t alloc, itch; - mp_limb_t rran0, rran1, qran0, qran1; - TMP_DECL; - - if (argc > 1) - { - char *end; - count = strtol (argv[1], &end, 0); - if (*end || count <= 0) - { - fprintf (stderr, "Invalid test count: %s.\n", argv[1]); - return 1; - } - } - - maxdbits = MAX_DN; - maxnbits = MAX_NN; - - tests_start (); - rands = RANDS; - - mpz_init (n); - mpz_init (d); - mpz_init (q); - mpz_init (r); - mpz_init (tz); - mpz_init (junk); - - maxnn = maxnbits / GMP_NUMB_BITS + 1; - maxdn = maxdbits / GMP_NUMB_BITS + 1; - - TMP_MARK; - - qp = TMP_ALLOC_LIMBS (maxnn + 2) + 1; - rp = TMP_ALLOC_LIMBS (maxnn + 2) + 1; - dnp = TMP_ALLOC_LIMBS (maxdn); - - alloc = 1; - scratch = __GMP_ALLOCATE_FUNC_LIMBS (alloc); - - for (test = -300; test < count; test++) - { - nbits = urandom () % (maxnbits - GMP_NUMB_BITS) + 2 * GMP_NUMB_BITS; - - if (test < 0) - dbits = (test + 300) % (nbits - 1) + 1; - else - dbits = urandom () % (nbits - 1) % maxdbits + 1; - -#if RAND_UNIFORM -#define RANDFUNC mpz_urandomb -#else -#define RANDFUNC mpz_rrandomb -#endif - - do - RANDFUNC (d, rands, dbits); - while (mpz_sgn (d) == 0); - dn = SIZ (d); - dup = PTR (d); - MPN_COPY (dnp, dup, dn); - dnp[dn - 1] |= GMP_NUMB_HIGHBIT; - - if (test % 2 == 0) - { - RANDFUNC (n, rands, nbits); - nn = SIZ (n); - ASSERT_ALWAYS (nn >= dn); - } - else - { - do - { - RANDFUNC (q, rands, urandom () % (nbits - dbits + 1)); - RANDFUNC (r, rands, urandom () % mpz_sizeinbase (d, 2)); - mpz_mul (n, q, d); - mpz_add (n, n, r); - nn = SIZ (n); - } - while (nn > maxnn || nn < dn); - } - - ASSERT_ALWAYS (nn <= maxnn); - ASSERT_ALWAYS (dn <= maxdn); - - mpz_urandomb (junk, rands, nbits); - junkp = PTR (junk); - - np = PTR (n); - - mpz_urandomb (tz, rands, 32); - t = mpz_get_ui (tz); - - if (t % 17 == 0) - { - dnp[dn - 1] = GMP_NUMB_MAX; - dup[dn - 1] = GMP_NUMB_MAX; - } - - switch ((int) t % 16) - { - case 0: - clearn = urandom () % nn; - for (i = clearn; i < nn; i++) - np[i] = 0; - break; - case 1: - mpn_sub_1 (np + nn - dn, dnp, dn, urandom ()); - break; - case 2: - mpn_add_1 (np + nn - dn, dnp, dn, urandom ()); - break; - } - - if (dn >= 2) - invert_pi1 (dinv, dnp[dn - 1], dnp[dn - 2]); - - rran0 = urandom (); - rran1 = urandom (); - qran0 = urandom (); - qran1 = urandom (); - - qp[-1] = qran0; - qp[nn - dn + 1] = qran1; - rp[-1] = rran0; - - ran = urandom (); - - if ((double) (nn - dn) * dn < 1e5) - { - /* Test mpn_sbpi1_div_qr */ - if (dn > 2) - { - MPN_COPY (rp, np, nn); - if (nn > dn) - MPN_COPY (qp, junkp, nn - dn); - qp[nn - dn] = mpn_sbpi1_div_qr (qp, rp, nn, dnp, dn, dinv.inv32); - check_one (qp, rp, np, nn, dnp, dn, "mpn_sbpi1_div_qr", 0); - } - - /* Test mpn_sbpi1_divappr_q */ - if (dn > 2) - { - MPN_COPY (rp, np, nn); - if (nn > dn) - MPN_COPY (qp, junkp, nn - dn); - qp[nn - dn] = mpn_sbpi1_divappr_q (qp, rp, nn, dnp, dn, dinv.inv32); - check_one (qp, NULL, np, nn, dnp, dn, "mpn_sbpi1_divappr_q", 1); - } - - /* Test mpn_sbpi1_div_q */ - if (dn > 2) - { - MPN_COPY (rp, np, nn); - if (nn > dn) - MPN_COPY (qp, junkp, nn - dn); - qp[nn - dn] = mpn_sbpi1_div_q (qp, rp, nn, dnp, dn, dinv.inv32); - check_one (qp, NULL, np, nn, dnp, dn, "mpn_sbpi1_div_q", 0); - } - - /* Test mpn_sec_div_qr */ - itch = mpn_sec_div_qr_itch (nn, dn); - if (itch + 1 > alloc) - { - scratch = __GMP_REALLOCATE_FUNC_LIMBS (scratch, alloc, itch + 1); - alloc = itch + 1; - } - scratch[itch] = ran; - MPN_COPY (rp, np, nn); - if (nn >= dn) - MPN_COPY (qp, junkp, nn - dn + 1); - qp[nn - dn] = mpn_sec_div_qr (qp, rp, nn, dup, dn, scratch); - ASSERT_ALWAYS (ran == scratch[itch]); - check_one (qp, rp, np, nn, dup, dn, "mpn_sec_div_qr (unnorm)", 0); - - /* Test mpn_sec_div_r */ - itch = mpn_sec_div_r_itch (nn, dn); - if (itch + 1 > alloc) - { - scratch = __GMP_REALLOCATE_FUNC_LIMBS (scratch, alloc, itch + 1); - alloc = itch + 1; - } - scratch[itch] = ran; - MPN_COPY (rp, np, nn); - mpn_sec_div_r (rp, nn, dup, dn, scratch); - ASSERT_ALWAYS (ran == scratch[itch]); - /* Note: Since check_one cannot cope with remainder-only functions, we - pass qp[] from the previous function, mpn_sec_div_qr. */ - check_one (qp, rp, np, nn, dup, dn, "mpn_sec_div_r (unnorm)", 0); - - /* Normalised case, mpn_sec_div_qr */ - itch = mpn_sec_div_qr_itch (nn, dn); - scratch[itch] = ran; - - MPN_COPY (rp, np, nn); - if (nn >= dn) - MPN_COPY (qp, junkp, nn - dn + 1); - qp[nn - dn] = mpn_sec_div_qr (qp, rp, nn, dnp, dn, scratch); - ASSERT_ALWAYS (ran == scratch[itch]); - check_one (qp, rp, np, nn, dnp, dn, "mpn_sec_div_qr (norm)", 0); - - /* Normalised case, mpn_sec_div_r */ - itch = mpn_sec_div_r_itch (nn, dn); - scratch[itch] = ran; - MPN_COPY (rp, np, nn); - mpn_sec_div_r (rp, nn, dnp, dn, scratch); - ASSERT_ALWAYS (ran == scratch[itch]); - /* Note: Since check_one cannot cope with remainder-only functions, we - pass qp[] from the previous function, mpn_sec_div_qr. */ - check_one (qp, rp, np, nn, dnp, dn, "mpn_sec_div_r (norm)", 0); - } - - /* Test mpn_dcpi1_div_qr */ - if (dn >= 6 && nn - dn >= 3) - { - MPN_COPY (rp, np, nn); - if (nn > dn) - MPN_COPY (qp, junkp, nn - dn); - qp[nn - dn] = mpn_dcpi1_div_qr (qp, rp, nn, dnp, dn, &dinv); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); - ASSERT_ALWAYS (rp[-1] == rran0); - check_one (qp, rp, np, nn, dnp, dn, "mpn_dcpi1_div_qr", 0); - } - - /* Test mpn_dcpi1_divappr_q */ - if (dn >= 6 && nn - dn >= 3) - { - MPN_COPY (rp, np, nn); - if (nn > dn) - MPN_COPY (qp, junkp, nn - dn); - qp[nn - dn] = mpn_dcpi1_divappr_q (qp, rp, nn, dnp, dn, &dinv); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); - ASSERT_ALWAYS (rp[-1] == rran0); - check_one (qp, NULL, np, nn, dnp, dn, "mpn_dcpi1_divappr_q", 1); - } - - /* Test mpn_dcpi1_div_q */ - if (dn >= 6 && nn - dn >= 3) - { - MPN_COPY (rp, np, nn); - if (nn > dn) - MPN_COPY (qp, junkp, nn - dn); - qp[nn - dn] = mpn_dcpi1_div_q (qp, rp, nn, dnp, dn, &dinv); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); - ASSERT_ALWAYS (rp[-1] == rran0); - check_one (qp, NULL, np, nn, dnp, dn, "mpn_dcpi1_div_q", 0); - } - - /* Test mpn_mu_div_qr */ - if (nn - dn > 2 && dn >= 2) - { - itch = mpn_mu_div_qr_itch (nn, dn, 0); - if (itch + 1 > alloc) - { - scratch = __GMP_REALLOCATE_FUNC_LIMBS (scratch, alloc, itch + 1); - alloc = itch + 1; - } - scratch[itch] = ran; - MPN_COPY (qp, junkp, nn - dn); - MPN_ZERO (rp, dn); - rp[dn] = rran1; - qp[nn - dn] = mpn_mu_div_qr (qp, rp, np, nn, dnp, dn, scratch); - ASSERT_ALWAYS (ran == scratch[itch]); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); - ASSERT_ALWAYS (rp[-1] == rran0); ASSERT_ALWAYS (rp[dn] == rran1); - check_one (qp, rp, np, nn, dnp, dn, "mpn_mu_div_qr", 0); - } - - /* Test mpn_mu_divappr_q */ - if (nn - dn > 2 && dn >= 2) - { - itch = mpn_mu_divappr_q_itch (nn, dn, 0); - if (itch + 1 > alloc) - { - scratch = __GMP_REALLOCATE_FUNC_LIMBS (scratch, alloc, itch + 1); - alloc = itch + 1; - } - scratch[itch] = ran; - MPN_COPY (qp, junkp, nn - dn); - qp[nn - dn] = mpn_mu_divappr_q (qp, np, nn, dnp, dn, scratch); - ASSERT_ALWAYS (ran == scratch[itch]); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); - check_one (qp, NULL, np, nn, dnp, dn, "mpn_mu_divappr_q", 4); - } - - /* Test mpn_mu_div_q */ - if (nn - dn > 2 && dn >= 2) - { - itch = mpn_mu_div_q_itch (nn, dn, 0); - if (itch + 1> alloc) - { - scratch = __GMP_REALLOCATE_FUNC_LIMBS (scratch, alloc, itch + 1); - alloc = itch + 1; - } - scratch[itch] = ran; - MPN_COPY (qp, junkp, nn - dn); - qp[nn - dn] = mpn_mu_div_q (qp, np, nn, dnp, dn, scratch); - ASSERT_ALWAYS (ran == scratch[itch]); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); - check_one (qp, NULL, np, nn, dnp, dn, "mpn_mu_div_q", 0); - } - - if (1) - { - itch = nn + 1; - if (itch + 1> alloc) - { - scratch = __GMP_REALLOCATE_FUNC_LIMBS (scratch, alloc, itch + 1); - alloc = itch + 1; - } - scratch[itch] = ran; - mpn_div_q (qp, np, nn, dup, dn, scratch); - ASSERT_ALWAYS (ran == scratch[itch]); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); - check_one (qp, NULL, np, nn, dup, dn, "mpn_div_q", 0); - } - - if (dn >= 2 && nn >= 2) - { - mp_limb_t qh; - - /* mpn_divrem_2 */ - MPN_COPY (rp, np, nn); - qp[nn - 2] = qp[nn-1] = qran1; - - qh = mpn_divrem_2 (qp, 0, rp, nn, dnp + dn - 2); - ASSERT_ALWAYS (qp[nn - 2] == qran1); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - 1] == qran1); - qp[nn - 2] = qh; - check_one (qp, rp, np, nn, dnp + dn - 2, 2, "mpn_divrem_2", 0); - - /* Missing: divrem_2 with fraction limbs. */ - - /* mpn_div_qr_2 */ - qp[nn - 2] = qran1; - - qh = mpn_div_qr_2 (qp, rp, np, nn, dup + dn - 2); - ASSERT_ALWAYS (qp[nn - 2] == qran1); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - 1] == qran1); - qp[nn - 2] = qh; - check_one (qp, rp, np, nn, dup + dn - 2, 2, "mpn_div_qr_2", 0); - } - if (dn >= 1 && nn >= 1) - { - /* mpn_div_qr_1 */ - mp_limb_t qh; - qp[nn-1] = qran1; - rp[0] = mpn_div_qr_1 (qp, &qh, np, nn, dnp[dn - 1]); - ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - 1] == qran1); - qp[nn - 1] = qh; - check_one (qp, rp, np, nn, dnp + dn - 1, 1, "mpn_div_qr_1", 0); - } - } - - __GMP_FREE_FUNC_LIMBS (scratch, alloc); - - TMP_FREE; - - mpz_clear (n); - mpz_clear (d); - mpz_clear (q); - mpz_clear (r); - mpz_clear (tz); - mpz_clear (junk); - - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-divrem_1.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-divrem_1.c deleted file mode 100644 index 9ffe90548f8..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-divrem_1.c +++ /dev/null @@ -1,124 +0,0 @@ -/* Test mpn_divrem_1 and mpn_preinv_divrem_1. - -Copyright 2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_data (void) -{ - static const struct { - mp_limb_t n[1]; - mp_size_t nsize; - mp_limb_t d; - mp_size_t qxn; - mp_limb_t want_q[5]; - mp_limb_t want_r; - } data[] = { - { { 0 }, 1, 1, 0, - { 0 }, 0}, - - { { 5 }, 1, 2, 0, - { 2 }, 1}, - - /* Exercises the q update in the nl == constant 0 case of - udiv_qrnnd_preinv3. Test case copied from t-fat.c. */ - { { 287 }, 1, 7, 1, - { 0, 41 }, 0 }, - -#if GMP_NUMB_BITS == 32 - { { 0x3C }, 1, 0xF2, 1, - { 0x3F789854, 0 }, 0x98 }, -#endif - -#if GMP_NUMB_BITS == 64 - { { 0x3C }, 1, 0xF2, 1, - { CNST_LIMB(0x3F789854A0CB1B81), 0 }, 0x0E }, - - /* This case exposed some wrong code generated by SGI cc on mips64 irix - 6.5 with -n32 -O2, in the fractional loop for normalized divisor - using udiv_qrnnd_preinv. A test "x>al" in one of the sub_ddmmss - expansions came out wrong, leading to an incorrect quotient. */ - { { CNST_LIMB(0x3C00000000000000) }, 1, CNST_LIMB(0xF200000000000000), 1, - { CNST_LIMB(0x3F789854A0CB1B81), 0 }, CNST_LIMB(0x0E00000000000000) }, -#endif - }; - - mp_limb_t dinv, got_r, got_q[numberof(data[0].want_q)]; - mp_size_t qsize; - int i, shift; - - for (i = 0; i < numberof (data); i++) - { - qsize = data[i].nsize + data[i].qxn; - ASSERT_ALWAYS (qsize <= numberof (got_q)); - - got_r = mpn_divrem_1 (got_q, data[i].qxn, data[i].n, data[i].nsize, - data[i].d); - if (got_r != data[i].want_r - || refmpn_cmp (got_q, data[i].want_q, qsize) != 0) - { - printf ("mpn_divrem_1 wrong at data[%d]\n", i); - bad: - mpn_trace (" n", data[i].n, data[i].nsize); - printf (" nsize=%ld\n", (long) data[i].nsize); - mp_limb_trace (" d", data[i].d); - printf (" qxn=%ld\n", (long) data[i].qxn); - mpn_trace (" want q", data[i].want_q, qsize); - mpn_trace (" got q", got_q, qsize); - mp_limb_trace (" want r", data[i].want_r); - mp_limb_trace (" got r", got_r); - abort (); - } - - /* test if available */ -#if USE_PREINV_DIVREM_1 || HAVE_NATIVE_mpn_preinv_divrem_1 - shift = refmpn_count_leading_zeros (data[i].d); - dinv = refmpn_invert_limb (data[i].d << shift); - got_r = mpn_preinv_divrem_1 (got_q, data[i].qxn, - data[i].n, data[i].nsize, - data[i].d, dinv, shift); - if (got_r != data[i].want_r - || refmpn_cmp (got_q, data[i].want_q, qsize) != 0) - { - printf ("mpn_preinv divrem_1 wrong at data[%d]\n", i); - printf (" shift=%d\n", shift); - mp_limb_trace (" dinv", dinv); - goto bad; - } -#endif - } -} - -int -main (void) -{ - tests_start (); - mp_trace_base = -16; - - check_data (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-fat.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-fat.c deleted file mode 100644 index abb288e4b00..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-fat.c +++ /dev/null @@ -1,311 +0,0 @@ -/* Test fat binary setups. - -Copyright 2003, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" -#include "tests.h" - - -/* In this program we're aiming to pick up certain subtle problems that - might creep into a fat binary. - - 1. We want to ensure the application entry point routines like - __gmpn_add_n dispatch to the correct field of __gmpn_cpuvec. - - Note that these routines are not exercised as a side effect of other - tests (eg. the mpz routines). Internally the fields of __gmpn_cpuvec - are used directly, so we need to write test code explicitly calling - the mpn functions, like an application will have. - - 2. We want to ensure the initial __gmpn_cpuvec data has the initializer - function pointers in the correct fields, and that those initializer - functions dispatch to their correct corresponding field once - initialization has been done. - - Only one of the initializer routines executes in a normal program, - since that routine sets all the pointers to actual mpn functions. We - forcibly reset __gmpn_cpuvec so we can run each. - - In both cases for the above, the data put through the functions is - nothing special, just enough to verify that for instance an add_n is - really doing an add_n and has not for instance mistakenly gone to sub_n - or something. - - The loop around each test will exercise the initializer routine on the - first iteration, and the dispatcher routine on the second. - - If the dispatcher and/or initializer routines are generated mechanically - via macros (eg. mpn/x86/fat/fat_entry.asm) then there shouldn't be too - much risk of them going wrong, provided the structure layout is correctly - expressed. But if they're in C then it's good to guard against typos in - what is rather repetitive code. The initializer data for __gmpn_cpuvec - in fat.c is always done by hand and is likewise a bit repetitive. */ - - -/* dummies when not a fat binary */ -#if ! WANT_FAT_BINARY -struct cpuvec_t { - int dummy; -}; -struct cpuvec_t __gmpn_cpuvec; -#define ITERATE_FAT_THRESHOLDS() do { } while (0) -#endif - -/* saved from program startup */ -struct cpuvec_t initial_cpuvec; - -void -check_functions (void) -{ - mp_limb_t wp[2], xp[2], yp[2], r; - int i; - - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 123; - yp[0] = 456; - mpn_add_n (wp, xp, yp, (mp_size_t) 1); - ASSERT_ALWAYS (wp[0] == 579); - } - - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 123; - wp[0] = 456; - r = mpn_addmul_1 (wp, xp, (mp_size_t) 1, CNST_LIMB(2)); - ASSERT_ALWAYS (wp[0] == 702); - ASSERT_ALWAYS (r == 0); - } - -#if HAVE_NATIVE_mpn_copyd - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 123; - xp[1] = 456; - mpn_copyd (xp+1, xp, (mp_size_t) 1); - ASSERT_ALWAYS (xp[1] == 123); - } -#endif - -#if HAVE_NATIVE_mpn_copyi - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 123; - xp[1] = 456; - mpn_copyi (xp, xp+1, (mp_size_t) 1); - ASSERT_ALWAYS (xp[0] == 456); - } -#endif - - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 1605; - mpn_divexact_1 (wp, xp, (mp_size_t) 1, CNST_LIMB(5)); - ASSERT_ALWAYS (wp[0] == 321); - } - - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 1296; - r = mpn_divexact_by3c (wp, xp, (mp_size_t) 1, CNST_LIMB(0)); - ASSERT_ALWAYS (wp[0] == 432); - ASSERT_ALWAYS (r == 0); - } - - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 287; - r = mpn_divrem_1 (wp, (mp_size_t) 1, xp, (mp_size_t) 1, CNST_LIMB(7)); - ASSERT_ALWAYS (wp[1] == 41); - ASSERT_ALWAYS (wp[0] == 0); - ASSERT_ALWAYS (r == 0); - } - - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 12; - r = mpn_gcd_1 (xp, (mp_size_t) 1, CNST_LIMB(9)); - ASSERT_ALWAYS (r == 3); - } - - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 0x1001; - mpn_lshift (wp, xp, (mp_size_t) 1, 1); - ASSERT_ALWAYS (wp[0] == 0x2002); - } - - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 14; - r = mpn_mod_1 (xp, (mp_size_t) 1, CNST_LIMB(4)); - ASSERT_ALWAYS (r == 2); - } - -#if (GMP_NUMB_BITS % 4) == 0 - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - int bits = (GMP_NUMB_BITS / 4) * 3; - mp_limb_t mod = (CNST_LIMB(1) << bits) - 1; - mp_limb_t want = GMP_NUMB_MAX % mod; - xp[0] = GMP_NUMB_MAX; - r = mpn_mod_34lsub1 (xp, (mp_size_t) 1); - ASSERT_ALWAYS (r % mod == want); - } -#endif - - /* DECL_modexact_1c_odd ((*modexact_1c_odd)); */ - - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 14; - r = mpn_mul_1 (wp, xp, (mp_size_t) 1, CNST_LIMB(4)); - ASSERT_ALWAYS (wp[0] == 56); - ASSERT_ALWAYS (r == 0); - } - - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 5; - yp[0] = 7; - mpn_mul_basecase (wp, xp, (mp_size_t) 1, yp, (mp_size_t) 1); - ASSERT_ALWAYS (wp[0] == 35); - ASSERT_ALWAYS (wp[1] == 0); - } - - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 5; - yp[0] = 7; - mpn_mullo_basecase (wp, xp, yp, (mp_size_t) 1); - ASSERT_ALWAYS (wp[0] == 35); - } - -#if HAVE_NATIVE_mpn_preinv_divrem_1 && GMP_NAIL_BITS == 0 - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 0x101; - r = mpn_preinv_divrem_1 (wp, (mp_size_t) 1, xp, (mp_size_t) 1, - GMP_LIMB_HIGHBIT, - refmpn_invert_limb (GMP_LIMB_HIGHBIT), 0); - ASSERT_ALWAYS (wp[0] == 0x202); - ASSERT_ALWAYS (wp[1] == 0); - ASSERT_ALWAYS (r == 0); - } -#endif - -#if GMP_NAIL_BITS == 0 - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = GMP_LIMB_HIGHBIT+123; - r = mpn_preinv_mod_1 (xp, (mp_size_t) 1, GMP_LIMB_HIGHBIT, - refmpn_invert_limb (GMP_LIMB_HIGHBIT)); - ASSERT_ALWAYS (r == 123); - } -#endif - - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 0x8008; - mpn_rshift (wp, xp, (mp_size_t) 1, 1); - ASSERT_ALWAYS (wp[0] == 0x4004); - } - - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 5; - mpn_sqr_basecase (wp, xp, (mp_size_t) 1); - ASSERT_ALWAYS (wp[0] == 25); - ASSERT_ALWAYS (wp[1] == 0); - } - - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 999; - yp[0] = 666; - mpn_sub_n (wp, xp, yp, (mp_size_t) 1); - ASSERT_ALWAYS (wp[0] == 333); - } - - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); - for (i = 0; i < 2; i++) - { - xp[0] = 123; - wp[0] = 456; - r = mpn_submul_1 (wp, xp, (mp_size_t) 1, CNST_LIMB(2)); - ASSERT_ALWAYS (wp[0] == 210); - ASSERT_ALWAYS (r == 0); - } -} - -/* Expect the first use of each fat threshold to invoke the necessary - initialization. */ -void -check_thresholds (void) -{ -#define ITERATE(name,field) \ - do { \ - __gmpn_cpuvec_initialized = 0; \ - memcpy (&__gmpn_cpuvec, &initial_cpuvec, sizeof (__gmpn_cpuvec)); \ - ASSERT_ALWAYS (name != 0); \ - ASSERT_ALWAYS (name == __gmpn_cpuvec.field); \ - ASSERT_ALWAYS (__gmpn_cpuvec_initialized); \ - } while (0) - - ITERATE_FAT_THRESHOLDS (); -} - - -int -main (void) -{ - memcpy (&initial_cpuvec, &__gmpn_cpuvec, sizeof (__gmpn_cpuvec)); - - tests_start (); - - check_functions (); - check_thresholds (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-get_d.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-get_d.c deleted file mode 100644 index 1499391e067..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-get_d.c +++ /dev/null @@ -1,498 +0,0 @@ -/* Test mpn_get_d. - -Copyright 2002-2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <setjmp.h> -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -#ifndef _GMP_IEEE_FLOATS -#define _GMP_IEEE_FLOATS 0 -#endif - - -/* Exercise various 2^n values, with various exponents and positive and - negative. */ -void -check_onebit (void) -{ - static const int bit_table[] = { - 0, 1, 2, 3, - GMP_NUMB_BITS - 2, GMP_NUMB_BITS - 1, - GMP_NUMB_BITS, - GMP_NUMB_BITS + 1, GMP_NUMB_BITS + 2, - 2 * GMP_NUMB_BITS - 2, 2 * GMP_NUMB_BITS - 1, - 2 * GMP_NUMB_BITS, - 2 * GMP_NUMB_BITS + 1, 2 * GMP_NUMB_BITS + 2, - 3 * GMP_NUMB_BITS - 2, 3 * GMP_NUMB_BITS - 1, - 3 * GMP_NUMB_BITS, - 3 * GMP_NUMB_BITS + 1, 3 * GMP_NUMB_BITS + 2, - 4 * GMP_NUMB_BITS - 2, 4 * GMP_NUMB_BITS - 1, - 4 * GMP_NUMB_BITS, - 4 * GMP_NUMB_BITS + 1, 4 * GMP_NUMB_BITS + 2, - 5 * GMP_NUMB_BITS - 2, 5 * GMP_NUMB_BITS - 1, - 5 * GMP_NUMB_BITS, - 5 * GMP_NUMB_BITS + 1, 5 * GMP_NUMB_BITS + 2, - 6 * GMP_NUMB_BITS - 2, 6 * GMP_NUMB_BITS - 1, - 6 * GMP_NUMB_BITS, - 6 * GMP_NUMB_BITS + 1, 6 * GMP_NUMB_BITS + 2, - }; - static const int exp_table[] = { - 0, -100, -10, -1, 1, 10, 100, - }; - - /* FIXME: It'd be better to base this on the float format. */ -#if defined (__vax) || defined (__vax__) - int limit = 127; /* vax fp numbers have limited range */ -#else - int limit = 511; -#endif - - int bit_i, exp_i, i; - double got, want; - mp_size_t nsize, sign; - long bit, exp, want_bit; - mp_limb_t np[20]; - - for (bit_i = 0; bit_i < numberof (bit_table); bit_i++) - { - bit = bit_table[bit_i]; - - nsize = BITS_TO_LIMBS (bit+1); - refmpn_zero (np, nsize); - np[bit/GMP_NUMB_BITS] = CNST_LIMB(1) << (bit % GMP_NUMB_BITS); - - for (exp_i = 0; exp_i < numberof (exp_table); exp_i++) - { - exp = exp_table[exp_i]; - - want_bit = bit + exp; - if (want_bit >= limit || want_bit <= -limit) - continue; - - want = 1.0; - for (i = 0; i < want_bit; i++) - want *= 2.0; - for (i = 0; i > want_bit; i--) - want *= 0.5; - - for (sign = 0; sign >= -1; sign--, want = -want) - { - got = mpn_get_d (np, nsize, sign, exp); - if (got != want) - { - printf ("mpn_get_d wrong on 2^n\n"); - printf (" bit %ld\n", bit); - printf (" exp %ld\n", exp); - printf (" want_bit %ld\n", want_bit); - printf (" sign %ld\n", (long) sign); - mpn_trace (" n ", np, nsize); - printf (" nsize %ld\n", (long) nsize); - d_trace (" want ", want); - d_trace (" got ", got); - abort(); - } - } - } - } -} - - -/* Exercise values 2^n+1, while such a value fits the mantissa of a double. */ -void -check_twobit (void) -{ - int i, mant_bits; - double got, want; - mp_size_t nsize, sign; - mp_ptr np; - - mant_bits = tests_dbl_mant_bits (); - if (mant_bits == 0) - return; - - np = refmpn_malloc_limbs (BITS_TO_LIMBS (mant_bits)); - want = 3.0; - for (i = 1; i < mant_bits; i++) - { - nsize = BITS_TO_LIMBS (i+1); - refmpn_zero (np, nsize); - np[i/GMP_NUMB_BITS] = CNST_LIMB(1) << (i % GMP_NUMB_BITS); - np[0] |= 1; - - for (sign = 0; sign >= -1; sign--) - { - got = mpn_get_d (np, nsize, sign, 0); - if (got != want) - { - printf ("mpn_get_d wrong on 2^%d + 1\n", i); - printf (" sign %ld\n", (long) sign); - mpn_trace (" n ", np, nsize); - printf (" nsize %ld\n", (long) nsize); - d_trace (" want ", want); - d_trace (" got ", got); - abort(); - } - want = -want; - } - - want = 2.0 * want - 1.0; - } - - free (np); -} - - -/* Expect large negative exponents to underflow to 0.0. - Some systems might have hardware traps for such an underflow (though - usually it's not the default), so watch out for SIGFPE. */ -void -check_underflow (void) -{ - static const long exp_table[] = { - -999999L, LONG_MIN, - }; - static const mp_limb_t np[1] = { 1 }; - - static long exp; - mp_size_t nsize, sign; - double got; - int exp_i; - - nsize = numberof (np); - - if (tests_setjmp_sigfpe() == 0) - { - for (exp_i = 0; exp_i < numberof (exp_table); exp_i++) - { - exp = exp_table[exp_i]; - - for (sign = 0; sign >= -1; sign--) - { - got = mpn_get_d (np, nsize, sign, exp); - if (got != 0.0) - { - printf ("mpn_get_d wrong, didn't get 0.0 on underflow\n"); - printf (" nsize %ld\n", (long) nsize); - printf (" exp %ld\n", exp); - printf (" sign %ld\n", (long) sign); - d_trace (" got ", got); - abort (); - } - } - } - } - else - { - printf ("Warning, underflow to zero tests skipped due to SIGFPE (exp=%ld)\n", exp); - } - tests_sigfpe_done (); -} - - -/* Expect large values to result in +/-inf, on IEEE systems. */ -void -check_inf (void) -{ - static const long exp_table[] = { - 999999L, LONG_MAX, - }; - static const mp_limb_t np[4] = { 1, 1, 1, 1 }; - long exp; - mp_size_t nsize, sign, got_sign; - double got; - int exp_i; - - if (! _GMP_IEEE_FLOATS) - return; - - for (nsize = 1; nsize <= numberof (np); nsize++) - { - for (exp_i = 0; exp_i < numberof (exp_table); exp_i++) - { - exp = exp_table[exp_i]; - - for (sign = 0; sign >= -1; sign--) - { - got = mpn_get_d (np, nsize, sign, exp); - got_sign = (got >= 0 ? 0 : -1); - if (! tests_isinf (got)) - { - printf ("mpn_get_d wrong, didn't get infinity\n"); - bad: - printf (" nsize %ld\n", (long) nsize); - printf (" exp %ld\n", exp); - printf (" sign %ld\n", (long) sign); - d_trace (" got ", got); - printf (" got sign %ld\n", (long) got_sign); - abort (); - } - if (got_sign != sign) - { - printf ("mpn_get_d wrong sign on infinity\n"); - goto bad; - } - } - } - } -} - -/* Check values 2^n approaching and into IEEE denorm range. - Some systems might not support denorms, or might have traps setup, so - watch out for SIGFPE. */ -void -check_ieee_denorm (void) -{ - static long exp; - mp_limb_t n = 1; - long i; - mp_size_t sign; - double want, got; - - if (! _GMP_IEEE_FLOATS) - return; - - if (tests_setjmp_sigfpe() == 0) - { - exp = -1020; - want = 1.0; - for (i = 0; i > exp; i--) - want *= 0.5; - - for ( ; exp > -1500 && want != 0.0; exp--) - { - for (sign = 0; sign >= -1; sign--) - { - got = mpn_get_d (&n, (mp_size_t) 1, sign, exp); - if (got != want) - { - printf ("mpn_get_d wrong on denorm\n"); - printf (" n=1\n"); - printf (" exp %ld\n", exp); - printf (" sign %ld\n", (long) sign); - d_trace (" got ", got); - d_trace (" want ", want); - abort (); - } - want = -want; - } - want *= 0.5; - FORCE_DOUBLE (want); - } - } - else - { - printf ("Warning, IEEE denorm tests skipped due to SIGFPE (exp=%ld)\n", exp); - } - tests_sigfpe_done (); -} - - -/* Check values 2^n approaching exponent overflow. - Some systems might trap on overflow, so watch out for SIGFPE. */ -void -check_ieee_overflow (void) -{ - static long exp; - mp_limb_t n = 1; - long i; - mp_size_t sign; - double want, got; - - if (! _GMP_IEEE_FLOATS) - return; - - if (tests_setjmp_sigfpe() == 0) - { - exp = 1010; - want = 1.0; - for (i = 0; i < exp; i++) - want *= 2.0; - - for ( ; exp < 1050; exp++) - { - for (sign = 0; sign >= -1; sign--) - { - got = mpn_get_d (&n, (mp_size_t) 1, sign, exp); - if (got != want) - { - printf ("mpn_get_d wrong on overflow\n"); - printf (" n=1\n"); - printf (" exp %ld\n", exp); - printf (" sign %ld\n", (long) sign); - d_trace (" got ", got); - d_trace (" want ", want); - abort (); - } - want = -want; - } - want *= 2.0; - FORCE_DOUBLE (want); - } - } - else - { - printf ("Warning, IEEE overflow tests skipped due to SIGFPE (exp=%ld)\n", exp); - } - tests_sigfpe_done (); -} - - -/* ARM gcc 2.95.4 was seen generating bad code for ulong->double - conversions, resulting in for instance 0x81c25113 incorrectly converted. - This test exercises that value, to see mpn_get_d has avoided the - problem. */ -void -check_0x81c25113 (void) -{ -#if GMP_NUMB_BITS >= 32 - double want = 2176995603.0; - double got; - mp_limb_t np[4]; - mp_size_t nsize; - long exp; - - if (tests_dbl_mant_bits() < 32) - return; - - for (nsize = 1; nsize <= numberof (np); nsize++) - { - refmpn_zero (np, nsize-1); - np[nsize-1] = CNST_LIMB(0x81c25113); - exp = - (nsize-1) * GMP_NUMB_BITS; - got = mpn_get_d (np, nsize, (mp_size_t) 0, exp); - if (got != want) - { - printf ("mpn_get_d wrong on 2176995603 (0x81c25113)\n"); - printf (" nsize %ld\n", (long) nsize); - printf (" exp %ld\n", exp); - d_trace (" got ", got); - d_trace (" want ", want); - abort (); - } - } -#endif -} - - -void -check_rand (void) -{ - gmp_randstate_ptr rands = RANDS; - int rep, i; - unsigned long mant_bits; - long exp, exp_min, exp_max; - double got, want, d; - mp_size_t nalloc, nsize, sign; - mp_limb_t nhigh_mask; - mp_ptr np; - - mant_bits = tests_dbl_mant_bits (); - if (mant_bits == 0) - return; - - /* Allow for vax D format with exponent 127 to -128 only. - FIXME: Do something to probe for a valid exponent range. */ - exp_min = -100 - mant_bits; - exp_max = 100 - mant_bits; - - /* space for mant_bits */ - nalloc = BITS_TO_LIMBS (mant_bits); - np = refmpn_malloc_limbs (nalloc); - nhigh_mask = MP_LIMB_T_MAX - >> (GMP_NAIL_BITS + nalloc * GMP_NUMB_BITS - mant_bits); - - for (rep = 0; rep < 200; rep++) - { - /* random exp_min to exp_max, inclusive */ - exp = exp_min + (long) gmp_urandomm_ui (rands, exp_max - exp_min + 1); - - /* mant_bits worth of random at np */ - if (rep & 1) - mpn_random (np, nalloc); - else - mpn_random2 (np, nalloc); - nsize = nalloc; - np[nsize-1] &= nhigh_mask; - MPN_NORMALIZE (np, nsize); - if (nsize == 0) - continue; - - sign = (mp_size_t) gmp_urandomb_ui (rands, 1L) - 1; - - /* want = {np,nsize}, converting one bit at a time */ - want = 0.0; - for (i = 0, d = 1.0; i < mant_bits; i++, d *= 2.0) - if (np[i/GMP_NUMB_BITS] & (CNST_LIMB(1) << (i%GMP_NUMB_BITS))) - want += d; - if (sign < 0) - want = -want; - - /* want = want * 2^exp */ - for (i = 0; i < exp; i++) - want *= 2.0; - for (i = 0; i > exp; i--) - want *= 0.5; - - got = mpn_get_d (np, nsize, sign, exp); - - if (got != want) - { - printf ("mpn_get_d wrong on random data\n"); - printf (" sign %ld\n", (long) sign); - mpn_trace (" n ", np, nsize); - printf (" nsize %ld\n", (long) nsize); - printf (" exp %ld\n", exp); - d_trace (" want ", want); - d_trace (" got ", got); - abort(); - } - } - - free (np); -} - - -int -main (void) -{ - tests_start (); - mp_trace_base = -16; - - check_onebit (); - check_twobit (); - check_inf (); - check_underflow (); - check_ieee_denorm (); - check_ieee_overflow (); - check_0x81c25113 (); -#if ! (defined (__vax) || defined (__vax__)) - check_rand (); -#endif - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-hgcd.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-hgcd.c deleted file mode 100644 index 64d33ef0061..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-hgcd.c +++ /dev/null @@ -1,407 +0,0 @@ -/* Test mpn_hgcd. - -Copyright 1991, 1993, 1994, 1996, 1997, 2000-2004 Free Software Foundation, -Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -static mp_size_t one_test (mpz_t, mpz_t, int); -static void debug_mp (mpz_t, int); - -#define MIN_OPERAND_SIZE 2 - -/* Fixed values, for regression testing of mpn_hgcd. */ -struct value { int res; const char *a; const char *b; }; -static const struct value hgcd_values[] = { -#if GMP_NUMB_BITS == 32 - { 5, - "0x1bddff867272a9296ac493c251d7f46f09a5591fe", - "0xb55930a2a68a916450a7de006031068c5ddb0e5c" }, - { 4, - "0x2f0ece5b1ee9c15e132a01d55768dc13", - "0x1c6f4fd9873cdb24466e6d03e1cc66e7" }, - { 3, "0x7FFFFC003FFFFFFFFFC5", "0x3FFFFE001FFFFFFFFFE3"}, -#endif - { -1, NULL, NULL } -}; - -struct hgcd_ref -{ - mpz_t m[2][2]; -}; - -static void hgcd_ref_init (struct hgcd_ref *); -static void hgcd_ref_clear (struct hgcd_ref *); -static int hgcd_ref (struct hgcd_ref *, mpz_t, mpz_t); -static int hgcd_ref_equal (const struct hgcd_matrix *, const struct hgcd_ref *); - -int -main (int argc, char **argv) -{ - mpz_t op1, op2, temp1, temp2; - int i, j, chain_len; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long size_range; - - tests_start (); - rands = RANDS; - - mpz_init (bs); - mpz_init (op1); - mpz_init (op2); - mpz_init (temp1); - mpz_init (temp2); - - for (i = 0; hgcd_values[i].res >= 0; i++) - { - mp_size_t res; - - mpz_set_str (op1, hgcd_values[i].a, 0); - mpz_set_str (op2, hgcd_values[i].b, 0); - - res = one_test (op1, op2, -1-i); - if (res != hgcd_values[i].res) - { - fprintf (stderr, "ERROR in test %d\n", -1-i); - fprintf (stderr, "Bad return code from hgcd\n"); - fprintf (stderr, "op1="); debug_mp (op1, -16); - fprintf (stderr, "op2="); debug_mp (op2, -16); - fprintf (stderr, "expected: %d\n", hgcd_values[i].res); - fprintf (stderr, "hgcd: %d\n", (int) res); - abort (); - } - } - - for (i = 0; i < 15; i++) - { - /* Generate plain operands with unknown gcd. These types of operands - have proven to trigger certain bugs in development versions of the - gcd code. */ - - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 13 + 2; - - mpz_urandomb (bs, rands, size_range); - mpz_rrandomb (op1, rands, mpz_get_ui (bs) + MIN_OPERAND_SIZE); - mpz_urandomb (bs, rands, size_range); - mpz_rrandomb (op2, rands, mpz_get_ui (bs) + MIN_OPERAND_SIZE); - - if (mpz_cmp (op1, op2) < 0) - mpz_swap (op1, op2); - - if (mpz_size (op1) > 0) - one_test (op1, op2, i); - - /* Generate a division chain backwards, allowing otherwise - unlikely huge quotients. */ - - mpz_set_ui (op1, 0); - mpz_urandomb (bs, rands, 32); - mpz_urandomb (bs, rands, mpz_get_ui (bs) % 16 + 1); - mpz_rrandomb (op2, rands, mpz_get_ui (bs)); - mpz_add_ui (op2, op2, 1); - -#if 0 - chain_len = 1000000; -#else - mpz_urandomb (bs, rands, 32); - chain_len = mpz_get_ui (bs) % (GMP_NUMB_BITS * GCD_DC_THRESHOLD / 256); -#endif - - for (j = 0; j < chain_len; j++) - { - mpz_urandomb (bs, rands, 32); - mpz_urandomb (bs, rands, mpz_get_ui (bs) % 12 + 1); - mpz_rrandomb (temp2, rands, mpz_get_ui (bs) + 1); - mpz_add_ui (temp2, temp2, 1); - mpz_mul (temp1, op2, temp2); - mpz_add (op1, op1, temp1); - - /* Don't generate overly huge operands. */ - if (SIZ (op1) > 3 * GCD_DC_THRESHOLD) - break; - - mpz_urandomb (bs, rands, 32); - mpz_urandomb (bs, rands, mpz_get_ui (bs) % 12 + 1); - mpz_rrandomb (temp2, rands, mpz_get_ui (bs) + 1); - mpz_add_ui (temp2, temp2, 1); - mpz_mul (temp1, op1, temp2); - mpz_add (op2, op2, temp1); - - /* Don't generate overly huge operands. */ - if (SIZ (op2) > 3 * GCD_DC_THRESHOLD) - break; - } - if (mpz_cmp (op1, op2) < 0) - mpz_swap (op1, op2); - - if (mpz_size (op1) > 0) - one_test (op1, op2, i); - } - - mpz_clear (bs); - mpz_clear (op1); - mpz_clear (op2); - mpz_clear (temp1); - mpz_clear (temp2); - - tests_end (); - exit (0); -} - -static void -debug_mp (mpz_t x, int base) -{ - mpz_out_str (stderr, base, x); fputc ('\n', stderr); -} - -static int -mpz_mpn_equal (const mpz_t a, mp_srcptr bp, mp_size_t bsize); - -static mp_size_t -one_test (mpz_t a, mpz_t b, int i) -{ - struct hgcd_matrix hgcd; - struct hgcd_ref ref; - - mpz_t ref_r0; - mpz_t ref_r1; - mpz_t hgcd_r0; - mpz_t hgcd_r1; - - mp_size_t res[2]; - mp_size_t asize; - mp_size_t bsize; - - mp_size_t hgcd_init_scratch; - mp_size_t hgcd_scratch; - - mp_ptr hgcd_init_tp; - mp_ptr hgcd_tp; - - asize = a->_mp_size; - bsize = b->_mp_size; - - ASSERT (asize >= bsize); - - hgcd_init_scratch = MPN_HGCD_MATRIX_INIT_ITCH (asize); - hgcd_init_tp = refmpn_malloc_limbs (hgcd_init_scratch); - mpn_hgcd_matrix_init (&hgcd, asize, hgcd_init_tp); - - hgcd_scratch = mpn_hgcd_itch (asize); - hgcd_tp = refmpn_malloc_limbs (hgcd_scratch); - -#if 0 - fprintf (stderr, - "one_test: i = %d asize = %d, bsize = %d\n", - i, a->_mp_size, b->_mp_size); - - gmp_fprintf (stderr, - "one_test: i = %d\n" - " a = %Zx\n" - " b = %Zx\n", - i, a, b); -#endif - hgcd_ref_init (&ref); - - mpz_init_set (ref_r0, a); - mpz_init_set (ref_r1, b); - res[0] = hgcd_ref (&ref, ref_r0, ref_r1); - - mpz_init_set (hgcd_r0, a); - mpz_init_set (hgcd_r1, b); - if (bsize < asize) - { - _mpz_realloc (hgcd_r1, asize); - MPN_ZERO (hgcd_r1->_mp_d + bsize, asize - bsize); - } - res[1] = mpn_hgcd (hgcd_r0->_mp_d, - hgcd_r1->_mp_d, - asize, - &hgcd, hgcd_tp); - - if (res[0] != res[1]) - { - fprintf (stderr, "ERROR in test %d\n", i); - fprintf (stderr, "Different return value from hgcd and hgcd_ref\n"); - fprintf (stderr, "op1="); debug_mp (a, -16); - fprintf (stderr, "op2="); debug_mp (b, -16); - fprintf (stderr, "hgcd_ref: %ld\n", (long) res[0]); - fprintf (stderr, "mpn_hgcd: %ld\n", (long) res[1]); - abort (); - } - if (res[0] > 0) - { - if (!hgcd_ref_equal (&hgcd, &ref) - || !mpz_mpn_equal (ref_r0, hgcd_r0->_mp_d, res[1]) - || !mpz_mpn_equal (ref_r1, hgcd_r1->_mp_d, res[1])) - { - fprintf (stderr, "ERROR in test %d\n", i); - fprintf (stderr, "mpn_hgcd and hgcd_ref returned different values\n"); - fprintf (stderr, "op1="); debug_mp (a, -16); - fprintf (stderr, "op2="); debug_mp (b, -16); - abort (); - } - } - - refmpn_free_limbs (hgcd_init_tp); - refmpn_free_limbs (hgcd_tp); - hgcd_ref_clear (&ref); - mpz_clear (ref_r0); - mpz_clear (ref_r1); - mpz_clear (hgcd_r0); - mpz_clear (hgcd_r1); - - return res[0]; -} - -static void -hgcd_ref_init (struct hgcd_ref *hgcd) -{ - unsigned i; - for (i = 0; i<2; i++) - { - unsigned j; - for (j = 0; j<2; j++) - mpz_init (hgcd->m[i][j]); - } -} - -static void -hgcd_ref_clear (struct hgcd_ref *hgcd) -{ - unsigned i; - for (i = 0; i<2; i++) - { - unsigned j; - for (j = 0; j<2; j++) - mpz_clear (hgcd->m[i][j]); - } -} - - -static int -sdiv_qr (mpz_t q, mpz_t r, mp_size_t s, const mpz_t a, const mpz_t b) -{ - mpz_fdiv_qr (q, r, a, b); - if (mpz_size (r) <= s) - { - mpz_add (r, r, b); - mpz_sub_ui (q, q, 1); - } - - return (mpz_sgn (q) > 0); -} - -static int -hgcd_ref (struct hgcd_ref *hgcd, mpz_t a, mpz_t b) -{ - mp_size_t n = MAX (mpz_size (a), mpz_size (b)); - mp_size_t s = n/2 + 1; - mp_size_t asize; - mp_size_t bsize; - mpz_t q; - int res; - - if (mpz_size (a) <= s || mpz_size (b) <= s) - return 0; - - res = mpz_cmp (a, b); - if (res < 0) - { - mpz_sub (b, b, a); - if (mpz_size (b) <= s) - return 0; - - mpz_set_ui (hgcd->m[0][0], 1); mpz_set_ui (hgcd->m[0][1], 0); - mpz_set_ui (hgcd->m[1][0], 1); mpz_set_ui (hgcd->m[1][1], 1); - } - else if (res > 0) - { - mpz_sub (a, a, b); - if (mpz_size (a) <= s) - return 0; - - mpz_set_ui (hgcd->m[0][0], 1); mpz_set_ui (hgcd->m[0][1], 1); - mpz_set_ui (hgcd->m[1][0], 0); mpz_set_ui (hgcd->m[1][1], 1); - } - else - return 0; - - mpz_init (q); - - for (;;) - { - ASSERT (mpz_size (a) > s); - ASSERT (mpz_size (b) > s); - - if (mpz_cmp (a, b) > 0) - { - if (!sdiv_qr (q, a, s, a, b)) - break; - mpz_addmul (hgcd->m[0][1], q, hgcd->m[0][0]); - mpz_addmul (hgcd->m[1][1], q, hgcd->m[1][0]); - } - else - { - if (!sdiv_qr (q, b, s, b, a)) - break; - mpz_addmul (hgcd->m[0][0], q, hgcd->m[0][1]); - mpz_addmul (hgcd->m[1][0], q, hgcd->m[1][1]); - } - } - - mpz_clear (q); - - asize = mpz_size (a); - bsize = mpz_size (b); - return MAX (asize, bsize); -} - -static int -mpz_mpn_equal (const mpz_t a, mp_srcptr bp, mp_size_t bsize) -{ - mp_srcptr ap = a->_mp_d; - mp_size_t asize = a->_mp_size; - - MPN_NORMALIZE (bp, bsize); - return asize == bsize && mpn_cmp (ap, bp, asize) == 0; -} - -static int -hgcd_ref_equal (const struct hgcd_matrix *hgcd, const struct hgcd_ref *ref) -{ - unsigned i; - - for (i = 0; i<2; i++) - { - unsigned j; - - for (j = 0; j<2; j++) - if (!mpz_mpn_equal (ref->m[i][j], hgcd->p[i][j], hgcd->n)) - return 0; - } - - return 1; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-hgcd_appr.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-hgcd_appr.c deleted file mode 100644 index 23ffbf0b768..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-hgcd_appr.c +++ /dev/null @@ -1,564 +0,0 @@ -/* Test mpn_hgcd_appr. - -Copyright 1991, 1993, 1994, 1996, 1997, 2000-2004, 2011 Free Software -Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -static mp_size_t one_test (mpz_t, mpz_t, int); -static void debug_mp (mpz_t, int); - -#define MIN_OPERAND_SIZE 2 - -struct hgcd_ref -{ - mpz_t m[2][2]; -}; - -static void hgcd_ref_init (struct hgcd_ref *hgcd); -static void hgcd_ref_clear (struct hgcd_ref *hgcd); -static int hgcd_ref (struct hgcd_ref *hgcd, mpz_t a, mpz_t b); -static int hgcd_ref_equal (const struct hgcd_ref *, const struct hgcd_ref *); -static int hgcd_appr_valid_p (mpz_t, mpz_t, mp_size_t, struct hgcd_ref *, - mpz_t, mpz_t, mp_size_t, struct hgcd_matrix *); - -static int verbose_flag = 0; - -int -main (int argc, char **argv) -{ - mpz_t op1, op2, temp1, temp2; - int i, j, chain_len; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long size_range; - - if (argc > 1) - { - if (strcmp (argv[1], "-v") == 0) - verbose_flag = 1; - else - { - fprintf (stderr, "Invalid argument.\n"); - return 1; - } - } - - tests_start (); - rands = RANDS; - - mpz_init (bs); - mpz_init (op1); - mpz_init (op2); - mpz_init (temp1); - mpz_init (temp2); - - for (i = 0; i < 15; i++) - { - /* Generate plain operands with unknown gcd. These types of operands - have proven to trigger certain bugs in development versions of the - gcd code. */ - - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 13 + 2; - - mpz_urandomb (bs, rands, size_range); - mpz_urandomb (op1, rands, mpz_get_ui (bs) + MIN_OPERAND_SIZE); - mpz_urandomb (bs, rands, size_range); - mpz_urandomb (op2, rands, mpz_get_ui (bs) + MIN_OPERAND_SIZE); - - if (mpz_cmp (op1, op2) < 0) - mpz_swap (op1, op2); - - if (mpz_size (op1) > 0) - one_test (op1, op2, i); - - /* Generate a division chain backwards, allowing otherwise - unlikely huge quotients. */ - - mpz_set_ui (op1, 0); - mpz_urandomb (bs, rands, 32); - mpz_urandomb (bs, rands, mpz_get_ui (bs) % 16 + 1); - mpz_rrandomb (op2, rands, mpz_get_ui (bs)); - mpz_add_ui (op2, op2, 1); - -#if 0 - chain_len = 1000000; -#else - mpz_urandomb (bs, rands, 32); - chain_len = mpz_get_ui (bs) % (GMP_NUMB_BITS * GCD_DC_THRESHOLD / 256); -#endif - - for (j = 0; j < chain_len; j++) - { - mpz_urandomb (bs, rands, 32); - mpz_urandomb (bs, rands, mpz_get_ui (bs) % 12 + 1); - mpz_rrandomb (temp2, rands, mpz_get_ui (bs) + 1); - mpz_add_ui (temp2, temp2, 1); - mpz_mul (temp1, op2, temp2); - mpz_add (op1, op1, temp1); - - /* Don't generate overly huge operands. */ - if (SIZ (op1) > 3 * GCD_DC_THRESHOLD) - break; - - mpz_urandomb (bs, rands, 32); - mpz_urandomb (bs, rands, mpz_get_ui (bs) % 12 + 1); - mpz_rrandomb (temp2, rands, mpz_get_ui (bs) + 1); - mpz_add_ui (temp2, temp2, 1); - mpz_mul (temp1, op1, temp2); - mpz_add (op2, op2, temp1); - - /* Don't generate overly huge operands. */ - if (SIZ (op2) > 3 * GCD_DC_THRESHOLD) - break; - } - if (mpz_cmp (op1, op2) < 0) - mpz_swap (op1, op2); - - if (mpz_size (op1) > 0) - one_test (op1, op2, i); - } - - mpz_clear (bs); - mpz_clear (op1); - mpz_clear (op2); - mpz_clear (temp1); - mpz_clear (temp2); - - tests_end (); - exit (0); -} - -static void -debug_mp (mpz_t x, int base) -{ - mpz_out_str (stderr, base, x); fputc ('\n', stderr); -} - -static mp_size_t -one_test (mpz_t a, mpz_t b, int i) -{ - struct hgcd_matrix hgcd; - struct hgcd_ref ref; - - mpz_t ref_r0; - mpz_t ref_r1; - mpz_t hgcd_r0; - mpz_t hgcd_r1; - - int res[2]; - mp_size_t asize; - mp_size_t bsize; - - mp_size_t hgcd_init_scratch; - mp_size_t hgcd_scratch; - - mp_ptr hgcd_init_tp; - mp_ptr hgcd_tp; - mp_limb_t marker[4]; - - asize = a->_mp_size; - bsize = b->_mp_size; - - ASSERT (asize >= bsize); - - hgcd_init_scratch = MPN_HGCD_MATRIX_INIT_ITCH (asize); - hgcd_init_tp = refmpn_malloc_limbs (hgcd_init_scratch + 2) + 1; - mpn_hgcd_matrix_init (&hgcd, asize, hgcd_init_tp); - - hgcd_scratch = mpn_hgcd_appr_itch (asize); - hgcd_tp = refmpn_malloc_limbs (hgcd_scratch + 2) + 1; - - mpn_random (marker, 4); - - hgcd_init_tp[-1] = marker[0]; - hgcd_init_tp[hgcd_init_scratch] = marker[1]; - hgcd_tp[-1] = marker[2]; - hgcd_tp[hgcd_scratch] = marker[3]; - -#if 0 - fprintf (stderr, - "one_test: i = %d asize = %d, bsize = %d\n", - i, a->_mp_size, b->_mp_size); - - gmp_fprintf (stderr, - "one_test: i = %d\n" - " a = %Zx\n" - " b = %Zx\n", - i, a, b); -#endif - hgcd_ref_init (&ref); - - mpz_init_set (ref_r0, a); - mpz_init_set (ref_r1, b); - res[0] = hgcd_ref (&ref, ref_r0, ref_r1); - - mpz_init_set (hgcd_r0, a); - mpz_init_set (hgcd_r1, b); - if (bsize < asize) - { - _mpz_realloc (hgcd_r1, asize); - MPN_ZERO (hgcd_r1->_mp_d + bsize, asize - bsize); - } - res[1] = mpn_hgcd_appr (hgcd_r0->_mp_d, - hgcd_r1->_mp_d, - asize, - &hgcd, hgcd_tp); - - if (hgcd_init_tp[-1] != marker[0] - || hgcd_init_tp[hgcd_init_scratch] != marker[1] - || hgcd_tp[-1] != marker[2] - || hgcd_tp[hgcd_scratch] != marker[3]) - { - fprintf (stderr, "ERROR in test %d\n", i); - fprintf (stderr, "scratch space overwritten!\n"); - - if (hgcd_init_tp[-1] != marker[0]) - gmp_fprintf (stderr, - "before init_tp: %Mx\n" - "expected: %Mx\n", - hgcd_init_tp[-1], marker[0]); - if (hgcd_init_tp[hgcd_init_scratch] != marker[1]) - gmp_fprintf (stderr, - "after init_tp: %Mx\n" - "expected: %Mx\n", - hgcd_init_tp[hgcd_init_scratch], marker[1]); - if (hgcd_tp[-1] != marker[2]) - gmp_fprintf (stderr, - "before tp: %Mx\n" - "expected: %Mx\n", - hgcd_tp[-1], marker[2]); - if (hgcd_tp[hgcd_scratch] != marker[3]) - gmp_fprintf (stderr, - "after tp: %Mx\n" - "expected: %Mx\n", - hgcd_tp[hgcd_scratch], marker[3]); - - abort (); - } - - if (!hgcd_appr_valid_p (a, b, res[0], &ref, ref_r0, ref_r1, - res[1], &hgcd)) - { - fprintf (stderr, "ERROR in test %d\n", i); - fprintf (stderr, "Invalid results for hgcd and hgcd_ref\n"); - fprintf (stderr, "op1="); debug_mp (a, -16); - fprintf (stderr, "op2="); debug_mp (b, -16); - fprintf (stderr, "hgcd_ref: %ld\n", (long) res[0]); - fprintf (stderr, "mpn_hgcd_appr: %ld\n", (long) res[1]); - abort (); - } - - refmpn_free_limbs (hgcd_init_tp - 1); - refmpn_free_limbs (hgcd_tp - 1); - hgcd_ref_clear (&ref); - mpz_clear (ref_r0); - mpz_clear (ref_r1); - mpz_clear (hgcd_r0); - mpz_clear (hgcd_r1); - - return res[0]; -} - -static void -hgcd_ref_init (struct hgcd_ref *hgcd) -{ - unsigned i; - for (i = 0; i<2; i++) - { - unsigned j; - for (j = 0; j<2; j++) - mpz_init (hgcd->m[i][j]); - } -} - -static void -hgcd_ref_clear (struct hgcd_ref *hgcd) -{ - unsigned i; - for (i = 0; i<2; i++) - { - unsigned j; - for (j = 0; j<2; j++) - mpz_clear (hgcd->m[i][j]); - } -} - -static int -sdiv_qr (mpz_t q, mpz_t r, mp_size_t s, const mpz_t a, const mpz_t b) -{ - mpz_fdiv_qr (q, r, a, b); - if (mpz_size (r) <= s) - { - mpz_add (r, r, b); - mpz_sub_ui (q, q, 1); - } - - return (mpz_sgn (q) > 0); -} - -static int -hgcd_ref (struct hgcd_ref *hgcd, mpz_t a, mpz_t b) -{ - mp_size_t n = MAX (mpz_size (a), mpz_size (b)); - mp_size_t s = n/2 + 1; - mpz_t q; - int res; - - if (mpz_size (a) <= s || mpz_size (b) <= s) - return 0; - - res = mpz_cmp (a, b); - if (res < 0) - { - mpz_sub (b, b, a); - if (mpz_size (b) <= s) - return 0; - - mpz_set_ui (hgcd->m[0][0], 1); mpz_set_ui (hgcd->m[0][1], 0); - mpz_set_ui (hgcd->m[1][0], 1); mpz_set_ui (hgcd->m[1][1], 1); - } - else if (res > 0) - { - mpz_sub (a, a, b); - if (mpz_size (a) <= s) - return 0; - - mpz_set_ui (hgcd->m[0][0], 1); mpz_set_ui (hgcd->m[0][1], 1); - mpz_set_ui (hgcd->m[1][0], 0); mpz_set_ui (hgcd->m[1][1], 1); - } - else - return 0; - - mpz_init (q); - - for (;;) - { - ASSERT (mpz_size (a) > s); - ASSERT (mpz_size (b) > s); - - if (mpz_cmp (a, b) > 0) - { - if (!sdiv_qr (q, a, s, a, b)) - break; - mpz_addmul (hgcd->m[0][1], q, hgcd->m[0][0]); - mpz_addmul (hgcd->m[1][1], q, hgcd->m[1][0]); - } - else - { - if (!sdiv_qr (q, b, s, b, a)) - break; - mpz_addmul (hgcd->m[0][0], q, hgcd->m[0][1]); - mpz_addmul (hgcd->m[1][0], q, hgcd->m[1][1]); - } - } - - mpz_clear (q); - - return 1; -} - -static int -hgcd_ref_equal (const struct hgcd_ref *A, const struct hgcd_ref *B) -{ - unsigned i; - - for (i = 0; i<2; i++) - { - unsigned j; - - for (j = 0; j<2; j++) - if (mpz_cmp (A->m[i][j], B->m[i][j]) != 0) - return 0; - } - - return 1; -} - -static int -hgcd_appr_valid_p (mpz_t a, mpz_t b, mp_size_t res0, - struct hgcd_ref *ref, mpz_t ref_r0, mpz_t ref_r1, - mp_size_t res1, struct hgcd_matrix *hgcd) -{ - mp_size_t n = MAX (mpz_size (a), mpz_size (b)); - mp_size_t s = n/2 + 1; - - mp_bitcnt_t dbits, abits, margin; - mpz_t appr_r0, appr_r1, t, q; - struct hgcd_ref appr; - - if (!res0) - { - if (!res1) - return 1; - - fprintf (stderr, "mpn_hgcd_appr returned 1 when no reduction possible.\n"); - return 0; - } - - /* NOTE: No *_clear calls on error return, since we're going to - abort anyway. */ - mpz_init (t); - mpz_init (q); - hgcd_ref_init (&appr); - mpz_init (appr_r0); - mpz_init (appr_r1); - - if (mpz_size (ref_r0) <= s) - { - fprintf (stderr, "ref_r0 too small!!!: "); debug_mp (ref_r0, 16); - return 0; - } - if (mpz_size (ref_r1) <= s) - { - fprintf (stderr, "ref_r1 too small!!!: "); debug_mp (ref_r1, 16); - return 0; - } - - mpz_sub (t, ref_r0, ref_r1); - dbits = mpz_sizeinbase (t, 2); - if (dbits > s*GMP_NUMB_BITS) - { - fprintf (stderr, "ref |r0 - r1| too large!!!: "); debug_mp (t, 16); - return 0; - } - - if (!res1) - { - mpz_set (appr_r0, a); - mpz_set (appr_r1, b); - } - else - { - unsigned i; - - for (i = 0; i<2; i++) - { - unsigned j; - - for (j = 0; j<2; j++) - { - mp_size_t mn = hgcd->n; - MPN_NORMALIZE (hgcd->p[i][j], mn); - mpz_realloc (appr.m[i][j], mn); - MPN_COPY (PTR (appr.m[i][j]), hgcd->p[i][j], mn); - SIZ (appr.m[i][j]) = mn; - } - } - mpz_mul (appr_r0, appr.m[1][1], a); - mpz_mul (t, appr.m[0][1], b); - mpz_sub (appr_r0, appr_r0, t); - if (mpz_sgn (appr_r0) <= 0 - || mpz_size (appr_r0) <= s) - { - fprintf (stderr, "appr_r0 too small: "); debug_mp (appr_r0, 16); - return 0; - } - - mpz_mul (appr_r1, appr.m[1][0], a); - mpz_mul (t, appr.m[0][0], b); - mpz_sub (appr_r1, t, appr_r1); - if (mpz_sgn (appr_r1) <= 0 - || mpz_size (appr_r1) <= s) - { - fprintf (stderr, "appr_r1 too small: "); debug_mp (appr_r1, 16); - return 0; - } - } - - mpz_sub (t, appr_r0, appr_r1); - abits = mpz_sizeinbase (t, 2); - if (abits < dbits) - { - fprintf (stderr, "|r0 - r1| too small: "); debug_mp (t, 16); - return 0; - } - - /* We lose one bit each time we discard the least significant limbs. - For the lehmer code, that can happen at most s * (GMP_NUMB_BITS) - / (GMP_NUMB_BITS - 1) times. For the dc code, we lose an entire - limb (or more?) for each level of recursion. */ - - margin = (n/2+1) * GMP_NUMB_BITS / (GMP_NUMB_BITS - 1); - { - mp_size_t rn; - for (rn = n; ABOVE_THRESHOLD (rn, HGCD_APPR_THRESHOLD); rn = (rn + 1)/2) - margin += GMP_NUMB_BITS; - } - - if (verbose_flag && abits > dbits) - fprintf (stderr, "n = %u: sbits = %u: ref #(r0-r1): %u, appr #(r0-r1): %u excess: %d, margin: %u\n", - (unsigned) n, (unsigned) s*GMP_NUMB_BITS, - (unsigned) dbits, (unsigned) abits, - (int) (abits - s * GMP_NUMB_BITS), (unsigned) margin); - - if (abits > s*GMP_NUMB_BITS + margin) - { - fprintf (stderr, "appr |r0 - r1| much larger than minimal (by %u bits, margin = %u bits)\n", - (unsigned) (abits - s*GMP_NUMB_BITS), (unsigned) margin); - return 0; - } - - while (mpz_cmp (appr_r0, ref_r0) > 0 || mpz_cmp (appr_r1, ref_r1) > 0) - { - ASSERT (mpz_size (appr_r0) > s); - ASSERT (mpz_size (appr_r1) > s); - - if (mpz_cmp (appr_r0, appr_r1) > 0) - { - if (!sdiv_qr (q, appr_r0, s, appr_r0, appr_r1)) - break; - mpz_addmul (appr.m[0][1], q, appr.m[0][0]); - mpz_addmul (appr.m[1][1], q, appr.m[1][0]); - } - else - { - if (!sdiv_qr (q, appr_r1, s, appr_r1, appr_r0)) - break; - mpz_addmul (appr.m[0][0], q, appr.m[0][1]); - mpz_addmul (appr.m[1][0], q, appr.m[1][1]); - } - } - - if (mpz_cmp (appr_r0, ref_r0) != 0 - || mpz_cmp (appr_r1, ref_r1) != 0 - || !hgcd_ref_equal (ref, &appr)) - { - fprintf (stderr, "appr_r0: "); debug_mp (appr_r0, 16); - fprintf (stderr, "ref_r0: "); debug_mp (ref_r0, 16); - - fprintf (stderr, "appr_r1: "); debug_mp (appr_r1, 16); - fprintf (stderr, "ref_r1: "); debug_mp (ref_r1, 16); - - return 0; - } - mpz_clear (t); - mpz_clear (q); - hgcd_ref_clear (&appr); - mpz_clear (appr_r0); - mpz_clear (appr_r1); - - return 1; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-instrument.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-instrument.c deleted file mode 100644 index 338fef17736..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-instrument.c +++ /dev/null @@ -1,416 +0,0 @@ -/* Test assembler support for --enable-profiling=instrument. - -Copyright 2002, 2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" -#include "tests.h" - - -#if WANT_PROFILING_INSTRUMENT - -/* This program exercises each mpn routine that might be implemented in - assembler. It ensures the __cyg_profile_func_enter and exit calls have - come out right, and that in the x86 code "ret_internal" is correctly used - for PIC setups. */ - - -/* Changes to enter_seen done by __cyg_profile_func_enter are essentially - unknown to the optimizer, so must use volatile. */ -volatile int enter_seen; - -/* Dummy used to stop various calls going dead. */ -unsigned long notdead; - -const char *name = "<none>"; -int old_ncall; - -struct { - void *this_fn; - void *call_site; -} call[100]; -int ncall; - - -void __cyg_profile_func_enter (void *, void *) - __attribute__ ((no_instrument_function)); - -void -__cyg_profile_func_enter (void *this_fn, void *call_site) -{ -#if 0 - printf ("%24s %p %p\n", name, this_fn, call_site); -#endif - ASSERT_ALWAYS (ncall >= 0); - ASSERT_ALWAYS (ncall <= numberof (call)); - - if (ncall >= numberof (call)) - { - printf ("__cyg_profile_func_enter: oops, call stack full, from %s\n", name); - abort (); - } - - enter_seen = 1; - call[ncall].this_fn = this_fn; - call[ncall].call_site = call_site; - ncall++; -} - -void __cyg_profile_func_exit (void *, void *) - __attribute__ ((no_instrument_function)); - -void -__cyg_profile_func_exit (void *this_fn, void *call_site) -{ - ASSERT_ALWAYS (ncall >= 0); - ASSERT_ALWAYS (ncall <= numberof (call)); - - if (ncall == 0) - { - printf ("__cyg_profile_func_exit: call stack empty, from %s\n", name); - abort (); - } - - ncall--; - if (this_fn != call[ncall].this_fn || call_site != call[ncall].call_site) - { - printf ("__cyg_profile_func_exit: unbalanced this_fn/call_site from %s\n", name); - printf (" this_fn got %p\n", this_fn); - printf (" want %p\n", call[ncall].this_fn); - printf (" call_site got %p\n", call_site); - printf (" want %p\n", call[ncall].call_site); - abort (); - } -} - - -void -pre (const char *str) -{ - name = str; - enter_seen = 0; - old_ncall = ncall; -} - -void -post (void) -{ - if (! enter_seen) - { - printf ("did not reach __cyg_profile_func_enter from %s\n", name); - abort (); - } - - if (ncall != old_ncall) - { - printf ("unbalance enter/exit calls from %s\n", name); - printf (" ncall %d\n", ncall); - printf (" old_ncall %d\n", old_ncall); - abort (); - } -} - -void -check (void) -{ - mp_limb_t wp[100], xp[100], yp[100]; - mp_size_t size = 100; - - refmpn_zero (xp, size); - refmpn_zero (yp, size); - refmpn_zero (wp, size); - - pre ("mpn_add_n"); - mpn_add_n (wp, xp, yp, size); - post (); - -#if HAVE_NATIVE_mpn_add_nc - pre ("mpn_add_nc"); - mpn_add_nc (wp, xp, yp, size, CNST_LIMB(0)); - post (); -#endif - -#if HAVE_NATIVE_mpn_addlsh1_n - pre ("mpn_addlsh1_n"); - mpn_addlsh1_n (wp, xp, yp, size); - post (); -#endif - -#if HAVE_NATIVE_mpn_and_n - pre ("mpn_and_n"); - mpn_and_n (wp, xp, yp, size); - post (); -#endif - -#if HAVE_NATIVE_mpn_andn_n - pre ("mpn_andn_n"); - mpn_andn_n (wp, xp, yp, size); - post (); -#endif - - pre ("mpn_addmul_1"); - mpn_addmul_1 (wp, xp, size, yp[0]); - post (); - -#if HAVE_NATIVE_mpn_addmul_1c - pre ("mpn_addmul_1c"); - mpn_addmul_1c (wp, xp, size, yp[0], CNST_LIMB(0)); - post (); -#endif - -#if HAVE_NATIVE_mpn_com - pre ("mpn_com"); - mpn_com (wp, xp, size); - post (); -#endif - -#if HAVE_NATIVE_mpn_copyd - pre ("mpn_copyd"); - mpn_copyd (wp, xp, size); - post (); -#endif - -#if HAVE_NATIVE_mpn_copyi - pre ("mpn_copyi"); - mpn_copyi (wp, xp, size); - post (); -#endif - - pre ("mpn_divexact_1"); - mpn_divexact_1 (wp, xp, size, CNST_LIMB(123)); - post (); - - pre ("mpn_divexact_by3c"); - mpn_divexact_by3c (wp, xp, size, CNST_LIMB(0)); - post (); - - pre ("mpn_divrem_1"); - mpn_divrem_1 (wp, (mp_size_t) 0, xp, size, CNST_LIMB(123)); - post (); - -#if HAVE_NATIVE_mpn_divrem_1c - pre ("mpn_divrem_1c"); - mpn_divrem_1c (wp, (mp_size_t) 0, xp, size, CNST_LIMB(123), CNST_LIMB(122)); - post (); -#endif - - pre ("mpn_gcd_1"); - xp[0] |= 1; - notdead += (unsigned long) mpn_gcd_1 (xp, size, CNST_LIMB(123)); - post (); - - pre ("mpn_hamdist"); - notdead += mpn_hamdist (xp, yp, size); - post (); - -#if HAVE_NATIVE_mpn_ior_n - pre ("mpn_ior_n"); - mpn_ior_n (wp, xp, yp, size); - post (); -#endif - -#if HAVE_NATIVE_mpn_iorn_n - pre ("mpn_iorn_n"); - mpn_iorn_n (wp, xp, yp, size); - post (); -#endif - - pre ("mpn_lshift"); - mpn_lshift (wp, xp, size, 1); - post (); - - pre ("mpn_mod_1"); - notdead += mpn_mod_1 (xp, size, CNST_LIMB(123)); - post (); - -#if HAVE_NATIVE_mpn_mod_1c - pre ("mpn_mod_1c"); - notdead += mpn_mod_1c (xp, size, CNST_LIMB(123), CNST_LIMB(122)); - post (); -#endif - -#if GMP_NUMB_BITS % 4 == 0 - pre ("mpn_mod_34lsub1"); - notdead += mpn_mod_34lsub1 (xp, size); - post (); -#endif - - pre ("mpn_modexact_1_odd"); - notdead += mpn_modexact_1_odd (xp, size, CNST_LIMB(123)); - post (); - - pre ("mpn_modexact_1c_odd"); - notdead += mpn_modexact_1c_odd (xp, size, CNST_LIMB(123), CNST_LIMB(456)); - post (); - - pre ("mpn_mul_1"); - mpn_mul_1 (wp, xp, size, yp[0]); - post (); - -#if HAVE_NATIVE_mpn_mul_1c - pre ("mpn_mul_1c"); - mpn_mul_1c (wp, xp, size, yp[0], CNST_LIMB(0)); - post (); -#endif - -#if HAVE_NATIVE_mpn_mul_2 - pre ("mpn_mul_2"); - mpn_mul_2 (wp, xp, size-1, yp); - post (); -#endif - - pre ("mpn_mul_basecase"); - mpn_mul_basecase (wp, xp, (mp_size_t) 3, yp, (mp_size_t) 3); - post (); - -#if HAVE_NATIVE_mpn_nand_n - pre ("mpn_nand_n"); - mpn_nand_n (wp, xp, yp, size); - post (); -#endif - -#if HAVE_NATIVE_mpn_nior_n - pre ("mpn_nior_n"); - mpn_nior_n (wp, xp, yp, size); - post (); -#endif - - pre ("mpn_popcount"); - notdead += mpn_popcount (xp, size); - post (); - - pre ("mpn_preinv_mod_1"); - notdead += mpn_preinv_mod_1 (xp, size, GMP_NUMB_MAX, - refmpn_invert_limb (GMP_NUMB_MAX)); - post (); - -#if USE_PREINV_DIVREM_1 || HAVE_NATIVE_mpn_preinv_divrem_1 - pre ("mpn_preinv_divrem_1"); - mpn_preinv_divrem_1 (wp, (mp_size_t) 0, xp, size, GMP_NUMB_MAX, - refmpn_invert_limb (GMP_NUMB_MAX), 0); - post (); -#endif - -#if HAVE_NATIVE_mpn_rsh1add_n - pre ("mpn_rsh1add_n"); - mpn_rsh1add_n (wp, xp, yp, size); - post (); -#endif - -#if HAVE_NATIVE_mpn_rsh1sub_n - pre ("mpn_rsh1sub_n"); - mpn_rsh1sub_n (wp, xp, yp, size); - post (); -#endif - - pre ("mpn_rshift"); - mpn_rshift (wp, xp, size, 1); - post (); - - pre ("mpn_sqr_basecase"); - mpn_sqr_basecase (wp, xp, (mp_size_t) 3); - post (); - - pre ("mpn_submul_1"); - mpn_submul_1 (wp, xp, size, yp[0]); - post (); - -#if HAVE_NATIVE_mpn_submul_1c - pre ("mpn_submul_1c"); - mpn_submul_1c (wp, xp, size, yp[0], CNST_LIMB(0)); - post (); -#endif - - pre ("mpn_sub_n"); - mpn_sub_n (wp, xp, yp, size); - post (); - -#if HAVE_NATIVE_mpn_sub_nc - pre ("mpn_sub_nc"); - mpn_sub_nc (wp, xp, yp, size, CNST_LIMB(0)); - post (); -#endif - -#if HAVE_NATIVE_mpn_sublsh1_n - pre ("mpn_sublsh1_n"); - mpn_sublsh1_n (wp, xp, yp, size); - post (); -#endif - -#if HAVE_NATIVE_mpn_udiv_qrnnd - pre ("mpn_udiv_qrnnd"); - mpn_udiv_qrnnd (&wp[0], CNST_LIMB(122), xp[0], CNST_LIMB(123)); - post (); -#endif - -#if HAVE_NATIVE_mpn_udiv_qrnnd_r - pre ("mpn_udiv_qrnnd_r"); - mpn_udiv_qrnnd (CNST_LIMB(122), xp[0], CNST_LIMB(123), &wp[0]); - post (); -#endif - -#if HAVE_NATIVE_mpn_umul_ppmm - pre ("mpn_umul_ppmm"); - mpn_umul_ppmm (&wp[0], xp[0], yp[0]); - post (); -#endif - -#if HAVE_NATIVE_mpn_umul_ppmm_r - pre ("mpn_umul_ppmm_r"); - mpn_umul_ppmm_r (&wp[0], xp[0], yp[0]); - post (); -#endif - -#if HAVE_NATIVE_mpn_xor_n - pre ("mpn_xor_n"); - mpn_xor_n (wp, xp, yp, size); - post (); -#endif - -#if HAVE_NATIVE_mpn_xnor_n - pre ("mpn_xnor_n"); - mpn_xnor_n (wp, xp, yp, size); - post (); -#endif -} - - -int -main (void) -{ - tests_start (); - - check (); - - tests_end (); - exit (0); -} - - -#else /* ! WANT_PROFILING_INSTRUMENT */ - -int -main (void) -{ - exit (0); -} - -#endif diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-invert.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-invert.c deleted file mode 100644 index c9b0080b764..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-invert.c +++ /dev/null @@ -1,161 +0,0 @@ -/* Test for mpn_invert function. - - Contributed to the GNU project by Marco Bodrato. - -Copyright 2009 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdlib.h> -#include <stdio.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -/* Sizes are up to 2^SIZE_LOG limbs */ -#ifndef SIZE_LOG -#define SIZE_LOG 12 -#endif - -#ifndef COUNT -#define COUNT 1000 -#endif - -#define MAX_N (1L << SIZE_LOG) -#define MIN_N 1 - - -static int -invert_valid (mp_srcptr ip, mp_srcptr dp, mp_size_t n) -{ - mp_ptr tp; - int cy; - TMP_DECL; - - TMP_MARK; - tp = TMP_ALLOC_LIMBS (2*n); - - refmpn_mul (tp, ip, n, dp, n); - cy = refmpn_add_n (tp + n, tp + n, dp, n); /* This must not give a carry. */ - cy -= refmpn_add (tp, tp, 2*n, dp, n); /* This must give a carry. */ - TMP_FREE; - - return (cy == -1); -} - -/* - Check the result of the mpn_invert function in the library. -*/ - -int -main (int argc, char **argv) -{ - mp_ptr ip, dp, scratch; - int count = COUNT; - int test; - gmp_randstate_ptr rands; - TMP_DECL; - TMP_MARK; - - if (argc > 1) - { - char *end; - count = strtol (argv[1], &end, 0); - if (*end || count <= 0) - { - fprintf (stderr, "Invalid test count: %s.\n", argv[1]); - return 1; - } - } - - tests_start (); - rands = RANDS; - - dp = TMP_ALLOC_LIMBS (MAX_N); - ip = 1+TMP_ALLOC_LIMBS (MAX_N + 2); - scratch - = 1+TMP_ALLOC_LIMBS (mpn_invert_itch (MAX_N) + 2); - - for (test = 0; test < count; test++) - { - unsigned size_min; - unsigned size_range; - mp_size_t n; - mp_size_t itch; - mp_limb_t i_before, i_after, s_before, s_after; - - for (size_min = 1; (1L << size_min) < MIN_N; size_min++) - ; - - /* We generate an in the MIN_N <= n <= (1 << size_range). */ - size_range = size_min - + gmp_urandomm_ui (rands, SIZE_LOG + 1 - size_min); - - n = MIN_N - + gmp_urandomm_ui (rands, (1L << size_range) + 1 - MIN_N); - - mpn_random2 (dp, n); - - mpn_random2 (ip-1, n + 2); - i_before = ip[-1]; - i_after = ip[n]; - - itch = mpn_invert_itch (n); - ASSERT_ALWAYS (itch <= mpn_invert_itch (MAX_N)); - mpn_random2 (scratch-1, itch+2); - s_before = scratch[-1]; - s_after = scratch[itch]; - - dp[n-1] |= GMP_NUMB_HIGHBIT; - mpn_invert (ip, dp, n, scratch); - if (ip[-1] != i_before || ip[n] != i_after - || scratch[-1] != s_before || scratch[itch] != s_after - || ! invert_valid(ip, dp, n)) - { - printf ("ERROR in test %d, n = %d\n", - test, (int) n); - if (ip[-1] != i_before) - { - printf ("before ip:"); mpn_dump (ip -1, 1); - printf ("keep: "); mpn_dump (&i_before, 1); - } - if (ip[n] != i_after) - { - printf ("after ip:"); mpn_dump (ip + n, 1); - printf ("keep: "); mpn_dump (&i_after, 1); - } - if (scratch[-1] != s_before) - { - printf ("before scratch:"); mpn_dump (scratch-1, 1); - printf ("keep: "); mpn_dump (&s_before, 1); - } - if (scratch[itch] != s_after) - { - printf ("after scratch:"); mpn_dump (scratch + itch, 1); - printf ("keep: "); mpn_dump (&s_after, 1); - } - mpn_dump (dp, n); - mpn_dump (ip, n); - - abort(); - } - } - TMP_FREE; - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-iord_u.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-iord_u.c deleted file mode 100644 index 93e68c5c3fb..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-iord_u.c +++ /dev/null @@ -1,221 +0,0 @@ -/* Test MPN_INCR_U and MPN_DECR_U. - -Copyright 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* The i386 MPN_INCR_U and MPN_DECR_U have special cases for "n" being a - compile-time constant 1, so that's exercised explicitly. */ - - -#define M GMP_NUMB_MAX -#define SIZE ((mp_size_t) 10) - - -void -check_one (const char *name, int i, - mp_srcptr src, mp_limb_t n, - mp_srcptr got, mp_srcptr want, mp_size_t size) -{ - if (! refmpn_equal_anynail (got, want, size)) - { - printf ("Wrong at %s i=%d\n", name, i); - mpn_trace (" src", src, size); - mpn_trace (" n", &n, (mp_size_t) 1); - mpn_trace (" got", got, size); - mpn_trace (" want", want, size); - abort (); - } -} - - -void -check_incr_data (void) -{ - static const struct { - mp_limb_t n; - const mp_limb_t src[SIZE]; - const mp_limb_t want[SIZE]; - } data[] = { - { 1, { 0 }, { 1 } }, - { 1, { 123 }, { 124 } }, - { 2, { 0 }, { 2 } }, - { 2, { 123 }, { 125 } }, - { M, { 0 }, { M } }, - - { 1, { M, 0 }, { 0, 1 } }, - { 1, { M, 123 }, { 0, 124 } }, - { 2, { M, 0 }, { 1, 1 } }, - { 2, { M, 123 }, { 1, 124 } }, - { M, { M, 0 }, { M-1, 1 } }, - { M, { M, 123 }, { M-1, 124 } }, - - { 1, { M, M, 0 }, { 0, 0, 1 } }, - { 1, { M, M, 123 }, { 0, 0, 124 } }, - { 2, { M, M, 0 }, { 1, 0, 1 } }, - { 2, { M, M, 123 }, { 1, 0, 124 } }, - { M, { M, M, 0 }, { M-1, 0, 1 } }, - { M, { M, M, 123 }, { M-1, 0, 124 } }, - - { 1, { M, M, M, 0 }, { 0, 0, 0, 1 } }, - { 1, { M, M, M, 123 }, { 0, 0, 0, 124 } }, - { 2, { M, M, M, 0 }, { 1, 0, 0, 1 } }, - { 2, { M, M, M, 123 }, { 1, 0, 0, 124 } }, - { M, { M, M, M, 0 }, { M-1, 0, 0, 1 } }, - { M, { M, M, M, 123 }, { M-1, 0, 0, 124 } }, - - { 1, { M, M, M, M, 0 }, { 0, 0, 0, 0, 1 } }, - { 1, { M, M, M, M, 123 }, { 0, 0, 0, 0, 124 } }, - { 2, { M, M, M, M, 0 }, { 1, 0, 0, 0, 1 } }, - { 2, { M, M, M, M, 123 }, { 1, 0, 0, 0, 124 } }, - { M, { M, M, M, M, 0 }, { M-1, 0, 0, 0, 1 } }, - { M, { M, M, M, M, 123 }, { M-1, 0, 0, 0, 124 -#if defined (__hpux) && ! defined (__GNUC__) - /* Some versions (at least HP92453-01 B.11.11.23709.GP) of the - HP C compilers fail to zero-fill aggregates as the ISO C standard - requires (cf 6.5.7 Initialization). Compensate here: */ - , 0, 0, 0, 0, 0 -#endif - } } - }; - - mp_limb_t got[SIZE]; - int i; - - for (i = 0; i < numberof (data); i++) - { - refmpn_copyi (got, data[i].src, SIZE); - MPN_INCR_U (got, SIZE, data[i].n); - check_one ("check_incr (general)", i, - data[i].src, data[i].n, - got, data[i].want, SIZE); - - if (data[i].n == 1) - { - refmpn_copyi (got, data[i].src, SIZE); - MPN_INCR_U (got, SIZE, CNST_LIMB(1)); - check_one ("check_incr (const 1)", i, - data[i].src, data[i].n, - got, data[i].want, SIZE); - } - } -} - -void -check_decr_data (void) -{ - static const struct { - mp_limb_t n; - const mp_limb_t src[SIZE]; - const mp_limb_t want[SIZE]; - } data[] = { - { 1, { 1 }, { 0 } }, - { 1, { 123 }, { 122 } }, - { 1, { M }, { M-1 } }, - { 2, { 2 }, { 0 } }, - { 2, { 123 }, { 121 } }, - { M, { M }, { 0 } }, - { M-1, { M }, { 1 } }, - - { 1, { 0, 1 }, { M, 0 } }, - { 1, { 0, 123 }, { M, 122 } }, - { 1, { 0, M }, { M, M-1 } }, - { 2, { 0, 123 }, { M-1, 122 } }, - { 2, { 1, 123 }, { M, 122 } }, - { M, { 0, 123 }, { 1, 122 } }, - { M, { M-1, M }, { M, M-1 } }, - - { 1, { 0, 0, 1 }, { M, M, 0 } }, - { 1, { 0, 0, 123 }, { M, M, 122 } }, - { 1, { 0, 0, M }, { M, M, M-1 } }, - { 2, { 0, 0, 123 }, { M-1, M, 122 } }, - { 2, { 1, 0, 123 }, { M, M, 122 } }, - { M, { 0, 0, 123 }, { 1, M, 122 } }, - { M, { M-1, 0, M }, { M, M, M-1 } }, - - { 1, { 0, 0, 0, 1 }, { M, M, M, 0 } }, - { 1, { 0, 0, 0, 123 }, { M, M, M, 122 } }, - { 1, { 0, 0, 0, M }, { M, M, M, M-1 } }, - { 2, { 0, 0, 0, 123 }, { M-1, M, M, 122 } }, - { 2, { 1, 0, 0, 123 }, { M, M, M, 122 } }, - { M, { 0, 0, 0, 123 }, { 1, M, M, 122 } }, - { M, { M-1, 0, 0, M }, { M, M, M, M-1 } }, - - { 1, { 0, 0, 0, 0, 1 }, { M, M, M, M, 0 } }, - { 1, { 0, 0, 0, 0, 123 }, { M, M, M, M, 122 } }, - { 1, { 0, 0, 0, 0, M }, { M, M, M, M, M-1 } }, - { 2, { 0, 0, 0, 0, 123 }, { M-1, M, M, M, 122 } }, - { 2, { 1, 0, 0, 0, 123 }, { M, M, M, M, 122 } }, - { M, { 0, 0, 0, 0, 123 }, { 1, M, M, M, 122 } }, - { M, { M-1, 0, 0, 0, M }, { M, M, M, M, M-1 } }, - - { 1, { 0, 0, 0, 0, 0, 1 }, { M, M, M, M, M, 0 } }, - { 1, { 0, 0, 0, 0, 0, 123 }, { M, M, M, M, M, 122 } }, - { 1, { 0, 0, 0, 0, 0, M }, { M, M, M, M, M, M-1 } }, - { 2, { 0, 0, 0, 0, 0, 123 }, { M-1, M, M, M, M, 122 } }, - { 2, { 1, 0, 0, 0, 0, 123 }, { M, M, M, M, M, 122 } }, - { M, { 0, 0, 0, 0, 0, 123 }, { 1, M, M, M, M, 122 } }, - { M, { M-1, 0, 0, 0, 0, M }, { M, M, M, M, M, M-1 -#if defined (__hpux) && ! defined (__GNUC__) - /* For explanation of this garbage, see previous function. */ - , 0, 0, 0, 0 -#endif - } } - }; - - mp_limb_t got[SIZE]; - int i; - - for (i = 0; i < numberof (data); i++) - { - refmpn_copyi (got, data[i].src, SIZE); - MPN_DECR_U (got, SIZE, data[i].n); - check_one ("check_decr_data", i, - data[i].src, data[i].n, - got, data[i].want, SIZE); - - if (data[i].n == 1) - { - refmpn_copyi (got, data[i].src, SIZE); - MPN_DECR_U (got, SIZE, CNST_LIMB(1)); - check_one ("check_decr (const 1)", i, - data[i].src, data[i].n, - got, data[i].want, SIZE); - } - } -} - - -int -main (void) -{ - tests_start (); - mp_trace_base = -16; - - check_incr_data (); - check_decr_data (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-matrix22.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-matrix22.c deleted file mode 100644 index e63cbe27bb8..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-matrix22.c +++ /dev/null @@ -1,207 +0,0 @@ -/* Tests matrix22_mul. - -Copyright 2008 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -struct matrix { - mp_size_t alloc; - mp_size_t n; - mp_ptr e00, e01, e10, e11; -}; - -static void -matrix_init (struct matrix *M, mp_size_t n) -{ - mp_ptr p = refmpn_malloc_limbs (4*(n+1)); - M->e00 = p; p += n+1; - M->e01 = p; p += n+1; - M->e10 = p; p += n+1; - M->e11 = p; - M->alloc = n + 1; - M->n = 0; -} - -static void -matrix_clear (struct matrix *M) -{ - refmpn_free_limbs (M->e00); -} - -static void -matrix_copy (struct matrix *R, const struct matrix *M) -{ - R->n = M->n; - MPN_COPY (R->e00, M->e00, M->n); - MPN_COPY (R->e01, M->e01, M->n); - MPN_COPY (R->e10, M->e10, M->n); - MPN_COPY (R->e11, M->e11, M->n); -} - -/* Used with same size, so no need for normalization. */ -static int -matrix_equal_p (const struct matrix *A, const struct matrix *B) -{ - return (A->n == B->n - && mpn_cmp (A->e00, B->e00, A->n) == 0 - && mpn_cmp (A->e01, B->e01, A->n) == 0 - && mpn_cmp (A->e10, B->e10, A->n) == 0 - && mpn_cmp (A->e11, B->e11, A->n) == 0); -} - -static void -matrix_random(struct matrix *M, mp_size_t n, gmp_randstate_ptr rands) -{ - M->n = n; - mpn_random (M->e00, n); - mpn_random (M->e01, n); - mpn_random (M->e10, n); - mpn_random (M->e11, n); -} - -#define MUL(rp, ap, an, bp, bn) do { \ - if (an > bn) \ - mpn_mul (rp, ap, an, bp, bn); \ - else \ - mpn_mul (rp, bp, bn, ap, an); \ - } while(0) - -static void -ref_matrix22_mul (struct matrix *R, - const struct matrix *A, - const struct matrix *B, mp_ptr tp) -{ - mp_size_t an, bn, n; - mp_ptr r00, r01, r10, r11, a00, a01, a10, a11, b00, b01, b10, b11; - - if (A->n >= B->n) - { - r00 = R->e00; a00 = A->e00; b00 = B->e00; - r01 = R->e01; a01 = A->e01; b01 = B->e01; - r10 = R->e10; a10 = A->e10; b10 = B->e10; - r11 = R->e11; a11 = A->e11; b11 = B->e11; - an = A->n, bn = B->n; - } - else - { - /* Transpose */ - r00 = R->e00; a00 = B->e00; b00 = A->e00; - r01 = R->e10; a01 = B->e10; b01 = A->e10; - r10 = R->e01; a10 = B->e01; b10 = A->e01; - r11 = R->e11; a11 = B->e11; b11 = A->e11; - an = B->n, bn = A->n; - } - n = an + bn; - R->n = n + 1; - - mpn_mul (r00, a00, an, b00, bn); - mpn_mul (tp, a01, an, b10, bn); - r00[n] = mpn_add_n (r00, r00, tp, n); - - mpn_mul (r01, a00, an, b01, bn); - mpn_mul (tp, a01, an, b11, bn); - r01[n] = mpn_add_n (r01, r01, tp, n); - - mpn_mul (r10, a10, an, b00, bn); - mpn_mul (tp, a11, an, b10, bn); - r10[n] = mpn_add_n (r10, r10, tp, n); - - mpn_mul (r11, a10, an, b01, bn); - mpn_mul (tp, a11, an, b11, bn); - r11[n] = mpn_add_n (r11, r11, tp, n); -} - -static void -one_test (const struct matrix *A, const struct matrix *B, int i) -{ - struct matrix R; - struct matrix P; - mp_ptr tp; - - matrix_init (&R, A->n + B->n + 1); - matrix_init (&P, A->n + B->n + 1); - - tp = refmpn_malloc_limbs (mpn_matrix22_mul_itch (A->n, B->n)); - - ref_matrix22_mul (&R, A, B, tp); - matrix_copy (&P, A); - mpn_matrix22_mul (P.e00, P.e01, P.e10, P.e11, A->n, - B->e00, B->e01, B->e10, B->e11, B->n, tp); - P.n = A->n + B->n + 1; - if (!matrix_equal_p (&R, &P)) - { - fprintf (stderr, "ERROR in test %d\n", i); - gmp_fprintf (stderr, "A = (%Nx, %Nx\n %Nx, %Nx)\n" - "B = (%Nx, %Nx\n %Nx, %Nx)\n" - "R = (%Nx, %Nx (expected)\n %Nx, %Nx)\n" - "P = (%Nx, %Nx (incorrect)\n %Nx, %Nx)\n", - A->e00, A->n, A->e01, A->n, A->e10, A->n, A->e11, A->n, - B->e00, B->n, B->e01, B->n, B->e10, B->n, B->e11, B->n, - R.e00, R.n, R.e01, R.n, R.e10, R.n, R.e11, R.n, - P.e00, P.n, P.e01, P.n, P.e10, P.n, P.e11, P.n); - abort(); - } - refmpn_free_limbs (tp); - matrix_clear (&R); - matrix_clear (&P); -} - -#define MAX_SIZE (2+2*MATRIX22_STRASSEN_THRESHOLD) - -int -main (int argc, char **argv) -{ - struct matrix A; - struct matrix B; - - gmp_randstate_ptr rands; - mpz_t bs; - int i; - - tests_start (); - rands = RANDS; - - matrix_init (&A, MAX_SIZE); - matrix_init (&B, MAX_SIZE); - mpz_init (bs); - - for (i = 0; i < 1000; i++) - { - mp_size_t an, bn; - mpz_urandomb (bs, rands, 32); - an = 1 + mpz_get_ui (bs) % MAX_SIZE; - mpz_urandomb (bs, rands, 32); - bn = 1 + mpz_get_ui (bs) % MAX_SIZE; - - matrix_random (&A, an, rands); - matrix_random (&B, bn, rands); - - one_test (&A, &B, i); - } - mpz_clear (bs); - matrix_clear (&A); - matrix_clear (&B); - - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-minvert.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-minvert.c deleted file mode 100644 index 044a8424166..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-minvert.c +++ /dev/null @@ -1,177 +0,0 @@ -/* Copyright 2013-2015 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> /* for strtol */ - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" -#include "tests/tests.h" - -#define MAX_SIZE 50 - -#define COUNT 200 - -static void -mpz_to_mpn (mp_ptr ap, mp_size_t an, const mpz_t b) -{ - mp_size_t bn = mpz_size (b); - ASSERT_ALWAYS (bn <= an); - MPN_COPY_INCR (ap, mpz_limbs_read (b), bn); - MPN_ZERO (ap + bn, an - bn); -} - -int -mpz_eq_mpn (mp_ptr ap, mp_size_t an, const mpz_t b) -{ - mp_size_t bn = mpz_size (b); - - return (bn >= 0 && bn <= an - && mpn_cmp (ap, mpz_limbs_read (b), bn) == 0 - && (an == bn || mpn_zero_p (ap + bn, an - bn))); -} - -static mp_bitcnt_t -bit_size (mp_srcptr xp, mp_size_t n) -{ - MPN_NORMALIZE (xp, n); - return n > 0 ? mpn_sizeinbase (xp, n, 2) : 0; -} - -int -main (int argc, char **argv) -{ - gmp_randstate_ptr rands; - long count = COUNT; - mp_ptr mp; - mp_ptr ap; - mp_ptr tp; - mp_ptr scratch; - mpz_t m, a, r, g; - int test; - mp_limb_t ran; - mp_size_t itch; - TMP_DECL; - - tests_start (); - rands = RANDS; - - - TMP_MARK; - mpz_init (m); - mpz_init (a); - mpz_init (r); - mpz_init (g); - - if (argc > 1) - { - char *end; - count = strtol (argv[1], &end, 0); - if (*end || count <= 0) - { - fprintf (stderr, "Invalid test count: %s.\n", argv[1]); - return 1; - } - } - - mp = TMP_ALLOC_LIMBS (MAX_SIZE); - ap = TMP_ALLOC_LIMBS (MAX_SIZE); - tp = TMP_ALLOC_LIMBS (MAX_SIZE); - scratch = TMP_ALLOC_LIMBS (mpn_sec_invert_itch (MAX_SIZE) + 1); - - for (test = 0; test < count; test++) - { - mp_bitcnt_t bits; - int rres, tres; - mp_size_t n; - - bits = urandom () % (GMP_NUMB_BITS * MAX_SIZE) + 1; - - if (test & 1) - mpz_rrandomb (m, rands, bits); - else - mpz_urandomb (m, rands, bits); - if (test & 2) - mpz_rrandomb (a, rands, bits); - else - mpz_urandomb (a, rands, bits); - - mpz_setbit (m, 0); - if (test & 4) - { - /* Ensure it really is invertible */ - if (mpz_sgn (a) == 0) - mpz_set_ui (a, 1); - else - for (;;) - { - mpz_gcd (g, a, m); - if (mpz_cmp_ui (g, 1) == 0) - break; - mpz_remove (a, a, g); - } - } - - rres = mpz_invert (r, a, m); - if ( (test & 4) && !rres) - { - gmp_fprintf (stderr, "test %d: Not invertible!\n" - "m = %Zd\n" - "a = %Zd\n", test, m, a); - abort (); - } - ASSERT_ALWAYS (! (test & 4) || rres); - - n = (bits + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS; - ASSERT_ALWAYS (n <= MAX_SIZE); - itch = mpn_sec_invert_itch (n); - scratch[itch] = ran = urandom (); - - mpz_to_mpn (ap, n, a); - mpz_to_mpn (mp, n, m); - tres = mpn_sec_invert (tp, ap, mp, n, - bit_size (ap, n) + bit_size (mp, n), - scratch); - - if (rres != tres || (rres == 1 && !mpz_eq_mpn (tp, n, r)) || ran != scratch[itch]) - { - gmp_fprintf (stderr, "Test %d failed.\n" - "m = %Zd\n" - "a = %Zd\n", test, m, a); - fprintf (stderr, "ref ret: %d\n" - "got ret: %d\n", rres, tres); - if (rres) - gmp_fprintf (stderr, "ref: %Zd\n", r); - if (tres) - gmp_fprintf (stderr, "got: %Nd\n", tp, n); - if (ran != scratch[itch]) - fprintf (stderr, "scratch[itch] changed.\n"); - abort (); - } - } - - TMP_FREE; - - mpz_clear (m); - mpz_clear (a); - mpz_clear (r); - mpz_clear (g); - - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mod_1.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mod_1.c deleted file mode 100644 index 3d08a9018ff..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mod_1.c +++ /dev/null @@ -1,129 +0,0 @@ -/* Test mpn_mod_1 variants. - -Copyright 2010, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -static void -check_one (mp_srcptr ap, mp_size_t n, mp_limb_t b) -{ - mp_limb_t r_ref = refmpn_mod_1 (ap, n, b); - mp_limb_t r; - - if (n >= 2) - { - mp_limb_t pre[4]; - mpn_mod_1_1p_cps (pre, b); - r = mpn_mod_1_1p (ap, n, b << pre[1], pre); - if (r != r_ref) - { - printf ("mpn_mod_1_1p failed\n"); - goto fail; - } - } - if ((b & GMP_NUMB_HIGHBIT) == 0) - { - mp_limb_t pre[5]; - mpn_mod_1s_2p_cps (pre, b); - r = mpn_mod_1s_2p (ap, n, b << pre[1], pre); - if (r != r_ref) - { - printf ("mpn_mod_1s_2p failed\n"); - goto fail; - } - } - if (b <= GMP_NUMB_MASK / 3) - { - mp_limb_t pre[6]; - mpn_mod_1s_3p_cps (pre, b); - r = mpn_mod_1s_3p (ap, n, b << pre[1], pre); - if (r != r_ref) - { - printf ("mpn_mod_1s_3p failed\n"); - goto fail; - } - } - if (b <= GMP_NUMB_MASK / 4) - { - mp_limb_t pre[7]; - mpn_mod_1s_4p_cps (pre, b); - r = mpn_mod_1s_4p (ap, n, b << pre[1], pre); - if (r != r_ref) - { - printf ("mpn_mod_1s_4p failed\n"); - goto fail; - } - } - r = mpn_mod_1 (ap, n, b); - if (r != r_ref) - { - printf ("mpn_mod_1 failed\n"); - fail: - printf ("an = %d, a: ", (int) n); mpn_dump (ap, n); - printf ("b : "); mpn_dump (&b, 1); - printf ("r (expected): "); mpn_dump (&r_ref, 1); - printf ("r (bad) : "); mpn_dump (&r, 1); - abort(); - } -} - -int -main (int argc, char **argv) -{ - gmp_randstate_ptr rands; - int i; - unsigned a_bits; - unsigned b_bits; - mpz_t a; - mpz_t b; - - tests_start (); - rands = RANDS; - mpz_init (a); - mpz_init (b); - - for (i = 0; i < 300; i++) - { - mp_size_t asize; - a_bits = 1 + gmp_urandomm_ui (rands, 1000); - b_bits = 1 + gmp_urandomm_ui (rands, GMP_NUMB_BITS); - - mpz_rrandomb (a, rands, a_bits); - mpz_rrandomb (b, rands, b_bits); - - asize = SIZ(a); - if (!asize) - asize = 1; - if (mpz_sgn (b) == 0) - mpz_set_ui (b, 1); - - check_one (PTR(a), asize, PTR(b)[0]); - } - - mpz_clear (a); - mpz_clear (b); - - tests_end (); - return 0; -} - diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mp_bases.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mp_bases.c deleted file mode 100644 index c0b228825a8..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mp_bases.c +++ /dev/null @@ -1,105 +0,0 @@ -/* Check mp_bases values. - -Copyright 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" -#include "tests.h" - - -int -main (int argc, char *argv[]) -{ - mp_limb_t want_bb, want_bb_inv; - int base, want_chars_per_limb; - - want_chars_per_limb = refmpn_chars_per_limb (10); - if (MP_BASES_CHARS_PER_LIMB_10 != want_chars_per_limb) - { - printf ("MP_BASES_CHARS_PER_LIMB_10 wrong\n"); - abort (); - } - - want_bb = refmpn_big_base (10); - if (MP_BASES_BIG_BASE_10 != want_bb) - { - printf ("MP_BASES_BIG_BASE_10 wrong\n"); - abort (); - } - - want_bb_inv = refmpn_invert_limb - (want_bb << refmpn_count_leading_zeros (want_bb)); - if (MP_BASES_BIG_BASE_INVERTED_10 != want_bb_inv) - { - printf ("MP_BASES_BIG_BASE_INVERTED_10 wrong\n"); - abort (); - } - - if (MP_BASES_NORMALIZATION_STEPS_10 - != refmpn_count_leading_zeros (MP_BASES_BIG_BASE_10)) - { - printf ("MP_BASES_NORMALIZATION_STEPS_10 wrong\n"); - abort (); - } - - for (base = 2; base < numberof (mp_bases); base++) - { - want_chars_per_limb = refmpn_chars_per_limb (base); - if (mp_bases[base].chars_per_limb != want_chars_per_limb) - { - printf ("mp_bases[%d].chars_per_limb wrong\n", base); - printf (" got %d\n", mp_bases[base].chars_per_limb); - printf (" want %d\n", want_chars_per_limb); - abort (); - } - - if (POW2_P (base)) - { - want_bb = refmpn_count_trailing_zeros ((mp_limb_t) base); - if (mp_bases[base].big_base != want_bb) - { - printf ("mp_bases[%d].big_base (log2 of base) wrong\n", base); - abort (); - } - } - else - { - want_bb = refmpn_big_base (base); - if (mp_bases[base].big_base != want_bb) - { - printf ("mp_bases[%d].big_base wrong\n", base); - abort (); - } - -#if USE_PREINV_DIVREM_1 - want_bb_inv = refmpn_invert_limb - (want_bb << refmpn_count_leading_zeros (want_bb)); - if (mp_bases[base].big_base_inverted != want_bb_inv) - { - printf ("mp_bases[%d].big_base_inverted wrong\n", base); - abort (); - } -#endif - } - } - - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mul.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mul.c deleted file mode 100644 index 26e42273346..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mul.c +++ /dev/null @@ -1,101 +0,0 @@ -/* Test mpn_mul function for all sizes up to a selected limit. - -Copyright 2011, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdlib.h> -#include <stdio.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -static unsigned -isqrt (unsigned t) -{ - unsigned s, b; - - for (b = 0, s = t; b++, s >>= 1; ) - ; - - s = 1 << (b >> 1); - if (b & 1) - s += s >> 1; - - do - { - b = t / s; - s = (s + b) >> 1; - } - while (b < s); - - return s; -} - -int -main (int argc, char **argv) -{ - mp_ptr ap, bp, rp, refp; - mp_size_t max_n, an, bn, rn; - gmp_randstate_ptr rands; - int reps; - TMP_DECL; - TMP_MARK; - - reps = 1; - - tests_start (); - TESTS_REPS (reps, argv, argc); - - rands = RANDS; - - /* Re-interpret reps argument as a size argument. */ - max_n = isqrt (reps * 25000); - - ap = TMP_ALLOC_LIMBS (max_n + 1); - bp = TMP_ALLOC_LIMBS (max_n + 1); - rp = TMP_ALLOC_LIMBS (2 * max_n); - refp = TMP_ALLOC_LIMBS (2 * max_n); - - for (an = 1; an <= max_n; an += 1) - { - for (bn = 1; bn <= an; bn += 1) - { - mpn_random2 (ap, an + 1); - mpn_random2 (bp, bn + 1); - - refmpn_mul (refp, ap, an, bp, bn); - mpn_mul (rp, ap, an, bp, bn); - - rn = an + bn; - if (mpn_cmp (refp, rp, rn)) - { - printf ("ERROR, an = %d, bn = %d, rn = %d\n", - (int) an, (int) bn, (int) rn); - printf ("a: "); mpn_dump (ap, an); - printf ("b: "); mpn_dump (bp, bn); - printf ("r: "); mpn_dump (rp, rn); - printf ("ref: "); mpn_dump (refp, rn); - abort(); - } - } - } - TMP_FREE; - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mullo.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mullo.c deleted file mode 100644 index d4789976ac0..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mullo.c +++ /dev/null @@ -1,142 +0,0 @@ -/* Test for mullo function. - -Copyright 2009 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdlib.h> -#include <stdio.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -/* Sizes are up to 2^SIZE_LOG limbs */ -#ifndef SIZE_LOG -#define SIZE_LOG 10 -#endif - -#ifndef COUNT -#define COUNT 10000 -#endif - -#define MAX_N (1L << SIZE_LOG) -#define MIN_N (1) - -int -main (int argc, char **argv) -{ - mp_ptr ap, bp, refp, pp, scratch; - int count = COUNT; - int test; - gmp_randstate_ptr rands; - TMP_DECL; - TMP_MARK; - - if (argc > 1) - { - char *end; - count = strtol (argv[1], &end, 0); - if (*end || count <= 0) - { - fprintf (stderr, "Invalid test count: %s.\n", argv[1]); - return 1; - } - } - - tests_start (); - rands = RANDS; - -#define mpn_mullo_itch(n) (0) - - ap = TMP_ALLOC_LIMBS (MAX_N); - bp = TMP_ALLOC_LIMBS (MAX_N); - refp = TMP_ALLOC_LIMBS (MAX_N * 2); - pp = 1+TMP_ALLOC_LIMBS (MAX_N + 2); - scratch - = 1+TMP_ALLOC_LIMBS (mpn_mullo_itch (MAX_N) + 2); - - for (test = 0; test < count; test++) - { - unsigned size_min; - unsigned size_range; - mp_size_t n; - mp_size_t itch; - mp_limb_t p_before, p_after, s_before, s_after; - - for (size_min = 1; (1L << size_min) < MIN_N; size_min++) - ; - - /* We generate an in the MIN_N <= n <= (1 << size_range). */ - size_range = size_min - + gmp_urandomm_ui (rands, SIZE_LOG + 1 - size_min); - - n = MIN_N - + gmp_urandomm_ui (rands, (1L << size_range) + 1 - MIN_N); - - mpn_random2 (ap, n); - mpn_random2 (bp, n); - mpn_random2 (pp-1, n + 2); - p_before = pp[-1]; - p_after = pp[n]; - - itch = mpn_mullo_itch (n); - ASSERT_ALWAYS (itch <= mpn_mullo_itch (MAX_N)); - mpn_random2 (scratch-1, itch+2); - s_before = scratch[-1]; - s_after = scratch[itch]; - - mpn_mullo_n (pp, ap, bp, n); - mpn_mul_n (refp, ap, bp, n); - if (pp[-1] != p_before || pp[n] != p_after - || scratch[-1] != s_before || scratch[itch] != s_after - || mpn_cmp (refp, pp, n) != 0) - { - printf ("ERROR in test %d, n = %d", - test, (int) n); - if (pp[-1] != p_before) - { - printf ("before pp:"); mpn_dump (pp -1, 1); - printf ("keep: "); mpn_dump (&p_before, 1); - } - if (pp[n] != p_after) - { - printf ("after pp:"); mpn_dump (pp + n, 1); - printf ("keep: "); mpn_dump (&p_after, 1); - } - if (scratch[-1] != s_before) - { - printf ("before scratch:"); mpn_dump (scratch-1, 1); - printf ("keep: "); mpn_dump (&s_before, 1); - } - if (scratch[itch] != s_after) - { - printf ("after scratch:"); mpn_dump (scratch + itch, 1); - printf ("keep: "); mpn_dump (&s_after, 1); - } - mpn_dump (ap, n); - mpn_dump (bp, n); - mpn_dump (pp, n); - mpn_dump (refp, n); - - abort(); - } - } - TMP_FREE; - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mulmid.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mulmid.c deleted file mode 100644 index 8978c4c1fd8..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mulmid.c +++ /dev/null @@ -1,93 +0,0 @@ -/* Test for mulmid function. - -Copyright 2011 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdlib.h> -#include <stdio.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -/* Sizes are up to 2^SIZE_LOG limbs */ -#ifndef SIZE_LOG -#define SIZE_LOG 9 -#endif - -#ifndef COUNT -#define COUNT 5000 -#endif - -#define MAX_N (1L << SIZE_LOG) - -int -main (int argc, char **argv) -{ - mp_ptr ap, bp, rp, refp; - gmp_randstate_ptr rands; - int test; - TMP_DECL; - TMP_MARK; - - tests_start (); - rands = RANDS; - - ap = TMP_ALLOC_LIMBS (MAX_N); - bp = TMP_ALLOC_LIMBS (MAX_N); - rp = TMP_ALLOC_LIMBS (MAX_N + 2); - refp = TMP_ALLOC_LIMBS (MAX_N + 2); - - for (test = 0; test < COUNT; test++) - { - mp_size_t an, bn, rn; - unsigned size_log; - - size_log = 1 + gmp_urandomm_ui (rands, SIZE_LOG); - an = 1 + gmp_urandomm_ui(rands, 1L << size_log); - - size_log = 1 + gmp_urandomm_ui (rands, SIZE_LOG); - bn = 1 + gmp_urandomm_ui(rands, 1L << size_log); - - /* Make sure an >= bn */ - if (an < bn) - MP_SIZE_T_SWAP (an, bn); - - mpn_random2 (ap, an); - mpn_random2 (bp, bn); - - refmpn_mulmid (refp, ap, an, bp, bn); - mpn_mulmid (rp, ap, an, bp, bn); - - rn = an + 3 - bn; - if (mpn_cmp (refp, rp, rn)) - { - printf ("ERROR in test %d, an = %d, bn = %d, rn = %d\n", - test, (int) an, (int) bn, (int) rn); - printf("a: "); mpn_dump (ap, an); - printf("b: "); mpn_dump (bp, bn); - printf("r: "); mpn_dump (rp, rn); - printf("ref: "); mpn_dump (refp, rn); - - abort(); - } - } - TMP_FREE; - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mulmod_bnm1.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mulmod_bnm1.c deleted file mode 100644 index 374b722c6b6..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-mulmod_bnm1.c +++ /dev/null @@ -1,218 +0,0 @@ -/* Test for mulmod_bnm1 function. - - Contributed to the GNU project by Marco Bodrato. - -Copyright 2009 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdlib.h> -#include <stdio.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -/* Sizes are up to 2^SIZE_LOG limbs */ -#ifndef SIZE_LOG -#define SIZE_LOG 11 -#endif - -#ifndef COUNT -#define COUNT 5000 -#endif - -#define MAX_N (1L << SIZE_LOG) -#define MIN_N 1 - -/* - Reference function for multiplication modulo B^rn-1. - - The result is expected to be ZERO if and only if one of the operand - already is. Otherwise the class [0] Mod(B^rn-1) is represented by - B^rn-1. This should not be a problem if mulmod_bnm1 is used to - combine results and obtain a natural number when one knows in - advance that the final value is less than (B^rn-1). -*/ - -static void -ref_mulmod_bnm1 (mp_ptr rp, mp_size_t rn, mp_srcptr ap, mp_size_t an, mp_srcptr bp, mp_size_t bn) -{ - mp_limb_t cy; - - ASSERT (0 < an && an <= rn); - ASSERT (0 < bn && bn <= rn); - - if (an >= bn) - refmpn_mul (rp, ap, an, bp, bn); - else - refmpn_mul (rp, bp, bn, ap, an); - an += bn; - if (an > rn) { - cy = mpn_add (rp, rp, rn, rp + rn, an - rn); - /* If cy == 1, then the value of rp is at most B^rn - 2, so there can - * be no overflow when adding in the carry. */ - MPN_INCR_U (rp, rn, cy); - } -} - -/* - Compare the result of the mpn_mulmod_bnm1 function in the library - with the reference function above. -*/ - -int -main (int argc, char **argv) -{ - mp_ptr ap, bp, refp, pp, scratch; - int count = COUNT; - int test; - gmp_randstate_ptr rands; - TMP_DECL; - TMP_MARK; - - if (argc > 1) - { - char *end; - count = strtol (argv[1], &end, 0); - if (*end || count <= 0) - { - fprintf (stderr, "Invalid test count: %s.\n", argv[1]); - return 1; - } - } - - tests_start (); - rands = RANDS; - - ASSERT_ALWAYS (mpn_mulmod_bnm1_next_size (MAX_N) == MAX_N); - - ap = TMP_ALLOC_LIMBS (MAX_N); - bp = TMP_ALLOC_LIMBS (MAX_N); - refp = TMP_ALLOC_LIMBS (MAX_N * 4); - pp = 1+TMP_ALLOC_LIMBS (MAX_N + 2); - scratch - = 1+TMP_ALLOC_LIMBS (mpn_mulmod_bnm1_itch (MAX_N, MAX_N, MAX_N) + 2); - - for (test = 0; test < count; test++) - { - unsigned size_min; - unsigned size_range; - mp_size_t an,bn,rn,n; - mp_size_t itch; - mp_limb_t p_before, p_after, s_before, s_after; - - for (size_min = 1; (1L << size_min) < MIN_N; size_min++) - ; - - /* We generate an in the MIN_N <= n <= (1 << size_range). */ - size_range = size_min - + gmp_urandomm_ui (rands, SIZE_LOG + 1 - size_min); - - n = MIN_N - + gmp_urandomm_ui (rands, (1L << size_range) + 1 - MIN_N); - n = mpn_mulmod_bnm1_next_size (n); - - if ( (test & 1) || n == 1) { - /* Half of the tests are done with the main scenario in mind: - both an and bn >= rn/2 */ - an = ((n+1) >> 1) + gmp_urandomm_ui (rands, (n+1) >> 1); - bn = ((n+1) >> 1) + gmp_urandomm_ui (rands, (n+1) >> 1); - } else { - /* Second half of the tests are done using mulmod to compute a - full product with n/2 < an+bn <= n. */ - an = 1 + gmp_urandomm_ui (rands, n - 1); - if (an >= n/2) - bn = 1 + gmp_urandomm_ui (rands, n - an); - else - bn = n/2 + 1 - an + gmp_urandomm_ui (rands, (n+1)/2); - } - - /* Make sure an >= bn */ - if (an < bn) - MP_SIZE_T_SWAP (an, bn); - - mpn_random2 (ap, an); - mpn_random2 (bp, bn); - - /* Sometime trigger the borderline conditions - A = -1,0,+1 or B = -1,0,+1 or A*B == -1,0,1 Mod(B^{n/2}+1). - This only makes sense if there is at least a split, i.e. n is even. */ - if ((test & 0x1f) == 1 && (n & 1) == 0) { - mp_size_t x; - MPN_COPY (ap, ap + (n >> 1), an - (n >> 1)); - MPN_ZERO (ap + an - (n >> 1) , n - an); - MPN_COPY (bp, bp + (n >> 1), bn - (n >> 1)); - MPN_ZERO (bp + bn - (n >> 1) , n - bn); - x = (n == an) ? 0 : gmp_urandomm_ui (rands, n - an); - ap[x] += gmp_urandomm_ui (rands, 3) - 1; - x = (n >> 1) - x % (n >> 1); - bp[x] += gmp_urandomm_ui (rands, 3) - 1; - /* We don't propagate carry, this means that the desired condition - is not triggered all the times. A few times are enough anyway. */ - } - rn = MIN(n, an + bn); - mpn_random2 (pp-1, rn + 2); - p_before = pp[-1]; - p_after = pp[rn]; - - itch = mpn_mulmod_bnm1_itch (n, an, bn); - ASSERT_ALWAYS (itch <= mpn_mulmod_bnm1_itch (MAX_N, MAX_N, MAX_N)); - mpn_random2 (scratch-1, itch+2); - s_before = scratch[-1]; - s_after = scratch[itch]; - - mpn_mulmod_bnm1 ( pp, n, ap, an, bp, bn, scratch); - ref_mulmod_bnm1 (refp, n, ap, an, bp, bn); - if (pp[-1] != p_before || pp[rn] != p_after - || scratch[-1] != s_before || scratch[itch] != s_after - || mpn_cmp (refp, pp, rn) != 0) - { - printf ("ERROR in test %d, an = %d, bn = %d, n = %d\n", - test, (int) an, (int) bn, (int) n); - if (pp[-1] != p_before) - { - printf ("before pp:"); mpn_dump (pp -1, 1); - printf ("keep: "); mpn_dump (&p_before, 1); - } - if (pp[rn] != p_after) - { - printf ("after pp:"); mpn_dump (pp + rn, 1); - printf ("keep: "); mpn_dump (&p_after, 1); - } - if (scratch[-1] != s_before) - { - printf ("before scratch:"); mpn_dump (scratch-1, 1); - printf ("keep: "); mpn_dump (&s_before, 1); - } - if (scratch[itch] != s_after) - { - printf ("after scratch:"); mpn_dump (scratch + itch, 1); - printf ("keep: "); mpn_dump (&s_after, 1); - } - mpn_dump (ap, an); - mpn_dump (bp, bn); - mpn_dump (pp, rn); - mpn_dump (refp, rn); - - abort(); - } - } - TMP_FREE; - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-perfsqr.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-perfsqr.c deleted file mode 100644 index 322ab6c3a4c..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-perfsqr.c +++ /dev/null @@ -1,117 +0,0 @@ -/* Test mpn_perfect_square_p data. - -Copyright 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#include "mpn/perfsqr.h" - - -#define PERFSQR_MOD_MASK ((CNST_LIMB(1) << PERFSQR_MOD_BITS) - 1) - -void -check_mod_2 (mp_limb_t d, mp_limb_t inv, mp_limb_t got_hi, mp_limb_t got_lo) -{ - int want[2*GMP_LIMB_BITS], got; - unsigned r, idx; - mp_limb_t q; - - ASSERT_ALWAYS (d <= numberof (want)); - ASSERT_ALWAYS (((inv * d) & PERFSQR_MOD_MASK) == 1); - ASSERT_ALWAYS (MP_LIMB_T_MAX / d >= PERFSQR_MOD_MASK); - - /* the squares mod d */ - for (r = 0; r < d; r++) - want[r] = 0; - for (r = 0; r < d; r++) - want[(r*r)%d] = 1; - - /* for each remainder mod d, expect the table data to correctly identify - it as a residue or non-residue */ - for (r = 0; r < d; r++) - { - /* as per PERFSQR_MOD_IDX */ - q = ((r) * (inv)) & PERFSQR_MOD_MASK; - idx = (q * (d)) >> PERFSQR_MOD_BITS; - - if (idx >= GMP_LIMB_BITS) - got = (got_hi >> (idx - GMP_LIMB_BITS)) & 1; - else - got = (got_lo >> idx) & 1; - - if (got != want[r]) - { - printf ("Wrong generated data\n"); - printf (" d=%u\n", (unsigned) d); - printf (" r=%u\n", r); - printf (" idx=%u\n", idx); - printf (" got %d\n", got); - printf (" want %d\n", want[r]); - abort (); - } - } -} - -/* Check the generated data in perfsqr.h. */ -void -check_mod (void) -{ -#define PERFSQR_MOD_34(r, up, usize) { r = 0; } /* so r isn't unused */ -#define PERFSQR_MOD_PP(r, up, usize) { r = 0; } -#define PERFSQR_MOD_1(r, d, inv, mask) check_mod_2 (d, inv, CNST_LIMB(0), mask) -#define PERFSQR_MOD_2(r, d, inv, mhi, mlo) check_mod_2 (d, inv, mhi, mlo) - - PERFSQR_MOD_TEST (dummy, dummy); -} - -/* Check PERFSQR_PP, if in use. */ -void -check_pp (void) -{ -#ifdef PERFSQR_PP - ASSERT_ALWAYS_LIMB (PERFSQR_PP); - ASSERT_ALWAYS_LIMB (PERFSQR_PP_NORM); - ASSERT_ALWAYS_LIMB (PERFSQR_PP_INVERTED); - - /* preinv stuff only for nails==0 */ - if (GMP_NAIL_BITS == 0) - { - ASSERT_ALWAYS (PERFSQR_PP_NORM - == PERFSQR_PP << refmpn_count_leading_zeros (PERFSQR_PP)); - ASSERT_ALWAYS (PERFSQR_PP_INVERTED - == refmpn_invert_limb (PERFSQR_PP_NORM)); - } -#endif -} - -int -main (void) -{ - tests_start (); - - check_mod (); - check_pp (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-scan.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-scan.c deleted file mode 100644 index f4478af3353..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-scan.c +++ /dev/null @@ -1,145 +0,0 @@ -/* Test mpn_scan0 and mpn_scan1. - -Copyright 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" - -#include "tests.h" - - -#define SIZE ((mp_size_t) 3) -mp_limb_t x[SIZE+1]; - -void -check (void) -{ - unsigned long i, got, want; - - x[SIZE] = 1; - for (i = 0; i < SIZE*GMP_NUMB_BITS; i++) - { - got = refmpn_scan1 (x, i); - want = mpn_scan1 (x, i); - if (got != want) - { - printf ("mpn_scan1\n"); - printf (" i %lu\n", i); - printf (" got %lu\n", got); - printf (" want %lu\n", want); - mpn_trace (" x ", x, SIZE); - abort (); - } - } - - x[SIZE] = 0; - for (i = 0; i < SIZE*GMP_NUMB_BITS; i++) - { - got = refmpn_scan0 (x, i); - want = mpn_scan0 (x, i); - if (got != want) - { - printf ("mpn_scan0\n"); - printf (" i %lu\n", i); - printf (" got %lu\n", got); - printf (" want %lu\n", want); - mpn_trace (" x ", x, SIZE); - abort (); - } - } -} - -void -check_twobits (void) -{ -#define TWOBITS(a, b) \ - ((CNST_LIMB(1) << (a)) | (CNST_LIMB(1) << (b))) - - refmpn_zero (x, SIZE); - x[0] = TWOBITS (1, 0); - check (); - - refmpn_zero (x, SIZE); - x[0] = TWOBITS (GMP_NUMB_BITS-1, 1); - check (); - - refmpn_zero (x, SIZE); - x[0] = CNST_LIMB(1); - x[1] = CNST_LIMB(1); - check (); - - refmpn_zero (x, SIZE); - x[0] = CNST_LIMB(1) << (GMP_NUMB_BITS-1); - x[1] = CNST_LIMB(1); - check (); - - refmpn_zero (x, SIZE); - x[1] = TWOBITS (1, 0); - check (); - - refmpn_zero (x, SIZE); - x[1] = CNST_LIMB(1); - x[2] = CNST_LIMB(1); - check (); -} - -/* This is unused, it takes too long, especially on 64-bit systems. */ -void -check_twobits_exhaustive (void) -{ - unsigned long i, j; - - for (i = 0; i < GMP_NUMB_BITS * SIZE; i++) - { - for (j = 0; j < GMP_NUMB_BITS * SIZE; j++) - { - refmpn_zero (x, SIZE); - refmpn_setbit (x, i); - refmpn_setbit (x, j); - check (); - } - } -} - -void -check_rand (void) -{ - int i; - - for (i = 0; i < 100; i++) - { - refmpn_random2 (x, SIZE); - check (); - } -} - -int -main (void) -{ - mp_trace_base = -16; - tests_start (); - - check_twobits (); - check_rand (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-sizeinbase.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-sizeinbase.c deleted file mode 100644 index 0887815d8bb..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-sizeinbase.c +++ /dev/null @@ -1,108 +0,0 @@ -/* Test for sizeinbase function. - -Copyright 2014 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdlib.h> -#include <stdio.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -/* Exponents up to 2^SIZE_LOG */ -#ifndef SIZE_LOG -#define SIZE_LOG 13 -#endif - -#ifndef COUNT -#define COUNT 30 -#endif - -#define MAX_N (1<<SIZE_LOG) - -int -main (int argc, char **argv) -{ - mp_limb_t a; - mp_ptr pp, scratch; - mp_limb_t max_b; - int count = COUNT; - int test; - gmp_randstate_ptr rands; - TMP_DECL; - - if (argc > 1) - { - char *end; - count = strtol (argv[1], &end, 0); - if (*end || count <= 0) - { - fprintf (stderr, "Invalid test count: %s.\n", argv[1]); - return 1; - } - } - - tests_start (); - TMP_MARK; - rands = RANDS; - - pp = TMP_ALLOC_LIMBS (MAX_N); - scratch = TMP_ALLOC_LIMBS (MAX_N); - max_b = numberof (mp_bases); - - ASSERT_ALWAYS (max_b > 62); - ASSERT_ALWAYS (max_b < GMP_NUMB_MAX); - - for (a = 2; a < max_b; ++a) - for (test = 0; test < count; ++test) - { - mp_size_t pn; - mp_limb_t exp; - mp_bitcnt_t res; - - exp = gmp_urandomm_ui (rands, MAX_N); - - pn = mpn_pow_1 (pp, &a, 1, exp, scratch); - - res = mpn_sizeinbase (pp, pn, a) - 1; - - if ((res < exp) || (res > exp + 1)) - { - printf ("ERROR in test %d, base = %d, exp = %d, res = %d\n", - test, (int) a, (int) exp, (int) res); - abort(); - } - - mpn_sub_1 (pp, pp, pn, CNST_LIMB(1)); - pn -= pp[pn-1] == 0; - - res = mpn_sizeinbase (pp, pn, a); - - if ((res < exp) || (res - 1 > exp)) - { - printf ("ERROR in -1 test %d, base = %d, exp = %d, res = %d\n", - test, (int) a, (int) exp, (int) res); - abort(); - } - } - - TMP_FREE; - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-sqrlo.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-sqrlo.c deleted file mode 100644 index 96caddc6fb3..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-sqrlo.c +++ /dev/null @@ -1,141 +0,0 @@ -/* Test for sqrlo function. - -Copyright 2009, 2015 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdlib.h> -#include <stdio.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -/* Sizes are up to 2^SIZE_LOG limbs */ -#ifndef SIZE_LOG -#define SIZE_LOG 10 -#endif - -#ifndef COUNT -#define COUNT 10000 -#endif - -#define MAX_N (1L << SIZE_LOG) -#define MIN_N (1) - -int -main (int argc, char **argv) -{ - mp_ptr ap, refp, pp, scratch; - int count = COUNT; - int test; - gmp_randstate_ptr rands; - TMP_DECL; - TMP_MARK; - - if (argc > 1) - { - char *end; - count = strtol (argv[1], &end, 0); - if (*end || count <= 0) - { - fprintf (stderr, "Invalid test count: %s.\n", argv[1]); - return 1; - } - } - - tests_start (); - rands = RANDS; - -#define mpn_sqrlo_itch(n) (0) - - ap = TMP_ALLOC_LIMBS (MAX_N); - refp = TMP_ALLOC_LIMBS (MAX_N * 2); - pp = 1+TMP_ALLOC_LIMBS (MAX_N + 2); - scratch - = 1+TMP_ALLOC_LIMBS (mpn_sqrlo_itch (MAX_N) + 2); - - for (test = 0; test < count; test++) - { - unsigned size_min; - unsigned size_range; - mp_size_t n; - mp_size_t itch; - mp_limb_t p_before, p_after, s_before, s_after; - - for (size_min = 1; (1L << size_min) < MIN_N; size_min++) - ; - - /* We generate an in the MIN_N <= n <= (1 << size_range). */ - size_range = size_min - + gmp_urandomm_ui (rands, SIZE_LOG + 1 - size_min); - - n = MIN_N - + gmp_urandomm_ui (rands, (1L << size_range) + 1 - MIN_N); - - mpn_random2 (ap, n); - mpn_random2 (pp-1, n + 2); - p_before = pp[-1]; - p_after = pp[n]; - - itch = mpn_sqrlo_itch (n); -#if 0 - ASSERT_ALWAYS (itch <= mpn_sqrlo_itch (MAX_N)); - mpn_random2 (scratch-1, itch+2); -#endif - s_before = scratch[-1]; - s_after = scratch[itch]; - - mpn_sqrlo (pp, ap, n); - mpn_sqr (refp, ap, n); - if (pp[-1] != p_before || pp[n] != p_after - || scratch[-1] != s_before || scratch[itch] != s_after - || mpn_cmp (refp, pp, n) != 0) - { - printf ("ERROR in test %d, n = %d", - test, (int) n); - if (pp[-1] != p_before) - { - printf ("before pp:"); mpn_dump (pp -1, 1); - printf ("keep: "); mpn_dump (&p_before, 1); - } - if (pp[n] != p_after) - { - printf ("after pp:"); mpn_dump (pp + n, 1); - printf ("keep: "); mpn_dump (&p_after, 1); - } - if (scratch[-1] != s_before) - { - printf ("before scratch:"); mpn_dump (scratch-1, 1); - printf ("keep: "); mpn_dump (&s_before, 1); - } - if (scratch[itch] != s_after) - { - printf ("after scratch:"); mpn_dump (scratch + itch, 1); - printf ("keep: "); mpn_dump (&s_after, 1); - } - mpn_dump (ap, n); - mpn_dump (pp, n); - mpn_dump (refp, n); - - abort(); - } - } - TMP_FREE; - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-sqrmod_bnm1.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-sqrmod_bnm1.c deleted file mode 100644 index 47ccf81083b..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-sqrmod_bnm1.c +++ /dev/null @@ -1,191 +0,0 @@ -/* Test for sqrmod_bnm1 function. - - Contributed to the GNU project by Marco Bodrato. - -Copyright 2009 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdlib.h> -#include <stdio.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -/* Sizes are up to 2^SIZE_LOG limbs */ -#ifndef SIZE_LOG -#define SIZE_LOG 12 -#endif - -#ifndef COUNT -#define COUNT 3000 -#endif - -#define MAX_N (1L << SIZE_LOG) -#define MIN_N 1 - -/* - Reference function for squaring modulo B^rn-1. - - The result is expected to be ZERO if and only if one of the operand - already is. Otherwise the class [0] Mod(B^rn-1) is represented by - B^rn-1. This should not be a problem if sqrmod_bnm1 is used to - combine results and obtain a natural number when one knows in - advance that the final value is less than (B^rn-1). -*/ - -static void -ref_sqrmod_bnm1 (mp_ptr rp, mp_size_t rn, mp_srcptr ap, mp_size_t an) -{ - mp_limb_t cy; - - ASSERT (0 < an && an <= rn); - - refmpn_mul (rp, ap, an, ap, an); - an *= 2; - if (an > rn) { - cy = mpn_add (rp, rp, rn, rp + rn, an - rn); - /* If cy == 1, then the value of rp is at most B^rn - 2, so there can - * be no overflow when adding in the carry. */ - MPN_INCR_U (rp, rn, cy); - } -} - -/* - Compare the result of the mpn_sqrmod_bnm1 function in the library - with the reference function above. -*/ - -int -main (int argc, char **argv) -{ - mp_ptr ap, refp, pp, scratch; - int count = COUNT; - int test; - gmp_randstate_ptr rands; - TMP_DECL; - TMP_MARK; - - if (argc > 1) - { - char *end; - count = strtol (argv[1], &end, 0); - if (*end || count <= 0) - { - fprintf (stderr, "Invalid test count: %s.\n", argv[1]); - return 1; - } - } - - tests_start (); - rands = RANDS; - - ASSERT_ALWAYS (mpn_sqrmod_bnm1_next_size (MAX_N) == MAX_N); - - ap = TMP_ALLOC_LIMBS (MAX_N); - refp = TMP_ALLOC_LIMBS (MAX_N * 4); - pp = 1+TMP_ALLOC_LIMBS (MAX_N + 2); - scratch - = 1+TMP_ALLOC_LIMBS (mpn_sqrmod_bnm1_itch (MAX_N, MAX_N) + 2); - - for (test = 0; test < count; test++) - { - unsigned size_min; - unsigned size_range; - mp_size_t an,rn,n; - mp_size_t itch; - mp_limb_t p_before, p_after, s_before, s_after; - - for (size_min = 1; (1L << size_min) < MIN_N; size_min++) - ; - - /* We generate an in the MIN_N <= n <= (1 << size_range). */ - size_range = size_min - + gmp_urandomm_ui (rands, SIZE_LOG + 1 - size_min); - - n = MIN_N - + gmp_urandomm_ui (rands, (1L << size_range) + 1 - MIN_N); - n = mpn_sqrmod_bnm1_next_size (n); - - if (n == 1) - an = 1; - else - an = ((n+1) >> 1) + gmp_urandomm_ui (rands, (n+1) >> 1); - - mpn_random2 (ap, an); - - /* Sometime trigger the borderline conditions - A = -1,0,+1 Mod(B^{n/2}+1). - This only makes sense if there is at least a split, i.e. n is even. */ - if ((test & 0x1f) == 1 && (n & 1) == 0) { - mp_size_t x; - MPN_COPY (ap, ap + (n >> 1), an - (n >> 1)); - MPN_ZERO (ap + an - (n >> 1) , n - an); - x = (n == an) ? 0 : gmp_urandomm_ui (rands, n - an); - ap[x] += gmp_urandomm_ui (rands, 3) - 1; - } - rn = MIN(n, 2*an); - mpn_random2 (pp-1, rn + 2); - p_before = pp[-1]; - p_after = pp[rn]; - - itch = mpn_sqrmod_bnm1_itch (n, an); - ASSERT_ALWAYS (itch <= mpn_sqrmod_bnm1_itch (MAX_N, MAX_N)); - mpn_random2 (scratch-1, itch+2); - s_before = scratch[-1]; - s_after = scratch[itch]; - - mpn_sqrmod_bnm1 ( pp, n, ap, an, scratch); - ref_sqrmod_bnm1 (refp, n, ap, an); - if (pp[-1] != p_before || pp[rn] != p_after - || scratch[-1] != s_before || scratch[itch] != s_after - || mpn_cmp (refp, pp, rn) != 0) - { - printf ("ERROR in test %d, an = %d, n = %d\n", - test, (int) an, (int) n); - if (pp[-1] != p_before) - { - printf ("before pp:"); mpn_dump (pp -1, 1); - printf ("keep: "); mpn_dump (&p_before, 1); - } - if (pp[rn] != p_after) - { - printf ("after pp:"); mpn_dump (pp + rn, 1); - printf ("keep: "); mpn_dump (&p_after, 1); - } - if (scratch[-1] != s_before) - { - printf ("before scratch:"); mpn_dump (scratch-1, 1); - printf ("keep: "); mpn_dump (&s_before, 1); - } - if (scratch[itch] != s_after) - { - printf ("after scratch:"); mpn_dump (scratch + itch, 1); - printf ("keep: "); mpn_dump (&s_after, 1); - } - mpn_dump (ap, an); - mpn_dump (pp, rn); - mpn_dump (refp, rn); - - abort(); - } - } - TMP_FREE; - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom2-sqr.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom2-sqr.c deleted file mode 100644 index a5cdcb57788..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom2-sqr.c +++ /dev/null @@ -1,6 +0,0 @@ -#define mpn_toomN_sqr mpn_toom2_sqr -#define mpn_toomN_sqr_itch mpn_toom2_sqr_itch -#define MIN_AN MPN_TOOM2_SQR_MINSIZE -#define MAX_AN SQR_TOOM3_THRESHOLD - -#include "toom-sqr-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom22.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom22.c deleted file mode 100644 index 2f35cac5281..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom22.c +++ /dev/null @@ -1,10 +0,0 @@ -#define mpn_toomMN_mul mpn_toom22_mul -#define mpn_toomMN_mul_itch mpn_toom22_mul_itch -#define MIN_AN MPN_TOOM22_MUL_MINSIZE - -#define MIN_BN(an) \ - ((an) >= 2*MUL_TOOM22_THRESHOLD \ - ? (an) + 2 - MUL_TOOM22_THRESHOLD \ - : ((an)+1)/2 + 1 + (an & 1)) - -#include "toom-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom3-sqr.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom3-sqr.c deleted file mode 100644 index ccc3b995048..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom3-sqr.c +++ /dev/null @@ -1,6 +0,0 @@ -#define mpn_toomN_sqr mpn_toom3_sqr -#define mpn_toomN_sqr_itch mpn_toom3_sqr_itch -#define MIN_AN MAX(SQR_TOOM3_THRESHOLD,MPN_TOOM3_SQR_MINSIZE) -#define MAX_AN SQR_TOOM4_THRESHOLD - -#include "toom-sqr-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom32.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom32.c deleted file mode 100644 index e42745da96b..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom32.c +++ /dev/null @@ -1,8 +0,0 @@ -#define mpn_toomMN_mul mpn_toom32_mul -#define mpn_toomMN_mul_itch mpn_toom32_mul_itch - -#define MIN_AN 6 -#define MIN_BN(an) (((an) + 8) / (size_t) 3) -#define MAX_BN(an) ((an) - 2) - -#include "toom-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom33.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom33.c deleted file mode 100644 index 7de82b20c91..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom33.c +++ /dev/null @@ -1,11 +0,0 @@ -#define mpn_toomMN_mul mpn_toom33_mul -#define mpn_toomMN_mul_itch mpn_toom33_mul_itch - -/* Smaller sizes not supported; may lead to recursive calls to - toom22_mul with invalid input size. */ -#define MIN_AN MUL_TOOM33_THRESHOLD -#define MIN_BN(an) (1 + 2*(((an)+2)/(size_t) 3)) - -#define COUNT 1000 - -#include "toom-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom4-sqr.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom4-sqr.c deleted file mode 100644 index ca14ab1482c..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom4-sqr.c +++ /dev/null @@ -1,6 +0,0 @@ -#define mpn_toomN_sqr mpn_toom4_sqr -#define mpn_toomN_sqr_itch mpn_toom4_sqr_itch -#define MIN_AN MAX(SQR_TOOM3_THRESHOLD,MAX(SQR_TOOM4_THRESHOLD,MPN_TOOM4_SQR_MINSIZE)) -#define MAX_AN SQR_TOOM6_THRESHOLD - -#include "toom-sqr-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom42.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom42.c deleted file mode 100644 index 09a4a0c1151..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom42.c +++ /dev/null @@ -1,8 +0,0 @@ -#define mpn_toomMN_mul mpn_toom42_mul -#define mpn_toomMN_mul_itch mpn_toom42_mul_itch - -#define MIN_AN 10 -#define MIN_BN(an) (((an) + 7) >> 2) -#define MAX_BN(an) ((2*(an)-5) / (size_t) 3) - -#include "toom-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom43.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom43.c deleted file mode 100644 index 224a45bc380..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom43.c +++ /dev/null @@ -1,8 +0,0 @@ -#define mpn_toomMN_mul mpn_toom43_mul -#define mpn_toomMN_mul_itch mpn_toom43_mul_itch - -#define MIN_AN 25 -#define MIN_BN(an) (1 + 2*(((an)+3) >> 2)) -#define MAX_BN(an) ((an)-3) - -#include "toom-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom44.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom44.c deleted file mode 100644 index 6c627e3428d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom44.c +++ /dev/null @@ -1,11 +0,0 @@ -#define mpn_toomMN_mul mpn_toom44_mul -#define mpn_toomMN_mul_itch mpn_toom44_mul_itch - -/* Smaller sizes not supported; may lead to recursive calls to - toom22_mul or toom33_mul with invalid input size. */ -#define MIN_AN MUL_TOOM44_THRESHOLD -#define MIN_BN(an) (1 + 3*(((an)+3)>>2)) - -#define COUNT 1000 - -#include "toom-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom52.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom52.c deleted file mode 100644 index d3fb134f2e5..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom52.c +++ /dev/null @@ -1,8 +0,0 @@ -#define mpn_toomMN_mul mpn_toom52_mul -#define mpn_toomMN_mul_itch mpn_toom52_mul_itch - -#define MIN_AN 32 -#define MIN_BN(an) (((an) + 9) / (size_t) 5) -#define MAX_BN(an) (((an) - 3) >> 1) - -#include "toom-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom53.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom53.c deleted file mode 100644 index ddbf177aec0..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom53.c +++ /dev/null @@ -1,8 +0,0 @@ -#define mpn_toomMN_mul mpn_toom53_mul -#define mpn_toomMN_mul_itch mpn_toom53_mul_itch - -#define MIN_AN 17 -#define MIN_BN(an) (1 + 2*(((an) + 4) / (size_t) 5)) -#define MAX_BN(an) ((3*(an) - 11) >> 2) - -#include "toom-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom54.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom54.c deleted file mode 100644 index 52a2bee7b35..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom54.c +++ /dev/null @@ -1,8 +0,0 @@ -#define mpn_toomMN_mul mpn_toom54_mul -#define mpn_toomMN_mul_itch mpn_toom54_mul_itch - -#define MIN_AN 31 -#define MIN_BN(an) ((3*(an) + 32) / (size_t) 5) /* 3/5 */ -#define MAX_BN(an) ((an) - 6) /* 1/1 */ - -#include "toom-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom6-sqr.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom6-sqr.c deleted file mode 100644 index 67d7a63d32f..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom6-sqr.c +++ /dev/null @@ -1,8 +0,0 @@ -#define mpn_toomN_sqr mpn_toom6_sqr -#define mpn_toomN_sqr_itch mpn_toom6_sqr_itch -#define MIN_AN MAX(SQR_TOOM3_THRESHOLD,MAX(SQR_TOOM4_THRESHOLD,MAX(SQR_TOOM6_THRESHOLD,MPN_TOOM6_SQR_MINSIZE))) -#define MAX_AN SQR_TOOM8_THRESHOLD - -#define COUNT 250 - -#include "toom-sqr-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom62.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom62.c deleted file mode 100644 index 1cb2aab26c0..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom62.c +++ /dev/null @@ -1,8 +0,0 @@ -#define mpn_toomMN_mul mpn_toom62_mul -#define mpn_toomMN_mul_itch mpn_toom62_mul_itch - -#define MIN_AN 31 -#define MIN_BN(an) (((an) + 11) / (size_t) 6) -#define MAX_BN(an) ((2*(an) - 7) / (size_t) 5) - -#include "toom-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom63.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom63.c deleted file mode 100644 index d79165dcbe5..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom63.c +++ /dev/null @@ -1,8 +0,0 @@ -#define mpn_toomMN_mul mpn_toom63_mul -#define mpn_toomMN_mul_itch mpn_toom63_mul_itch - -#define MIN_AN 49 -#define MIN_BN(an) (2*(((an) + 23) / (size_t) 6)) /* 2/6 */ -#define MAX_BN(an) ((3*(an) - 23) / (size_t) 5) /* 3/5 */ - -#include "toom-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom6h.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom6h.c deleted file mode 100644 index 5cca9fc90e4..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom6h.c +++ /dev/null @@ -1,13 +0,0 @@ -#define mpn_toomMN_mul mpn_toom6h_mul -#define mpn_toomMN_mul_itch mpn_toom6h_mul_itch - -#define SIZE_LOG 11 - -/* Smaller sizes not supported; may lead to recursive calls to - toom22_mul, toom33_mul, or toom44_mul with invalid input size. */ -#define MIN_AN MUL_TOOM6H_MIN -#define MIN_BN(an) (MAX ((an*3)>>3, 46)) - -#define COUNT 1000 - -#include "toom-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom8-sqr.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom8-sqr.c deleted file mode 100644 index 0eee6059288..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom8-sqr.c +++ /dev/null @@ -1,8 +0,0 @@ -#define mpn_toomN_sqr mpn_toom8_sqr -#define mpn_toomN_sqr_itch mpn_toom8_sqr_itch -#define MIN_AN MAX(SQR_TOOM3_THRESHOLD,MAX(SQR_TOOM4_THRESHOLD,MAX(SQR_TOOM6_THRESHOLD,MAX(SQR_TOOM8_THRESHOLD,MPN_TOOM8_SQR_MINSIZE)))) -#define MAX_AN SQR_FFT_THRESHOLD - -#define COUNT 250 - -#include "toom-sqr-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom8h.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom8h.c deleted file mode 100644 index aeeabb274b6..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/t-toom8h.c +++ /dev/null @@ -1,18 +0,0 @@ -#define mpn_toomMN_mul mpn_toom8h_mul -#define mpn_toomMN_mul_itch mpn_toom8h_mul_itch - -#define SIZE_LOG 11 - -/* Smaller sizes not supported; may lead to recursive calls to - toom{22,33,44,6h}_mul with invalid input size. */ -#define MIN_AN MUL_TOOM8H_MIN - -#define MIN_BN(an) \ -(MAX(GMP_NUMB_BITS <= 10*3 ? (an*6)/10 : \ - GMP_NUMB_BITS <= 11*3 ? (an*5)/11 : \ - GMP_NUMB_BITS <= 12*3 ? (an*4)/12 : \ - (an*4)/13, 86) ) - -#define COUNT 1000 - -#include "toom-shared.h" diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/toom-shared.h b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/toom-shared.h deleted file mode 100644 index 7479e7efd9a..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/toom-shared.h +++ /dev/null @@ -1,158 +0,0 @@ -/* Test for various Toom functions. - -Copyright 2009 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdlib.h> -#include <stdio.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -/* Main file is expected to define mpn_toomMN_mul, - * mpn_toomMN_mul_itch, MIN_AN, MIN_BN(an), MAX_BN(an) and then - * include this file. */ - -/* Sizes are up to 2^SIZE_LOG limbs */ -#ifndef SIZE_LOG -#define SIZE_LOG 10 -#endif - -#ifndef COUNT -#define COUNT 2000 -#endif - -#define MAX_AN (1L << SIZE_LOG) - -#ifndef MAX_BN -#define MAX_BN(an) (an) -#endif - -/* For general toomMN_mul, we need - * - * MIN_BN(an) = N + floor(((N-1)*an + M - N)/M) - * - * MAX_BN(an) = floor(N*(an-1)/(M-1)) - N + 1 - */ - -int -main (int argc, char **argv) -{ - mp_ptr ap, bp, refp, pp, scratch; - int count = COUNT; - int test; - gmp_randstate_ptr rands; - TMP_DECL; - TMP_MARK; - - if (argc > 1) - { - char *end; - count = strtol (argv[1], &end, 0); - if (*end || count <= 0) - { - fprintf (stderr, "Invalid test count: %s.\n", argv[1]); - return 1; - } - } - - tests_start (); - rands = RANDS; - - ap = TMP_ALLOC_LIMBS (MAX_AN); - bp = TMP_ALLOC_LIMBS (MAX_BN(MAX_AN)); - refp = TMP_ALLOC_LIMBS (MAX_AN + MAX_BN(MAX_AN)); - pp = 1+TMP_ALLOC_LIMBS (MAX_AN + MAX_BN(MAX_AN)+2); - scratch - = 1+TMP_ALLOC_LIMBS (mpn_toomMN_mul_itch (MAX_AN, MAX_BN(MAX_AN)) - + 2); - - for (test = 0; test < count; test++) - { - unsigned size_min; - unsigned size_range; - mp_size_t an, bn; - mp_size_t itch; - mp_limb_t p_before, p_after, s_before, s_after; - - for (size_min = 1; (1L << size_min) < MIN_AN; size_min++) - ; - - /* We generate an in the MIN_AN <= an <= (1 << size_range). */ - size_range = size_min - + gmp_urandomm_ui (rands, SIZE_LOG + 1 - size_min); - - an = MIN_AN - + gmp_urandomm_ui (rands, (1L << size_range) + 1 - MIN_AN); - bn = MIN_BN(an) - + gmp_urandomm_ui (rands, MAX_BN(an) + 1 - MIN_BN(an)); - - mpn_random2 (ap, an); - mpn_random2 (bp, bn); - mpn_random2 (pp-1, an + bn + 2); - p_before = pp[-1]; - p_after = pp[an + bn]; - - itch = mpn_toomMN_mul_itch (an, bn); - ASSERT_ALWAYS (itch <= mpn_toomMN_mul_itch (MAX_AN, MAX_BN(MAX_AN))); - mpn_random2 (scratch-1, itch+2); - s_before = scratch[-1]; - s_after = scratch[itch]; - - mpn_toomMN_mul (pp, ap, an, bp, bn, scratch); - refmpn_mul (refp, ap, an, bp, bn); - if (pp[-1] != p_before || pp[an + bn] != p_after - || scratch[-1] != s_before || scratch[itch] != s_after - || mpn_cmp (refp, pp, an + bn) != 0) - { - printf ("ERROR in test %d, an = %d, bn = %d\n", - test, (int) an, (int) bn); - if (pp[-1] != p_before) - { - printf ("before pp:"); mpn_dump (pp -1, 1); - printf ("keep: "); mpn_dump (&p_before, 1); - } - if (pp[an + bn] != p_after) - { - printf ("after pp:"); mpn_dump (pp + an + bn, 1); - printf ("keep: "); mpn_dump (&p_after, 1); - } - if (scratch[-1] != s_before) - { - printf ("before scratch:"); mpn_dump (scratch-1, 1); - printf ("keep: "); mpn_dump (&s_before, 1); - } - if (scratch[itch] != s_after) - { - printf ("after scratch:"); mpn_dump (scratch + itch, 1); - printf ("keep: "); mpn_dump (&s_after, 1); - } - mpn_dump (ap, an); - mpn_dump (bp, bn); - mpn_dump (pp, an + bn); - mpn_dump (refp, an + bn); - - abort(); - } - } - TMP_FREE; - - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/toom-sqr-shared.h b/src/plugins/e-acsl/contrib/libgmp/tests/mpn/toom-sqr-shared.h deleted file mode 100644 index 3b4d7e22e74..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpn/toom-sqr-shared.h +++ /dev/null @@ -1,127 +0,0 @@ -/* Test for various Toom squaring functions. - -Copyright 2009, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdlib.h> -#include <stdio.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -/* Main file is expected to define mpn_toomN_mul, mpn_toomN_sqr_itch, - * MIN_AN, MAX_AN and then include this file. */ - -#ifndef COUNT -#define COUNT 2000 -#endif - -int -main (int argc, char **argv) -{ - mp_ptr ap, refp, pp, scratch; - int count = COUNT; - int test; - gmp_randstate_ptr rands; - TMP_DECL; - TMP_MARK; - - if (argc > 1) - { - char *end; - count = strtol (argv[1], &end, 0); - if (*end || count <= 0) - { - fprintf (stderr, "Invalid test count: %s.\n", argv[1]); - return 1; - } - } - - tests_start (); - - if (MAX_AN > MIN_AN) { - rands = RANDS; - - ap = TMP_ALLOC_LIMBS (MAX_AN); - refp = TMP_ALLOC_LIMBS (MAX_AN * 2); - pp = 1 + TMP_ALLOC_LIMBS (MAX_AN * 2 + 2); - scratch - = 1+TMP_ALLOC_LIMBS (mpn_toomN_sqr_itch (MAX_AN) + 2); - - for (test = 0; test < count; test++) - { - mp_size_t an; - mp_size_t itch; - mp_limb_t p_before, p_after, s_before, s_after; - - an = MIN_AN - + gmp_urandomm_ui (rands, MAX_AN - MIN_AN); - - mpn_random2 (ap, an); - mpn_random2 (pp-1, an * 2 + 2); - p_before = pp[-1]; - p_after = pp[an * 2]; - - itch = mpn_toomN_sqr_itch (an); - ASSERT_ALWAYS (itch <= mpn_toomN_sqr_itch (MAX_AN)); - mpn_random2 (scratch-1, itch+2); - s_before = scratch[-1]; - s_after = scratch[itch]; - - mpn_toomN_sqr (pp, ap, an, scratch); - refmpn_mul (refp, ap, an, ap, an); - if (pp[-1] != p_before || pp[an * 2] != p_after - || scratch[-1] != s_before || scratch[itch] != s_after - || mpn_cmp (refp, pp, an * 2) != 0) - { - printf ("ERROR in test %d, an = %d\n", - test, (int) an); - if (pp[-1] != p_before) - { - printf ("before pp:"); mpn_dump (pp -1, 1); - printf ("keep: "); mpn_dump (&p_before, 1); - } - if (pp[an * 2] != p_after) - { - printf ("after pp:"); mpn_dump (pp + an * 2, 1); - printf ("keep: "); mpn_dump (&p_after, 1); - } - if (scratch[-1] != s_before) - { - printf ("before scratch:"); mpn_dump (scratch-1, 1); - printf ("keep: "); mpn_dump (&s_before, 1); - } - if (scratch[itch] != s_after) - { - printf ("after scratch:"); mpn_dump (scratch + itch, 1); - printf ("keep: "); mpn_dump (&s_after, 1); - } - mpn_dump (ap, an); - mpn_dump (pp, an * 2); - mpn_dump (refp, an * 2); - - abort(); - } - } - TMP_FREE; - } - - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/Makefile.am b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/Makefile.am deleted file mode 100644 index 41578fafa80..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -## Process this file with automake to generate Makefile.in - -# Copyright 1996, 1999-2002, 2012, 2015 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. - - -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la - -check_PROGRAMS = t-aors t-cmp t-cmp_ui t-cmp_si t-equal t-get_d t-get_str \ - t-inp_str t-inv t-md_2exp t-set_f t-set_str io reuse t-cmp_z -TESTS = $(check_PROGRAMS) - -# Temporary files used by the tests. Removed automatically if the tests -# pass, but ensure they're cleaned if they fail. -# -CLEANFILES = *.tmp - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/Makefile.in b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/Makefile.in deleted file mode 100644 index 0cbd1e3a374..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/Makefile.in +++ /dev/null @@ -1,1240 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright 1996, 1999-2002, 2012, 2015 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -check_PROGRAMS = t-aors$(EXEEXT) t-cmp$(EXEEXT) t-cmp_ui$(EXEEXT) \ - t-cmp_si$(EXEEXT) t-equal$(EXEEXT) t-get_d$(EXEEXT) \ - t-get_str$(EXEEXT) t-inp_str$(EXEEXT) t-inv$(EXEEXT) \ - t-md_2exp$(EXEEXT) t-set_f$(EXEEXT) t-set_str$(EXEEXT) \ - io$(EXEEXT) reuse$(EXEEXT) t-cmp_z$(EXEEXT) -subdir = tests/mpq -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -io_SOURCES = io.c -io_OBJECTS = io.$(OBJEXT) -io_LDADD = $(LDADD) -io_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -reuse_SOURCES = reuse.c -reuse_OBJECTS = reuse.$(OBJEXT) -reuse_LDADD = $(LDADD) -reuse_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_aors_SOURCES = t-aors.c -t_aors_OBJECTS = t-aors.$(OBJEXT) -t_aors_LDADD = $(LDADD) -t_aors_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_cmp_SOURCES = t-cmp.c -t_cmp_OBJECTS = t-cmp.$(OBJEXT) -t_cmp_LDADD = $(LDADD) -t_cmp_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_cmp_si_SOURCES = t-cmp_si.c -t_cmp_si_OBJECTS = t-cmp_si.$(OBJEXT) -t_cmp_si_LDADD = $(LDADD) -t_cmp_si_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_cmp_ui_SOURCES = t-cmp_ui.c -t_cmp_ui_OBJECTS = t-cmp_ui.$(OBJEXT) -t_cmp_ui_LDADD = $(LDADD) -t_cmp_ui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_cmp_z_SOURCES = t-cmp_z.c -t_cmp_z_OBJECTS = t-cmp_z.$(OBJEXT) -t_cmp_z_LDADD = $(LDADD) -t_cmp_z_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_equal_SOURCES = t-equal.c -t_equal_OBJECTS = t-equal.$(OBJEXT) -t_equal_LDADD = $(LDADD) -t_equal_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_get_d_SOURCES = t-get_d.c -t_get_d_OBJECTS = t-get_d.$(OBJEXT) -t_get_d_LDADD = $(LDADD) -t_get_d_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_get_str_SOURCES = t-get_str.c -t_get_str_OBJECTS = t-get_str.$(OBJEXT) -t_get_str_LDADD = $(LDADD) -t_get_str_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_inp_str_SOURCES = t-inp_str.c -t_inp_str_OBJECTS = t-inp_str.$(OBJEXT) -t_inp_str_LDADD = $(LDADD) -t_inp_str_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_inv_SOURCES = t-inv.c -t_inv_OBJECTS = t-inv.$(OBJEXT) -t_inv_LDADD = $(LDADD) -t_inv_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_md_2exp_SOURCES = t-md_2exp.c -t_md_2exp_OBJECTS = t-md_2exp.$(OBJEXT) -t_md_2exp_LDADD = $(LDADD) -t_md_2exp_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_set_f_SOURCES = t-set_f.c -t_set_f_OBJECTS = t-set_f.$(OBJEXT) -t_set_f_LDADD = $(LDADD) -t_set_f_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_set_str_SOURCES = t-set_str.c -t_set_str_OBJECTS = t-set_str.$(OBJEXT) -t_set_str_LDADD = $(LDADD) -t_set_str_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = io.c reuse.c t-aors.c t-cmp.c t-cmp_si.c t-cmp_ui.c \ - t-cmp_z.c t-equal.c t-get_d.c t-get_str.c t-inp_str.c t-inv.c \ - t-md_2exp.c t-set_f.c t-set_str.c -DIST_SOURCES = io.c reuse.c t-aors.c t-cmp.c t-cmp_si.c t-cmp_ui.c \ - t-cmp_z.c t-equal.c t-get_d.c t-get_str.c t-inp_str.c t-inv.c \ - t-md_2exp.c t-set_f.c t-set_str.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red='[0;31m'; \ - grn='[0;32m'; \ - lgn='[1;32m'; \ - blu='[1;34m'; \ - mgn='[0;35m'; \ - brg='[1m'; \ - std='[m'; \ - fi; \ -} -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck -TEST_SUITE_LOG = test-suite.log -TEST_EXTENSIONS = @EXEEXT@ .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/test-driver -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ABI = @ABI@ -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -ASMFLAGS = @ASMFLAGS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ -CC = @CC@ -CCAS = @CCAS@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CPP_FOR_BUILD = @CPP_FOR_BUILD@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@ -DEFS = @DEFS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -FGREP = @FGREP@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIMB_BITS = @GMP_LIMB_BITS@ -GMP_NAIL_BITS = @GMP_NAIL_BITS@ -GREP = @GREP@ -HAVE_CLOCK_01 = @HAVE_CLOCK_01@ -HAVE_CPUTIME_01 = @HAVE_CPUTIME_01@ -HAVE_GETRUSAGE_01 = @HAVE_GETRUSAGE_01@ -HAVE_GETTIMEOFDAY_01 = @HAVE_GETTIMEOFDAY_01@ -HAVE_HOST_CPU_FAMILY_power = @HAVE_HOST_CPU_FAMILY_power@ -HAVE_HOST_CPU_FAMILY_powerpc = @HAVE_HOST_CPU_FAMILY_powerpc@ -HAVE_SIGACTION_01 = @HAVE_SIGACTION_01@ -HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@ -HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@ -HAVE_STACK_T_01 = @HAVE_STACK_T_01@ -HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBCURSES = @LIBCURSES@ -LIBGMPXX_LDFLAGS = @LIBGMPXX_LDFLAGS@ -LIBGMP_DLL = @LIBGMP_DLL@ -LIBGMP_LDFLAGS = @LIBGMP_LDFLAGS@ -LIBM = @LIBM@ -LIBM_FOR_BUILD = @LIBM_FOR_BUILD@ -LIBOBJS = @LIBOBJS@ -LIBREADLINE = @LIBREADLINE@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -M4 = @M4@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@ -STRIP = @STRIP@ -TAL_OBJECT = @TAL_OBJECT@ -TUNE_LIBS = @TUNE_LIBS@ -TUNE_SQR_OBJ = @TUNE_SQR_OBJ@ -U_FOR_BUILD = @U_FOR_BUILD@ -VERSION = @VERSION@ -WITH_READLINE_01 = @WITH_READLINE_01@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gmp_srclinks = @gmp_srclinks@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -mpn_objects = @mpn_objects@ -mpn_objs_in_libgmp = @mpn_objs_in_libgmp@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la -TESTS = $(check_PROGRAMS) - -# Temporary files used by the tests. Removed automatically if the tests -# pass, but ensure they're cleaned if they fail. -# -CLEANFILES = *.tmp -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps tests/mpq/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu --ignore-deps tests/mpq/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -io$(EXEEXT): $(io_OBJECTS) $(io_DEPENDENCIES) $(EXTRA_io_DEPENDENCIES) - @rm -f io$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(io_OBJECTS) $(io_LDADD) $(LIBS) - -reuse$(EXEEXT): $(reuse_OBJECTS) $(reuse_DEPENDENCIES) $(EXTRA_reuse_DEPENDENCIES) - @rm -f reuse$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(reuse_OBJECTS) $(reuse_LDADD) $(LIBS) - -t-aors$(EXEEXT): $(t_aors_OBJECTS) $(t_aors_DEPENDENCIES) $(EXTRA_t_aors_DEPENDENCIES) - @rm -f t-aors$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_aors_OBJECTS) $(t_aors_LDADD) $(LIBS) - -t-cmp$(EXEEXT): $(t_cmp_OBJECTS) $(t_cmp_DEPENDENCIES) $(EXTRA_t_cmp_DEPENDENCIES) - @rm -f t-cmp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_cmp_OBJECTS) $(t_cmp_LDADD) $(LIBS) - -t-cmp_si$(EXEEXT): $(t_cmp_si_OBJECTS) $(t_cmp_si_DEPENDENCIES) $(EXTRA_t_cmp_si_DEPENDENCIES) - @rm -f t-cmp_si$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_cmp_si_OBJECTS) $(t_cmp_si_LDADD) $(LIBS) - -t-cmp_ui$(EXEEXT): $(t_cmp_ui_OBJECTS) $(t_cmp_ui_DEPENDENCIES) $(EXTRA_t_cmp_ui_DEPENDENCIES) - @rm -f t-cmp_ui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_cmp_ui_OBJECTS) $(t_cmp_ui_LDADD) $(LIBS) - -t-cmp_z$(EXEEXT): $(t_cmp_z_OBJECTS) $(t_cmp_z_DEPENDENCIES) $(EXTRA_t_cmp_z_DEPENDENCIES) - @rm -f t-cmp_z$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_cmp_z_OBJECTS) $(t_cmp_z_LDADD) $(LIBS) - -t-equal$(EXEEXT): $(t_equal_OBJECTS) $(t_equal_DEPENDENCIES) $(EXTRA_t_equal_DEPENDENCIES) - @rm -f t-equal$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_equal_OBJECTS) $(t_equal_LDADD) $(LIBS) - -t-get_d$(EXEEXT): $(t_get_d_OBJECTS) $(t_get_d_DEPENDENCIES) $(EXTRA_t_get_d_DEPENDENCIES) - @rm -f t-get_d$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_get_d_OBJECTS) $(t_get_d_LDADD) $(LIBS) - -t-get_str$(EXEEXT): $(t_get_str_OBJECTS) $(t_get_str_DEPENDENCIES) $(EXTRA_t_get_str_DEPENDENCIES) - @rm -f t-get_str$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_get_str_OBJECTS) $(t_get_str_LDADD) $(LIBS) - -t-inp_str$(EXEEXT): $(t_inp_str_OBJECTS) $(t_inp_str_DEPENDENCIES) $(EXTRA_t_inp_str_DEPENDENCIES) - @rm -f t-inp_str$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_inp_str_OBJECTS) $(t_inp_str_LDADD) $(LIBS) - -t-inv$(EXEEXT): $(t_inv_OBJECTS) $(t_inv_DEPENDENCIES) $(EXTRA_t_inv_DEPENDENCIES) - @rm -f t-inv$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_inv_OBJECTS) $(t_inv_LDADD) $(LIBS) - -t-md_2exp$(EXEEXT): $(t_md_2exp_OBJECTS) $(t_md_2exp_DEPENDENCIES) $(EXTRA_t_md_2exp_DEPENDENCIES) - @rm -f t-md_2exp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_md_2exp_OBJECTS) $(t_md_2exp_LDADD) $(LIBS) - -t-set_f$(EXEEXT): $(t_set_f_OBJECTS) $(t_set_f_DEPENDENCIES) $(EXTRA_t_set_f_DEPENDENCIES) - @rm -f t-set_f$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_set_f_OBJECTS) $(t_set_f_LDADD) $(LIBS) - -t-set_str$(EXEEXT): $(t_set_str_OBJECTS) $(t_set_str_DEPENDENCIES) $(EXTRA_t_set_str_DEPENDENCIES) - @rm -f t-set_str$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_set_str_OBJECTS) $(t_set_str_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(AM_V_CC)$(COMPILE) -c -o $@ $< - -.c.obj: - $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -recheck: all $(check_PROGRAMS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -t-aors.log: t-aors$(EXEEXT) - @p='t-aors$(EXEEXT)'; \ - b='t-aors'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-cmp.log: t-cmp$(EXEEXT) - @p='t-cmp$(EXEEXT)'; \ - b='t-cmp'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-cmp_ui.log: t-cmp_ui$(EXEEXT) - @p='t-cmp_ui$(EXEEXT)'; \ - b='t-cmp_ui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-cmp_si.log: t-cmp_si$(EXEEXT) - @p='t-cmp_si$(EXEEXT)'; \ - b='t-cmp_si'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-equal.log: t-equal$(EXEEXT) - @p='t-equal$(EXEEXT)'; \ - b='t-equal'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-get_d.log: t-get_d$(EXEEXT) - @p='t-get_d$(EXEEXT)'; \ - b='t-get_d'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-get_str.log: t-get_str$(EXEEXT) - @p='t-get_str$(EXEEXT)'; \ - b='t-get_str'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-inp_str.log: t-inp_str$(EXEEXT) - @p='t-inp_str$(EXEEXT)'; \ - b='t-inp_str'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-inv.log: t-inv$(EXEEXT) - @p='t-inv$(EXEEXT)'; \ - b='t-inv'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-md_2exp.log: t-md_2exp$(EXEEXT) - @p='t-md_2exp$(EXEEXT)'; \ - b='t-md_2exp'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-set_f.log: t-set_f$(EXEEXT) - @p='t-set_f$(EXEEXT)'; \ - b='t-set_f'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-set_str.log: t-set_str$(EXEEXT) - @p='t-set_str$(EXEEXT)'; \ - b='t-set_str'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -io.log: io$(EXEEXT) - @p='io$(EXEEXT)'; \ - b='io'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -reuse.log: reuse$(EXEEXT) - @p='reuse$(EXEEXT)'; \ - b='reuse'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-cmp_z.log: t-cmp_z$(EXEEXT) - @p='t-cmp_z$(EXEEXT)'; \ - b='t-cmp_z'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.test$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/io.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/io.c deleted file mode 100644 index a1b718d2cf0..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/io.c +++ /dev/null @@ -1,137 +0,0 @@ -/* Test conversion and I/O using mpq_out_str and mpq_inp_str. - -Copyright 1993, 1994, 1996, 2000, 2001, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <stdio.h> -#include <stdlib.h> -#if HAVE_UNISTD_H -#include <unistd.h> /* for unlink */ -#endif - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#define FILENAME "io.tmp" - -void -debug_mp (mpq_t x, int base) -{ - mpq_out_str (stdout, base, x); fputc ('\n', stdout); -} - -int -main (int argc, char **argv) -{ - mpq_t op1, op2; - mp_size_t size; - int i; - int reps = 10000; - FILE *fp; - int base; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - size_t nread; - - tests_start (); - rands = RANDS; - - mpz_init (bs); - - if (argc == 2) - reps = atoi (argv[1]); - - mpq_init (op1); - mpq_init (op2); - - fp = fopen (FILENAME, "w+"); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 10 + 2; - - mpz_urandomb (bs, rands, size_range); - size = mpz_get_ui (bs); - mpz_errandomb (mpq_numref(op1), rands, 512L); - mpz_errandomb_nonzero (mpq_denref(op1), rands, 512L); - mpq_canonicalize (op1); - - mpz_urandomb (bs, rands, 1); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - mpq_neg (op1, op1); - - mpz_urandomb (bs, rands, 16); - bsi = mpz_get_ui (bs); - base = bsi % 36 + 1; - if (base == 1) - base = 0; - - rewind (fp); - if (mpq_out_str (fp, base, op1) == 0 - || putc (' ', fp) == EOF - || fflush (fp) != 0) - { - printf ("mpq_out_str write error\n"); - abort (); - } - - rewind (fp); - nread = mpq_inp_str (op2, fp, base); - if (nread == 0) - { - if (ferror (fp)) - printf ("mpq_inp_str stream read error\n"); - else - printf ("mpq_inp_str data conversion error\n"); - abort (); - } - - if (nread != ftell(fp)) - { - printf ("mpq_inp_str nread doesn't match ftell\n"); - printf (" nread %lu\n", (unsigned long) nread); - printf (" ftell %ld\n", ftell(fp)); - abort (); - } - - if (mpq_cmp (op1, op2)) - { - printf ("ERROR\n"); - printf ("op1 = "); debug_mp (op1, -16); - printf ("op2 = "); debug_mp (op2, -16); - printf ("base = %d\n", base); - abort (); - } - } - - fclose (fp); - - unlink (FILENAME); - - mpz_clear (bs); - mpq_clear (op1); - mpq_clear (op2); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/reuse.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/reuse.c deleted file mode 100644 index 3bff1dac2a1..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/reuse.c +++ /dev/null @@ -1,247 +0,0 @@ -/* Test that routines allow reusing a source variable as destination. - -Copyright 1996, 2000-2002, 2012, 2015 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#if __GMP_LIBGMP_DLL - -/* FIXME: When linking to a DLL libgmp, mpq_add etc can't be used as - initializers for global variables because they're effectively global - variables (function pointers) themselves. Perhaps calling a test - function successively with mpq_add etc would be better. */ - -int -main (void) -{ - printf ("Test suppressed for windows DLL\n"); - exit (0); -} - - -#else /* ! DLL_EXPORT */ - -#ifndef SIZE -#define SIZE 16 -#endif - -void dump_abort (const char *, mpq_t, mpq_t); - -typedef void (*dss_func) (mpq_ptr, mpq_srcptr, mpq_srcptr); - -dss_func dss_funcs[] = -{ - mpq_div, mpq_add, mpq_mul, mpq_sub, -}; - -const char *dss_func_names[] = -{ - "mpq_div", "mpq_add", "mpq_mul", "mpq_sub", -}; - -typedef void (*ds_func) (mpq_ptr, mpq_srcptr); - -ds_func ds_funcs[] = -{ - mpq_abs, mpq_neg, -}; - -const char *ds_func_names[] = -{ - "mpq_abs", "mpq_neg", -}; - -typedef void (*dsi_func) (mpq_ptr, mpq_srcptr, unsigned long int); - -dsi_func dsi_funcs[] = -{ - mpq_mul_2exp, mpq_div_2exp -}; - -const char *dsi_func_names[] = -{ - "mpq_mul_2exp", "mpq_div_2exp" -}; - -int -main (int argc, char **argv) -{ - int i; - int pass, reps = 100; - mpq_t in1, in2, out1; - unsigned long int randbits, in2i; - mpq_t res1, res2; - gmp_randstate_ptr rands; - - tests_start (); - - if (argc > 1) - reps = strtol (argv[1], 0, 0); - - rands = RANDS; - - mpq_init (in1); - mpq_init (in2); - mpq_init (out1); - mpq_init (res1); - mpq_init (res2); - - for (pass = 1; pass <= reps; pass++) - { - randbits = urandom (); - - if (randbits & 1) - { - mpq_clear (in1); - mpq_init (in1); - } - randbits >>= 1; - mpz_errandomb (mpq_numref(in1), rands, 512L); - mpz_errandomb_nonzero (mpq_denref(in1), rands, 512L); - if (randbits & 1) - mpz_neg (mpq_numref(in1),mpq_numref(in1)); - randbits >>= 1; - mpq_canonicalize (in1); - - if (randbits & 1) - { - mpq_clear (in2); - mpq_init (in2); - } - randbits >>= 1; - mpz_errandomb (mpq_numref(in2), rands, 512L); - mpz_errandomb_nonzero (mpq_denref(in2), rands, 512L); - if (randbits & 1) - mpz_neg (mpq_numref(in2),mpq_numref(in2)); - randbits >>= 1; - mpq_canonicalize (in2); - - for (i = 0; i < sizeof (dss_funcs) / sizeof (dss_func); i++) - { - /* Don't divide by 0. */ - if (i == 0 && mpq_cmp_ui (in2, 0, 1) == 0) - continue; - - if (randbits & 1) - { - mpq_clear (res1); - mpq_init (res1); - } - randbits >>= 1; - - (dss_funcs[i]) (res1, in1, in2); - MPQ_CHECK_FORMAT(res1); - - mpq_set (out1, in1); - (dss_funcs[i]) (out1, out1, in2); - MPQ_CHECK_FORMAT(out1); - - if (mpq_cmp (res1, out1) != 0) - dump_abort (dss_func_names[i], res1, out1); - - mpq_set (out1, in2); - (dss_funcs[i]) (out1, in1, out1); - MPQ_CHECK_FORMAT(out1); - - if (mpq_cmp (res1, out1) != 0) - dump_abort (dss_func_names[i], res1, out1); - - mpq_set (out1, in2); - (dss_funcs[i]) (res1, out1, in2); - MPQ_CHECK_FORMAT(res1); - - (dss_funcs[i]) (res2, in2, in2); - MPQ_CHECK_FORMAT(res2); - - (dss_funcs[i]) (out1, out1, out1); - MPQ_CHECK_FORMAT(out1); - - if (mpq_cmp (res1, res2) != 0) - dump_abort (dss_func_names[i], res1, res2); - if (mpq_cmp (res1, out1) != 0) - dump_abort (dss_func_names[i], res1, out1); - } - - for (i = 0; i < sizeof (ds_funcs) / sizeof (ds_func); i++) - { - if (randbits & 1) - { - mpq_clear (res1); - mpq_init (res1); - } - randbits >>= 1; - (ds_funcs[i]) (res1, in1); - MPQ_CHECK_FORMAT(res1); - - mpq_set (out1, in1); - (ds_funcs[i]) (out1, out1); - MPQ_CHECK_FORMAT(out1); - - if (mpq_cmp (res1, out1) != 0) - dump_abort (ds_func_names[i], res1, out1); - } - - in2i = urandom () % 65536; - for (i = 0; i < sizeof (dsi_funcs) / sizeof (dsi_func); i++) - { - if (randbits & 1) - { - mpq_clear (res1); - mpq_init (res1); - } - randbits >>= 1; - - (dsi_funcs[i]) (res1, in1, in2i); - MPQ_CHECK_FORMAT(res1); - - mpq_set (out1, in1); - (dsi_funcs[i]) (out1, out1, in2i); - MPQ_CHECK_FORMAT(out1); - - if (mpq_cmp (res1, out1) != 0) - dump_abort (dsi_func_names[i], res1, out1); - } - - } - - mpq_clear (in1); - mpq_clear (in2); - mpq_clear (out1); - mpq_clear (res1); - mpq_clear (res2); - - tests_end (); - exit (0); -} - -void -dump_abort (const char *name, mpq_t res1, mpq_t res2) -{ - printf ("failure in %s:\n", name); - mpq_trace (" res1 ", res1); - mpq_trace (" res2 ", res2); - abort (); -} - -#endif /* ! DLL_EXPORT */ diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-aors.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-aors.c deleted file mode 100644 index a65f5d8ab88..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-aors.c +++ /dev/null @@ -1,183 +0,0 @@ -/* Test mpq_add and mpq_sub. - -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_all (mpq_ptr x, mpq_ptr y, mpq_ptr want_add, mpq_ptr want_sub) -{ - mpq_t got; - int neg_x, neg_y, swap; - - mpq_init (got); - - MPQ_CHECK_FORMAT (want_add); - MPQ_CHECK_FORMAT (want_sub); - MPQ_CHECK_FORMAT (x); - MPQ_CHECK_FORMAT (y); - - for (swap = 0; swap <= 1; swap++) - { - for (neg_x = 0; neg_x <= 1; neg_x++) - { - for (neg_y = 0; neg_y <= 1; neg_y++) - { - mpq_add (got, x, y); - MPQ_CHECK_FORMAT (got); - if (! mpq_equal (got, want_add)) - { - printf ("mpq_add wrong\n"); - mpq_trace (" x ", x); - mpq_trace (" y ", y); - mpq_trace (" got ", got); - mpq_trace (" want", want_add); - abort (); - } - - mpq_sub (got, x, y); - MPQ_CHECK_FORMAT (got); - if (! mpq_equal (got, want_sub)) - { - printf ("mpq_sub wrong\n"); - mpq_trace (" x ", x); - mpq_trace (" y ", y); - mpq_trace (" got ", got); - mpq_trace (" want", want_sub); - abort (); - } - - - mpq_neg (y, y); - mpq_swap (want_add, want_sub); - } - - mpq_neg (x, x); - mpq_swap (want_add, want_sub); - mpq_neg (want_add, want_add); - mpq_neg (want_sub, want_sub); - } - - mpq_swap (x, y); - mpq_neg (want_sub, want_sub); - } - - mpq_clear (got); -} - - -void -check_data (void) -{ - static const struct { - const char *x; - const char *y; - const char *want_add; - const char *want_sub; - - } data[] = { - - { "0", "0", "0", "0" }, - { "1", "0", "1", "1" }, - { "1", "1", "2", "0" }, - - { "1/2", "1/2", "1", "0" }, - { "5/6", "14/15", "53/30", "-1/10" }, - }; - - mpq_t x, y, want_add, want_sub; - int i; - - mpq_init (x); - mpq_init (y); - mpq_init (want_add); - mpq_init (want_sub); - - for (i = 0; i < numberof (data); i++) - { - mpq_set_str_or_abort (x, data[i].x, 0); - mpq_set_str_or_abort (y, data[i].y, 0); - mpq_set_str_or_abort (want_add, data[i].want_add, 0); - mpq_set_str_or_abort (want_sub, data[i].want_sub, 0); - - check_all (x, y, want_add, want_sub); - } - - mpq_clear (x); - mpq_clear (y); - mpq_clear (want_add); - mpq_clear (want_sub); -} - - -void -check_rand (void) -{ - mpq_t x, y, want_add, want_sub; - int i; - gmp_randstate_ptr rands = RANDS; - - mpq_init (x); - mpq_init (y); - mpq_init (want_add); - mpq_init (want_sub); - - for (i = 0; i < 500; i++) - { - mpz_errandomb (mpq_numref(x), rands, 512L); - mpz_errandomb_nonzero (mpq_denref(x), rands, 512L); - mpq_canonicalize (x); - - mpz_errandomb (mpq_numref(y), rands, 512L); - mpz_errandomb_nonzero (mpq_denref(y), rands, 512L); - mpq_canonicalize (y); - - refmpq_add (want_add, x, y); - refmpq_sub (want_sub, x, y); - - check_all (x, y, want_add, want_sub); - } - - mpq_clear (x); - mpq_clear (y); - mpq_clear (want_add); - mpq_clear (want_sub); -} - - -int -main (void) -{ - tests_start (); - - check_data (); - check_rand (); - - tests_end (); - - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-cmp.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-cmp.c deleted file mode 100644 index 5858fa23c25..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-cmp.c +++ /dev/null @@ -1,102 +0,0 @@ -/* Test mpq_cmp. - -Copyright 1996, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#define SGN(x) ((x) < 0 ? -1 : (x) > 0 ? 1 : 0) - -int -ref_mpq_cmp (mpq_t a, mpq_t b) -{ - mpz_t ai, bi; - int cc; - - mpz_init (ai); - mpz_init (bi); - - mpz_mul (ai, NUM (a), DEN (b)); - mpz_mul (bi, NUM (b), DEN (a)); - cc = mpz_cmp (ai, bi); - mpz_clear (ai); - mpz_clear (bi); - return cc; -} - -#ifndef SIZE -#define SIZE 8 /* increasing this lowers the probability of finding an error */ -#endif - -int -main (int argc, char **argv) -{ - mpq_t a, b; - mp_size_t size; - int reps = 10000; - int i; - int cc, ccref; - - tests_start (); - - if (argc == 2) - reps = atoi (argv[1]); - - mpq_init (a); - mpq_init (b); - - for (i = 0; i < reps; i++) - { - size = urandom () % SIZE - SIZE/2; - mpz_random2 (NUM (a), size); - do - { - size = urandom () % SIZE - SIZE/2; - mpz_random2 (DEN (a), size); - } - while (mpz_cmp_ui (DEN (a), 0) == 0); - - size = urandom () % SIZE - SIZE/2; - mpz_random2 (NUM (b), size); - do - { - size = urandom () % SIZE - SIZE/2; - mpz_random2 (DEN (b), size); - } - while (mpz_cmp_ui (DEN (b), 0) == 0); - - mpq_canonicalize (a); - mpq_canonicalize (b); - - ccref = ref_mpq_cmp (a, b); - cc = mpq_cmp (a, b); - - if (SGN (ccref) != SGN (cc)) - abort (); - } - - mpq_clear (a); - mpq_clear (b); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-cmp_si.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-cmp_si.c deleted file mode 100644 index 15252cc7ccf..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-cmp_si.c +++ /dev/null @@ -1,118 +0,0 @@ -/* Test mpq_cmp_si. - -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include <limits.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -#define SGN(x) ((x)<0 ? -1 : (x) != 0) - -void -check_data (void) -{ - static const struct { - const char *q; - long n; - unsigned long d; - int want; - } data[] = { - { "0", 0, 1, 0 }, - { "0", 0, 123, 0 }, - { "0", 0, ULONG_MAX, 0 }, - { "1", 0, 1, 1 }, - { "1", 0, 123, 1 }, - { "1", 0, ULONG_MAX, 1 }, - { "-1", 0, 1, -1 }, - { "-1", 0, 123, -1 }, - { "-1", 0, ULONG_MAX, -1 }, - - { "123", 123, 1, 0 }, - { "124", 123, 1, 1 }, - { "122", 123, 1, -1 }, - - { "-123", 123, 1, -1 }, - { "-124", 123, 1, -1 }, - { "-122", 123, 1, -1 }, - - { "123", -123, 1, 1 }, - { "124", -123, 1, 1 }, - { "122", -123, 1, 1 }, - - { "-123", -123, 1, 0 }, - { "-124", -123, 1, -1 }, - { "-122", -123, 1, 1 }, - - { "5/7", 3,4, -1 }, - { "5/7", -3,4, 1 }, - { "-5/7", 3,4, -1 }, - { "-5/7", -3,4, 1 }, - }; - - mpq_t q; - int i, got; - - mpq_init (q); - - for (i = 0; i < numberof (data); i++) - { - mpq_set_str_or_abort (q, data[i].q, 0); - MPQ_CHECK_FORMAT (q); - - got = mpq_cmp_si (q, data[i].n, data[i].d); - if (SGN(got) != data[i].want) - { - printf ("mpq_cmp_si wrong\n"); - error: - mpq_trace (" q", q); - printf (" n=%ld\n", data[i].n); - printf (" d=%lu\n", data[i].d); - printf (" got=%d\n", got); - printf (" want=%d\n", data[i].want); - abort (); - } - - if (data[i].n == 0) - { - got = mpq_cmp_si (q, 0L, data[i].d); - if (SGN(got) != data[i].want) - { - printf ("mpq_cmp_si wrong\n"); - goto error; - } - } - } - - mpq_clear (q); -} - -int -main (int argc, char **argv) -{ - tests_start (); - - check_data (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-cmp_ui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-cmp_ui.c deleted file mode 100644 index 9d2808393b3..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-cmp_ui.c +++ /dev/null @@ -1,117 +0,0 @@ -/* Test mpq_cmp_ui. - -Copyright 1996, 1997, 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#define SGN(x) ((x) < 0 ? -1 : (x) > 0 ? 1 : 0) - -int -ref_mpq_cmp_ui (mpq_t a, unsigned long int bn, unsigned long int bd) -{ - mpz_t ai, bi; - int cc; - - mpz_init (ai); - mpz_init (bi); - - mpz_mul_ui (ai, NUM (a), bd); - mpz_mul_ui (bi, DEN (a), bn); - cc = mpz_cmp (ai, bi); - mpz_clear (ai); - mpz_clear (bi); - return cc; -} - -#ifndef SIZE -#define SIZE 8 /* increasing this lowers the probability of finding an error */ -#endif - -int -main (int argc, char **argv) -{ - mpq_t a, b; - mp_size_t size; - int reps = 10000; - int i; - int cc, ccref; - unsigned long int bn, bd; - - tests_start (); - - if (argc == 2) - reps = atoi (argv[1]); - - mpq_init (a); - mpq_init (b); - - for (i = 0; i < reps; i++) - { - size = urandom () % SIZE - SIZE/2; - mpz_random2 (NUM (a), size); - do - { - size = urandom () % SIZE - SIZE/2; - mpz_random2 (DEN (a), size); - } - while (mpz_cmp_ui (DEN (a), 0) == 0); - - mpz_random2 (NUM (b), (mp_size_t) 1); - mpz_mod_ui (NUM (b), NUM (b), ~(unsigned long int) 0); - mpz_add_ui (NUM (b), NUM (b), 1); - - mpz_random2 (DEN (b), (mp_size_t) 1); - mpz_mod_ui (DEN (b), DEN (b), ~(unsigned long int) 0); - mpz_add_ui (DEN (b), DEN (b), 1); - - mpq_canonicalize (a); - mpq_canonicalize (b); - - ccref = ref_mpq_cmp_ui (a, 1, 1); - cc = mpq_cmp_ui (a, 1, 1); - - if (SGN (ccref) != SGN (cc)) - abort (); - - ccref = ref_mpq_cmp_ui (a, 0, 1); - cc = mpq_cmp_ui (a, 0, 1); - - if (SGN (ccref) != SGN (cc)) - abort (); - - bn = mpz_get_ui (NUM (b)); - bd = mpz_get_ui (DEN (b)); - - ccref = ref_mpq_cmp_ui (a, bn, bd); - cc = mpq_cmp_ui (a, bn, bd); - - if (SGN (ccref) != SGN (cc)) - abort (); - } - - mpq_clear (a); - mpq_clear (b); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-cmp_z.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-cmp_z.c deleted file mode 100644 index 2d4f47c212d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-cmp_z.c +++ /dev/null @@ -1,147 +0,0 @@ -/* Test mpq_cmp_z. - -Copyright 1996, 2001, 2015 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#define SGN(x) ((x) < 0 ? -1 : (x) > 0 ? 1 : 0) - -int -ref_mpq_cmp_z (mpq_t a, mpz_t b) -{ - mpz_t bi; - int cc; - - mpz_init (bi); - - mpz_mul (bi, b, DEN (a)); - cc = mpz_cmp (NUM (a), bi); - mpz_clear (bi); - return cc; -} - -#ifndef SIZE -#define SIZE 8 /* increasing this lowers the probability of finding an error */ -#endif - -#ifndef MAXN -#define MAXN 5 /* increasing this impatcs on total timing */ -#endif - -void -sizes_test (int m) -{ - mpq_t a; - mpz_t b; - int i, j, k, s; - int cc, ccref; - - mpq_init (a); - mpz_init (b); - - for (i = 0; i <= MAXN ; ++i) - { - mpz_setbit (DEN (a), i*m); /* \sum_0^i 2^(i*m) */ - for (j = 0; j <= MAXN; ++j) - { - mpz_set_ui (NUM (a), 0); - mpz_setbit (NUM (a), j*m); /* 2^(j*m) */ - for (k = 0; k <= MAXN; ++k) - { - mpz_set_ui (b, 0); - mpz_setbit (b, k*m); /* 2^(k*m) */ - if (i == 0) /* Denominator is 1, compare the two exponents */ - ccref = (j>k)-(j<k); - else - ccref = j-i > k ? 1 : -1; - for (s = 1; s >= -1; s -= 2) - { - cc = mpq_cmp_z (a, b); - - if (ccref != SGN (cc)) - { - fprintf (stderr, "i=%i, j=%i, k=%i, m=%i, s=%i\n; ccref= %i, cc= %i\n", i, j, k, m, s, ccref, cc); - abort (); - } - - mpq_neg (a, a); - mpz_neg (b, b); - ccref = - ccref; - } - } - } - } - - mpq_clear (a); - mpz_clear (b); -} - -int -main (int argc, char **argv) -{ - mpq_t a; - mpz_t b; - mp_size_t size; - int reps = 10000; - int i; - int cc, ccref; - - tests_start (); - - if (argc == 2) - reps = atoi (argv[1]); - - mpq_init (a); - mpz_init (b); - - for (i = 0; i < reps; i++) - { - if (i % 8192 == 0) - sizes_test (urandom () % (i + 1) + 1); - size = urandom () % SIZE - SIZE/2; - mpz_random2 (NUM (a), size); - do - { - size = urandom () % (SIZE/2); - mpz_random2 (DEN (a), size); - } - while (mpz_cmp_ui (DEN (a), 0) == 0); - - size = urandom () % SIZE - SIZE/2; - mpz_random2 (b, size); - - mpq_canonicalize (a); - - ccref = ref_mpq_cmp_z (a, b); - cc = mpq_cmp_z (a, b); - - if (SGN (ccref) != SGN (cc)) - abort (); - } - - mpq_clear (a); - mpz_clear (b); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-equal.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-equal.c deleted file mode 100644 index 4523dd8b1e2..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-equal.c +++ /dev/null @@ -1,147 +0,0 @@ -/* Test mpq_equal. - -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_one (mpq_srcptr x, mpq_srcptr y, int want) -{ - int got; - - MPQ_CHECK_FORMAT (x); - MPQ_CHECK_FORMAT (y); - - got = mpq_equal (x, y); - if ((got != 0) != (want != 0)) - { - printf ("mpq_equal got %d want %d\n", got, want); - mpq_trace ("x", x); - mpq_trace ("y", y); - abort (); - } -} - - -void -check_all (mpq_ptr x, mpq_ptr y, int want) -{ - check_one (x, y, want); - check_one (y, x, want); - - mpq_neg (x, x); - mpq_neg (y, y); - - check_one (x, y, want); - check_one (y, x, want); -} - - -#define SET4Z(z, size,l3,l2,l1,l0) \ - SIZ(z) = size; PTR(z)[3] = l3; PTR(z)[2] = l2; PTR(z)[1] = l1; PTR(z)[0] = l0 - -#define SET4(q, nsize,n3,n2,n1,n0, dsize,d3,d2,d1,d0) \ - SET4Z (mpq_numref(q), nsize,n3,n2,n1,n0); \ - SET4Z (mpq_denref(q), dsize,d3,d2,d1,d0) - - -/* Exercise various combinations of same and slightly different values. */ - -void -check_various (void) -{ - mpq_t x, y; - - mpq_init (x); - mpq_init (y); - - mpz_realloc (mpq_numref(x), (mp_size_t) 20); - mpz_realloc (mpq_denref(x), (mp_size_t) 20); - mpz_realloc (mpq_numref(y), (mp_size_t) 20); - mpz_realloc (mpq_denref(y), (mp_size_t) 20); - - /* 0 == 0 */ - SET4 (x, 0,13,12,11,10, 1,23,22,21,1); - SET4 (y, 0,33,32,31,30, 1,43,42,41,1); - check_all (x, y, 1); - - /* 83/99 == 83/99 */ - SET4 (x, 1,13,12,11,83, 1,23,22,21,99); - SET4 (y, 1,33,32,31,83, 1,43,42,41,99); - check_all (x, y, 1); - - /* 1:2:3:4/5:6:7 == 1:2:3:4/5:6:7 */ - SET4 (x, 4,1,2,3,4, 3,88,5,6,7); - SET4 (y, 4,1,2,3,4, 3,99,5,6,7); - check_all (x, y, 1); - - /* various individual changes making != */ - SET4 (x, 4,1,2,3,667, 3,88,5,6,7); - SET4 (y, 4,1,2,3,4, 3,99,5,6,7); - check_all (x, y, 0); - SET4 (x, 4,1,2,666,4, 3,88,5,6,7); - SET4 (y, 4,1,2,3,4, 3,99,5,6,7); - check_all (x, y, 0); - SET4 (x, 4,1,666,3,4, 3,88,5,6,7); - SET4 (y, 4,1,2,3,4, 3,99,5,6,7); - check_all (x, y, 0); -#if GMP_NUMB_BITS != 62 - SET4 (x, 4,667,2,3,4, 3,88,5,6,7); - SET4 (y, 4,1,2,3,4, 3,99,5,6,7); - check_all (x, y, 0); -#endif - SET4 (x, 4,1,2,3,4, 3,88,5,6,667); - SET4 (y, 4,1,2,3,4, 3,99,5,6,7); - check_all (x, y, 0); - SET4 (x, 4,1,2,3,4, 3,88,5,667,7); - SET4 (y, 4,1,2,3,4, 3,99,5,6,7); - check_all (x, y, 0); - SET4 (x, 4,1,2,3,4, 3,88,666,6,7); - SET4 (y, 4,1,2,3,4, 3,99,5,6,7); - check_all (x, y, 0); - SET4 (x, -4,1,2,3,4, 3,88,5,6,7); - SET4 (y, 4,1,2,3,4, 3,99,5,6,7); - check_all (x, y, 0); - SET4 (x, 1,1,2,3,4, 3,88,5,6,7); - SET4 (y, 4,1,2,3,4, 3,99,5,6,7); - check_all (x, y, 0); - SET4 (x, 4,1,2,3,4, 3,88,5,6,7); - SET4 (y, 4,1,2,3,4, 2,99,5,6,7); - check_all (x, y, 0); - - mpq_clear (x); - mpq_clear (y); -} - - -int -main (void) -{ - tests_start (); - mp_trace_base = -16; - - check_various (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-get_d.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-get_d.c deleted file mode 100644 index aa848e029c9..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-get_d.c +++ /dev/null @@ -1,295 +0,0 @@ -/* Test mpq_get_d and mpq_set_d - -Copyright 1991, 1993, 1994, 1996, 2000-2003, 2012, 2013 Free Software -Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#ifndef SIZE -#define SIZE 8 -#endif - -/* VAX D floats only have an 8 bit signed exponent, so anything 2^128 or - bigger will overflow, that being 4 limbs. */ -#if defined (__vax) || defined (__vax__) && SIZE > 4 -#undef SIZE -#define SIZE 4 -#define EPSIZE 3 -#else -#define EPSIZE SIZE -#endif - -void dump (mpq_t); - -void -check_monotonic (int argc, char **argv) -{ - mpq_t a; - mp_size_t size; - int reps = 100; - int i, j; - double last_d, new_d; - mpq_t qlast_d, qnew_d; - mpq_t eps; - - if (argc == 2) - reps = atoi (argv[1]); - - /* The idea here is to test the monotonousness of mpq_get_d by adding - numbers to the numerator and denominator. */ - - mpq_init (a); - mpq_init (eps); - mpq_init (qlast_d); - mpq_init (qnew_d); - - for (i = 0; i < reps; i++) - { - size = urandom () % SIZE - SIZE/2; - mpz_random2 (mpq_numref (a), size); - do - { - size = urandom () % SIZE - SIZE/2; - mpz_random2 (mpq_denref (a), size); - } - while (mpz_cmp_ui (mpq_denref (a), 0) == 0); - - mpq_canonicalize (a); - - last_d = mpq_get_d (a); - mpq_set_d (qlast_d, last_d); - for (j = 0; j < 10; j++) - { - size = urandom () % EPSIZE + 1; - mpz_random2 (mpq_numref (eps), size); - size = urandom () % EPSIZE + 1; - mpz_random2 (mpq_denref (eps), size); - mpq_canonicalize (eps); - - mpq_add (a, a, eps); - mpq_canonicalize (a); - new_d = mpq_get_d (a); - if (last_d > new_d) - { - printf ("\nERROR (test %d/%d): bad mpq_get_d results\n", i, j); - printf ("last: %.16g\n", last_d); - printf (" new: %.16g\n", new_d); dump (a); - abort (); - } - mpq_set_d (qnew_d, new_d); - MPQ_CHECK_FORMAT (qnew_d); - if (mpq_cmp (qlast_d, qnew_d) > 0) - { - printf ("ERROR (test %d/%d): bad mpq_set_d results\n", i, j); - printf ("last: %.16g\n", last_d); dump (qlast_d); - printf (" new: %.16g\n", new_d); dump (qnew_d); - abort (); - } - last_d = new_d; - mpq_set (qlast_d, qnew_d); - } - } - - mpq_clear (a); - mpq_clear (eps); - mpq_clear (qlast_d); - mpq_clear (qnew_d); -} - -double -my_ldexp (double d, int e) -{ - for (;;) - { - if (e > 0) - { - if (e >= 16) - { - d *= 65536.0; - e -= 16; - } - else - { - d *= 2.0; - e -= 1; - } - } - else if (e < 0) - { - - if (e <= -16) - { - d /= 65536.0; - e += 16; - } - else - { - d /= 2.0; - e += 1; - } - } - else - return d; - } -} - -#define MAXEXP 500 - -#if defined (__vax) || defined (__vax__) -#undef MAXEXP -#define MAXEXP 30 -#endif - -void -check_random (int argc, char **argv) -{ - gmp_randstate_ptr rands = RANDS; - - double d; - mpq_t q; - mpz_t a, t; - int exp; - - int test, reps = 100000; - - if (argc == 2) - reps = 100 * atoi (argv[1]); - - mpq_init (q); - mpz_init (a); - mpz_init (t); - - for (test = 0; test < reps; test++) - { - mpz_rrandomb (a, rands, 53); - mpz_urandomb (t, rands, 32); - exp = mpz_get_ui (t) % (2*MAXEXP) - MAXEXP; - - d = my_ldexp (mpz_get_d (a), exp); - mpq_set_d (q, d); - /* Check that n/d = a * 2^exp, or - d*a 2^{exp} = n */ - mpz_mul (t, a, mpq_denref (q)); - if (exp > 0) - mpz_mul_2exp (t, t, exp); - else - { - if (!mpz_divisible_2exp_p (t, -exp)) - goto fail; - mpz_div_2exp (t, t, -exp); - } - if (mpz_cmp (t, mpq_numref (q)) != 0) - { - fail: - printf ("ERROR (check_random test %d): bad mpq_set_d results\n", test); - printf ("%.16g\n", d); - gmp_printf ("%Qd\n", q); - abort (); - } - } - mpq_clear (q); - mpz_clear (t); - mpz_clear (a); -} - -void -dump (mpq_t x) -{ - mpz_out_str (stdout, 10, mpq_numref (x)); - printf ("/"); - mpz_out_str (stdout, 10, mpq_denref (x)); - printf ("\n"); -} - -/* Check various values 2^n and 1/2^n. */ -void -check_onebit (void) -{ - static const long data[] = { - -3*GMP_NUMB_BITS-1, -3*GMP_NUMB_BITS, -3*GMP_NUMB_BITS+1, - -2*GMP_NUMB_BITS-1, -2*GMP_NUMB_BITS, -2*GMP_NUMB_BITS+1, - -GMP_NUMB_BITS-1, -GMP_NUMB_BITS, -GMP_NUMB_BITS+1, - -5, -2, -1, 0, 1, 2, 5, - GMP_NUMB_BITS-1, GMP_NUMB_BITS, GMP_NUMB_BITS+1, - 2*GMP_NUMB_BITS-1, 2*GMP_NUMB_BITS, 2*GMP_NUMB_BITS+1, - 3*GMP_NUMB_BITS-1, 3*GMP_NUMB_BITS, 3*GMP_NUMB_BITS+1, - }; - - int i, neg; - long exp, l; - mpq_t q; - double got, want; - - mpq_init (q); - - for (i = 0; i < numberof (data); i++) - { - exp = data[i]; - - mpq_set_ui (q, 1L, 1L); - if (exp >= 0) - mpq_mul_2exp (q, q, exp); - else - mpq_div_2exp (q, q, -exp); - - want = 1.0; - for (l = 0; l < exp; l++) - want *= 2.0; - for (l = 0; l > exp; l--) - want /= 2.0; - - for (neg = 0; neg <= 1; neg++) - { - if (neg) - { - mpq_neg (q, q); - want = -want; - } - - got = mpq_get_d (q); - - if (got != want) - { - printf ("mpq_get_d wrong on %s2**%ld\n", neg ? "-" : "", exp); - mpq_trace (" q ", q); - d_trace (" want ", want); - d_trace (" got ", got); - abort(); - } - } - } - mpq_clear (q); -} - -int -main (int argc, char **argv) -{ - tests_start (); - - check_onebit (); - check_monotonic (argc, argv); - check_random (argc, argv); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-get_str.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-get_str.c deleted file mode 100644 index c3c9dd6e912..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-get_str.c +++ /dev/null @@ -1,143 +0,0 @@ -/* Test mpq_get_str. - -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_one (mpq_srcptr q, int base, const char *want) -{ - char *str, *ret; - size_t str_alloc; - - MPQ_CHECK_FORMAT (q); - mp_trace_base = base; - - str_alloc = - mpz_sizeinbase (mpq_numref(q), ABS(base)) + - mpz_sizeinbase (mpq_denref(q), ABS(base)) + 3; - - str = mpq_get_str (NULL, base, q); - if (strlen(str)+1 > str_alloc) - { - printf ("mpq_get_str size bigger than should be (passing NULL)\n"); - printf (" base %d\n", base); - printf (" got size %lu \"%s\"\n", (unsigned long) strlen(str)+1, str); - printf (" want size %lu\n", (unsigned long) str_alloc); - abort (); - } - if (strcmp (str, want) != 0) - { - printf ("mpq_get_str wrong (passing NULL)\n"); - printf (" base %d\n", base); - printf (" got \"%s\"\n", str); - printf (" want \"%s\"\n", want); - mpq_trace (" q", q); - abort (); - } - (*__gmp_free_func) (str, strlen (str) + 1); - - str = (char *) (*__gmp_allocate_func) (str_alloc); - - ret = mpq_get_str (str, base, q); - if (str != ret) - { - printf ("mpq_get_str wrong return value (passing non-NULL)\n"); - printf (" base %d\n", base); - printf (" got %p\n", ret); - printf (" want %p\n", want); - abort (); - } - if (strcmp (str, want) != 0) - { - printf ("mpq_get_str wrong (passing non-NULL)\n"); - printf (" base %d\n", base); - printf (" got \"%s\"\n", str); - printf (" want \"%s\"\n", want); - abort (); - } - (*__gmp_free_func) (str, str_alloc); -} - - -void -check_all (mpq_srcptr q, int base, const char *want) -{ - char *s; - - check_one (q, base, want); - - s = __gmp_allocate_strdup (want); - strtoupper (s); - check_one (q, -base, s); - (*__gmp_free_func) (s, strlen(s)+1); -} - -void -check_data (void) -{ - static const struct { - int base; - const char *num; - const char *den; - const char *want; - } data[] = { - { 10, "0", "1", "0" }, - { 10, "1", "1", "1" }, - - { 16, "ffffffff", "1", "ffffffff" }, - { 16, "ffffffffffffffff", "1", "ffffffffffffffff" }, - - { 16, "1", "ffffffff", "1/ffffffff" }, - { 16, "1", "ffffffffffffffff", "1/ffffffffffffffff" }, - { 16, "1", "10000000000000003", "1/10000000000000003" }, - - { 10, "12345678901234567890", "9876543210987654323", - "12345678901234567890/9876543210987654323" }, - }; - - mpq_t q; - int i; - - mpq_init (q); - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (mpq_numref(q), data[i].num, data[i].base); - mpz_set_str_or_abort (mpq_denref(q), data[i].den, data[i].base); - check_all (q, data[i].base, data[i].want); - } - mpq_clear (q); -} - - -int -main (void) -{ - tests_start (); - - check_data (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-inp_str.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-inp_str.c deleted file mode 100644 index 601cee3729f..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-inp_str.c +++ /dev/null @@ -1,172 +0,0 @@ -/* Test mpq_inp_str. - -Copyright 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#if HAVE_UNISTD_H -#include <unistd.h> /* for unlink */ -#endif - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -#define FILENAME "t-inp_str.tmp" - - -void -check_data (void) -{ - static const struct { - const char *inp; - int base; - const char *want; - int want_nread; - - } data[] = { - - { "0", 10, "0", 1 }, - { "0/1", 10, "0", 3 }, - - { "0/", 10, "0", 0 }, - { "/123", 10, "0", 0 }, - { "blah", 10, "0", 0 }, - { "123/blah", 10, "0", 0 }, - { "5 /8", 10, "5", 1 }, - { "5/ 8", 10, "0", 0 }, - - { "ff", 16, "255", 2 }, - { "-ff", 16, "-255", 3 }, - { "FF", 16, "255", 2 }, - { "-FF", 16, "-255", 3 }, - - { "z", 36, "35", 1 }, - { "Z", 36, "35", 1 }, - - { "0x0", 0, "0", 3 }, - { "0x10", 0, "16", 4 }, - { "-0x0", 0, "0", 4 }, - { "-0x10", 0, "-16", 5 }, - { "-0x10/5", 0, "-16/5", 7 }, - - { "00", 0, "0", 2 }, - { "010", 0, "8", 3 }, - { "-00", 0, "0", 3 }, - { "-010", 0, "-8", 4 }, - }; - - mpq_t got, want; - long ftell_nread; - int i, post, j, got_nread; - FILE *fp; - - mpq_init (got); - mpq_init (want); - - for (i = 0; i < numberof (data); i++) - { - for (post = 0; post <= 2; post++) - { - mpq_set_str_or_abort (want, data[i].want, 0); - MPQ_CHECK_FORMAT (want); - - fp = fopen (FILENAME, "w+"); - ASSERT_ALWAYS (fp != NULL); - fputs (data[i].inp, fp); - for (j = 0; j < post; j++) - putc (' ', fp); - fflush (fp); - ASSERT_ALWAYS (! ferror(fp)); - - rewind (fp); - got_nread = mpq_inp_str (got, fp, data[i].base); - - if (got_nread != 0) - { - ftell_nread = ftell (fp); - if (got_nread != ftell_nread) - { - printf ("mpq_inp_str nread wrong\n"); - printf (" inp \"%s\"\n", data[i].inp); - printf (" base %d\n", data[i].base); - printf (" got_nread %d\n", got_nread); - printf (" ftell_nread %ld\n", ftell_nread); - abort (); - } - } - - if (post == 0 && data[i].want_nread == strlen(data[i].inp)) - { - int c = getc(fp); - if (c != EOF) - { - printf ("mpq_inp_str didn't read to EOF\n"); - printf (" inp \"%s\"\n", data[i].inp); - printf (" base %d\n", data[i].base); - printf (" c '%c' %#x\n", c, c); - abort (); - } - } - - if (got_nread != data[i].want_nread) - { - printf ("mpq_inp_str nread wrong\n"); - printf (" inp \"%s\"\n", data[i].inp); - printf (" base %d\n", data[i].base); - printf (" got_nread %d\n", got_nread); - printf (" want_nread %d\n", data[i].want_nread); - abort (); - } - - MPQ_CHECK_FORMAT (got); - - if (! mpq_equal (got, want)) - { - printf ("mpq_inp_str wrong result\n"); - printf (" inp \"%s\"\n", data[i].inp); - printf (" base %d\n", data[i].base); - mpq_trace (" got ", got); - mpq_trace (" want", want); - abort (); - } - - ASSERT_ALWAYS (fclose (fp) == 0); - } - } - - mpq_clear (got); - mpq_clear (want); -} - -int -main (void) -{ - tests_start (); - - check_data (); - - unlink (FILENAME); - tests_end (); - - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-inv.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-inv.c deleted file mode 100644 index 1a0df8d7281..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-inv.c +++ /dev/null @@ -1,61 +0,0 @@ -/* Test mpq_inv (and set/get_num/den). - -Copyright 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -int -main (int argc, char **argv) -{ - mpq_t a, b; - mpz_t m, n; - const char* s = "-420000000000000000000000"; - - tests_start (); - - mpq_inits (a, b, (mpq_ptr)0); - mpz_inits (m, n, (mpz_ptr)0); - - mpz_set_ui (m, 13); - mpq_set_den (a, m); - mpz_set_str (m, s, 0); - mpq_set_num (a, m); - MPQ_CHECK_FORMAT (a); - mpq_inv (b, a); - MPQ_CHECK_FORMAT (b); - mpq_get_num (n, b); - ASSERT_ALWAYS (mpz_cmp_si (n, -13) == 0); - mpq_neg (b, b); - mpq_inv (a, b); - MPQ_CHECK_FORMAT (a); - mpq_inv (b, b); - MPQ_CHECK_FORMAT (b); - mpq_get_den (n, b); - ASSERT_ALWAYS (mpz_cmp_ui (n, 13) == 0); - mpq_get_num (n, a); - mpz_add (n, n, m); - ASSERT_ALWAYS (mpz_sgn (n) == 0); - - mpq_clears (a, b, (mpq_ptr)0); - mpz_clears (m, n, (mpz_ptr)0); - - tests_end (); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-md_2exp.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-md_2exp.c deleted file mode 100644 index c6e40285804..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-md_2exp.c +++ /dev/null @@ -1,245 +0,0 @@ -/* Test mpq_mul_2exp and mpq_div_2exp. - -Copyright 2000, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -struct pair_t { - const char *num; - const char *den; -}; - -void -check_random () -{ - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long arg_size, size_range; - mpq_t q, r; - int i; - mp_bitcnt_t shift; - int reps = 10000; - - rands = RANDS; - - mpz_init (bs); - mpq_init (q); - mpq_init (r); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 11 + 2; /* 0..4096 bit operands */ - - mpz_urandomb (bs, rands, size_range); - arg_size = mpz_get_ui (bs); - mpz_rrandomb (mpq_numref (q), rands, arg_size); - do - { - mpz_urandomb (bs, rands, size_range); - arg_size = mpz_get_ui (bs); - mpz_rrandomb (mpq_denref (q), rands, arg_size); - } - while (mpz_sgn (mpq_denref (q)) == 0); - - /* We now have a random rational in q, albeit an unnormalised one. The - lack of normalisation should not matter here, so let's save the time a - gcd would require. */ - - mpz_urandomb (bs, rands, 32); - shift = mpz_get_ui (bs) % 4096; - - mpq_mul_2exp (r, q, shift); - - if (mpq_cmp (r, q) < 0) - { - printf ("mpq_mul_2exp wrong on random\n"); - abort (); - } - - mpq_div_2exp (r, r, shift); - - if (mpq_cmp (r, q) != 0) - { - printf ("mpq_mul_2exp or mpq_div_2exp wrong on random\n"); - abort (); - } - } - mpq_clear (q); - mpq_clear (r); - mpz_clear (bs); -} - -int -main (int argc, char **argv) -{ - static const struct { - struct pair_t left; - unsigned long n; - struct pair_t right; - - } data[] = { - { {"0","1"}, 0, {"0","1"} }, - { {"0","1"}, 1, {"0","1"} }, - { {"0","1"}, 2, {"0","1"} }, - - { {"1","1"}, 0, {"1","1"} }, - { {"1","1"}, 1, {"2","1"} }, - { {"1","1"}, 2, {"4","1"} }, - { {"1","1"}, 3, {"8","1"} }, - - { {"1","1"}, 31, {"0x80000000","1"} }, - { {"1","1"}, 32, {"0x100000000","1"} }, - { {"1","1"}, 33, {"0x200000000","1"} }, - { {"1","1"}, 63, {"0x8000000000000000","1"} }, - { {"1","1"}, 64, {"0x10000000000000000","1"} }, - { {"1","1"}, 65, {"0x20000000000000000","1"} }, - { {"1","1"}, 95, {"0x800000000000000000000000","1"} }, - { {"1","1"}, 96, {"0x1000000000000000000000000","1"} }, - { {"1","1"}, 97, {"0x2000000000000000000000000","1"} }, - { {"1","1"}, 127, {"0x80000000000000000000000000000000","1"} }, - { {"1","1"}, 128, {"0x100000000000000000000000000000000","1"} }, - { {"1","1"}, 129, {"0x200000000000000000000000000000000","1"} }, - - { {"1","2"}, 31, {"0x40000000","1"} }, - { {"1","2"}, 32, {"0x80000000","1"} }, - { {"1","2"}, 33, {"0x100000000","1"} }, - { {"1","2"}, 63, {"0x4000000000000000","1"} }, - { {"1","2"}, 64, {"0x8000000000000000","1"} }, - { {"1","2"}, 65, {"0x10000000000000000","1"} }, - { {"1","2"}, 95, {"0x400000000000000000000000","1"} }, - { {"1","2"}, 96, {"0x800000000000000000000000","1"} }, - { {"1","2"}, 97, {"0x1000000000000000000000000","1"} }, - { {"1","2"}, 127, {"0x40000000000000000000000000000000","1"} }, - { {"1","2"}, 128, {"0x80000000000000000000000000000000","1"} }, - { {"1","2"}, 129, {"0x100000000000000000000000000000000","1"} }, - - { {"1","0x80000000"}, 30, {"1","2"} }, - { {"1","0x80000000"}, 31, {"1","1"} }, - { {"1","0x80000000"}, 32, {"2","1"} }, - { {"1","0x80000000"}, 33, {"4","1"} }, - { {"1","0x80000000"}, 62, {"0x80000000","1"} }, - { {"1","0x80000000"}, 63, {"0x100000000","1"} }, - { {"1","0x80000000"}, 64, {"0x200000000","1"} }, - { {"1","0x80000000"}, 94, {"0x8000000000000000","1"} }, - { {"1","0x80000000"}, 95, {"0x10000000000000000","1"} }, - { {"1","0x80000000"}, 96, {"0x20000000000000000","1"} }, - { {"1","0x80000000"}, 126, {"0x800000000000000000000000","1"} }, - { {"1","0x80000000"}, 127, {"0x1000000000000000000000000","1"} }, - { {"1","0x80000000"}, 128, {"0x2000000000000000000000000","1"} }, - - { {"1","0x100000000"}, 1, {"1","0x80000000"} }, - { {"1","0x100000000"}, 2, {"1","0x40000000"} }, - { {"1","0x100000000"}, 3, {"1","0x20000000"} }, - - { {"1","0x10000000000000000"}, 1, {"1","0x8000000000000000"} }, - { {"1","0x10000000000000000"}, 2, {"1","0x4000000000000000"} }, - { {"1","0x10000000000000000"}, 3, {"1","0x2000000000000000"} }, - }; - - void (*fun) (mpq_ptr, mpq_srcptr, unsigned long); - const struct pair_t *p_start, *p_want; - const char *name; - mpq_t sep, got, want; - mpq_ptr q; - int i, muldiv, sign, overlap; - - tests_start (); - - mpq_init (sep); - mpq_init (got); - mpq_init (want); - - for (i = 0; i < numberof (data); i++) - { - for (muldiv = 0; muldiv < 2; muldiv++) - { - if (muldiv == 0) - { - fun = mpq_mul_2exp; - name = "mpq_mul_2exp"; - p_start = &data[i].left; - p_want = &data[i].right; - } - else - { - fun = mpq_div_2exp; - name = "mpq_div_2exp"; - p_start = &data[i].right; - p_want = &data[i].left; - } - - for (sign = 0; sign <= 1; sign++) - { - mpz_set_str_or_abort (mpq_numref(want), p_want->num, 0); - mpz_set_str_or_abort (mpq_denref(want), p_want->den, 0); - if (sign) - mpq_neg (want, want); - - for (overlap = 0; overlap <= 1; overlap++) - { - q = overlap ? got : sep; - - /* initial garbage in "got" */ - mpq_set_ui (got, 123L, 456L); - - mpz_set_str_or_abort (mpq_numref(q), p_start->num, 0); - mpz_set_str_or_abort (mpq_denref(q), p_start->den, 0); - if (sign) - mpq_neg (q, q); - - (*fun) (got, q, data[i].n); - MPQ_CHECK_FORMAT (got); - - if (! mpq_equal (got, want)) - { - printf ("%s wrong at data[%d], sign %d, overlap %d\n", - name, i, sign, overlap); - printf (" num \"%s\"\n", p_start->num); - printf (" den \"%s\"\n", p_start->den); - printf (" n %lu\n", data[i].n); - - printf (" got "); - mpq_out_str (stdout, 16, got); - printf (" (hex)\n"); - - printf (" want "); - mpq_out_str (stdout, 16, want); - printf (" (hex)\n"); - - abort (); - } - } - } - } - } - - check_random (); - - mpq_clear (sep); - mpq_clear (got); - mpq_clear (want); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-set_f.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-set_f.c deleted file mode 100644 index 76f4a68df80..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-set_f.c +++ /dev/null @@ -1,170 +0,0 @@ -/* Test mpq_set_f. - -Copyright 2000, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -int -main (int argc, char **argv) -{ -#if GMP_NAIL_BITS == 0 - static const struct { - int f_base; - const char *f; - int z_base; - const char *want_num; - const char *want_den; - - } data[] = { - - { -2, "0", 16, "0", "1" }, - { -2, "1", 16, "1", "1" }, - { -2, "1@1", 16, "2", "1" }, - { -2, "1@2", 16, "4", "1" }, - { -2, "1@3", 16, "8", "1" }, - - { -2, "1@30", 16, "40000000", "1" }, - { -2, "1@31", 16, "80000000", "1" }, - { -2, "1@32", 16, "100000000", "1" }, - { -2, "1@33", 16, "200000000", "1" }, - { -2, "1@34", 16, "400000000", "1" }, - - { -2, "1@62", 16, "4000000000000000", "1" }, - { -2, "1@63", 16, "8000000000000000", "1" }, - { -2, "1@64", 16, "10000000000000000", "1" }, - { -2, "1@65", 16, "20000000000000000", "1" }, - { -2, "1@66", 16, "40000000000000000", "1" }, - - { -2, "1@126", 16, "40000000000000000000000000000000", "1" }, - { -2, "1@127", 16, "80000000000000000000000000000000", "1" }, - { -2, "1@128", 16, "100000000000000000000000000000000", "1" }, - { -2, "1@129", 16, "200000000000000000000000000000000", "1" }, - { -2, "1@130", 16, "400000000000000000000000000000000", "1" }, - - { -2, "1@-1", 16, "1", "2" }, - { -2, "1@-2", 16, "1", "4" }, - { -2, "1@-3", 16, "1", "8" }, - - { -2, "1@-30", 16, "1", "40000000" }, - { -2, "1@-31", 16, "1", "80000000" }, - { -2, "1@-32", 16, "1", "100000000" }, - { -2, "1@-33", 16, "1", "200000000" }, - { -2, "1@-34", 16, "1", "400000000" }, - - { -2, "1@-62", 16, "1", "4000000000000000" }, - { -2, "1@-63", 16, "1", "8000000000000000" }, - { -2, "1@-64", 16, "1", "10000000000000000" }, - { -2, "1@-65", 16, "1", "20000000000000000" }, - { -2, "1@-66", 16, "1", "40000000000000000" }, - - { -2, "1@-126", 16, "1", "40000000000000000000000000000000" }, - { -2, "1@-127", 16, "1", "80000000000000000000000000000000" }, - { -2, "1@-128", 16, "1", "100000000000000000000000000000000" }, - { -2, "1@-129", 16, "1", "200000000000000000000000000000000" }, - { -2, "1@-130", 16, "1", "400000000000000000000000000000000" }, - - { -2, "1@-30", 16, "1", "40000000" }, - { -2, "1@-31", 16, "1", "80000000" }, - { -2, "1@-32", 16, "1", "100000000" }, - { -2, "1@-33", 16, "1", "200000000" }, - { -2, "1@-34", 16, "1", "400000000" }, - - { -2, "11@-62", 16, "3", "4000000000000000" }, - { -2, "11@-63", 16, "3", "8000000000000000" }, - { -2, "11@-64", 16, "3", "10000000000000000" }, - { -2, "11@-65", 16, "3", "20000000000000000" }, - { -2, "11@-66", 16, "3", "40000000000000000" }, - - { 16, "80000000.00000001", 16, "8000000000000001", "100000000" }, - { 16, "80000000.00000008", 16, "1000000000000001", "20000000" }, - { 16, "80000000.8", 16, "100000001", "2" }, - - }; - - mpf_t f; - mpq_t got; - mpz_t want_num, want_den; - int i, neg; - - tests_start (); - - mpf_init2 (f, 1024L); - mpq_init (got); - mpz_init (want_num); - mpz_init (want_den); - - for (i = 0; i < numberof (data); i++) - { - for (neg = 0; neg <= 1; neg++) - { - mpf_set_str_or_abort (f, data[i].f, data[i].f_base); - mpz_set_str_or_abort (want_num, data[i].want_num, data[i].z_base); - mpz_set_str_or_abort (want_den, data[i].want_den, data[i].z_base); - - if (neg) - { - mpf_neg (f, f); - mpz_neg (want_num, want_num); - } - - mpq_set_f (got, f); - MPQ_CHECK_FORMAT (got); - - if (mpz_cmp (mpq_numref(got), want_num) != 0 - || mpz_cmp (mpq_denref(got), want_den) != 0) - { - printf ("wrong at data[%d]\n", i); - printf (" f_base %d, z_base %d\n", - data[i].f_base, data[i].z_base); - - printf (" f \"%s\" hex ", data[i].f); - mpf_out_str (stdout, 16, 0, f); - printf ("\n"); - - printf (" want num 0x"); - mpz_out_str (stdout, 16, want_num); - printf ("\n"); - printf (" want den 0x"); - mpz_out_str (stdout, 16, want_den); - printf ("\n"); - - printf (" got num 0x"); - mpz_out_str (stdout, 16, mpq_numref(got)); - printf ("\n"); - printf (" got den 0x"); - mpz_out_str (stdout, 16, mpq_denref(got)); - printf ("\n"); - - abort (); - } - } - } - - mpf_clear (f); - mpq_clear (got); - mpz_clear (want_num); - mpz_clear (want_den); - - tests_end (); -#endif - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-set_str.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-set_str.c deleted file mode 100644 index 92cb9205a75..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpq/t-set_str.c +++ /dev/null @@ -1,103 +0,0 @@ -/* Test mpq_set_str. - -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_one (mpq_srcptr want, int base, const char *str) -{ - mpq_t got; - - MPQ_CHECK_FORMAT (want); - mp_trace_base = base; - - mpq_init (got); - - if (mpq_set_str (got, str, base) != 0) - { - printf ("mpq_set_str unexpectedly failed\n"); - printf (" base %d\n", base); - printf (" str \"%s\"\n", str); - abort (); - } - MPQ_CHECK_FORMAT (got); - - if (! mpq_equal (got, want)) - { - printf ("mpq_set_str wrong\n"); - printf (" base %d\n", base); - printf (" str \"%s\"\n", str); - mpq_trace ("got ", got); - mpq_trace ("want", want); - abort (); - } - - mpq_clear (got); -} - -void -check_samples (void) -{ - mpq_t q; - - mpq_init (q); - - mpq_set_ui (q, 0L, 1L); - check_one (q, 10, "0"); - check_one (q, 10, "0/1"); - check_one (q, 10, "0 / 1"); - check_one (q, 0, "0x0/ 1"); - check_one (q, 0, "0x0/ 0x1"); - check_one (q, 0, "0 / 0x1"); - - check_one (q, 10, "-0"); - check_one (q, 10, "-0/1"); - check_one (q, 10, "-0 / 1"); - check_one (q, 0, "-0x0/ 1"); - check_one (q, 0, "-0x0/ 0x1"); - check_one (q, 0, "-0 / 0x1"); - - mpq_set_ui (q, 255L, 256L); - check_one (q, 10, "255/256"); - check_one (q, 0, "0xFF/0x100"); - check_one (q, 16, "FF/100"); - - mpq_neg (q, q); - check_one (q, 10, "-255/256"); - check_one (q, 0, "-0xFF/0x100"); - check_one (q, 16, "-FF/100"); - - mpq_clear (q); -} - -int -main (void) -{ - tests_start (); - - check_samples (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/Makefile.am b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/Makefile.am deleted file mode 100644 index efca0c298bd..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -## Process this file with automake to generate Makefile.in - -# Copyright 1996, 1997, 1999-2003, 2009, 2012 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. - - -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la - -check_PROGRAMS = reuse t-addsub t-cmp t-mul t-mul_i t-tdiv t-tdiv_ui t-fdiv \ - t-fdiv_ui t-cdiv_ui t-gcd t-gcd_ui t-lcm t-invert dive dive_ui t-sqrtrem \ - convert io t-inp_str logic bit t-powm t-powm_ui t-pow t-div_2exp \ - t-root t-perfsqr t-perfpow t-jac t-bin t-get_d t-get_d_2exp t-get_si \ - t-set_d t-set_si \ - t-fac_ui t-mfac_uiui t-primorial_ui t-fib_ui t-lucnum_ui t-scan t-fits \ - t-divis t-divis_2exp t-cong t-cong_2exp t-sizeinbase t-set_str \ - t-aorsmul t-cmp_d t-cmp_si t-hamdist t-oddeven t-popcount t-set_f \ - t-io_raw t-import t-export t-pprime_p t-nextprime t-remove t-limbs - -TESTS = $(check_PROGRAMS) - -# Temporary files used by the tests. Removed automatically if the tests -# pass, but ensure they're cleaned if they fail. -# -CLEANFILES = *.tmp - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/Makefile.in b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/Makefile.in deleted file mode 100644 index d8308924f82..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/Makefile.in +++ /dev/null @@ -1,2042 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright 1996, 1997, 1999-2003, 2009, 2012 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -check_PROGRAMS = reuse$(EXEEXT) t-addsub$(EXEEXT) t-cmp$(EXEEXT) \ - t-mul$(EXEEXT) t-mul_i$(EXEEXT) t-tdiv$(EXEEXT) \ - t-tdiv_ui$(EXEEXT) t-fdiv$(EXEEXT) t-fdiv_ui$(EXEEXT) \ - t-cdiv_ui$(EXEEXT) t-gcd$(EXEEXT) t-gcd_ui$(EXEEXT) \ - t-lcm$(EXEEXT) t-invert$(EXEEXT) dive$(EXEEXT) \ - dive_ui$(EXEEXT) t-sqrtrem$(EXEEXT) convert$(EXEEXT) \ - io$(EXEEXT) t-inp_str$(EXEEXT) logic$(EXEEXT) bit$(EXEEXT) \ - t-powm$(EXEEXT) t-powm_ui$(EXEEXT) t-pow$(EXEEXT) \ - t-div_2exp$(EXEEXT) t-root$(EXEEXT) t-perfsqr$(EXEEXT) \ - t-perfpow$(EXEEXT) t-jac$(EXEEXT) t-bin$(EXEEXT) \ - t-get_d$(EXEEXT) t-get_d_2exp$(EXEEXT) t-get_si$(EXEEXT) \ - t-set_d$(EXEEXT) t-set_si$(EXEEXT) t-fac_ui$(EXEEXT) \ - t-mfac_uiui$(EXEEXT) t-primorial_ui$(EXEEXT) t-fib_ui$(EXEEXT) \ - t-lucnum_ui$(EXEEXT) t-scan$(EXEEXT) t-fits$(EXEEXT) \ - t-divis$(EXEEXT) t-divis_2exp$(EXEEXT) t-cong$(EXEEXT) \ - t-cong_2exp$(EXEEXT) t-sizeinbase$(EXEEXT) t-set_str$(EXEEXT) \ - t-aorsmul$(EXEEXT) t-cmp_d$(EXEEXT) t-cmp_si$(EXEEXT) \ - t-hamdist$(EXEEXT) t-oddeven$(EXEEXT) t-popcount$(EXEEXT) \ - t-set_f$(EXEEXT) t-io_raw$(EXEEXT) t-import$(EXEEXT) \ - t-export$(EXEEXT) t-pprime_p$(EXEEXT) t-nextprime$(EXEEXT) \ - t-remove$(EXEEXT) t-limbs$(EXEEXT) -subdir = tests/mpz -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -bit_SOURCES = bit.c -bit_OBJECTS = bit.$(OBJEXT) -bit_LDADD = $(LDADD) -bit_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -convert_SOURCES = convert.c -convert_OBJECTS = convert.$(OBJEXT) -convert_LDADD = $(LDADD) -convert_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -dive_SOURCES = dive.c -dive_OBJECTS = dive.$(OBJEXT) -dive_LDADD = $(LDADD) -dive_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -dive_ui_SOURCES = dive_ui.c -dive_ui_OBJECTS = dive_ui.$(OBJEXT) -dive_ui_LDADD = $(LDADD) -dive_ui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -io_SOURCES = io.c -io_OBJECTS = io.$(OBJEXT) -io_LDADD = $(LDADD) -io_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -logic_SOURCES = logic.c -logic_OBJECTS = logic.$(OBJEXT) -logic_LDADD = $(LDADD) -logic_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -reuse_SOURCES = reuse.c -reuse_OBJECTS = reuse.$(OBJEXT) -reuse_LDADD = $(LDADD) -reuse_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_addsub_SOURCES = t-addsub.c -t_addsub_OBJECTS = t-addsub.$(OBJEXT) -t_addsub_LDADD = $(LDADD) -t_addsub_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_aorsmul_SOURCES = t-aorsmul.c -t_aorsmul_OBJECTS = t-aorsmul.$(OBJEXT) -t_aorsmul_LDADD = $(LDADD) -t_aorsmul_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_bin_SOURCES = t-bin.c -t_bin_OBJECTS = t-bin.$(OBJEXT) -t_bin_LDADD = $(LDADD) -t_bin_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_cdiv_ui_SOURCES = t-cdiv_ui.c -t_cdiv_ui_OBJECTS = t-cdiv_ui.$(OBJEXT) -t_cdiv_ui_LDADD = $(LDADD) -t_cdiv_ui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_cmp_SOURCES = t-cmp.c -t_cmp_OBJECTS = t-cmp.$(OBJEXT) -t_cmp_LDADD = $(LDADD) -t_cmp_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_cmp_d_SOURCES = t-cmp_d.c -t_cmp_d_OBJECTS = t-cmp_d.$(OBJEXT) -t_cmp_d_LDADD = $(LDADD) -t_cmp_d_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_cmp_si_SOURCES = t-cmp_si.c -t_cmp_si_OBJECTS = t-cmp_si.$(OBJEXT) -t_cmp_si_LDADD = $(LDADD) -t_cmp_si_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_cong_SOURCES = t-cong.c -t_cong_OBJECTS = t-cong.$(OBJEXT) -t_cong_LDADD = $(LDADD) -t_cong_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_cong_2exp_SOURCES = t-cong_2exp.c -t_cong_2exp_OBJECTS = t-cong_2exp.$(OBJEXT) -t_cong_2exp_LDADD = $(LDADD) -t_cong_2exp_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_div_2exp_SOURCES = t-div_2exp.c -t_div_2exp_OBJECTS = t-div_2exp.$(OBJEXT) -t_div_2exp_LDADD = $(LDADD) -t_div_2exp_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_divis_SOURCES = t-divis.c -t_divis_OBJECTS = t-divis.$(OBJEXT) -t_divis_LDADD = $(LDADD) -t_divis_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_divis_2exp_SOURCES = t-divis_2exp.c -t_divis_2exp_OBJECTS = t-divis_2exp.$(OBJEXT) -t_divis_2exp_LDADD = $(LDADD) -t_divis_2exp_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_export_SOURCES = t-export.c -t_export_OBJECTS = t-export.$(OBJEXT) -t_export_LDADD = $(LDADD) -t_export_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_fac_ui_SOURCES = t-fac_ui.c -t_fac_ui_OBJECTS = t-fac_ui.$(OBJEXT) -t_fac_ui_LDADD = $(LDADD) -t_fac_ui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_fdiv_SOURCES = t-fdiv.c -t_fdiv_OBJECTS = t-fdiv.$(OBJEXT) -t_fdiv_LDADD = $(LDADD) -t_fdiv_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_fdiv_ui_SOURCES = t-fdiv_ui.c -t_fdiv_ui_OBJECTS = t-fdiv_ui.$(OBJEXT) -t_fdiv_ui_LDADD = $(LDADD) -t_fdiv_ui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_fib_ui_SOURCES = t-fib_ui.c -t_fib_ui_OBJECTS = t-fib_ui.$(OBJEXT) -t_fib_ui_LDADD = $(LDADD) -t_fib_ui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_fits_SOURCES = t-fits.c -t_fits_OBJECTS = t-fits.$(OBJEXT) -t_fits_LDADD = $(LDADD) -t_fits_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_gcd_SOURCES = t-gcd.c -t_gcd_OBJECTS = t-gcd.$(OBJEXT) -t_gcd_LDADD = $(LDADD) -t_gcd_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_gcd_ui_SOURCES = t-gcd_ui.c -t_gcd_ui_OBJECTS = t-gcd_ui.$(OBJEXT) -t_gcd_ui_LDADD = $(LDADD) -t_gcd_ui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_get_d_SOURCES = t-get_d.c -t_get_d_OBJECTS = t-get_d.$(OBJEXT) -t_get_d_LDADD = $(LDADD) -t_get_d_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_get_d_2exp_SOURCES = t-get_d_2exp.c -t_get_d_2exp_OBJECTS = t-get_d_2exp.$(OBJEXT) -t_get_d_2exp_LDADD = $(LDADD) -t_get_d_2exp_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_get_si_SOURCES = t-get_si.c -t_get_si_OBJECTS = t-get_si.$(OBJEXT) -t_get_si_LDADD = $(LDADD) -t_get_si_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_hamdist_SOURCES = t-hamdist.c -t_hamdist_OBJECTS = t-hamdist.$(OBJEXT) -t_hamdist_LDADD = $(LDADD) -t_hamdist_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_import_SOURCES = t-import.c -t_import_OBJECTS = t-import.$(OBJEXT) -t_import_LDADD = $(LDADD) -t_import_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_inp_str_SOURCES = t-inp_str.c -t_inp_str_OBJECTS = t-inp_str.$(OBJEXT) -t_inp_str_LDADD = $(LDADD) -t_inp_str_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_invert_SOURCES = t-invert.c -t_invert_OBJECTS = t-invert.$(OBJEXT) -t_invert_LDADD = $(LDADD) -t_invert_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_io_raw_SOURCES = t-io_raw.c -t_io_raw_OBJECTS = t-io_raw.$(OBJEXT) -t_io_raw_LDADD = $(LDADD) -t_io_raw_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_jac_SOURCES = t-jac.c -t_jac_OBJECTS = t-jac.$(OBJEXT) -t_jac_LDADD = $(LDADD) -t_jac_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_lcm_SOURCES = t-lcm.c -t_lcm_OBJECTS = t-lcm.$(OBJEXT) -t_lcm_LDADD = $(LDADD) -t_lcm_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_limbs_SOURCES = t-limbs.c -t_limbs_OBJECTS = t-limbs.$(OBJEXT) -t_limbs_LDADD = $(LDADD) -t_limbs_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_lucnum_ui_SOURCES = t-lucnum_ui.c -t_lucnum_ui_OBJECTS = t-lucnum_ui.$(OBJEXT) -t_lucnum_ui_LDADD = $(LDADD) -t_lucnum_ui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_mfac_uiui_SOURCES = t-mfac_uiui.c -t_mfac_uiui_OBJECTS = t-mfac_uiui.$(OBJEXT) -t_mfac_uiui_LDADD = $(LDADD) -t_mfac_uiui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_mul_SOURCES = t-mul.c -t_mul_OBJECTS = t-mul.$(OBJEXT) -t_mul_LDADD = $(LDADD) -t_mul_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_mul_i_SOURCES = t-mul_i.c -t_mul_i_OBJECTS = t-mul_i.$(OBJEXT) -t_mul_i_LDADD = $(LDADD) -t_mul_i_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_nextprime_SOURCES = t-nextprime.c -t_nextprime_OBJECTS = t-nextprime.$(OBJEXT) -t_nextprime_LDADD = $(LDADD) -t_nextprime_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_oddeven_SOURCES = t-oddeven.c -t_oddeven_OBJECTS = t-oddeven.$(OBJEXT) -t_oddeven_LDADD = $(LDADD) -t_oddeven_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_perfpow_SOURCES = t-perfpow.c -t_perfpow_OBJECTS = t-perfpow.$(OBJEXT) -t_perfpow_LDADD = $(LDADD) -t_perfpow_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_perfsqr_SOURCES = t-perfsqr.c -t_perfsqr_OBJECTS = t-perfsqr.$(OBJEXT) -t_perfsqr_LDADD = $(LDADD) -t_perfsqr_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_popcount_SOURCES = t-popcount.c -t_popcount_OBJECTS = t-popcount.$(OBJEXT) -t_popcount_LDADD = $(LDADD) -t_popcount_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_pow_SOURCES = t-pow.c -t_pow_OBJECTS = t-pow.$(OBJEXT) -t_pow_LDADD = $(LDADD) -t_pow_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_powm_SOURCES = t-powm.c -t_powm_OBJECTS = t-powm.$(OBJEXT) -t_powm_LDADD = $(LDADD) -t_powm_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_powm_ui_SOURCES = t-powm_ui.c -t_powm_ui_OBJECTS = t-powm_ui.$(OBJEXT) -t_powm_ui_LDADD = $(LDADD) -t_powm_ui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_pprime_p_SOURCES = t-pprime_p.c -t_pprime_p_OBJECTS = t-pprime_p.$(OBJEXT) -t_pprime_p_LDADD = $(LDADD) -t_pprime_p_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_primorial_ui_SOURCES = t-primorial_ui.c -t_primorial_ui_OBJECTS = t-primorial_ui.$(OBJEXT) -t_primorial_ui_LDADD = $(LDADD) -t_primorial_ui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_remove_SOURCES = t-remove.c -t_remove_OBJECTS = t-remove.$(OBJEXT) -t_remove_LDADD = $(LDADD) -t_remove_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_root_SOURCES = t-root.c -t_root_OBJECTS = t-root.$(OBJEXT) -t_root_LDADD = $(LDADD) -t_root_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_scan_SOURCES = t-scan.c -t_scan_OBJECTS = t-scan.$(OBJEXT) -t_scan_LDADD = $(LDADD) -t_scan_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_set_d_SOURCES = t-set_d.c -t_set_d_OBJECTS = t-set_d.$(OBJEXT) -t_set_d_LDADD = $(LDADD) -t_set_d_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_set_f_SOURCES = t-set_f.c -t_set_f_OBJECTS = t-set_f.$(OBJEXT) -t_set_f_LDADD = $(LDADD) -t_set_f_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_set_si_SOURCES = t-set_si.c -t_set_si_OBJECTS = t-set_si.$(OBJEXT) -t_set_si_LDADD = $(LDADD) -t_set_si_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_set_str_SOURCES = t-set_str.c -t_set_str_OBJECTS = t-set_str.$(OBJEXT) -t_set_str_LDADD = $(LDADD) -t_set_str_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_sizeinbase_SOURCES = t-sizeinbase.c -t_sizeinbase_OBJECTS = t-sizeinbase.$(OBJEXT) -t_sizeinbase_LDADD = $(LDADD) -t_sizeinbase_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_sqrtrem_SOURCES = t-sqrtrem.c -t_sqrtrem_OBJECTS = t-sqrtrem.$(OBJEXT) -t_sqrtrem_LDADD = $(LDADD) -t_sqrtrem_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_tdiv_SOURCES = t-tdiv.c -t_tdiv_OBJECTS = t-tdiv.$(OBJEXT) -t_tdiv_LDADD = $(LDADD) -t_tdiv_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_tdiv_ui_SOURCES = t-tdiv_ui.c -t_tdiv_ui_OBJECTS = t-tdiv_ui.$(OBJEXT) -t_tdiv_ui_LDADD = $(LDADD) -t_tdiv_ui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = bit.c convert.c dive.c dive_ui.c io.c logic.c reuse.c \ - t-addsub.c t-aorsmul.c t-bin.c t-cdiv_ui.c t-cmp.c t-cmp_d.c \ - t-cmp_si.c t-cong.c t-cong_2exp.c t-div_2exp.c t-divis.c \ - t-divis_2exp.c t-export.c t-fac_ui.c t-fdiv.c t-fdiv_ui.c \ - t-fib_ui.c t-fits.c t-gcd.c t-gcd_ui.c t-get_d.c \ - t-get_d_2exp.c t-get_si.c t-hamdist.c t-import.c t-inp_str.c \ - t-invert.c t-io_raw.c t-jac.c t-lcm.c t-limbs.c t-lucnum_ui.c \ - t-mfac_uiui.c t-mul.c t-mul_i.c t-nextprime.c t-oddeven.c \ - t-perfpow.c t-perfsqr.c t-popcount.c t-pow.c t-powm.c \ - t-powm_ui.c t-pprime_p.c t-primorial_ui.c t-remove.c t-root.c \ - t-scan.c t-set_d.c t-set_f.c t-set_si.c t-set_str.c \ - t-sizeinbase.c t-sqrtrem.c t-tdiv.c t-tdiv_ui.c -DIST_SOURCES = bit.c convert.c dive.c dive_ui.c io.c logic.c reuse.c \ - t-addsub.c t-aorsmul.c t-bin.c t-cdiv_ui.c t-cmp.c t-cmp_d.c \ - t-cmp_si.c t-cong.c t-cong_2exp.c t-div_2exp.c t-divis.c \ - t-divis_2exp.c t-export.c t-fac_ui.c t-fdiv.c t-fdiv_ui.c \ - t-fib_ui.c t-fits.c t-gcd.c t-gcd_ui.c t-get_d.c \ - t-get_d_2exp.c t-get_si.c t-hamdist.c t-import.c t-inp_str.c \ - t-invert.c t-io_raw.c t-jac.c t-lcm.c t-limbs.c t-lucnum_ui.c \ - t-mfac_uiui.c t-mul.c t-mul_i.c t-nextprime.c t-oddeven.c \ - t-perfpow.c t-perfsqr.c t-popcount.c t-pow.c t-powm.c \ - t-powm_ui.c t-pprime_p.c t-primorial_ui.c t-remove.c t-root.c \ - t-scan.c t-set_d.c t-set_f.c t-set_si.c t-set_str.c \ - t-sizeinbase.c t-sqrtrem.c t-tdiv.c t-tdiv_ui.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red='[0;31m'; \ - grn='[0;32m'; \ - lgn='[1;32m'; \ - blu='[1;34m'; \ - mgn='[0;35m'; \ - brg='[1m'; \ - std='[m'; \ - fi; \ -} -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck -TEST_SUITE_LOG = test-suite.log -TEST_EXTENSIONS = @EXEEXT@ .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/test-driver -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ABI = @ABI@ -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -ASMFLAGS = @ASMFLAGS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ -CC = @CC@ -CCAS = @CCAS@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CPP_FOR_BUILD = @CPP_FOR_BUILD@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@ -DEFS = @DEFS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -FGREP = @FGREP@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIMB_BITS = @GMP_LIMB_BITS@ -GMP_NAIL_BITS = @GMP_NAIL_BITS@ -GREP = @GREP@ -HAVE_CLOCK_01 = @HAVE_CLOCK_01@ -HAVE_CPUTIME_01 = @HAVE_CPUTIME_01@ -HAVE_GETRUSAGE_01 = @HAVE_GETRUSAGE_01@ -HAVE_GETTIMEOFDAY_01 = @HAVE_GETTIMEOFDAY_01@ -HAVE_HOST_CPU_FAMILY_power = @HAVE_HOST_CPU_FAMILY_power@ -HAVE_HOST_CPU_FAMILY_powerpc = @HAVE_HOST_CPU_FAMILY_powerpc@ -HAVE_SIGACTION_01 = @HAVE_SIGACTION_01@ -HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@ -HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@ -HAVE_STACK_T_01 = @HAVE_STACK_T_01@ -HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBCURSES = @LIBCURSES@ -LIBGMPXX_LDFLAGS = @LIBGMPXX_LDFLAGS@ -LIBGMP_DLL = @LIBGMP_DLL@ -LIBGMP_LDFLAGS = @LIBGMP_LDFLAGS@ -LIBM = @LIBM@ -LIBM_FOR_BUILD = @LIBM_FOR_BUILD@ -LIBOBJS = @LIBOBJS@ -LIBREADLINE = @LIBREADLINE@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -M4 = @M4@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@ -STRIP = @STRIP@ -TAL_OBJECT = @TAL_OBJECT@ -TUNE_LIBS = @TUNE_LIBS@ -TUNE_SQR_OBJ = @TUNE_SQR_OBJ@ -U_FOR_BUILD = @U_FOR_BUILD@ -VERSION = @VERSION@ -WITH_READLINE_01 = @WITH_READLINE_01@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gmp_srclinks = @gmp_srclinks@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -mpn_objects = @mpn_objects@ -mpn_objs_in_libgmp = @mpn_objs_in_libgmp@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la -TESTS = $(check_PROGRAMS) - -# Temporary files used by the tests. Removed automatically if the tests -# pass, but ensure they're cleaned if they fail. -# -CLEANFILES = *.tmp -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps tests/mpz/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu --ignore-deps tests/mpz/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -bit$(EXEEXT): $(bit_OBJECTS) $(bit_DEPENDENCIES) $(EXTRA_bit_DEPENDENCIES) - @rm -f bit$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(bit_OBJECTS) $(bit_LDADD) $(LIBS) - -convert$(EXEEXT): $(convert_OBJECTS) $(convert_DEPENDENCIES) $(EXTRA_convert_DEPENDENCIES) - @rm -f convert$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(convert_OBJECTS) $(convert_LDADD) $(LIBS) - -dive$(EXEEXT): $(dive_OBJECTS) $(dive_DEPENDENCIES) $(EXTRA_dive_DEPENDENCIES) - @rm -f dive$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(dive_OBJECTS) $(dive_LDADD) $(LIBS) - -dive_ui$(EXEEXT): $(dive_ui_OBJECTS) $(dive_ui_DEPENDENCIES) $(EXTRA_dive_ui_DEPENDENCIES) - @rm -f dive_ui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(dive_ui_OBJECTS) $(dive_ui_LDADD) $(LIBS) - -io$(EXEEXT): $(io_OBJECTS) $(io_DEPENDENCIES) $(EXTRA_io_DEPENDENCIES) - @rm -f io$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(io_OBJECTS) $(io_LDADD) $(LIBS) - -logic$(EXEEXT): $(logic_OBJECTS) $(logic_DEPENDENCIES) $(EXTRA_logic_DEPENDENCIES) - @rm -f logic$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(logic_OBJECTS) $(logic_LDADD) $(LIBS) - -reuse$(EXEEXT): $(reuse_OBJECTS) $(reuse_DEPENDENCIES) $(EXTRA_reuse_DEPENDENCIES) - @rm -f reuse$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(reuse_OBJECTS) $(reuse_LDADD) $(LIBS) - -t-addsub$(EXEEXT): $(t_addsub_OBJECTS) $(t_addsub_DEPENDENCIES) $(EXTRA_t_addsub_DEPENDENCIES) - @rm -f t-addsub$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_addsub_OBJECTS) $(t_addsub_LDADD) $(LIBS) - -t-aorsmul$(EXEEXT): $(t_aorsmul_OBJECTS) $(t_aorsmul_DEPENDENCIES) $(EXTRA_t_aorsmul_DEPENDENCIES) - @rm -f t-aorsmul$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_aorsmul_OBJECTS) $(t_aorsmul_LDADD) $(LIBS) - -t-bin$(EXEEXT): $(t_bin_OBJECTS) $(t_bin_DEPENDENCIES) $(EXTRA_t_bin_DEPENDENCIES) - @rm -f t-bin$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_bin_OBJECTS) $(t_bin_LDADD) $(LIBS) - -t-cdiv_ui$(EXEEXT): $(t_cdiv_ui_OBJECTS) $(t_cdiv_ui_DEPENDENCIES) $(EXTRA_t_cdiv_ui_DEPENDENCIES) - @rm -f t-cdiv_ui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_cdiv_ui_OBJECTS) $(t_cdiv_ui_LDADD) $(LIBS) - -t-cmp$(EXEEXT): $(t_cmp_OBJECTS) $(t_cmp_DEPENDENCIES) $(EXTRA_t_cmp_DEPENDENCIES) - @rm -f t-cmp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_cmp_OBJECTS) $(t_cmp_LDADD) $(LIBS) - -t-cmp_d$(EXEEXT): $(t_cmp_d_OBJECTS) $(t_cmp_d_DEPENDENCIES) $(EXTRA_t_cmp_d_DEPENDENCIES) - @rm -f t-cmp_d$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_cmp_d_OBJECTS) $(t_cmp_d_LDADD) $(LIBS) - -t-cmp_si$(EXEEXT): $(t_cmp_si_OBJECTS) $(t_cmp_si_DEPENDENCIES) $(EXTRA_t_cmp_si_DEPENDENCIES) - @rm -f t-cmp_si$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_cmp_si_OBJECTS) $(t_cmp_si_LDADD) $(LIBS) - -t-cong$(EXEEXT): $(t_cong_OBJECTS) $(t_cong_DEPENDENCIES) $(EXTRA_t_cong_DEPENDENCIES) - @rm -f t-cong$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_cong_OBJECTS) $(t_cong_LDADD) $(LIBS) - -t-cong_2exp$(EXEEXT): $(t_cong_2exp_OBJECTS) $(t_cong_2exp_DEPENDENCIES) $(EXTRA_t_cong_2exp_DEPENDENCIES) - @rm -f t-cong_2exp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_cong_2exp_OBJECTS) $(t_cong_2exp_LDADD) $(LIBS) - -t-div_2exp$(EXEEXT): $(t_div_2exp_OBJECTS) $(t_div_2exp_DEPENDENCIES) $(EXTRA_t_div_2exp_DEPENDENCIES) - @rm -f t-div_2exp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_div_2exp_OBJECTS) $(t_div_2exp_LDADD) $(LIBS) - -t-divis$(EXEEXT): $(t_divis_OBJECTS) $(t_divis_DEPENDENCIES) $(EXTRA_t_divis_DEPENDENCIES) - @rm -f t-divis$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_divis_OBJECTS) $(t_divis_LDADD) $(LIBS) - -t-divis_2exp$(EXEEXT): $(t_divis_2exp_OBJECTS) $(t_divis_2exp_DEPENDENCIES) $(EXTRA_t_divis_2exp_DEPENDENCIES) - @rm -f t-divis_2exp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_divis_2exp_OBJECTS) $(t_divis_2exp_LDADD) $(LIBS) - -t-export$(EXEEXT): $(t_export_OBJECTS) $(t_export_DEPENDENCIES) $(EXTRA_t_export_DEPENDENCIES) - @rm -f t-export$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_export_OBJECTS) $(t_export_LDADD) $(LIBS) - -t-fac_ui$(EXEEXT): $(t_fac_ui_OBJECTS) $(t_fac_ui_DEPENDENCIES) $(EXTRA_t_fac_ui_DEPENDENCIES) - @rm -f t-fac_ui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_fac_ui_OBJECTS) $(t_fac_ui_LDADD) $(LIBS) - -t-fdiv$(EXEEXT): $(t_fdiv_OBJECTS) $(t_fdiv_DEPENDENCIES) $(EXTRA_t_fdiv_DEPENDENCIES) - @rm -f t-fdiv$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_fdiv_OBJECTS) $(t_fdiv_LDADD) $(LIBS) - -t-fdiv_ui$(EXEEXT): $(t_fdiv_ui_OBJECTS) $(t_fdiv_ui_DEPENDENCIES) $(EXTRA_t_fdiv_ui_DEPENDENCIES) - @rm -f t-fdiv_ui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_fdiv_ui_OBJECTS) $(t_fdiv_ui_LDADD) $(LIBS) - -t-fib_ui$(EXEEXT): $(t_fib_ui_OBJECTS) $(t_fib_ui_DEPENDENCIES) $(EXTRA_t_fib_ui_DEPENDENCIES) - @rm -f t-fib_ui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_fib_ui_OBJECTS) $(t_fib_ui_LDADD) $(LIBS) - -t-fits$(EXEEXT): $(t_fits_OBJECTS) $(t_fits_DEPENDENCIES) $(EXTRA_t_fits_DEPENDENCIES) - @rm -f t-fits$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_fits_OBJECTS) $(t_fits_LDADD) $(LIBS) - -t-gcd$(EXEEXT): $(t_gcd_OBJECTS) $(t_gcd_DEPENDENCIES) $(EXTRA_t_gcd_DEPENDENCIES) - @rm -f t-gcd$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_gcd_OBJECTS) $(t_gcd_LDADD) $(LIBS) - -t-gcd_ui$(EXEEXT): $(t_gcd_ui_OBJECTS) $(t_gcd_ui_DEPENDENCIES) $(EXTRA_t_gcd_ui_DEPENDENCIES) - @rm -f t-gcd_ui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_gcd_ui_OBJECTS) $(t_gcd_ui_LDADD) $(LIBS) - -t-get_d$(EXEEXT): $(t_get_d_OBJECTS) $(t_get_d_DEPENDENCIES) $(EXTRA_t_get_d_DEPENDENCIES) - @rm -f t-get_d$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_get_d_OBJECTS) $(t_get_d_LDADD) $(LIBS) - -t-get_d_2exp$(EXEEXT): $(t_get_d_2exp_OBJECTS) $(t_get_d_2exp_DEPENDENCIES) $(EXTRA_t_get_d_2exp_DEPENDENCIES) - @rm -f t-get_d_2exp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_get_d_2exp_OBJECTS) $(t_get_d_2exp_LDADD) $(LIBS) - -t-get_si$(EXEEXT): $(t_get_si_OBJECTS) $(t_get_si_DEPENDENCIES) $(EXTRA_t_get_si_DEPENDENCIES) - @rm -f t-get_si$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_get_si_OBJECTS) $(t_get_si_LDADD) $(LIBS) - -t-hamdist$(EXEEXT): $(t_hamdist_OBJECTS) $(t_hamdist_DEPENDENCIES) $(EXTRA_t_hamdist_DEPENDENCIES) - @rm -f t-hamdist$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_hamdist_OBJECTS) $(t_hamdist_LDADD) $(LIBS) - -t-import$(EXEEXT): $(t_import_OBJECTS) $(t_import_DEPENDENCIES) $(EXTRA_t_import_DEPENDENCIES) - @rm -f t-import$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_import_OBJECTS) $(t_import_LDADD) $(LIBS) - -t-inp_str$(EXEEXT): $(t_inp_str_OBJECTS) $(t_inp_str_DEPENDENCIES) $(EXTRA_t_inp_str_DEPENDENCIES) - @rm -f t-inp_str$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_inp_str_OBJECTS) $(t_inp_str_LDADD) $(LIBS) - -t-invert$(EXEEXT): $(t_invert_OBJECTS) $(t_invert_DEPENDENCIES) $(EXTRA_t_invert_DEPENDENCIES) - @rm -f t-invert$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_invert_OBJECTS) $(t_invert_LDADD) $(LIBS) - -t-io_raw$(EXEEXT): $(t_io_raw_OBJECTS) $(t_io_raw_DEPENDENCIES) $(EXTRA_t_io_raw_DEPENDENCIES) - @rm -f t-io_raw$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_io_raw_OBJECTS) $(t_io_raw_LDADD) $(LIBS) - -t-jac$(EXEEXT): $(t_jac_OBJECTS) $(t_jac_DEPENDENCIES) $(EXTRA_t_jac_DEPENDENCIES) - @rm -f t-jac$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_jac_OBJECTS) $(t_jac_LDADD) $(LIBS) - -t-lcm$(EXEEXT): $(t_lcm_OBJECTS) $(t_lcm_DEPENDENCIES) $(EXTRA_t_lcm_DEPENDENCIES) - @rm -f t-lcm$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_lcm_OBJECTS) $(t_lcm_LDADD) $(LIBS) - -t-limbs$(EXEEXT): $(t_limbs_OBJECTS) $(t_limbs_DEPENDENCIES) $(EXTRA_t_limbs_DEPENDENCIES) - @rm -f t-limbs$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_limbs_OBJECTS) $(t_limbs_LDADD) $(LIBS) - -t-lucnum_ui$(EXEEXT): $(t_lucnum_ui_OBJECTS) $(t_lucnum_ui_DEPENDENCIES) $(EXTRA_t_lucnum_ui_DEPENDENCIES) - @rm -f t-lucnum_ui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_lucnum_ui_OBJECTS) $(t_lucnum_ui_LDADD) $(LIBS) - -t-mfac_uiui$(EXEEXT): $(t_mfac_uiui_OBJECTS) $(t_mfac_uiui_DEPENDENCIES) $(EXTRA_t_mfac_uiui_DEPENDENCIES) - @rm -f t-mfac_uiui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_mfac_uiui_OBJECTS) $(t_mfac_uiui_LDADD) $(LIBS) - -t-mul$(EXEEXT): $(t_mul_OBJECTS) $(t_mul_DEPENDENCIES) $(EXTRA_t_mul_DEPENDENCIES) - @rm -f t-mul$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_mul_OBJECTS) $(t_mul_LDADD) $(LIBS) - -t-mul_i$(EXEEXT): $(t_mul_i_OBJECTS) $(t_mul_i_DEPENDENCIES) $(EXTRA_t_mul_i_DEPENDENCIES) - @rm -f t-mul_i$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_mul_i_OBJECTS) $(t_mul_i_LDADD) $(LIBS) - -t-nextprime$(EXEEXT): $(t_nextprime_OBJECTS) $(t_nextprime_DEPENDENCIES) $(EXTRA_t_nextprime_DEPENDENCIES) - @rm -f t-nextprime$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_nextprime_OBJECTS) $(t_nextprime_LDADD) $(LIBS) - -t-oddeven$(EXEEXT): $(t_oddeven_OBJECTS) $(t_oddeven_DEPENDENCIES) $(EXTRA_t_oddeven_DEPENDENCIES) - @rm -f t-oddeven$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_oddeven_OBJECTS) $(t_oddeven_LDADD) $(LIBS) - -t-perfpow$(EXEEXT): $(t_perfpow_OBJECTS) $(t_perfpow_DEPENDENCIES) $(EXTRA_t_perfpow_DEPENDENCIES) - @rm -f t-perfpow$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_perfpow_OBJECTS) $(t_perfpow_LDADD) $(LIBS) - -t-perfsqr$(EXEEXT): $(t_perfsqr_OBJECTS) $(t_perfsqr_DEPENDENCIES) $(EXTRA_t_perfsqr_DEPENDENCIES) - @rm -f t-perfsqr$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_perfsqr_OBJECTS) $(t_perfsqr_LDADD) $(LIBS) - -t-popcount$(EXEEXT): $(t_popcount_OBJECTS) $(t_popcount_DEPENDENCIES) $(EXTRA_t_popcount_DEPENDENCIES) - @rm -f t-popcount$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_popcount_OBJECTS) $(t_popcount_LDADD) $(LIBS) - -t-pow$(EXEEXT): $(t_pow_OBJECTS) $(t_pow_DEPENDENCIES) $(EXTRA_t_pow_DEPENDENCIES) - @rm -f t-pow$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_pow_OBJECTS) $(t_pow_LDADD) $(LIBS) - -t-powm$(EXEEXT): $(t_powm_OBJECTS) $(t_powm_DEPENDENCIES) $(EXTRA_t_powm_DEPENDENCIES) - @rm -f t-powm$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_powm_OBJECTS) $(t_powm_LDADD) $(LIBS) - -t-powm_ui$(EXEEXT): $(t_powm_ui_OBJECTS) $(t_powm_ui_DEPENDENCIES) $(EXTRA_t_powm_ui_DEPENDENCIES) - @rm -f t-powm_ui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_powm_ui_OBJECTS) $(t_powm_ui_LDADD) $(LIBS) - -t-pprime_p$(EXEEXT): $(t_pprime_p_OBJECTS) $(t_pprime_p_DEPENDENCIES) $(EXTRA_t_pprime_p_DEPENDENCIES) - @rm -f t-pprime_p$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_pprime_p_OBJECTS) $(t_pprime_p_LDADD) $(LIBS) - -t-primorial_ui$(EXEEXT): $(t_primorial_ui_OBJECTS) $(t_primorial_ui_DEPENDENCIES) $(EXTRA_t_primorial_ui_DEPENDENCIES) - @rm -f t-primorial_ui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_primorial_ui_OBJECTS) $(t_primorial_ui_LDADD) $(LIBS) - -t-remove$(EXEEXT): $(t_remove_OBJECTS) $(t_remove_DEPENDENCIES) $(EXTRA_t_remove_DEPENDENCIES) - @rm -f t-remove$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_remove_OBJECTS) $(t_remove_LDADD) $(LIBS) - -t-root$(EXEEXT): $(t_root_OBJECTS) $(t_root_DEPENDENCIES) $(EXTRA_t_root_DEPENDENCIES) - @rm -f t-root$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_root_OBJECTS) $(t_root_LDADD) $(LIBS) - -t-scan$(EXEEXT): $(t_scan_OBJECTS) $(t_scan_DEPENDENCIES) $(EXTRA_t_scan_DEPENDENCIES) - @rm -f t-scan$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_scan_OBJECTS) $(t_scan_LDADD) $(LIBS) - -t-set_d$(EXEEXT): $(t_set_d_OBJECTS) $(t_set_d_DEPENDENCIES) $(EXTRA_t_set_d_DEPENDENCIES) - @rm -f t-set_d$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_set_d_OBJECTS) $(t_set_d_LDADD) $(LIBS) - -t-set_f$(EXEEXT): $(t_set_f_OBJECTS) $(t_set_f_DEPENDENCIES) $(EXTRA_t_set_f_DEPENDENCIES) - @rm -f t-set_f$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_set_f_OBJECTS) $(t_set_f_LDADD) $(LIBS) - -t-set_si$(EXEEXT): $(t_set_si_OBJECTS) $(t_set_si_DEPENDENCIES) $(EXTRA_t_set_si_DEPENDENCIES) - @rm -f t-set_si$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_set_si_OBJECTS) $(t_set_si_LDADD) $(LIBS) - -t-set_str$(EXEEXT): $(t_set_str_OBJECTS) $(t_set_str_DEPENDENCIES) $(EXTRA_t_set_str_DEPENDENCIES) - @rm -f t-set_str$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_set_str_OBJECTS) $(t_set_str_LDADD) $(LIBS) - -t-sizeinbase$(EXEEXT): $(t_sizeinbase_OBJECTS) $(t_sizeinbase_DEPENDENCIES) $(EXTRA_t_sizeinbase_DEPENDENCIES) - @rm -f t-sizeinbase$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_sizeinbase_OBJECTS) $(t_sizeinbase_LDADD) $(LIBS) - -t-sqrtrem$(EXEEXT): $(t_sqrtrem_OBJECTS) $(t_sqrtrem_DEPENDENCIES) $(EXTRA_t_sqrtrem_DEPENDENCIES) - @rm -f t-sqrtrem$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_sqrtrem_OBJECTS) $(t_sqrtrem_LDADD) $(LIBS) - -t-tdiv$(EXEEXT): $(t_tdiv_OBJECTS) $(t_tdiv_DEPENDENCIES) $(EXTRA_t_tdiv_DEPENDENCIES) - @rm -f t-tdiv$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_tdiv_OBJECTS) $(t_tdiv_LDADD) $(LIBS) - -t-tdiv_ui$(EXEEXT): $(t_tdiv_ui_OBJECTS) $(t_tdiv_ui_DEPENDENCIES) $(EXTRA_t_tdiv_ui_DEPENDENCIES) - @rm -f t-tdiv_ui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_tdiv_ui_OBJECTS) $(t_tdiv_ui_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(AM_V_CC)$(COMPILE) -c -o $@ $< - -.c.obj: - $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -recheck: all $(check_PROGRAMS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -reuse.log: reuse$(EXEEXT) - @p='reuse$(EXEEXT)'; \ - b='reuse'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-addsub.log: t-addsub$(EXEEXT) - @p='t-addsub$(EXEEXT)'; \ - b='t-addsub'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-cmp.log: t-cmp$(EXEEXT) - @p='t-cmp$(EXEEXT)'; \ - b='t-cmp'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-mul.log: t-mul$(EXEEXT) - @p='t-mul$(EXEEXT)'; \ - b='t-mul'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-mul_i.log: t-mul_i$(EXEEXT) - @p='t-mul_i$(EXEEXT)'; \ - b='t-mul_i'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-tdiv.log: t-tdiv$(EXEEXT) - @p='t-tdiv$(EXEEXT)'; \ - b='t-tdiv'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-tdiv_ui.log: t-tdiv_ui$(EXEEXT) - @p='t-tdiv_ui$(EXEEXT)'; \ - b='t-tdiv_ui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-fdiv.log: t-fdiv$(EXEEXT) - @p='t-fdiv$(EXEEXT)'; \ - b='t-fdiv'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-fdiv_ui.log: t-fdiv_ui$(EXEEXT) - @p='t-fdiv_ui$(EXEEXT)'; \ - b='t-fdiv_ui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-cdiv_ui.log: t-cdiv_ui$(EXEEXT) - @p='t-cdiv_ui$(EXEEXT)'; \ - b='t-cdiv_ui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-gcd.log: t-gcd$(EXEEXT) - @p='t-gcd$(EXEEXT)'; \ - b='t-gcd'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-gcd_ui.log: t-gcd_ui$(EXEEXT) - @p='t-gcd_ui$(EXEEXT)'; \ - b='t-gcd_ui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-lcm.log: t-lcm$(EXEEXT) - @p='t-lcm$(EXEEXT)'; \ - b='t-lcm'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-invert.log: t-invert$(EXEEXT) - @p='t-invert$(EXEEXT)'; \ - b='t-invert'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -dive.log: dive$(EXEEXT) - @p='dive$(EXEEXT)'; \ - b='dive'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -dive_ui.log: dive_ui$(EXEEXT) - @p='dive_ui$(EXEEXT)'; \ - b='dive_ui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-sqrtrem.log: t-sqrtrem$(EXEEXT) - @p='t-sqrtrem$(EXEEXT)'; \ - b='t-sqrtrem'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -convert.log: convert$(EXEEXT) - @p='convert$(EXEEXT)'; \ - b='convert'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -io.log: io$(EXEEXT) - @p='io$(EXEEXT)'; \ - b='io'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-inp_str.log: t-inp_str$(EXEEXT) - @p='t-inp_str$(EXEEXT)'; \ - b='t-inp_str'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -logic.log: logic$(EXEEXT) - @p='logic$(EXEEXT)'; \ - b='logic'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -bit.log: bit$(EXEEXT) - @p='bit$(EXEEXT)'; \ - b='bit'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-powm.log: t-powm$(EXEEXT) - @p='t-powm$(EXEEXT)'; \ - b='t-powm'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-powm_ui.log: t-powm_ui$(EXEEXT) - @p='t-powm_ui$(EXEEXT)'; \ - b='t-powm_ui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-pow.log: t-pow$(EXEEXT) - @p='t-pow$(EXEEXT)'; \ - b='t-pow'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-div_2exp.log: t-div_2exp$(EXEEXT) - @p='t-div_2exp$(EXEEXT)'; \ - b='t-div_2exp'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-root.log: t-root$(EXEEXT) - @p='t-root$(EXEEXT)'; \ - b='t-root'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-perfsqr.log: t-perfsqr$(EXEEXT) - @p='t-perfsqr$(EXEEXT)'; \ - b='t-perfsqr'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-perfpow.log: t-perfpow$(EXEEXT) - @p='t-perfpow$(EXEEXT)'; \ - b='t-perfpow'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-jac.log: t-jac$(EXEEXT) - @p='t-jac$(EXEEXT)'; \ - b='t-jac'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-bin.log: t-bin$(EXEEXT) - @p='t-bin$(EXEEXT)'; \ - b='t-bin'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-get_d.log: t-get_d$(EXEEXT) - @p='t-get_d$(EXEEXT)'; \ - b='t-get_d'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-get_d_2exp.log: t-get_d_2exp$(EXEEXT) - @p='t-get_d_2exp$(EXEEXT)'; \ - b='t-get_d_2exp'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-get_si.log: t-get_si$(EXEEXT) - @p='t-get_si$(EXEEXT)'; \ - b='t-get_si'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-set_d.log: t-set_d$(EXEEXT) - @p='t-set_d$(EXEEXT)'; \ - b='t-set_d'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-set_si.log: t-set_si$(EXEEXT) - @p='t-set_si$(EXEEXT)'; \ - b='t-set_si'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-fac_ui.log: t-fac_ui$(EXEEXT) - @p='t-fac_ui$(EXEEXT)'; \ - b='t-fac_ui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-mfac_uiui.log: t-mfac_uiui$(EXEEXT) - @p='t-mfac_uiui$(EXEEXT)'; \ - b='t-mfac_uiui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-primorial_ui.log: t-primorial_ui$(EXEEXT) - @p='t-primorial_ui$(EXEEXT)'; \ - b='t-primorial_ui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-fib_ui.log: t-fib_ui$(EXEEXT) - @p='t-fib_ui$(EXEEXT)'; \ - b='t-fib_ui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-lucnum_ui.log: t-lucnum_ui$(EXEEXT) - @p='t-lucnum_ui$(EXEEXT)'; \ - b='t-lucnum_ui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-scan.log: t-scan$(EXEEXT) - @p='t-scan$(EXEEXT)'; \ - b='t-scan'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-fits.log: t-fits$(EXEEXT) - @p='t-fits$(EXEEXT)'; \ - b='t-fits'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-divis.log: t-divis$(EXEEXT) - @p='t-divis$(EXEEXT)'; \ - b='t-divis'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-divis_2exp.log: t-divis_2exp$(EXEEXT) - @p='t-divis_2exp$(EXEEXT)'; \ - b='t-divis_2exp'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-cong.log: t-cong$(EXEEXT) - @p='t-cong$(EXEEXT)'; \ - b='t-cong'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-cong_2exp.log: t-cong_2exp$(EXEEXT) - @p='t-cong_2exp$(EXEEXT)'; \ - b='t-cong_2exp'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-sizeinbase.log: t-sizeinbase$(EXEEXT) - @p='t-sizeinbase$(EXEEXT)'; \ - b='t-sizeinbase'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-set_str.log: t-set_str$(EXEEXT) - @p='t-set_str$(EXEEXT)'; \ - b='t-set_str'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-aorsmul.log: t-aorsmul$(EXEEXT) - @p='t-aorsmul$(EXEEXT)'; \ - b='t-aorsmul'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-cmp_d.log: t-cmp_d$(EXEEXT) - @p='t-cmp_d$(EXEEXT)'; \ - b='t-cmp_d'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-cmp_si.log: t-cmp_si$(EXEEXT) - @p='t-cmp_si$(EXEEXT)'; \ - b='t-cmp_si'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-hamdist.log: t-hamdist$(EXEEXT) - @p='t-hamdist$(EXEEXT)'; \ - b='t-hamdist'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-oddeven.log: t-oddeven$(EXEEXT) - @p='t-oddeven$(EXEEXT)'; \ - b='t-oddeven'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-popcount.log: t-popcount$(EXEEXT) - @p='t-popcount$(EXEEXT)'; \ - b='t-popcount'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-set_f.log: t-set_f$(EXEEXT) - @p='t-set_f$(EXEEXT)'; \ - b='t-set_f'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-io_raw.log: t-io_raw$(EXEEXT) - @p='t-io_raw$(EXEEXT)'; \ - b='t-io_raw'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-import.log: t-import$(EXEEXT) - @p='t-import$(EXEEXT)'; \ - b='t-import'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-export.log: t-export$(EXEEXT) - @p='t-export$(EXEEXT)'; \ - b='t-export'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-pprime_p.log: t-pprime_p$(EXEEXT) - @p='t-pprime_p$(EXEEXT)'; \ - b='t-pprime_p'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-nextprime.log: t-nextprime$(EXEEXT) - @p='t-nextprime$(EXEEXT)'; \ - b='t-nextprime'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-remove.log: t-remove$(EXEEXT) - @p='t-remove$(EXEEXT)'; \ - b='t-remove'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-limbs.log: t-limbs$(EXEEXT) - @p='t-limbs$(EXEEXT)'; \ - b='t-limbs'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.test$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/bit.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/bit.c deleted file mode 100644 index c42e9f0cc5e..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/bit.c +++ /dev/null @@ -1,406 +0,0 @@ -/* Test mpz_setbit, mpz_clrbit, mpz_tstbit. - -Copyright 1997, 2000-2003, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#ifndef SIZE -#define SIZE 4 -#endif - - -void -debug_mp (mpz_srcptr x, int base) -{ - mpz_out_str (stdout, base, x); fputc ('\n', stdout); -} - - -/* exercise the case where mpz_clrbit or mpz_combit ends up extending a - value like -2^(k*GMP_NUMB_BITS-1) when clearing bit k*GMP_NUMB_BITS-1. */ -/* And vice-versa. */ -void -check_clr_extend (void) -{ - mpz_t got, want; - unsigned long i; - int f; - - mpz_init (got); - mpz_init (want); - - for (i = 1; i < 5; i++) - { - for (f = 0; f <= 1; f++) - { - /* lots of 1 bits in _mp_d */ - mpz_set_si (got, 1L); - mpz_mul_2exp (got, got, 10*GMP_NUMB_BITS); - mpz_sub_ui (got, got, 1L); - - /* value -2^(n-1) representing ..11100..00 */ - mpz_set_si (got, -1L); - mpz_mul_2exp (got, got, i*GMP_NUMB_BITS-1); - - /* complement bit n, giving ..11000..00 which is -2^n */ - if (f == 0) - mpz_clrbit (got, i*GMP_NUMB_BITS-1); - else - mpz_combit (got, i*GMP_NUMB_BITS-1); - MPZ_CHECK_FORMAT (got); - - mpz_set_si (want, -1L); - mpz_mul_2exp (want, want, i*GMP_NUMB_BITS); - - if (mpz_cmp (got, want) != 0) - { - if (f == 0) - printf ("mpz_clrbit: "); - else - printf ("mpz_combit: "); - printf ("wrong after extension\n"); - mpz_trace ("got ", got); - mpz_trace ("want", want); - abort (); - } - - /* complement bit n, going back to ..11100..00 which is -2^(n-1) */ - if (f == 0) - mpz_setbit (got, i*GMP_NUMB_BITS-1); - else - mpz_combit (got, i*GMP_NUMB_BITS-1); - MPZ_CHECK_FORMAT (got); - - mpz_set_si (want, -1L); - mpz_mul_2exp (want, want, i*GMP_NUMB_BITS - 1); - - if (mpz_cmp (got, want) != 0) - { - if (f == 0) - printf ("mpz_setbit: "); - else - printf ("mpz_combit: "); - printf ("wrong after shrinking\n"); - mpz_trace ("got ", got); - mpz_trace ("want", want); - abort (); - } - } - } - - mpz_clear (got); - mpz_clear (want); -} - -void -check_com_negs (void) -{ - static const struct { - unsigned long bit; - mp_size_t inp_size; - mp_limb_t inp_n[5]; - mp_size_t want_size; - mp_limb_t want_n[5]; - } data[] = { - { GMP_NUMB_BITS, 2, { 1, 1 }, 1, { 1 } }, - { GMP_NUMB_BITS+1, 2, { 1, 1 }, 2, { 1, 3 } }, - - { GMP_NUMB_BITS, 2, { 0, 1 }, 2, { 0, 2 } }, - { GMP_NUMB_BITS+1, 2, { 0, 1 }, 2, { 0, 3 } }, - }; - mpz_t inp, got, want; - int i; - - mpz_init (got); - mpz_init (want); - mpz_init (inp); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_n (inp, data[i].inp_n, data[i].inp_size); - mpz_neg (inp, inp); - - mpz_set_n (want, data[i].want_n, data[i].want_size); - mpz_neg (want, want); - - mpz_set (got, inp); - mpz_combit (got, data[i].bit); - - if (mpz_cmp (got, want) != 0) - { - printf ("mpz_combit: wrong on neg data[%d]\n", i); - mpz_trace ("inp ", inp); - printf ("bit %lu\n", data[i].bit); - mpz_trace ("got ", got); - mpz_trace ("want", want); - abort (); - } - } - - mpz_clear (inp); - mpz_clear (got); - mpz_clear (want); -} - -/* See that mpz_tstbit matches a twos complement calculated explicitly, for - various low zeros. */ -void -check_tstbit (void) -{ -#define MAX_ZEROS 3 -#define NUM_LIMBS 3 - - mp_limb_t pos[1+NUM_LIMBS+MAX_ZEROS]; - mp_limb_t neg[1+NUM_LIMBS+MAX_ZEROS]; - mpz_t z; - unsigned long i; - int zeros, low1; - int got, want; - - mpz_init (z); - for (zeros = 0; zeros <= MAX_ZEROS; zeros++) - { - MPN_ZERO (pos, numberof(pos)); - mpn_random2 (pos+zeros, (mp_size_t) NUM_LIMBS); - - for (low1 = 0; low1 <= 1; low1++) - { - if (low1) - pos[0] |= 1; - - refmpn_neg (neg, pos, (mp_size_t) numberof(neg)); - mpz_set_n (z, neg, (mp_size_t) numberof(neg)); - mpz_neg (z, z); - - for (i = 0; i < numberof(pos)*GMP_NUMB_BITS; i++) - { - got = mpz_tstbit (z, i); - want = refmpn_tstbit (pos, i); - if (got != want) - { - printf ("wrong at bit %lu, with %d zeros\n", i, zeros); - printf ("z neg "); debug_mp (z, -16); - mpz_set_n (z, pos, (mp_size_t) numberof(pos)); - printf ("pos "); debug_mp (z, -16); - mpz_set_n (z, neg, (mp_size_t) numberof(neg)); - printf ("neg "); debug_mp (z, -16); - exit (1); - } - } - } - } - mpz_clear (z); -} - - -void -check_single (void) -{ - mpz_t x; - int limb, offset, initial; - unsigned long bit; - - mpz_init (x); - - for (limb = 0; limb < 4; limb++) - { - for (offset = (limb==0 ? 0 : -2); offset <= 2; offset++) - { - for (initial = 1; initial >= -1; initial--) - { - mpz_set_si (x, (long) initial); - - bit = (unsigned long) limb*GMP_LIMB_BITS + offset; - - mpz_clrbit (x, bit); - MPZ_CHECK_FORMAT (x); - if (mpz_tstbit (x, bit) != 0) - { - printf ("check_single(): expected 0\n"); - abort (); - } - - mpz_setbit (x, bit); - MPZ_CHECK_FORMAT (x); - if (mpz_tstbit (x, bit) != 1) - { - printf ("check_single(): expected 1\n"); - abort (); - } - - mpz_clrbit (x, bit); - MPZ_CHECK_FORMAT (x); - if (mpz_tstbit (x, bit) != 0) - { - printf ("check_single(): expected 0\n"); - abort (); - } - - mpz_combit (x, bit); - MPZ_CHECK_FORMAT (x); - if (mpz_tstbit (x, bit) != 1) - { - printf ("check_single(): expected 1\n"); - abort (); - } - - mpz_combit (x, bit); - MPZ_CHECK_FORMAT (x); - if (mpz_tstbit (x, bit) != 0) - { - printf ("check_single(): expected 0\n"); - abort (); - } - } - } - } - - mpz_clear (x); -} - - -void -check_random (int argc, char *argv[]) -{ - mpz_t x, s0, s1, s2, s3, m; - mp_size_t xsize; - int i; - int reps = 100000; - int bit0, bit1, bit2, bit3; - unsigned long int bitindex; - const char *s = ""; - - if (argc == 2) - reps = atoi (argv[1]); - - mpz_init (x); - mpz_init (s0); - mpz_init (s1); - mpz_init (s2); - mpz_init (s3); - mpz_init (m); - - for (i = 0; i < reps; i++) - { - xsize = urandom () % (2 * SIZE) - SIZE; - mpz_random2 (x, xsize); - bitindex = urandom () % SIZE; - - mpz_set (s0, x); - bit0 = mpz_tstbit (x, bitindex); - mpz_setbit (x, bitindex); - MPZ_CHECK_FORMAT (x); - - mpz_set (s1, x); - bit1 = mpz_tstbit (x, bitindex); - mpz_clrbit (x, bitindex); - MPZ_CHECK_FORMAT (x); - - mpz_set (s2, x); - bit2 = mpz_tstbit (x, bitindex); - mpz_combit (x, bitindex); - MPZ_CHECK_FORMAT (x); - - mpz_set (s3, x); - bit3 = mpz_tstbit (x, bitindex); - -#define FAIL(str) do { s = str; goto fail; } while (0) - - if (bit1 != 1) FAIL ("bit1 != 1"); - if (bit2 != 0) FAIL ("bit2 != 0"); - if (bit3 != 1) FAIL ("bit3 != 1"); - - if (bit0 == 0) - { - if (mpz_cmp (s0, s1) == 0 || mpz_cmp (s0, s2) != 0 || mpz_cmp (s0, s3) == 0) - abort (); - } - else - { - if (mpz_cmp (s0, s1) != 0 || mpz_cmp (s0, s2) == 0 || mpz_cmp (s0, s3) != 0) - abort (); - } - - if (mpz_cmp (s1, s2) == 0 || mpz_cmp (s1, s3) != 0) - abort (); - if (mpz_cmp (s2, s3) == 0) - abort (); - - mpz_combit (x, bitindex); - MPZ_CHECK_FORMAT (x); - if (mpz_cmp (s2, x) != 0) - abort (); - - mpz_clrbit (x, bitindex); - MPZ_CHECK_FORMAT (x); - if (mpz_cmp (s2, x) != 0) - abort (); - - mpz_ui_pow_ui (m, 2L, bitindex); - MPZ_CHECK_FORMAT (m); - mpz_ior (x, s0, m); - MPZ_CHECK_FORMAT (x); - if (mpz_cmp (x, s3) != 0) - abort (); - - mpz_com (m, m); - MPZ_CHECK_FORMAT (m); - mpz_and (x, s0, m); - MPZ_CHECK_FORMAT (x); - if (mpz_cmp (x, s2) != 0) - abort (); - } - - mpz_clear (x); - mpz_clear (s0); - mpz_clear (s1); - mpz_clear (s2); - mpz_clear (s3); - mpz_clear (m); - return; - - - fail: - printf ("%s\n", s); - printf ("bitindex = %lu\n", bitindex); - printf ("x = "); mpz_out_str (stdout, -16, x); printf (" hex\n"); - exit (1); -} - - - -int -main (int argc, char *argv[]) -{ - tests_start (); - mp_trace_base = -16; - - check_clr_extend (); - check_com_negs (); - check_tstbit (); - check_random (argc, argv); - check_single (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/convert.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/convert.c deleted file mode 100644 index ada6d11a164..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/convert.c +++ /dev/null @@ -1,170 +0,0 @@ -/* Test conversion using mpz_get_str and mpz_set_str. - -Copyright 1993, 1994, 1996, 1999-2002, 2006, 2007 Free Software Foundation, -Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> /* for strlen */ - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void debug_mp (mpz_t, int); - - -void -string_urandomb (char *bp, size_t len, int base, gmp_randstate_ptr rands) -{ - mpz_t bs; - unsigned long bsi; - int d, l; - const char *collseq = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; - - mpz_init (bs); - - mpz_urandomb (bs, rands, 32); - bsi = mpz_get_ui (bs); - d = bsi % base; - while (len != 0) - { - l = (bsi >> 16) % 20; - l = MIN (l, len); - - memset (bp, collseq[d], l); - - len -= l; - bp += l; - - mpz_urandomb (bs, rands, 32); - bsi = mpz_get_ui (bs); - d = bsi & 0xfff; - if (d >= base) - d = 0; - } - - bp[0] = '\0'; - mpz_clear (bs); -} - -int -main (int argc, char **argv) -{ - mpz_t op1, op2; - mp_size_t size; - int i; - int reps = 2000; - char *str, *buf, *bp; - int base; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - size_t len; - - tests_start (); - TESTS_REPS (reps, argv, argc); - - rands = RANDS; - - mpz_init (bs); - - mpz_init (op1); - mpz_init (op2); - - for (i = 0; i < reps; i++) - { - /* 1. Generate random mpz_t and convert to a string and back to mpz_t - again. */ - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 17 + 2; /* 2..18 */ - mpz_urandomb (bs, rands, size_range); /* 3..262144 bits */ - size = mpz_get_ui (bs); - mpz_rrandomb (op1, rands, size); - - mpz_urandomb (bs, rands, 1); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - mpz_neg (op1, op1); - - mpz_urandomb (bs, rands, 32); - bsi = mpz_get_ui (bs); - base = bsi % 62 + 1; - if (base == 1) - base = 0; - - str = mpz_get_str ((char *) 0, base, op1); - mpz_set_str_or_abort (op2, str, base); - - if (mpz_cmp (op1, op2)) - { - fprintf (stderr, "ERROR, op1 and op2 different in test %d\n", i); - fprintf (stderr, "str = %s\n", str); - fprintf (stderr, "base = %d\n", base); - fprintf (stderr, "op1 = "); debug_mp (op1, -16); - fprintf (stderr, "op2 = "); debug_mp (op2, -16); - abort (); - } - - (*__gmp_free_func) (str, strlen (str) + 1); - - /* 2. Generate random string and convert to mpz_t and back to a string - again. */ - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 16 + 1; /* 1..16 */ - mpz_urandomb (bs, rands, size_range); /* 1..65536 digits */ - len = mpz_get_ui (bs) + 1; - buf = (char *) (*__gmp_allocate_func) (len + 1); - if (base == 0) - base = 10; - string_urandomb (buf, len, base, rands); - - mpz_set_str_or_abort (op1, buf, base); - str = mpz_get_str ((char *) 0, base, op1); - - /* Skip over leading zeros, but don't leave the string at zero length. */ - for (bp = buf; bp[0] == '0' && bp[1] != '\0'; bp++) - ; - - if (strcasecmp (str, bp) != 0) - { - fprintf (stderr, "ERROR, str and buf different in test %d\n", i); - fprintf (stderr, "str = %s\n", str); - fprintf (stderr, "buf = %s\n", buf); - fprintf (stderr, "base = %d\n", base); - fprintf (stderr, "op1 = "); debug_mp (op1, -16); - abort (); - } - - (*__gmp_free_func) (buf, len + 1); - (*__gmp_free_func) (str, strlen (str) + 1); - } - - mpz_clear (bs); - mpz_clear (op1); - mpz_clear (op2); - - tests_end (); - exit (0); -} - -void -debug_mp (mpz_t x, int base) -{ - mpz_out_str (stderr, base, x); fputc ('\n', stderr); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/dive.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/dive.c deleted file mode 100644 index 7970e718a07..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/dive.c +++ /dev/null @@ -1,101 +0,0 @@ -/* Test mpz_mul, mpz_divexact. - -Copyright 1996, 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -int -main (int argc, char **argv) -{ - mpz_t op1, op2; - mpz_t prod, quot; - mp_size_t size; - int i; - int reps = 5000; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - - tests_start (); - TESTS_REPS (reps, argv, argc); - - rands = RANDS; - - mp_trace_base = -16; - - mpz_init (bs); - - mpz_init (op1); - mpz_init (op2); - mpz_init (prod); - mpz_init (quot); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 17 + 2; /* 0..2047 bit operands */ - - mpz_urandomb (bs, rands, size_range); - size = mpz_get_ui (bs); - mpz_rrandomb (op1, rands, size); - - do - { - mpz_urandomb (bs, rands, size_range); - size = mpz_get_ui (bs); - mpz_rrandomb (op2, rands, size); - } - while (mpz_sgn (op2) == 0); - - mpz_urandomb (bs, rands, 2); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - mpz_neg (op1, op1); - if ((bsi & 2) != 0) - mpz_neg (op2, op2); - - mpz_mul (prod, op1, op2); - - mpz_divexact (quot, prod, op2); - MPZ_CHECK_FORMAT (quot); - - if (mpz_cmp (quot, op1) != 0) - { - printf ("Wrong results:\n"); - mpz_trace (" got ", quot); - mpz_trace (" want ", op1); - mpz_trace (" dividend", prod); - mpz_trace (" divisor ", op2); - abort (); - } - } - - mpz_clear (bs); - mpz_clear (op1); - mpz_clear (op2); - mpz_clear (prod); - mpz_clear (quot); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/dive_ui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/dive_ui.c deleted file mode 100644 index 6771677f1f9..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/dive_ui.c +++ /dev/null @@ -1,87 +0,0 @@ -/* Test mpz_divexact_ui. - -Copyright 1996, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_random (int argc, char *argv[]) -{ - gmp_randstate_ptr rands = RANDS; - int reps = 500000; - mpz_t a, q, got; - int i, qneg; - unsigned long d; - - if (argc == 2) - reps = atoi (argv[1]); - - mpz_init (a); - mpz_init (q); - mpz_init (got); - - for (i = 0; i < reps; i++) - { - do - d = (unsigned long) urandom(); - while (d == 0); - mpz_erandomb (q, rands, 512); - mpz_mul_ui (a, q, d); - - for (qneg = 0; qneg <= 1; qneg++) - { - mpz_divexact_ui (got, a, d); - MPZ_CHECK_FORMAT (got); - if (mpz_cmp (got, q) != 0) - { - printf ("mpz_divexact_ui wrong\n"); - mpz_trace (" a", a); - printf (" d=%lu\n", d); - mpz_trace (" q", q); - mpz_trace (" got", got); - abort (); - } - - mpz_neg (q, q); - mpz_neg (a, a); - } - - } - - mpz_clear (a); - mpz_clear (q); - mpz_clear (got); -} - - -int -main (int argc, char **argv) -{ - tests_start (); - - check_random (argc, argv); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/io.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/io.c deleted file mode 100644 index 7674d69b1c3..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/io.c +++ /dev/null @@ -1,139 +0,0 @@ -/* Test conversion and I/O using mpz_out_str and mpz_inp_str. - -Copyright 1993, 1994, 1996, 2000, 2001, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <stdio.h> -#include <stdlib.h> -#if HAVE_UNISTD_H -#include <unistd.h> /* for unlink */ -#endif - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#define FILENAME "io.tmp" - -void -debug_mp (mpz_t x, int base) -{ - mpz_out_str (stdout, base, x); fputc ('\n', stdout); -} - -int -main (int argc, char **argv) -{ - mpz_t op1, op2; - mp_size_t size; - int i; - int reps = 10000; - FILE *fp; - int base, base_out; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - size_t nread; - - tests_start (); - rands = RANDS; - - mpz_init (bs); - - if (argc == 2) - reps = atoi (argv[1]); - - mpz_init (op1); - mpz_init (op2); - - fp = fopen (FILENAME, "w+"); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 10 + 2; - - mpz_urandomb (bs, rands, size_range); - size = mpz_get_ui (bs); - mpz_rrandomb (op1, rands, size); - mpz_urandomb (bs, rands, 1); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - mpz_neg (op1, op1); - - mpz_urandomb (bs, rands, 16); - bsi = mpz_get_ui (bs); - base = bsi % 62 + 1; - if (base == 1) - base = 0; - - if (i % 2 == 0 && base <= 36) - base_out = -base; - else - base_out = base; - - rewind (fp); - if (mpz_out_str (fp, base_out, op1) == 0 - || putc (' ', fp) == EOF - || fflush (fp) != 0) - { - printf ("mpz_out_str write error\n"); - abort (); - } - - rewind (fp); - nread = mpz_inp_str (op2, fp, base); - if (nread == 0) - { - if (ferror (fp)) - printf ("mpz_inp_str stream read error\n"); - else - printf ("mpz_inp_str data conversion error\n"); - abort (); - } - - if (nread != ftell(fp)) - { - printf ("mpz_inp_str nread doesn't match ftell\n"); - printf (" nread %lu\n", (unsigned long) nread); - printf (" ftell %ld\n", ftell(fp)); - abort (); - } - - if (mpz_cmp (op1, op2)) - { - printf ("ERROR\n"); - printf ("op1 = "); debug_mp (op1, -16); - printf ("op2 = "); debug_mp (op2, -16); - printf ("base = %d\n", base); - abort (); - } - } - - fclose (fp); - - unlink (FILENAME); - - mpz_clear (bs); - mpz_clear (op1); - mpz_clear (op2); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/logic.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/logic.c deleted file mode 100644 index d99cadc2bdb..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/logic.c +++ /dev/null @@ -1,195 +0,0 @@ -/* Test mpz_com, mpz_and, mpz_ior, and mpz_xor. - -Copyright 1993, 1994, 1996, 1997, 2001, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void dump_abort (void); -void debug_mp (mpz_t, int); - -int -main (int argc, char **argv) -{ - mpz_t x, y, r1, r2; - mpz_t t1, t2, t3; - mp_size_t xsize, ysize; - int i; - int reps = 100000; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - - tests_start (); - rands = RANDS; - - mpz_init (bs); - - if (argc == 2) - reps = atoi (argv[1]); - - mpz_init (x); - mpz_init (y); - mpz_init (r1); - mpz_init (r2); - mpz_init (t1); - mpz_init (t2); - mpz_init (t3); - - mpz_set_si (x, -1); - mpz_set_ui (y, 0); - for (i = 0; i < 300; i++) - { - mpz_mul_2exp (x, x, 1); - - mpz_and (r1, x, x); - MPZ_CHECK_FORMAT (r1); - if (mpz_cmp (r1, x) != 0) - dump_abort (); - - mpz_ior (r2, x, x); - MPZ_CHECK_FORMAT (r2); - if (mpz_cmp (r2, x) != 0) - dump_abort (); - - mpz_xor (t1, x, x); - MPZ_CHECK_FORMAT (t1); - if (mpz_cmp_si (t1, 0) != 0) - dump_abort (); - - mpz_ior (t1, x, y); - MPZ_CHECK_FORMAT (t1); - if (mpz_cmp (t1, x) != 0) - dump_abort (); - - mpz_xor (t2, x, y); - MPZ_CHECK_FORMAT (t2); - if (mpz_cmp (t2, x) != 0) - dump_abort (); - - mpz_com (t2, x); - MPZ_CHECK_FORMAT (t2); - mpz_xor (t3, t2, x); - MPZ_CHECK_FORMAT (t3); - if (mpz_cmp_si (t3, -1) != 0) - dump_abort (); - } - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 8 + 2; - - mpz_urandomb (bs, rands, size_range); - xsize = mpz_get_ui (bs); - mpz_rrandomb (x, rands, xsize); - mpz_urandomb (bs, rands, 1); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - mpz_neg (x, x); - - mpz_urandomb (bs, rands, size_range); - ysize = mpz_get_ui (bs); - mpz_rrandomb (y, rands, ysize); - mpz_urandomb (bs, rands, 1); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - mpz_neg (y, y); - - mpz_com (r1, x); - MPZ_CHECK_FORMAT (r1); - mpz_com (r1, r1); - MPZ_CHECK_FORMAT (r1); - if (mpz_cmp (r1, x) != 0) - dump_abort (); - - mpz_com (r1, y); - MPZ_CHECK_FORMAT (r1); - mpz_com (r2, r1); - MPZ_CHECK_FORMAT (r2); - if (mpz_cmp (r2, y) != 0) - dump_abort (); - - mpz_com (t1, x); - MPZ_CHECK_FORMAT (t1); - mpz_com (t2, y); - MPZ_CHECK_FORMAT (t2); - mpz_and (t3, t1, t2); - MPZ_CHECK_FORMAT (t3); - mpz_com (r1, t3); - MPZ_CHECK_FORMAT (r1); - mpz_ior (r2, x, y); - MPZ_CHECK_FORMAT (r2); - if (mpz_cmp (r1, r2) != 0) - dump_abort (); - - mpz_com (t1, x); - MPZ_CHECK_FORMAT (t1); - mpz_com (t2, y); - MPZ_CHECK_FORMAT (t2); - mpz_ior (t3, t1, t2); - MPZ_CHECK_FORMAT (t3); - mpz_com (r1, t3); - MPZ_CHECK_FORMAT (r1); - mpz_and (r2, x, y); - MPZ_CHECK_FORMAT (r2); - if (mpz_cmp (r1, r2) != 0) - dump_abort (); - - mpz_ior (t1, x, y); - MPZ_CHECK_FORMAT (t1); - mpz_and (t2, x, y); - MPZ_CHECK_FORMAT (t2); - mpz_com (t3, t2); - MPZ_CHECK_FORMAT (t3); - mpz_and (r1, t1, t3); - MPZ_CHECK_FORMAT (r1); - mpz_xor (r2, x, y); - MPZ_CHECK_FORMAT (r2); - if (mpz_cmp (r1, r2) != 0) - dump_abort (); - } - - mpz_clear (bs); - mpz_clear (x); - mpz_clear (y); - mpz_clear (r1); - mpz_clear (r2); - mpz_clear (t1); - mpz_clear (t2); - mpz_clear (t3); - - tests_end (); - exit (0); -} - -void -dump_abort () -{ - abort(); -} - -void -debug_mp (mpz_t x, int base) -{ - mpz_out_str (stderr, base, x); fputc ('\n', stderr); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/reuse.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/reuse.c deleted file mode 100644 index f3e4781b2cb..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/reuse.c +++ /dev/null @@ -1,722 +0,0 @@ -/* Test that routines allow reusing a source variable as destination. - - Test all relevant functions except: - mpz_bin_ui - mpz_nextprime - mpz_mul_si - mpz_addmul_ui (should this really allow a+=a*c?) - -Copyright 1996, 1999-2002, 2009, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#if __GMP_LIBGMP_DLL - -/* FIXME: When linking to a DLL libgmp, mpz_add etc can't be used as - initializers for global variables because they're effectively global - variables (function pointers) themselves. Perhaps calling a test - function successively with mpz_add etc would be better. */ - -int -main (void) -{ - printf ("Test suppressed for windows DLL\n"); - exit (0); -} - - -#else /* ! DLL_EXPORT */ - -void dump (const char *, mpz_t, mpz_t, mpz_t); - -typedef void (*dss_func) (mpz_ptr, mpz_srcptr, mpz_srcptr); -typedef void (*dsi_func) (mpz_ptr, mpz_srcptr, unsigned long int); -typedef unsigned long int (*dsi_div_func) (mpz_ptr, mpz_srcptr, unsigned long int); -typedef unsigned long int (*ddsi_div_func) (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); -typedef void (*ddss_div_func) (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); -typedef void (*ds_func) (mpz_ptr, mpz_srcptr); - - -void -mpz_xinvert (mpz_ptr r, mpz_srcptr a, mpz_srcptr b) -{ - int res; - res = mpz_invert (r, a, b); - if (res == 0) - mpz_set_ui (r, 0); -} - -struct { - dss_func fptr; - const char *fname; - int isdivision; - int isslow; -} static dss[] = - { { mpz_add, "mpz_add", 0, 0 }, - { mpz_sub, "mpz_sub", 0, 0 }, - { mpz_mul, "mpz_mul", 0, 0 }, - { mpz_cdiv_q, "mpz_cdiv_q", 1, 0 }, - { mpz_cdiv_r, "mpz_cdiv_r", 1, 0 }, - { mpz_fdiv_q, "mpz_fdiv_q", 1, 0 }, - { mpz_fdiv_r, "mpz_fdiv_r", 1, 0 }, - { mpz_tdiv_q, "mpz_tdiv_q", 1, 0 }, - { mpz_tdiv_r, "mpz_tdiv_r", 1, 0 }, - { mpz_mod, "mpz_mod", 1, 0 }, - { mpz_xinvert, "mpz_xinvert", 1, 1 }, - { mpz_gcd, "mpz_gcd", 0, 1 }, - { mpz_lcm, "mpz_lcm", 0, 1 }, - { mpz_and, "mpz_and", 0, 0 }, - { mpz_ior, "mpz_ior", 0, 0 }, - { mpz_xor, "mpz_xor", 0, 0 } - }; - - -struct { - dsi_func fptr; - const char *fname; - int mod; -} static dsi[] = -{ - /* Don't change order here without changing the code in main(). */ - { mpz_add_ui, "mpz_add_ui", 0 }, - { mpz_mul_ui, "mpz_mul_ui", 0 }, - { mpz_sub_ui, "mpz_sub_ui", 0 }, - { mpz_fdiv_q_2exp, "mpz_fdiv_q_2exp", 0x1000 }, - { mpz_fdiv_r_2exp, "mpz_fdiv_r_2exp", 0x1000 }, - { mpz_cdiv_q_2exp, "mpz_cdiv_q_2exp", 0x1000 }, - { mpz_cdiv_r_2exp, "mpz_cdiv_r_2exp", 0x1000 }, - { mpz_tdiv_q_2exp, "mpz_tdiv_q_2exp", 0x1000 }, - { mpz_tdiv_r_2exp, "mpz_tdiv_r_2exp", 0x1000 }, - { mpz_mul_2exp, "mpz_mul_2exp", 0x100 }, - { mpz_pow_ui, "mpz_pow_ui", 0x10 } -}; - -struct { - dsi_div_func fptr; - const char *fname; -} static dsi_div[] = -{ - { mpz_cdiv_q_ui, "mpz_cdiv_q_ui" }, - { mpz_cdiv_r_ui, "mpz_cdiv_r_ui" }, - { mpz_fdiv_q_ui, "mpz_fdiv_q_ui" }, - { mpz_fdiv_r_ui, "mpz_fdiv_r_ui" }, - { mpz_tdiv_q_ui, "mpz_tdiv_q_ui" }, - { mpz_tdiv_r_ui, "mpz_tdiv_r_ui" } -}; - -struct { - ddsi_div_func fptr; - const char *fname; - int isslow; -} static ddsi_div[] = -{ - { mpz_cdiv_qr_ui, "mpz_cdiv_qr_ui", 0 }, - { mpz_fdiv_qr_ui, "mpz_fdiv_qr_ui", 0 }, - { mpz_tdiv_qr_ui, "mpz_tdiv_qr_ui", 0 }, -}; - - -struct { - ddss_div_func fptr; - const char *fname; - int isslow; -} static ddss_div[] = -{ - { mpz_cdiv_qr, "mpz_cdiv_qr", 0 }, - { mpz_fdiv_qr, "mpz_fdiv_qr", 0 }, - { mpz_tdiv_qr, "mpz_tdiv_qr", 0 }, -}; - -struct { - ds_func fptr; - const char *fname; - int nonneg; -} static ds[] = -{ - { mpz_abs, "mpz_abs", 0 }, - { mpz_com, "mpz_com", 0 }, - { mpz_neg, "mpz_neg", 0 }, - { mpz_sqrt, "mpz_sqrt", 1 }, -}; - -#define FAIL(class,indx,op1,op2,op3) \ - do { \ - dump (class[indx].fname, op1, op2, op3); \ - exit (1); \ - } while (0) - -#define FAIL2(fname,op1,op2,op3) \ - do { \ - dump (#fname, op1, op2, op3); \ - exit (1); \ - } while (0) - - -#define INVOKE_RRS(desc,r1,r2,i1) \ - do { \ - if (pass & 1) _mpz_realloc (r1, ABSIZ(r1)); \ - if (pass & 2) _mpz_realloc (r2, ABSIZ(r2)); \ - (desc).fptr (r1, r2, i1); \ - } while (0) -#define INVOKE_RS(desc,r1,i1) \ - do { \ - if (pass & 1) _mpz_realloc (r1, ABSIZ(r1)); \ - (desc).fptr (r1, i1); \ - } while (0) -#define INVOKE_RRSS(desc,r1,r2,i1,i2) \ - do { \ - if (pass & 1) _mpz_realloc (r1, ABSIZ(r1)); \ - if (pass & 2) _mpz_realloc (r2, ABSIZ(r2)); \ - (desc).fptr (r1, r2, i1, i2); \ - } while (0) -#define INVOKE_RSS(desc,r1,i1,i2) \ - do { \ - if (pass & 1) _mpz_realloc (r1, ABSIZ(r1)); \ - (desc).fptr (r1, i1, i2); \ - } while (0) - -int -main (int argc, char **argv) -{ - int i; - int pass, reps = 400; - mpz_t in1, in2, in3; - unsigned long int in2i; - mp_size_t size; - mpz_t res1, res2, res3; - mpz_t ref1, ref2, ref3; - mpz_t t; - unsigned long int r1, r2; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - - tests_start (); - TESTS_REPS (reps, argv, argc); - - rands = RANDS; - - mpz_init (bs); - - mpz_init (in1); - mpz_init (in2); - mpz_init (in3); - mpz_init (ref1); - mpz_init (ref2); - mpz_init (ref3); - mpz_init (res1); - mpz_init (res2); - mpz_init (res3); - mpz_init (t); - - for (pass = 1; pass <= reps; pass++) - { - if (isatty (fileno (stdout))) - { - printf ("\r%d/%d passes", pass, reps); - fflush (stdout); - } - - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 21 + 2; - - if ((pass & 1) == 0) - { - /* Make all input operands have quite different sizes */ - mpz_urandomb (bs, rands, 32); - size = mpz_get_ui (bs) % size_range; - mpz_rrandomb (in1, rands, size); - - mpz_urandomb (bs, rands, 32); - size = mpz_get_ui (bs) % size_range; - mpz_rrandomb (in2, rands, size); - - mpz_urandomb (bs, rands, 32); - size = mpz_get_ui (bs) % size_range; - mpz_rrandomb (in3, rands, size); - } - else - { - /* Make all input operands have about the same size */ - mpz_urandomb (bs, rands, size_range); - size = mpz_get_ui (bs); - mpz_rrandomb (in1, rands, size); - - mpz_urandomb (bs, rands, size_range); - size = mpz_get_ui (bs); - mpz_rrandomb (in2, rands, size); - - mpz_urandomb (bs, rands, size_range); - size = mpz_get_ui (bs); - mpz_rrandomb (in3, rands, size); - } - - mpz_urandomb (bs, rands, 3); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - mpz_neg (in1, in1); - if ((bsi & 2) != 0) - mpz_neg (in2, in2); - if ((bsi & 4) != 0) - mpz_neg (in3, in3); - - for (i = 0; i < numberof (dss); i++) - { - if (dss[i].isdivision && mpz_sgn (in2) == 0) - continue; - if (dss[i].isslow && size_range > 19) - continue; - - (dss[i].fptr) (ref1, in1, in2); - MPZ_CHECK_FORMAT (ref1); - - mpz_set (res1, in1); - INVOKE_RSS (dss[i], res1, res1, in2); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL (dss, i, in1, in2, NULL); - - mpz_set (res1, in2); - INVOKE_RSS (dss[i], res1, in1, res1); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL (dss, i, in1, in2, NULL); - } - - for (i = 0; i < numberof (ddss_div); i++) - { - if (mpz_sgn (in2) == 0) - continue; - - (ddss_div[i].fptr) (ref1, ref2, in1, in2); - MPZ_CHECK_FORMAT (ref1); - MPZ_CHECK_FORMAT (ref2); - - mpz_set (res1, in1); - INVOKE_RRSS (ddss_div[i], res1, res2, res1, in2); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0) - FAIL (ddss_div, i, in1, in2, NULL); - - mpz_set (res2, in1); - INVOKE_RRSS (ddss_div[i], res1, res2, res2, in2); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0) - FAIL (ddss_div, i, in1, in2, NULL); - - mpz_set (res1, in2); - INVOKE_RRSS (ddss_div[i], res1, res2, in1, res1); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0) - FAIL (ddss_div, i, in1, in2, NULL); - - mpz_set (res2, in2); - INVOKE_RRSS (ddss_div[i], res1, res2, in1, res2); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0) - FAIL (ddss_div, i, in1, in2, NULL); - } - - for (i = 0; i < numberof (ds); i++) - { - if (ds[i].nonneg && mpz_sgn (in1) < 0) - continue; - - (ds[i].fptr) (ref1, in1); - MPZ_CHECK_FORMAT (ref1); - - mpz_set (res1, in1); - INVOKE_RS (ds[i], res1, res1); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL (ds, i, in1, in2, NULL); - } - - in2i = mpz_get_ui (in2); - - for (i = 0; i < numberof (dsi); i++) - { - if (dsi[i].mod != 0) - in2i = mpz_get_ui (in2) % dsi[i].mod; - - (dsi[i].fptr) (ref1, in1, in2i); - MPZ_CHECK_FORMAT (ref1); - - mpz_set (res1, in1); - INVOKE_RRS (dsi[i], res1, res1, in2i); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL (dsi, i, in1, in2, NULL); - } - - if (in2i != 0) /* Don't divide by 0. */ - { - for (i = 0; i < numberof (dsi_div); i++) - { - r1 = (dsi_div[i].fptr) (ref1, in1, in2i); - MPZ_CHECK_FORMAT (ref1); - - mpz_set (res1, in1); - r2 = (dsi_div[i].fptr) (res1, res1, in2i); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0 || r1 != r2) - FAIL (dsi_div, i, in1, in2, NULL); - } - - for (i = 0; i < numberof (ddsi_div); i++) - { - r1 = (ddsi_div[i].fptr) (ref1, ref2, in1, in2i); - MPZ_CHECK_FORMAT (ref1); - - mpz_set (res1, in1); - r2 = (ddsi_div[i].fptr) (res1, res2, res1, in2i); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 || r1 != r2) - FAIL (ddsi_div, i, in1, in2, NULL); - - mpz_set (res2, in1); - (ddsi_div[i].fptr) (res1, res2, res2, in2i); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 || r1 != r2) - FAIL (ddsi_div, i, in1, in2, NULL); - } - } - - if (mpz_sgn (in1) >= 0) - { - mpz_sqrtrem (ref1, ref2, in1); - MPZ_CHECK_FORMAT (ref1); - MPZ_CHECK_FORMAT (ref2); - - mpz_set (res1, in1); - mpz_sqrtrem (res1, res2, res1); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0) - FAIL2 (mpz_sqrtrem, in1, NULL, NULL); - - mpz_set (res2, in1); - mpz_sqrtrem (res1, res2, res2); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0) - FAIL2 (mpz_sqrtrem, in1, NULL, NULL); - - mpz_set (res1, in1); - mpz_sqrtrem (res1, res1, res1); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref2, res1) != 0) - FAIL2 (mpz_sqrtrem, in1, NULL, NULL); - } - - if (mpz_sgn (in1) >= 0) - { - mpz_root (ref1, in1, in2i % 0x100 + 1); - MPZ_CHECK_FORMAT (ref1); - - mpz_set (res1, in1); - mpz_root (res1, res1, in2i % 0x100 + 1); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_root, in1, in2, NULL); - } - - if (mpz_sgn (in1) >= 0) - { - mpz_rootrem (ref1, ref2, in1, in2i % 0x100 + 1); - MPZ_CHECK_FORMAT (ref1); - MPZ_CHECK_FORMAT (ref2); - - mpz_set (res1, in1); - mpz_rootrem (res1, res2, res1, in2i % 0x100 + 1); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0) - FAIL2 (mpz_rootrem, in1, in2, NULL); - - mpz_set (res2, in1); - mpz_rootrem (res1, res2, res2, in2i % 0x100 + 1); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0) - FAIL2 (mpz_rootrem, in1, in2, NULL); - } - - if (size_range < 18) /* run fewer tests since gcdext is slow */ - { - mpz_gcdext (ref1, ref2, ref3, in1, in2); - MPZ_CHECK_FORMAT (ref1); - MPZ_CHECK_FORMAT (ref2); - MPZ_CHECK_FORMAT (ref3); - - mpz_set (res1, in1); - mpz_gcdext (res1, res2, res3, res1, in2); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - MPZ_CHECK_FORMAT (res3); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res2, in1); - mpz_gcdext (res1, res2, res3, res2, in2); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - MPZ_CHECK_FORMAT (res3); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res3, in1); - mpz_gcdext (res1, res2, res3, res3, in2); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - MPZ_CHECK_FORMAT (res3); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res1, in2); - mpz_gcdext (res1, res2, res3, in1, res1); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - MPZ_CHECK_FORMAT (res3); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res2, in2); - mpz_gcdext (res1, res2, res3, in1, res2); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - MPZ_CHECK_FORMAT (res3); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res3, in2); - mpz_gcdext (res1, res2, res3, in1, res3); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - MPZ_CHECK_FORMAT (res3); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res1, in1); - mpz_gcdext (res1, res2, NULL, res1, in2); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res2, in1); - mpz_gcdext (res1, res2, NULL, res2, in2); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res1, in2); - mpz_gcdext (res1, res2, NULL, in1, res1); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - - mpz_set (res2, in2); - mpz_gcdext (res1, res2, NULL, in1, res2); - MPZ_CHECK_FORMAT (res1); - MPZ_CHECK_FORMAT (res2); - if (mpz_cmp (ref1, res1) != 0 || mpz_cmp (ref2, res2) != 0 - || mpz_cmp (ref3, res3) != 0) - FAIL2 (mpz_gcdext, in1, in2, NULL); - } - - /* Don't run mpz_powm for huge exponents or when undefined. */ - if (size_range < 17 && mpz_sizeinbase (in2, 2) < 250 && mpz_sgn (in3) != 0 - && (mpz_sgn (in2) >= 0 || mpz_invert (t, in1, in3))) - { - mpz_powm (ref1, in1, in2, in3); - MPZ_CHECK_FORMAT (ref1); - - mpz_set (res1, in1); - mpz_powm (res1, res1, in2, in3); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_powm, in1, in2, in3); - - mpz_set (res1, in2); - mpz_powm (res1, in1, res1, in3); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_powm, in1, in2, in3); - - mpz_set (res1, in3); - mpz_powm (res1, in1, in2, res1); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_powm, in1, in2, in3); - } - - /* Don't run mpz_powm_ui when undefined. */ - if (size_range < 17 && mpz_sgn (in3) != 0) - { - mpz_powm_ui (ref1, in1, in2i, in3); - MPZ_CHECK_FORMAT (ref1); - - mpz_set (res1, in1); - mpz_powm_ui (res1, res1, in2i, in3); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_powm_ui, in1, in2, in3); - - mpz_set (res1, in3); - mpz_powm_ui (res1, in1, in2i, res1); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_powm_ui, in1, in2, in3); - } - - { - r1 = mpz_gcd_ui (ref1, in1, in2i); - MPZ_CHECK_FORMAT (ref1); - - mpz_set (res1, in1); - r2 = mpz_gcd_ui (res1, res1, in2i); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_gcd_ui, in1, in2, NULL); - } - - if (mpz_sgn (in2) != 0) - { - /* Test mpz_remove */ - mp_bitcnt_t refretval, retval; - refretval = mpz_remove (ref1, in1, in2); - MPZ_CHECK_FORMAT (ref1); - - mpz_set (res1, in1); - retval = mpz_remove (res1, res1, in2); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0 || refretval != retval) - FAIL2 (mpz_remove, in1, in2, NULL); - - mpz_set (res1, in2); - retval = mpz_remove (res1, in1, res1); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0 || refretval != retval) - FAIL2 (mpz_remove, in1, in2, NULL); - } - - if (mpz_sgn (in2) != 0) - { - /* Test mpz_divexact */ - mpz_mul (t, in1, in2); - mpz_divexact (ref1, t, in2); - MPZ_CHECK_FORMAT (ref1); - - mpz_set (res1, t); - mpz_divexact (res1, res1, in2); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_divexact, t, in2, NULL); - - mpz_set (res1, in2); - mpz_divexact (res1, t, res1); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_divexact, t, in2, NULL); - } - - if (mpz_sgn (in2) > 0) - { - /* Test mpz_divexact_gcd, same as mpz_divexact */ - mpz_mul (t, in1, in2); - mpz_divexact_gcd (ref1, t, in2); - MPZ_CHECK_FORMAT (ref1); - - mpz_set (res1, t); - mpz_divexact_gcd (res1, res1, in2); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_divexact_gcd, t, in2, NULL); - - mpz_set (res1, in2); - mpz_divexact_gcd (res1, t, res1); - MPZ_CHECK_FORMAT (res1); - if (mpz_cmp (ref1, res1) != 0) - FAIL2 (mpz_divexact_gcd, t, in2, NULL); - } - } - - if (isatty (fileno (stdout))) - printf ("\r%20s", ""); - - mpz_clear (bs); - mpz_clear (in1); - mpz_clear (in2); - mpz_clear (in3); - mpz_clear (ref1); - mpz_clear (ref2); - mpz_clear (ref3); - mpz_clear (res1); - mpz_clear (res2); - mpz_clear (res3); - mpz_clear (t); - - if (isatty (fileno (stdout))) - printf ("\r"); - - tests_end (); - exit (0); -} - -void -dump (const char *name, mpz_t in1, mpz_t in2, mpz_t in3) -{ - printf ("failure in %s (", name); - 0 && mpz_out_str (stdout, -16, in1); - if (in2 != NULL) - { - printf (" "); - 0 && mpz_out_str (stdout, -16, in2); - } - if (in3 != NULL) - { - printf (" "); - 0 && mpz_out_str (stdout, -16, in3); - } - printf (")\n"); -} - -#endif /* ! DLL_EXPORT */ diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-addsub.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-addsub.c deleted file mode 100644 index bf898411502..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-addsub.c +++ /dev/null @@ -1,122 +0,0 @@ -/* Test mpz_add, mpz_sub, mpz_add_ui, mpz_sub_ui, and mpz_ui_sub. - -Copyright 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" -#include "tests.h" - -void debug_mp (mpz_t, int); -void dump_abort (int, const char *, mpz_t, mpz_t); - -int -main (int argc, char **argv) -{ - mpz_t op1, op2, r1, r2; - mp_size_t op1n, op2n; - unsigned long int op2long; - int i; - int reps = 100000; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - - tests_start (); - rands = RANDS; - - mpz_init (bs); - - if (argc == 2) - reps = atoi (argv[1]); - - mpz_init (op1); - mpz_init (op2); - mpz_init (r1); - mpz_init (r2); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 10 + 2; - - mpz_urandomb (bs, rands, size_range); - op1n = mpz_get_ui (bs); - mpz_rrandomb (op1, rands, op1n); - - mpz_urandomb (bs, rands, size_range); - op2n = mpz_get_ui (bs); - mpz_rrandomb (op2, rands, op2n); - - mpz_urandomb (bs, rands, 2); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - mpz_neg (op1, op1); - if ((bsi & 2) != 0) - mpz_neg (op2, op2); - - /* printf ("%ld %ld\n", SIZ (multiplier), SIZ (multiplicand)); */ - - mpz_add (r1, op1, op2); - mpz_sub (r2, r1, op2); - if (mpz_cmp (r2, op1) != 0) - dump_abort (i, "mpz_add or mpz_sub incorrect", op1, op2); - - if (mpz_fits_ulong_p (op2)) - { - op2long = mpz_get_ui (op2); - mpz_add_ui (r1, op1, op2long); - mpz_sub_ui (r2, r1, op2long); - if (mpz_cmp (r2, op1) != 0) - dump_abort (i, "mpz_add_ui or mpz_sub_ui incorrect", op1, op2); - - mpz_ui_sub (r1, op2long, op1); - mpz_sub_ui (r2, op1, op2long); - mpz_neg (r2, r2); - if (mpz_cmp (r1, r2) != 0) - dump_abort (i, "mpz_add_ui or mpz_ui_sub incorrect", op1, op2); - } - } - - mpz_clear (bs); - mpz_clear (op1); - mpz_clear (op2); - mpz_clear (r1); - mpz_clear (r2); - - tests_end (); - exit (0); -} - -void -dump_abort (int i, const char *s, mpz_t op1, mpz_t op2) -{ - fprintf (stderr, "ERROR: %s in test %d\n", s, i); - fprintf (stderr, "op1 = "); debug_mp (op1, -16); - fprintf (stderr, "op2 = "); debug_mp (op2, -16); - abort(); -} - -void -debug_mp (mpz_t x, int base) -{ - mpz_out_str (stderr, base, x); fputc ('\n', stderr); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-aorsmul.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-aorsmul.c deleted file mode 100644 index 918725fdcb1..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-aorsmul.c +++ /dev/null @@ -1,422 +0,0 @@ -/* Test mpz_addmul, mpz_addmul_ui, mpz_submul, mpz_submul_ui. - -Copyright 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -#define M GMP_NUMB_MAX - - -void -check_one_inplace (mpz_srcptr w, mpz_srcptr y) -{ - mpz_t want, got; - - mpz_init (want); - mpz_init (got); - - mpz_mul (want, w, y); - mpz_add (want, w, want); - mpz_set (got, w); - mpz_addmul (got, got, y); - MPZ_CHECK_FORMAT (got); - if (mpz_cmp (want, got) != 0) - { - printf ("mpz_addmul inplace fail\n"); - fail: - mpz_trace ("w", w); - mpz_trace ("y", y); - mpz_trace ("want", want); - mpz_trace ("got ", got); - abort (); - } - - mpz_mul (want, w, y); - mpz_sub (want, w, want); - mpz_set (got, w); - mpz_submul (got, got, y); - MPZ_CHECK_FORMAT (got); - if (mpz_cmp (want, got) != 0) - { - printf ("mpz_submul inplace fail\n"); - goto fail; - } - - mpz_clear (want); - mpz_clear (got); -} - -void -check_one_ui_inplace (mpz_ptr w, unsigned long y) -{ - mpz_t want, got; - - mpz_init (want); - mpz_init (got); - - mpz_mul_ui (want, w, (unsigned long) y); - mpz_add (want, w, want); - mpz_set (got, w); - mpz_addmul_ui (got, got, (unsigned long) y); - MPZ_CHECK_FORMAT (got); - if (mpz_cmp (want, got) != 0) - { - printf ("mpz_addmul_ui fail\n"); - fail: - mpz_trace ("w", w); - printf ("y=0x%lX %lu\n", y, y); - mpz_trace ("want", want); - mpz_trace ("got ", got); - abort (); - } - - mpz_mul_ui (want, w, y); - mpz_sub (want, w, want); - mpz_set (got, w); - mpz_submul_ui (got, got, y); - MPZ_CHECK_FORMAT (got); - if (mpz_cmp (want, got) != 0) - { - printf ("mpz_submul_ui fail\n"); - goto fail; - } - - mpz_clear (want); - mpz_clear (got); -} - -void -check_all_inplace (mpz_ptr w, mpz_ptr y) -{ - int wneg, yneg; - - MPZ_CHECK_FORMAT (w); - MPZ_CHECK_FORMAT (y); - - for (wneg = 0; wneg < 2; wneg++) - { - for (yneg = 0; yneg < 2; yneg++) - { - check_one_inplace (w, y); - - if (mpz_fits_ulong_p (y)) - check_one_ui_inplace (w, mpz_get_ui (y)); - - mpz_neg (y, y); - } - mpz_neg (w, w); - } -} - -void -check_one (mpz_srcptr w, mpz_srcptr x, mpz_srcptr y) -{ - mpz_t want, got; - - mpz_init (want); - mpz_init (got); - - mpz_mul (want, x, y); - mpz_add (want, w, want); - mpz_set (got, w); - mpz_addmul (got, x, y); - MPZ_CHECK_FORMAT (got); - if (mpz_cmp (want, got) != 0) - { - printf ("mpz_addmul fail\n"); - fail: - mpz_trace ("w", w); - mpz_trace ("x", x); - mpz_trace ("y", y); - mpz_trace ("want", want); - mpz_trace ("got ", got); - abort (); - } - - mpz_mul (want, x, y); - mpz_sub (want, w, want); - mpz_set (got, w); - mpz_submul (got, x, y); - MPZ_CHECK_FORMAT (got); - if (mpz_cmp (want, got) != 0) - { - printf ("mpz_submul fail\n"); - goto fail; - } - - mpz_clear (want); - mpz_clear (got); -} - -void -check_one_ui (mpz_ptr w, mpz_ptr x, unsigned long y) -{ - mpz_t want, got; - - mpz_init (want); - mpz_init (got); - - mpz_mul_ui (want, x, (unsigned long) y); - mpz_add (want, w, want); - mpz_set (got, w); - mpz_addmul_ui (got, x, (unsigned long) y); - MPZ_CHECK_FORMAT (got); - if (mpz_cmp (want, got) != 0) - { - printf ("mpz_addmul_ui fail\n"); - fail: - mpz_trace ("w", w); - mpz_trace ("x", x); - printf ("y=0x%lX %lu\n", y, y); - mpz_trace ("want", want); - mpz_trace ("got ", got); - abort (); - } - - mpz_mul_ui (want, x, y); - mpz_sub (want, w, want); - mpz_set (got, w); - mpz_submul_ui (got, x, y); - MPZ_CHECK_FORMAT (got); - if (mpz_cmp (want, got) != 0) - { - printf ("mpz_submul_ui fail\n"); - goto fail; - } - - mpz_clear (want); - mpz_clear (got); -} - - -void -check_all (mpz_ptr w, mpz_ptr x, mpz_ptr y) -{ - int swap, wneg, xneg, yneg; - - MPZ_CHECK_FORMAT (w); - MPZ_CHECK_FORMAT (x); - MPZ_CHECK_FORMAT (y); - - for (swap = 0; swap < 2; swap++) - { - for (wneg = 0; wneg < 2; wneg++) - { - for (xneg = 0; xneg < 2; xneg++) - { - for (yneg = 0; yneg < 2; yneg++) - { - check_one (w, x, y); - - if (mpz_fits_ulong_p (y)) - check_one_ui (w, x, mpz_get_ui (y)); - - mpz_neg (y, y); - } - mpz_neg (x, x); - } - mpz_neg (w, w); - } - mpz_swap (x, y); - } -} - -void -check_data_inplace_ui (void) -{ - static const struct { - mp_limb_t w[6]; - unsigned long y; - - } data[] = { - - { { 0 }, 0 }, - { { 0 }, 1 }, - { { 1 }, 1 }, - { { 2 }, 1 }, - - { { 123 }, 1 }, - { { 123 }, ULONG_MAX }, - { { M }, 1 }, - { { M }, ULONG_MAX }, - - { { 123, 456 }, 1 }, - { { M, M }, 1 }, - { { 123, 456 }, ULONG_MAX }, - { { M, M }, ULONG_MAX }, - - { { 123, 456, 789 }, 1 }, - { { M, M, M }, 1 }, - { { 123, 456, 789 }, ULONG_MAX }, - { { M, M, M }, ULONG_MAX }, - }; - - mpz_t w, y; - int i; - - mpz_init (w); - mpz_init (y); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_n (w, data[i].w, (mp_size_t) numberof(data[i].w)); - mpz_set_ui (y, data[i].y); - check_all_inplace (w, y); - } - - mpz_clear (w); - mpz_clear (y); -} - -void -check_data (void) -{ - static const struct { - mp_limb_t w[6]; - mp_limb_t x[6]; - mp_limb_t y[6]; - - } data[] = { - - /* reducing to zero */ - { { 1 }, { 1 }, { 1 } }, - { { 2 }, { 1 }, { 2 } }, - { { 0,1 }, { 0,1 }, { 1 } }, - - /* reducing to 1 */ - { { 0,1 }, { M }, { 1 } }, - { { 0,0,1 }, { M,M }, { 1 } }, - { { 0,0,0,1 }, { M,M,M }, { 1 } }, - { { 0,0,0,0,1 }, { M,M,M,M }, { 1 } }, - - /* reducing to -1 */ - { { M }, { 0,1 }, { 1 } }, - { { M,M }, { 0,0,1 }, { 1 } }, - { { M,M,M }, { 0,0,0,1 }, { 1 } }, - { { M,M,M,M }, { 0,0,0,0,1 }, { 1 } }, - - /* carry out of addmul */ - { { M }, { 1 }, { 1 } }, - { { M,M }, { 1 }, { 1 } }, - { { M,M,M }, { 1 }, { 1 } }, - - /* borrow from submul */ - { { 0,1 }, { 1 }, { 1 } }, - { { 0,0,1 }, { 1 }, { 1 } }, - { { 0,0,0,1 }, { 1 }, { 1 } }, - - /* borrow from submul */ - { { 0,0,1 }, { 0,1 }, { 1 } }, - { { 0,0,0,1 }, { 0,1 }, { 1 } }, - { { 0,0,0,0,1 }, { 0,1 }, { 1 } }, - - /* more borrow from submul */ - { { M }, { 0,1 }, { 1 } }, - { { M }, { 0,0,1 }, { 1 } }, - { { M }, { 0,0,0,1 }, { 1 } }, - { { M }, { 0,0,0,0,1 }, { 1 } }, - - /* big borrow from submul */ - { { 0,0,1 }, { M,M }, { M } }, - { { 0,0,0,1 }, { M,M }, { M } }, - { { 0,0,0,0,1 }, { M,M }, { M } }, - - /* small w */ - { { 0,1 }, { M,M }, { M } }, - { { 0,1 }, { M,M,M }, { M } }, - { { 0,1 }, { M,M,M,M }, { M } }, - { { 0,1 }, { M,M,M,M,M }, { M } }, - }; - - mpz_t w, x, y; - int i; - - mpz_init (w); - mpz_init (x); - mpz_init (y); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_n (w, data[i].w, (mp_size_t) numberof(data[i].w)); - mpz_set_n (x, data[i].x, (mp_size_t) numberof(data[i].x)); - mpz_set_n (y, data[i].y, (mp_size_t) numberof(data[i].y)); - check_all (w, x, y); - } - - mpz_clear (w); - mpz_clear (x); - mpz_clear (y); -} - - -void -check_random (int argc, char *argv[]) -{ - gmp_randstate_ptr rands = RANDS; - mpz_t w, x, y; - int i, reps = 2000; - - mpz_init (w); - mpz_init (x); - mpz_init (y); - - if (argc == 2) - reps = atoi (argv[1]); - - for (i = 0; i < reps; i++) - { - mpz_errandomb (w, rands, 5*GMP_LIMB_BITS); - mpz_errandomb (x, rands, 5*GMP_LIMB_BITS); - mpz_errandomb (y, rands, 5*GMP_LIMB_BITS); - check_all (w, x, y); - check_all_inplace (w, y); - - mpz_errandomb (w, rands, 5*GMP_LIMB_BITS); - mpz_errandomb (x, rands, 5*GMP_LIMB_BITS); - mpz_errandomb (y, rands, BITS_PER_ULONG); - check_all (w, x, y); - check_all_inplace (w, y); - } - - mpz_clear (w); - mpz_clear (x); - mpz_clear (y); -} - - -int -main (int argc, char *argv[]) -{ - tests_start (); - mp_trace_base = -16; - - check_data (); - check_data_inplace_ui (); - check_random (argc, argv); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-bin.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-bin.c deleted file mode 100644 index acce41df9ab..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-bin.c +++ /dev/null @@ -1,266 +0,0 @@ -/* Exercise mpz_bin_ui and mpz_bin_uiui. - -Copyright 2000, 2001, 2010, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -/* Default number of generated tests. */ -#define COUNT 700 - -void -try_mpz_bin_ui (mpz_srcptr want, mpz_srcptr n, unsigned long k) -{ - mpz_t got; - - mpz_init (got); - mpz_bin_ui (got, n, k); - MPZ_CHECK_FORMAT (got); - if (mpz_cmp (got, want) != 0) - { - printf ("mpz_bin_ui wrong\n"); - printf (" n="); mpz_out_str (stdout, 10, n); printf ("\n"); - printf (" k=%lu\n", k); - printf (" got="); mpz_out_str (stdout, 10, got); printf ("\n"); - printf (" want="); mpz_out_str (stdout, 10, want); printf ("\n"); - abort(); - } - mpz_clear (got); -} - - -void -try_mpz_bin_uiui (mpz_srcptr want, unsigned long n, unsigned long k) -{ - mpz_t got; - - mpz_init (got); - mpz_bin_uiui (got, n, k); - MPZ_CHECK_FORMAT (got); - if (mpz_cmp (got, want) != 0) - { - printf ("mpz_bin_uiui wrong\n"); - printf (" n=%lu\n", n); - printf (" k=%lu\n", k); - printf (" got="); mpz_out_str (stdout, 10, got); printf ("\n"); - printf (" want="); mpz_out_str (stdout, 10, want); printf ("\n"); - abort(); - } - mpz_clear (got); -} - - -void -samples (void) -{ - static const struct { - const char *n; - unsigned long k; - const char *want; - } data[] = { - - { "0", 123456, "0" }, - { "1", 543210, "0" }, - { "2", 123321, "0" }, - { "3", 234567, "0" }, - { "10", 23456, "0" }, - - /* negatives, using bin(-n,k)=bin(n+k-1,k) */ - { "-1", 0, "1" }, - { "-1", 1, "-1" }, - { "-1", 2, "1" }, - { "-1", 3, "-1" }, - { "-1", 4, "1" }, - - { "-2", 0, "1" }, - { "-2", 1, "-2" }, - { "-2", 2, "3" }, - { "-2", 3, "-4" }, - { "-2", 4, "5" }, - { "-2", 5, "-6" }, - { "-2", 6, "7" }, - - { "-3", 0, "1" }, - { "-3", 1, "-3" }, - { "-3", 2, "6" }, - { "-3", 3, "-10" }, - { "-3", 4, "15" }, - { "-3", 5, "-21" }, - { "-3", 6, "28" }, - - /* A few random values */ - { "41", 20, "269128937220" }, - { "62", 37, "147405545359541742" }, - { "50", 18, "18053528883775" }, - { "149", 21, "19332950844468483467894649" }, - }; - - mpz_t n, want; - int i; - - mpz_init (n); - mpz_init (want); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (n, data[i].n, 0); - mpz_set_str_or_abort (want, data[i].want, 0); - - try_mpz_bin_ui (want, n, data[i].k); - - if (mpz_fits_ulong_p (n)) - try_mpz_bin_uiui (want, mpz_get_ui (n), data[i].k); - } - - mpz_clear (n); - mpz_clear (want); -} - - -/* Test some bin(2k,k) cases. This produces some biggish numbers to - exercise the limb accumulating code. */ -void -twos (int count) -{ - mpz_t n, want; - unsigned long k; - - mpz_init (n); - mpz_init (want); - - mpz_set_ui (want, (unsigned long) 2); - for (k = 1; k < count; k++) - { - mpz_set_ui (n, 2*k); - try_mpz_bin_ui (want, n, k); - - try_mpz_bin_uiui (want, 2*k, k); - - mpz_mul_ui (want, want, 2*(2*k+1)); - mpz_fdiv_q_ui (want, want, k+1); - } - - mpz_clear (n); - mpz_clear (want); -} - -/* Test some random bin(n,k) cases. This produces some biggish - numbers to exercise the limb accumulating code. */ -void -randomwalk (int count) -{ - mpz_t n_z, want; - unsigned long n, k, i, r; - int tests; - gmp_randstate_ptr rands; - - rands = RANDS; - mpz_init (n_z); - mpz_init (want); - - k = 3; - n = 12; - mpz_set_ui (want, (unsigned long) 220); /* binomial(12,3) = 220 */ - - for (tests = 1; tests < count; tests++) - { - r = gmp_urandomm_ui (rands, 62) + 1; - for (i = r & 7; i > 0; i--) - { - n++; k++; - mpz_mul_ui (want, want, n); - mpz_fdiv_q_ui (want, want, k); - } - for (i = r >> 3; i > 0; i--) - { - n++; - mpz_mul_ui (want, want, n); - mpz_fdiv_q_ui (want, want, n - k); - } - - mpz_set_ui (n_z, n); - try_mpz_bin_ui (want, n_z, k); - - try_mpz_bin_uiui (want, n, k); - } - - mpz_clear (n_z); - mpz_clear (want); -} - - -/* Test all bin(n,k) cases, with 0 <= k <= n + 1 <= count. */ -void -smallexaustive (unsigned int count) -{ - mpz_t n_z, want; - unsigned long n, k; - - mpz_init (n_z); - mpz_init (want); - - for (n = 0; n < count; n++) - { - mpz_set_ui (want, (unsigned long) 1); - mpz_set_ui (n_z, n); - for (k = 0; k <= n; k++) - { - try_mpz_bin_ui (want, n_z, k); - try_mpz_bin_uiui (want, n, k); - mpz_mul_ui (want, want, n - k); - mpz_fdiv_q_ui (want, want, k + 1); - } - try_mpz_bin_ui (want, n_z, k); - try_mpz_bin_uiui (want, n, k); - } - - mpz_clear (n_z); - mpz_clear (want); -} - -int -main (int argc, char **argv) -{ - int count; - - if (argc > 1) - { - char *end; - count = strtol (argv[1], &end, 0); - if (*end || count <= 0) - { - fprintf (stderr, "Invalid test count: %s.\n", argv[1]); - return 1; - } - } - else - count = COUNT; - - tests_start (); - - samples (); - smallexaustive (count >> 4); - twos (count >> 1); - randomwalk (count - (count >> 1)); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cdiv_ui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cdiv_ui.c deleted file mode 100644 index 39735a92e92..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cdiv_ui.c +++ /dev/null @@ -1,159 +0,0 @@ -/* Test mpz_abs, mpz_add, mpz_cmp, mpz_cmp_ui, mpz_cdiv_qr_ui, mpz_cdiv_q_ui, - mpz_cdiv_r_ui, , mpz_cdiv_ui, mpz_mul_ui. - -Copyright 1993, 1994, 1996, 2000-2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void dump_abort (const char *, mpz_t, unsigned long); -void debug_mp (mpz_t, int); - -int -main (int argc, char **argv) -{ - mpz_t dividend; - mpz_t quotient, remainder; - mpz_t quotient2, remainder2; - mpz_t temp; - mp_size_t dividend_size; - unsigned long divisor; - int i; - int reps = 10000; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - unsigned long r_rq, r_q, r_r, r; - - tests_start (); - rands = RANDS; - - mpz_init (bs); - - if (argc == 2) - reps = atoi (argv[1]); - - mpz_init (dividend); - mpz_init (quotient); - mpz_init (remainder); - mpz_init (quotient2); - mpz_init (remainder2); - mpz_init (temp); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 10 + 2; /* 0..2047 bit operands */ - - do - { - mpz_rrandomb (bs, rands, 64); - divisor = mpz_get_ui (bs); - } - while (divisor == 0); - - mpz_urandomb (bs, rands, size_range); - dividend_size = mpz_get_ui (bs); - mpz_rrandomb (dividend, rands, dividend_size); - - mpz_urandomb (bs, rands, 2); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - mpz_neg (dividend, dividend); - - /* printf ("%ld\n", SIZ (dividend)); */ - - r_rq = mpz_cdiv_qr_ui (quotient, remainder, dividend, divisor); - r_q = mpz_cdiv_q_ui (quotient2, dividend, divisor); - r_r = mpz_cdiv_r_ui (remainder2, dividend, divisor); - r = mpz_cdiv_ui (dividend, divisor); - - /* First determine that the quotients and remainders computed - with different functions are equal. */ - if (mpz_cmp (quotient, quotient2) != 0) - dump_abort ("quotients from mpz_cdiv_qr_ui and mpz_cdiv_q_ui differ", - dividend, divisor); - if (mpz_cmp (remainder, remainder2) != 0) - dump_abort ("remainders from mpz_cdiv_qr_ui and mpz_cdiv_r_ui differ", - dividend, divisor); - - /* Check if the sign of the quotient is correct. */ - if (mpz_cmp_ui (quotient, 0) != 0) - if ((mpz_cmp_ui (quotient, 0) < 0) - != (mpz_cmp_ui (dividend, 0) < 0)) - dump_abort ("quotient sign wrong", dividend, divisor); - - /* Check if the remainder has the opposite sign as the (positive) divisor - (quotient rounded towards minus infinity). */ - if (mpz_cmp_ui (remainder, 0) != 0) - if (mpz_cmp_ui (remainder, 0) > 0) - dump_abort ("remainder sign wrong", dividend, divisor); - - mpz_mul_ui (temp, quotient, divisor); - mpz_add (temp, temp, remainder); - if (mpz_cmp (temp, dividend) != 0) - dump_abort ("n mod d != n - [n/d]*d", dividend, divisor); - - mpz_abs (remainder, remainder); - if (mpz_cmp_ui (remainder, divisor) >= 0) - dump_abort ("remainder greater than divisor", dividend, divisor); - - if (mpz_cmp_ui (remainder, r_rq) != 0) - dump_abort ("remainder returned from mpz_cdiv_qr_ui is wrong", - dividend, divisor); - if (mpz_cmp_ui (remainder, r_q) != 0) - dump_abort ("remainder returned from mpz_cdiv_q_ui is wrong", - dividend, divisor); - if (mpz_cmp_ui (remainder, r_r) != 0) - dump_abort ("remainder returned from mpz_cdiv_r_ui is wrong", - dividend, divisor); - if (mpz_cmp_ui (remainder, r) != 0) - dump_abort ("remainder returned from mpz_cdiv_ui is wrong", - dividend, divisor); - } - - mpz_clear (bs); - mpz_clear (dividend); - mpz_clear (quotient); - mpz_clear (remainder); - mpz_clear (quotient2); - mpz_clear (remainder2); - mpz_clear (temp); - - tests_end (); - exit (0); -} - -void -dump_abort (const char *str, mpz_t dividend, unsigned long divisor) -{ - fprintf (stderr, "ERROR: %s\n", str); - fprintf (stderr, "dividend = "); debug_mp (dividend, -16); - fprintf (stderr, "divisor = %lX\n", divisor); - abort(); -} - -void -debug_mp (mpz_t x, int base) -{ - mpz_out_str (stderr, base, x); fputc ('\n', stderr); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cmp.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cmp.c deleted file mode 100644 index cf0474e7f1e..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cmp.c +++ /dev/null @@ -1,182 +0,0 @@ -/* Test mpz_cmp and mpz_cmpabs. - -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* Nothing sophisticated here, just exercise some combinations of sizes and - signs. */ - - -void -check_one (mpz_ptr x, mpz_ptr y, int want_cmp, int want_cmpabs) -{ - int got; - - got = mpz_cmp (x, y); - if (( got < 0) != (want_cmp < 0) - || (got == 0) != (want_cmp == 0) - || (got > 0) != (want_cmp > 0)) - { - printf ("mpz_cmp got %d want %d\n", got, want_cmp); - mpz_trace ("x", x); - mpz_trace ("y", y); - abort (); - } - - got = mpz_cmpabs (x, y); - if (( got < 0) != (want_cmpabs < 0) - || (got == 0) != (want_cmpabs == 0) - || (got > 0) != (want_cmpabs > 0)) - { - printf ("mpz_cmpabs got %d want %d\n", got, want_cmpabs); - mpz_trace ("x", x); - mpz_trace ("y", y); - abort (); - } -} - - -void -check_all (mpz_ptr x, mpz_ptr y, int want_cmp, int want_cmpabs) -{ - check_one (x, y, want_cmp, want_cmpabs); - check_one (y, x, -want_cmp, -want_cmpabs); - - mpz_neg (x, x); - mpz_neg (y, y); - want_cmp = -want_cmp; - - check_one (x, y, want_cmp, want_cmpabs); - check_one (y, x, -want_cmp, -want_cmpabs); -} - - -#define SET1(z,size, n) \ - SIZ(z) = size; PTR(z)[0] = n - -#define SET2(z,size, n1,n0) \ - SIZ(z) = size; PTR(z)[1] = n1; PTR(z)[0] = n0 - -#define SET4(z,size, n3,n2,n1,n0) \ - SIZ(z) = size; PTR(z)[3] = n3; PTR(z)[2] = n2; PTR(z)[1] = n1; PTR(z)[0] = n0 - -void -check_various (void) -{ - mpz_t x, y; - - mpz_init (x); - mpz_init (y); - - mpz_realloc (x, (mp_size_t) 20); - mpz_realloc (y, (mp_size_t) 20); - - /* 0 cmp 0, junk in low limbs */ - SET1 (x,0, 123); - SET1 (y,0, 456); - check_all (x, y, 0, 0); - - - /* 123 cmp 0 */ - SET1 (x,1, 123); - SET1 (y,0, 456); - check_all (x, y, 1, 1); - - /* 123:456 cmp 0 */ - SET2 (x,2, 456,123); - SET1 (y,0, 9999); - check_all (x, y, 1, 1); - - - /* 123 cmp 123 */ - SET1(x,1, 123); - SET1(y,1, 123); - check_all (x, y, 0, 0); - - /* -123 cmp 123 */ - SET1(x,-1, 123); - SET1(y,1, 123); - check_all (x, y, -1, 0); - - - /* 123 cmp 456 */ - SET1(x,1, 123); - SET1(y,1, 456); - check_all (x, y, -1, -1); - - /* -123 cmp 456 */ - SET1(x,-1, 123); - SET1(y,1, 456); - check_all (x, y, -1, -1); - - /* 123 cmp -456 */ - SET1(x,1, 123); - SET1(y,-1, 456); - check_all (x, y, 1, -1); - - - /* 1:0 cmp 1:0 */ - SET2 (x,2, 1,0); - SET2 (y,2, 1,0); - check_all (x, y, 0, 0); - - /* -1:0 cmp 1:0 */ - SET2 (x,-2, 1,0); - SET2 (y,2, 1,0); - check_all (x, y, -1, 0); - - - /* 2:0 cmp 1:0 */ - SET2 (x,2, 2,0); - SET2 (y,2, 1,0); - check_all (x, y, 1, 1); - - - /* 4:3:2:1 cmp 2:1 */ - SET4 (x,4, 4,3,2,1); - SET2 (y,2, 2,1); - check_all (x, y, 1, 1); - - /* -4:3:2:1 cmp 2:1 */ - SET4 (x,-4, 4,3,2,1); - SET2 (y,2, 2,1); - check_all (x, y, -1, 1); - - - mpz_clear (x); - mpz_clear (y); -} - - -int -main (void) -{ - tests_start (); - mp_trace_base = -16; - - check_various (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cmp_d.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cmp_d.c deleted file mode 100644 index c9877fc521d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cmp_d.c +++ /dev/null @@ -1,293 +0,0 @@ -/* Test mpz_cmp_d and mpz_cmpabs_d. - -Copyright 2001-2003, 2005 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* FIXME: Not sure if the tests here are exhaustive. Ought to try to get - each possible exit from mpz_cmp_d (and mpz_cmpabs_d) exercised. */ - - -#define SGN(n) ((n) > 0 ? 1 : (n) < 0 ? -1 : 0) - - -void -check_one (const char *name, mpz_srcptr x, double y, int cmp, int cmpabs) -{ - int got; - - got = mpz_cmp_d (x, y); - if (SGN(got) != cmp) - { - int i; - printf ("mpz_cmp_d wrong (from %s)\n", name); - printf (" got %d\n", got); - printf (" want %d\n", cmp); - fail: - mpz_trace (" x", x); - printf (" y %g\n", y); - mp_trace_base=-16; - mpz_trace (" x", x); - printf (" y %g\n", y); - printf (" y"); - for (i = 0; i < sizeof(y); i++) - printf (" %02X", (unsigned) ((unsigned char *) &y)[i]); - printf ("\n"); - abort (); - } - - got = mpz_cmpabs_d (x, y); - if (SGN(got) != cmpabs) - { - printf ("mpz_cmpabs_d wrong\n"); - printf (" got %d\n", got); - printf (" want %d\n", cmpabs); - goto fail; - } -} - - -void -check_data (void) -{ - static const struct { - const char *x; - double y; - int cmp, cmpabs; - - } data[] = { - - { "0", 0.0, 0, 0 }, - - { "1", 0.0, 1, 1 }, - { "-1", 0.0, -1, 1 }, - - { "1", 0.5, 1, 1 }, - { "-1", -0.5, -1, 1 }, - - { "0", 1.0, -1, -1 }, - { "0", -1.0, 1, -1 }, - - { "0x1000000000000000000000000000000000000000000000000", 1.0, 1, 1 }, - { "-0x1000000000000000000000000000000000000000000000000", 1.0, -1, 1 }, - - { "0", 1e100, -1, -1 }, - { "0", -1e100, 1, -1 }, - - { "2", 1.5, 1, 1 }, - { "2", -1.5, 1, 1 }, - { "-2", 1.5, -1, 1 }, - { "-2", -1.5, -1, 1 }, - }; - - mpz_t x; - int i; - - mpz_init (x); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (x, data[i].x, 0); - check_one ("check_data", x, data[i].y, data[i].cmp, data[i].cmpabs); - } - - mpz_clear (x); -} - - -/* Equality of integers with up to 53 bits */ -void -check_onebits (void) -{ - mpz_t x, x2; - double y; - int i; - - mpz_init_set_ui (x, 0L); - mpz_init (x2); - - for (i = 0; i < 512; i++) - { - mpz_mul_2exp (x, x, 1); - mpz_add_ui (x, x, 1L); - - y = mpz_get_d (x); - mpz_set_d (x2, y); - - /* stop if any truncation is occurring */ - if (mpz_cmp (x, x2) != 0) - break; - - check_one ("check_onebits", x, y, 0, 0); - check_one ("check_onebits", x, -y, 1, 0); - mpz_neg (x, x); - check_one ("check_onebits", x, y, -1, 0); - check_one ("check_onebits", x, -y, 0, 0); - mpz_neg (x, x); - } - - mpz_clear (x); - mpz_clear (x2); -} - - -/* With the mpz differing by 1, in a limb position possibly below the double */ -void -check_low_z_one (void) -{ - mpz_t x; - double y; - unsigned long i; - - mpz_init (x); - - /* FIXME: It'd be better to base this on the float format. */ -#if defined (__vax) || defined (__vax__) -#define LIM 127 /* vax fp numbers have limited range */ -#else -#define LIM 512 -#endif - - for (i = 1; i < LIM; i++) - { - mpz_set_ui (x, 1L); - mpz_mul_2exp (x, x, i); - y = mpz_get_d (x); - - check_one ("check_low_z_one", x, y, 0, 0); - check_one ("check_low_z_one", x, -y, 1, 0); - mpz_neg (x, x); - check_one ("check_low_z_one", x, y, -1, 0); - check_one ("check_low_z_one", x, -y, 0, 0); - mpz_neg (x, x); - - mpz_sub_ui (x, x, 1); - - check_one ("check_low_z_one", x, y, -1, -1); - check_one ("check_low_z_one", x, -y, 1, -1); - mpz_neg (x, x); - check_one ("check_low_z_one", x, y, -1, -1); - check_one ("check_low_z_one", x, -y, 1, -1); - mpz_neg (x, x); - - mpz_add_ui (x, x, 2); - - check_one ("check_low_z_one", x, y, 1, 1); - check_one ("check_low_z_one", x, -y, 1, 1); - mpz_neg (x, x); - check_one ("check_low_z_one", x, y, -1, 1); - check_one ("check_low_z_one", x, -y, -1, 1); - mpz_neg (x, x); - } - - mpz_clear (x); -} - -/* Comparing 1 and 1+2^-n. "y" is volatile to make gcc store and fetch it, - which forces it to a 64-bit double, whereas on x86 it would otherwise - remain on the float stack as an 80-bit long double. */ -void -check_one_2exp (void) -{ - double e; - mpz_t x; - volatile double y; - int i; - - mpz_init (x); - - e = 1.0; - for (i = 0; i < 128; i++) - { - e /= 2.0; - y = 1.0 + e; - if (y == 1.0) - break; - - mpz_set_ui (x, 1L); - check_one ("check_one_2exp", x, y, -1, -1); - check_one ("check_one_2exp", x, -y, 1, -1); - - mpz_set_si (x, -1L); - check_one ("check_one_2exp", x, y, -1, -1); - check_one ("check_one_2exp", x, -y, 1, -1); - } - - mpz_clear (x); -} - -void -check_infinity (void) -{ - mpz_t x; - double y = tests_infinity_d (); - if (y == 0.0) - return; - - mpz_init (x); - - /* 0 cmp inf */ - mpz_set_ui (x, 0L); - check_one ("check_infinity", x, y, -1, -1); - check_one ("check_infinity", x, -y, 1, -1); - - /* 123 cmp inf */ - mpz_set_ui (x, 123L); - check_one ("check_infinity", x, y, -1, -1); - check_one ("check_infinity", x, -y, 1, -1); - - /* -123 cmp inf */ - mpz_set_si (x, -123L); - check_one ("check_infinity", x, y, -1, -1); - check_one ("check_infinity", x, -y, 1, -1); - - /* 2^5000 cmp inf */ - mpz_set_ui (x, 1L); - mpz_mul_2exp (x, x, 5000L); - check_one ("check_infinity", x, y, -1, -1); - check_one ("check_infinity", x, -y, 1, -1); - - /* -2^5000 cmp inf */ - mpz_neg (x, x); - check_one ("check_infinity", x, y, -1, -1); - check_one ("check_infinity", x, -y, 1, -1); - - mpz_clear (x); -} - -int -main (int argc, char *argv[]) -{ - tests_start (); - - check_data (); - check_onebits (); - check_low_z_one (); - check_one_2exp (); - check_infinity (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cmp_si.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cmp_si.c deleted file mode 100644 index 97fdbcaae3a..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cmp_si.c +++ /dev/null @@ -1,102 +0,0 @@ -/* Test mpz_cmp_si. - -Copyright 2000, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#define SGN(x) ((x) < 0 ? -1 : (x) == 0 ? 0 : 1) - -void -check_data (void) -{ - static const struct { - const char *a, *b; - int want; - } data[] = { - { "0", "1", -1 }, - { "0", "0", 0 }, - { "0", "-1", 1 }, - - { "1", "1", 0 }, - { "1", "0", 1 }, - { "1", "-1", 1 }, - - { "-1", "1", -1 }, - { "-1", "0", -1 }, - { "-1", "-1", 0 }, - - { "0", "-0x80000000", 1 }, - { "0x80000000", "-0x80000000", 1 }, - { "0x80000001", "-0x80000000", 1 }, - { "-0x80000000", "-0x80000000", 0 }, - { "-0x80000001", "-0x80000000", -1 }, - - { "0", "-0x8000000000000000", 1 }, - { "0x8000000000000000", "-0x8000000000000000", 1 }, - { "0x8000000000000001", "-0x8000000000000000", 1 }, - { "-0x8000000000000000", "-0x8000000000000000", 0 }, - { "-0x8000000000000001", "-0x8000000000000000", -1 }, - }; - - mpz_t a, bz; - long b; - int got; - int i; - - mpz_init (a); - mpz_init (bz); - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (a, data[i].a, 0); - mpz_set_str_or_abort (bz, data[i].b, 0); - - if (mpz_fits_slong_p (bz)) - { - b = mpz_get_si (bz); - got = mpz_cmp_si (a, b); - if (SGN (got) != data[i].want) - { - printf ("mpz_cmp_si wrong on data[%d]\n", i); - printf (" a="); mpz_out_str (stdout, 10, a); printf ("\n"); - printf (" b=%ld\n", b); - printf (" got=%d\n", got); - printf (" want=%d\n", data[i].want); - abort(); - } - } - } - - mpz_clear (a); - mpz_clear (bz); -} - - -int -main (void) -{ - tests_start (); - - check_data (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cong.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cong.c deleted file mode 100644 index 1227335ec56..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cong.c +++ /dev/null @@ -1,227 +0,0 @@ -/* test mpz_congruent_p and mpz_congruent_ui_p - -Copyright 2001, 2002, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_one (mpz_srcptr a, mpz_srcptr c, mpz_srcptr d, int want) -{ - int got; - int swap; - - for (swap = 0; swap <= 1; swap++) - { - got = (mpz_congruent_p (a, c, d) != 0); - if (want != got) - { - printf ("mpz_congruent_p wrong\n"); - printf (" expected %d got %d\n", want, got); - mpz_trace (" a", a); - mpz_trace (" c", c); - mpz_trace (" d", d); - mp_trace_base = -16; - mpz_trace (" a", a); - mpz_trace (" c", c); - mpz_trace (" d", d); - abort (); - } - - if (mpz_fits_ulong_p (c) && mpz_fits_ulong_p (d)) - { - unsigned long uc = mpz_get_ui (c); - unsigned long ud = mpz_get_ui (d); - got = (mpz_congruent_ui_p (a, uc, ud) != 0); - if (want != got) - { - printf ("mpz_congruent_ui_p wrong\n"); - printf (" expected %d got %d\n", want, got); - mpz_trace (" a", a); - printf (" c=%lu\n", uc); - printf (" d=%lu\n", ud); - mp_trace_base = -16; - mpz_trace (" a", a); - printf (" c=0x%lX\n", uc); - printf (" d=0x%lX\n", ud); - abort (); - } - } - - MPZ_SRCPTR_SWAP (a, c); - } -} - - -void -check_data (void) -{ - static const struct { - const char *a; - const char *c; - const char *d; - int want; - - } data[] = { - - /* strict equality mod 0 */ - { "0", "0", "0", 1 }, - { "11", "11", "0", 1 }, - { "3", "11", "0", 0 }, - - /* anything congruent mod 1 */ - { "0", "0", "1", 1 }, - { "1", "0", "1", 1 }, - { "0", "1", "1", 1 }, - { "123", "456", "1", 1 }, - { "0x123456789123456789", "0x987654321987654321", "1", 1 }, - - /* csize==1, dsize==2 changing to 1 after stripping 2s */ - { "0x3333333333333333", "0x33333333", - "0x180000000", 1 }, - { "0x33333333333333333333333333333333", "0x3333333333333333", - "0x18000000000000000", 1 }, - - /* another dsize==2 becoming 1, with opposite signs this time */ - { "0x444444441", - "-0x22222221F", - "0x333333330", 1 }, - { "0x44444444444444441", - "-0x2222222222222221F", - "0x33333333333333330", 1 }, - }; - - mpz_t a, c, d; - int i; - - mpz_init (a); - mpz_init (c); - mpz_init (d); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (a, data[i].a, 0); - mpz_set_str_or_abort (c, data[i].c, 0); - mpz_set_str_or_abort (d, data[i].d, 0); - check_one (a, c, d, data[i].want); - } - - mpz_clear (a); - mpz_clear (c); - mpz_clear (d); -} - - -void -check_random (int argc, char *argv[]) -{ - gmp_randstate_ptr rands = RANDS; - mpz_t a, c, d, ra, rc; - int i; - int want; - int reps = 10000; - mpz_t bs; - unsigned long size_range, size; - - if (argc >= 2) - reps = atoi (argv[1]); - - mpz_init (bs); - - mpz_init (a); - mpz_init (c); - mpz_init (d); - mpz_init (ra); - mpz_init (rc); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 16 + 1; /* 0..65536 bit operands */ - - mpz_urandomb (bs, rands, size_range); - size = mpz_get_ui (bs); - mpz_rrandomb (a, rands, size); - - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 16 + 1; /* 0..65536 bit operands */ - - mpz_urandomb (bs, rands, size_range); - size = mpz_get_ui (bs); - mpz_rrandomb (c, rands, size); - - do - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 16 + 1; /* 0..65536 bit operands */ - - mpz_urandomb (bs, rands, size_range); - size = mpz_get_ui (bs); - mpz_rrandomb (d, rands, size); - } - while (SIZ(d) == 0); - - mpz_negrandom (a, rands); - MPZ_CHECK_FORMAT (a); - mpz_negrandom (c, rands); - MPZ_CHECK_FORMAT (c); - mpz_negrandom (d, rands); - - mpz_fdiv_r (ra, a, d); - mpz_fdiv_r (rc, c, d); - - want = (mpz_cmp (ra, rc) == 0); - check_one (a, c, d, want); - - mpz_sub (ra, ra, rc); - mpz_sub (a, a, ra); - MPZ_CHECK_FORMAT (a); - check_one (a, c, d, 1); - - if (! mpz_pow2abs_p (d)) - { - refmpz_combit (a, urandom() % (8*GMP_LIMB_BITS)); - check_one (a, c, d, 0); - } - } - - mpz_clear (bs); - - mpz_clear (a); - mpz_clear (c); - mpz_clear (d); - mpz_clear (ra); - mpz_clear (rc); -} - - -int -main (int argc, char *argv[]) -{ - tests_start (); - - check_data (); - check_random (argc, argv); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cong_2exp.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cong_2exp.c deleted file mode 100644 index f222827e7b2..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-cong_2exp.c +++ /dev/null @@ -1,208 +0,0 @@ -/* test mpz_congruent_2exp_p */ - -/* -Copyright 2001, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_one (mpz_srcptr a, mpz_srcptr c, unsigned long d, int want) -{ - mpz_t diff, d2exp; - int got; - int swap; - - for (swap = 0; swap <= 1; swap++) - { - got = (mpz_congruent_2exp_p (a, c, d) != 0); - if (want != got) - { - mpz_init (diff); - mpz_init (d2exp); - - mpz_sub (diff, a, c); - mpz_set_ui (d2exp, 1L); - mpz_mul_2exp (d2exp, d2exp, d); - - printf ("mpz_congruent_2exp_p wrong\n"); - printf (" expected %d got %d\n", want, got); - mpz_trace (" a", a); - mpz_trace (" c", c); - mpz_trace (" a-c", diff); - mpz_trace (" 2^d", d2exp); - printf (" d=%lu\n", d); - - mp_trace_base = -16; - mpz_trace (" a", a); - mpz_trace (" c", c); - mpz_trace (" a-c", diff); - mpz_trace (" 2^d", d2exp); - printf (" d=0x%lX\n", d); - abort (); - } - - MPZ_SRCPTR_SWAP (a, c); - } -} - - -void -check_data (void) -{ - static const struct { - const char *a; - const char *c; - unsigned long d; - int want; - - } data[] = { - - /* anything is congruent mod 1 */ - { "0", "0", 0, 1 }, - { "1", "0", 0, 1 }, - { "0", "1", 0, 1 }, - { "123", "-456", 0, 1 }, - { "0x123456789123456789", "0x987654321987654321", 0, 1 }, - { "0xfffffffffffffffffffffffffffffff7", "-0x9", 129, 0 }, - { "0xfffffffffffffffffffffffffffffff6", "-0xa", 128, 1 }, - - }; - - mpz_t a, c; - int i; - - mpz_init (a); - mpz_init (c); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (a, data[i].a, 0); - mpz_set_str_or_abort (c, data[i].c, 0); - check_one (a, c, data[i].d, data[i].want); - } - - mpz_clear (a); - mpz_clear (c); -} - - -void -check_random (int reps) -{ - gmp_randstate_ptr rands = RANDS; - unsigned long d; - mpz_t a, c, ra, rc; - int i; - - mpz_init (a); - mpz_init (c); - mpz_init (ra); - mpz_init (rc); - - for (i = 0; i < reps; i++) - { - mpz_errandomb (a, rands, 8*GMP_LIMB_BITS); - mpz_errandomb (c, rands, 8*GMP_LIMB_BITS); - d = urandom() % (8*GMP_LIMB_BITS); - - mpz_mul_2exp (a, a, urandom() % (2*GMP_LIMB_BITS)); - mpz_mul_2exp (c, c, urandom() % (2*GMP_LIMB_BITS)); - - mpz_negrandom (a, rands); - mpz_negrandom (c, rands); - - mpz_fdiv_r_2exp (ra, a, d); - mpz_fdiv_r_2exp (rc, c, d); - - mpz_sub (ra, ra, rc); - if (mpz_cmp_ui (ra, 0) != 0) - { - check_one (a, c, d, 0); - mpz_sub (a, a, ra); - } - check_one (a, c, d, 1); - if (d != 0) - { - mpz_combit (a, urandom() % d); - check_one (a, c, d, 0); - } - } - - mpz_clear (a); - mpz_clear (c); - mpz_clear (ra); - mpz_clear (rc); -} - -void -check_random_bits (int reps) -{ - mp_bitcnt_t ea, ec, en, d; - mp_bitcnt_t m = 10 * GMP_LIMB_BITS; - mpz_t a, c; - int i; - - mpz_init2 (a, m + 1); - mpz_init2 (c, m); - - for (i = 0; i < reps; i++) - { - d = urandom() % m; - ea = urandom() % m; - ec = urandom() % m; - en = urandom() % m; - - mpz_set_ui (c, 0); - mpz_setbit (c, en); - - mpz_set_ui (a, 0); - mpz_setbit (a, ec); - mpz_sub (c , a, c); - - mpz_set_ui (a, 0); - mpz_setbit (a, ea); - mpz_add (a , a, c); - - check_one (a, c, d, ea >= d); - } - - mpz_clear (a); - mpz_clear (c); -} - - -int -main (int argc, char *argv[]) -{ - int reps = 5000; - - tests_start (); - TESTS_REPS (reps, argv, argc); - - check_data (); - check_random (reps); - check_random_bits (reps); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-div_2exp.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-div_2exp.c deleted file mode 100644 index 1620698b12d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-div_2exp.c +++ /dev/null @@ -1,224 +0,0 @@ -/* Test mpz_[cft]div_[qr]_2exp. - -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* If the remainder is in the correct range and q*d+r is correct, then q - must have rounded correctly. */ - -void -check_one (mpz_srcptr a, unsigned long d) -{ - mpz_t q, r, p, d2exp; - int inplace; - - mpz_init (d2exp); - mpz_init (q); - mpz_init (r); - mpz_init (p); - - mpz_set_ui (d2exp, 1L); - mpz_mul_2exp (d2exp, d2exp, d); - -#define INPLACE(fun,dst,src,d) \ - if (inplace) \ - { \ - mpz_set (dst, src); \ - fun (dst, dst, d); \ - } \ - else \ - fun (dst, src, d); - - for (inplace = 0; inplace <= 1; inplace++) - { - INPLACE (mpz_fdiv_q_2exp, q, a, d); - INPLACE (mpz_fdiv_r_2exp, r, a, d); - - mpz_mul_2exp (p, q, d); - mpz_add (p, p, r); - if (mpz_sgn (r) < 0 || mpz_cmp (r, d2exp) >= 0) - { - printf ("mpz_fdiv_r_2exp result out of range\n"); - goto error; - } - if (mpz_cmp (p, a) != 0) - { - printf ("mpz_fdiv_[qr]_2exp doesn't multiply back\n"); - goto error; - } - - - INPLACE (mpz_cdiv_q_2exp, q, a, d); - INPLACE (mpz_cdiv_r_2exp, r, a, d); - - mpz_mul_2exp (p, q, d); - mpz_add (p, p, r); - if (mpz_sgn (r) > 0 || mpz_cmpabs (r, d2exp) >= 0) - { - printf ("mpz_cdiv_r_2exp result out of range\n"); - goto error; - } - if (mpz_cmp (p, a) != 0) - { - printf ("mpz_cdiv_[qr]_2exp doesn't multiply back\n"); - goto error; - } - - - INPLACE (mpz_tdiv_q_2exp, q, a, d); - INPLACE (mpz_tdiv_r_2exp, r, a, d); - - mpz_mul_2exp (p, q, d); - mpz_add (p, p, r); - if (mpz_sgn (r) != 0 && mpz_sgn (r) != mpz_sgn (a)) - { - printf ("mpz_tdiv_r_2exp result wrong sign\n"); - goto error; - } - if (mpz_cmpabs (r, d2exp) >= 0) - { - printf ("mpz_tdiv_r_2exp result out of range\n"); - goto error; - } - if (mpz_cmp (p, a) != 0) - { - printf ("mpz_tdiv_[qr]_2exp doesn't multiply back\n"); - goto error; - } - } - - mpz_clear (d2exp); - mpz_clear (q); - mpz_clear (r); - mpz_clear (p); - return; - - - error: - mpz_trace ("a", a); - printf ("d=%lu\n", d); - mpz_trace ("q", q); - mpz_trace ("r", r); - mpz_trace ("p", p); - - mp_trace_base = -16; - mpz_trace ("a", a); - printf ("d=0x%lX\n", d); - mpz_trace ("q", q); - mpz_trace ("r", r); - mpz_trace ("p", p); - - abort (); -} - - -void -check_all (mpz_ptr a, unsigned long d) -{ - check_one (a, d); - mpz_neg (a, a); - check_one (a, d); -} - - -void -check_various (void) -{ - static const unsigned long table[] = { - 0, 1, 2, 3, 4, 5, - GMP_NUMB_BITS-1, GMP_NUMB_BITS, GMP_NUMB_BITS+1, - 2*GMP_NUMB_BITS-1, 2*GMP_NUMB_BITS, 2*GMP_NUMB_BITS+1, - 3*GMP_NUMB_BITS-1, 3*GMP_NUMB_BITS, 3*GMP_NUMB_BITS+1, - 4*GMP_NUMB_BITS-1, 4*GMP_NUMB_BITS, 4*GMP_NUMB_BITS+1 - }; - - int i, j; - unsigned long n, d; - mpz_t a; - - mpz_init (a); - - /* a==0, and various d */ - mpz_set_ui (a, 0L); - for (i = 0; i < numberof (table); i++) - check_one (a, table[i]); - - /* a==2^n, and various d */ - for (i = 0; i < numberof (table); i++) - { - n = table[i]; - mpz_set_ui (a, 1L); - mpz_mul_2exp (a, a, n); - - for (j = 0; j < numberof (table); j++) - { - d = table[j]; - check_all (a, d); - } - } - - mpz_clear (a); -} - - -void -check_random (int argc, char *argv[]) -{ - gmp_randstate_ptr rands = RANDS; - int reps = 100; - mpz_t a; - unsigned long d; - int i; - - if (argc == 2) - reps = atoi (argv[1]); - - mpz_init (a); - - for (i = 0; i < reps; i++) - { - /* exponentially within 2 to 257 bits */ - mpz_erandomb (a, rands, urandom () % 8 + 2); - - d = urandom () % 256; - - check_all (a, d); - } - - mpz_clear (a); -} - - -int -main (int argc, char *argv[]) -{ - tests_start (); - - check_various (); - check_random (argc, argv); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-divis.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-divis.c deleted file mode 100644 index fdfedc82b3e..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-divis.c +++ /dev/null @@ -1,168 +0,0 @@ -/* test mpz_divisible_p and mpz_divisible_ui_p - -Copyright 2001, 2009 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_one (mpz_srcptr a, mpz_srcptr d, int want) -{ - int got; - - if (mpz_fits_ulong_p (d)) - { - unsigned long u = mpz_get_ui (d); - got = (mpz_divisible_ui_p (a, u) != 0); - if (want != got) - { - printf ("mpz_divisible_ui_p wrong\n"); - printf (" expected %d got %d\n", want, got); - mpz_trace (" a", a); - printf (" d=%lu\n", u); - mp_trace_base = -16; - mpz_trace (" a", a); - printf (" d=0x%lX\n", u); - abort (); - } - } - - got = (mpz_divisible_p (a, d) != 0); - if (want != got) - { - printf ("mpz_divisible_p wrong\n"); - printf (" expected %d got %d\n", want, got); - mpz_trace (" a", a); - mpz_trace (" d", d); - mp_trace_base = -16; - mpz_trace (" a", a); - mpz_trace (" d", d); - abort (); - } -} - -void -check_data (void) -{ - static const struct { - const char *a; - const char *d; - int want; - - } data[] = { - - { "0", "0", 1 }, - { "17", "0", 0 }, - { "0", "1", 1 }, - { "123", "1", 1 }, - { "-123", "1", 1 }, - - { "0", "2", 1 }, - { "1", "2", 0 }, - { "2", "2", 1 }, - { "-2", "2", 1 }, - { "0x100000000000000000000000000000000", "2", 1 }, - { "0x100000000000000000000000000000001", "2", 0 }, - - { "0x3333333333333333", "3", 1 }, - { "0x3333333333333332", "3", 0 }, - { "0x33333333333333333333333333333333", "3", 1 }, - { "0x33333333333333333333333333333332", "3", 0 }, - - /* divisor changes from 2 to 1 limb after stripping 2s */ - { "0x3333333300000000", "0x180000000", 1 }, - { "0x33333333333333330000000000000000", "0x18000000000000000", 1 }, - { "0x133333333333333330000000000000000", "0x18000000000000000", 0 }, - }; - - mpz_t a, d; - int i; - - mpz_init (a); - mpz_init (d); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (a, data[i].a, 0); - mpz_set_str_or_abort (d, data[i].d, 0); - check_one (a, d, data[i].want); - } - - mpz_clear (a); - mpz_clear (d); -} - -void -check_random (int reps) -{ - gmp_randstate_ptr rands = RANDS; - mpz_t a, d, r; - int i; - int want; - - mpz_init (a); - mpz_init (d); - mpz_init (r); - - for (i = 0; i < reps; i++) - { - mpz_erandomb (a, rands, 1 << 19); - mpz_erandomb_nonzero (d, rands, 1 << 18); - - mpz_fdiv_r (r, a, d); - - want = (mpz_sgn (r) == 0); - check_one (a, d, want); - - mpz_sub (a, a, r); - check_one (a, d, 1); - - if (mpz_cmpabs_ui (d, 1L) == 0) - continue; - - mpz_add_ui (a, a, 1L); - check_one (a, d, 0); - } - - mpz_clear (a); - mpz_clear (d); - mpz_clear (r); -} - - -int -main (int argc, char *argv[]) -{ - int reps = 100; - - tests_start (); - - if (argc == 2) - reps = atoi (argv[1]); - - check_data (); - check_random (reps); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-divis_2exp.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-divis_2exp.c deleted file mode 100644 index ecd7440eaeb..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-divis_2exp.c +++ /dev/null @@ -1,133 +0,0 @@ -/* test mpz_divisible_2exp_p */ - -/* -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_one (mpz_srcptr a, unsigned long d, int want) -{ - int got; - - got = (mpz_divisible_2exp_p (a, d) != 0); - if (want != got) - { - printf ("mpz_divisible_2exp_p wrong\n"); - printf (" expected %d got %d\n", want, got); - mpz_trace (" a", a); - printf (" d=%lu\n", d); - mp_trace_base = -16; - mpz_trace (" a", a); - printf (" d=0x%lX\n", d); - abort (); - } -} - -void -check_data (void) -{ - static const struct { - const char *a; - unsigned long d; - int want; - - } data[] = { - - { "0", 0, 1 }, - { "0", 1, 1 }, - { "0", 2, 1 }, - { "0", 3, 1 }, - - { "1", 0, 1 }, - { "1", 1, 0 }, - { "1", 2, 0 }, - { "1", 3, 0 }, - { "1", 10000, 0 }, - - { "4", 0, 1 }, - { "4", 1, 1 }, - { "4", 2, 1 }, - { "4", 3, 0 }, - { "4", 4, 0 }, - { "4", 10000, 0 }, - - { "0x80000000", 31, 1 }, - { "0x80000000", 32, 0 }, - { "0x80000000", 64, 0 }, - - { "0x100000000", 32, 1 }, - { "0x100000000", 33, 0 }, - { "0x100000000", 64, 0 }, - - { "0x8000000000000000", 63, 1 }, - { "0x8000000000000000", 64, 0 }, - { "0x8000000000000000", 128, 0 }, - - { "0x10000000000000000", 64, 1 }, - { "0x10000000000000000", 65, 0 }, - { "0x10000000000000000", 128, 0 }, - { "0x10000000000000000", 256, 0 }, - - { "0x10000000000000000100000000", 32, 1 }, - { "0x10000000000000000100000000", 33, 0 }, - { "0x10000000000000000100000000", 64, 0 }, - - { "0x1000000000000000010000000000000000", 64, 1 }, - { "0x1000000000000000010000000000000000", 65, 0 }, - { "0x1000000000000000010000000000000000", 128, 0 }, - { "0x1000000000000000010000000000000000", 256, 0 }, - { "0x1000000000000000010000000000000000", 1024, 0 }, - - }; - - mpz_t a, d; - int i; - - mpz_init (a); - mpz_init (d); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (a, data[i].a, 0); - check_one (a, data[i].d, data[i].want); - - mpz_neg (a, a); - check_one (a, data[i].d, data[i].want); - } - - mpz_clear (a); - mpz_clear (d); -} - -int -main (int argc, char *argv[]) -{ - tests_start (); - - check_data (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-export.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-export.c deleted file mode 100644 index d07476486de..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-export.c +++ /dev/null @@ -1,206 +0,0 @@ -/* Test mpz_export. - -Copyright 2002, 2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_data (void) -{ - static const struct { - const char *src; - size_t want_count; - int order; - size_t size; - int endian; - int nail; - char want_data[64]; - - } data[] = { - - { "0", 0,1, 1,1, 0 }, - { "0", 0,1, 2,1, 0 }, - { "0", 0,1, 3,1, 0 }, - - { "0x12345678", 4,1, 1,1, 0, { '\022', '\064', '\126', '\170' } }, - { "0x12345678", 1,1, 4,1, 0, { '\022', '\064', '\126', '\170' } }, - { "0x12345678", 1,-1, 4,1, 0, { '\022', '\064', '\126', '\170' } }, - - { "0x12345678", 4,-1, 1,-1, 0, { '\170', '\126', '\064', '\022' } }, - { "0x12345678", 1,1, 4,-1, 0, { '\170', '\126', '\064', '\022' } }, - { "0x12345678", 1,-1, 4,-1, 0, { '\170', '\126', '\064', '\022' } }, - - { "0x15", 5,1, 1,1, 7, { '\001', '\000', '\001', '\000', '\001' } }, - - { "0x1FFFFFFFFFFF", 3,1, 2,1, 1, { - '\177','\377', '\177','\377', '\177','\377' } }, - { "0x1FFFFFFFFFFF", 3,1, 2,-1, 1, { - '\377','\177', '\377','\177', '\377','\177' } }, - { "0x7", 3,1, 2,1, 15, { - '\000','\001', '\000','\001', '\000','\001' } }, - { "0x7", 3,1, 2,-1, 15, { - '\001','\000', '\001','\000', '\001','\000' } }, - - { "0x24", 3,1, 2,1, 14, { '\000','\002', '\000','\001', '\000','\000' }}, - { "0x24", 3,1, 2,-1, 14, { '\002','\000', '\001','\000', '\000','\000' }}, - { "0x24", 3,-1, 2,-1, 14, { '\000','\000', '\001','\000', '\002','\000' }}, - { "0x24", 3,-1, 2,1, 14, { '\000','\000', '\000','\001', '\000','\002' }}, - - { "0x123456789ABC", 3,1, 2,1, 0, { - '\022','\064', '\126','\170', '\232','\274' } }, - { "0x123456789ABC", 3,-1, 2,1, 0, { - '\232','\274', '\126','\170', '\022','\064' } }, - { "0x123456789ABC", 3,1, 2,-1, 0, { - '\064','\022', '\170','\126', '\274','\232' } }, - { "0x123456789ABC", 3,-1, 2,-1, 0, { - '\274','\232', '\170','\126', '\064','\022' } }, - - { "0x112233445566778899AABBCC", 3,1, 4,1, 0, - { '\021','\042','\063','\104', - '\125','\146','\167','\210', - '\231','\252','\273','\314' } }, - { "0x112233445566778899AABBCC", 3,-1, 4,1, 0, - { '\231','\252','\273','\314', - '\125','\146','\167','\210', - '\021','\042','\063','\104' } }, - { "0x112233445566778899AABBCC", 3,1, 4,-1, 0, - { '\104','\063','\042','\021', - '\210','\167','\146','\125', - '\314','\273','\252','\231' } }, - { "0x112233445566778899AABBCC", 3,-1, 4,-1, 0, - { '\314','\273','\252','\231', - '\210','\167','\146','\125', - '\104','\063','\042','\021' } }, - - { "0x100120023003400450056006700780089009A00AB00BC00C", 3,1, 8,1, 0, - { '\020','\001','\040','\002','\060','\003','\100','\004', - '\120','\005','\140','\006','\160','\007','\200','\010', - '\220','\011','\240','\012','\260','\013','\300','\014' } }, - { "0x100120023003400450056006700780089009A00AB00BC00C", 3,-1, 8,1, 0, - { '\220','\011','\240','\012','\260','\013','\300','\014', - '\120','\005','\140','\006','\160','\007','\200','\010', - '\020','\001','\040','\002','\060','\003','\100','\004' } }, - { "0x100120023003400450056006700780089009A00AB00BC00C", 3,1, 8,-1, 0, - { '\004','\100','\003','\060','\002','\040','\001','\020', - '\010','\200','\007','\160','\006','\140','\005','\120', - '\014','\300','\013','\260','\012','\240','\011','\220' } }, - { "0x100120023003400450056006700780089009A00AB00BC00C", 3,-1, 8,-1, 0, - { '\014','\300','\013','\260','\012','\240','\011','\220', - '\010','\200','\007','\160','\006','\140','\005','\120', - '\004','\100','\003','\060','\002','\040','\001','\020' } }, - - { "0x155555555555555555555555", 3,1, 4,1, 1, - { '\125','\125','\125','\125', - '\052','\252','\252','\252', - '\125','\125','\125','\125' } }, - { "0x155555555555555555555555", 3,-1, 4,1, 1, - { '\125','\125','\125','\125', - '\052','\252','\252','\252', - '\125','\125','\125','\125' } }, - { "0x155555555555555555555555", 3,1, 4,-1, 1, - { '\125','\125','\125','\125', - '\252','\252','\252','\052', - '\125','\125','\125','\125' } }, - { "0x155555555555555555555555", 3,-1, 4,-1, 1, - { '\125','\125','\125','\125', - '\252','\252','\252','\052', - '\125','\125','\125','\125' } }, - }; - - char buf[sizeof(data[0].src) + sizeof (mp_limb_t) + 128]; - char *got_data; - void *ret; - size_t align, got_count, j; - int i, error = 0; - mpz_t src; - - mpz_init (src); - - for (i = 0; i < numberof (data); i++) - { - for (align = 0; align < sizeof (mp_limb_t); align++) - { - mpz_set_str_or_abort (src, data[i].src, 0); - MPZ_CHECK_FORMAT (src); - got_data = buf + align; - - ASSERT_ALWAYS (data[i].want_count * data[i].size + align - <= sizeof (buf)); - - memset (got_data, '\0', data[i].want_count * data[i].size); - ret = mpz_export (got_data, &got_count, data[i].order, - data[i].size, data[i].endian, data[i].nail, src); - - if (ret != got_data) - { - printf ("return doesn't equal given pointer\n"); - error = 1; - } - if (got_count != data[i].want_count) - { - printf ("wrong count\n"); - error = 1; - } - if (memcmp (got_data, data[i].want_data, got_count * data[i].size) != 0) - { - printf ("wrong result data\n"); - error = 1; - } - if (error) - { - printf (" at data[%d] align=%d\n", i, (int) align); - printf (" src \"%s\"\n", data[i].src); - mpz_trace (" src", src); - printf (" order=%d size=%lu endian=%d nail=%u\n", - data[i].order, - (unsigned long) data[i].size, data[i].endian, data[i].nail); - printf (" want count %lu\n", (unsigned long) data[i].want_count); - printf (" got count %lu\n", (unsigned long) got_count); - printf (" want"); - for (j = 0; j < data[i].want_count*data[i].size; j++) - printf (" 0x%02X,", (unsigned) (unsigned char) data[i].want_data[j]); - printf ("\n"); - printf (" got "); - for (j = 0; j < got_count*data[i].size; j++) - printf (" 0x%02X,", (unsigned) (unsigned char) got_data[j]); - printf ("\n"); - abort (); - } - } - } - mpz_clear (src); -} - - -int -main (void) -{ - tests_start (); - - mp_trace_base = -16; - check_data (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fac_ui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fac_ui.c deleted file mode 100644 index f45154f7758..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fac_ui.c +++ /dev/null @@ -1,109 +0,0 @@ -/* Exercise mpz_fac_ui and mpz_2fac_ui. - -Copyright 2000-2002, 2012, 2015 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* Usage: t-fac_ui [x|num] - - With no arguments testing goes up to the initial value of "limit" below. - With a number argument tests are carried that far, or with a literal "x" - tests are continued without limit (this being meant only for development - purposes). */ - - -int -main (int argc, char *argv[]) -{ - unsigned long n, m; - unsigned long limit = 2222; - mpz_t df[2], f, r; - - tests_start (); - - if (argc > 1 && argv[1][0] == 'x') - limit = ULONG_MAX; - else if (argc > 1) - limit = atoi (argv[1]); - - /* for small limb testing */ - limit = MIN (limit, MP_LIMB_T_MAX); - - mpz_init_set_ui (df[0], 1); /* 0!! = 1 */ - mpz_init_set_ui (df[1], 1); /* -1!! = 1 */ - mpz_init_set_ui (f, 1); /* 0! = 1 */ - mpz_init (r); - - for (n = 0, m = 0; n < limit; n++) - { - mpz_fac_ui (r, n); - MPZ_CHECK_FORMAT (r); - - if (mpz_cmp (f, r) != 0) - { - printf ("mpz_fac_ui(%lu) wrong\n", n); - printf (" got "); mpz_out_str (stdout, 10, r); printf("\n"); - printf (" want "); mpz_out_str (stdout, 10, f); printf("\n"); - abort (); - } - - mpz_2fac_ui (r, n); - MPZ_CHECK_FORMAT (r); - - if (mpz_cmp (df[m], r) != 0) - { - printf ("mpz_2fac_ui(%lu) wrong\n", n); - printf (" got "); mpz_out_str (stdout, 10, r); printf("\n"); - printf (" want "); mpz_out_str (stdout, 10, df[m]); printf("\n"); - abort (); - } - - m ^= 1; - mpz_mul_ui (df[m], df[m], n+1); /* (n+1)!! = (n-1)!! * (n+1) */ - mpz_mul_ui (f, f, n+1); /* (n+1)! = n! * (n+1) */ - } - - n = 2097169; /* a prime = 1 mod 4*/ - if (n / 2 > MP_LIMB_T_MAX) - n = 131041; /* a smaller prime :-) */ - mpz_fac_ui (f, n / 2); /* ((n-1)/2)! */ - m = mpz_fdiv_ui (f, n); /* ((n-1)/2)! mod n*/ - mpz_set_ui (f, m); - mpz_mul_ui (f, f, m); /* (((n-1)/2)!)^2 */ - m = mpz_fdiv_ui (f, n); /* (((n-1)/2)!)^2 mod n*/ - if ( m != n - 1) - { - printf ("mpz_fac_ui(%lu) wrong\n", n / 2); - printf (" al-Haytham's theorem not verified: got %lu, expected %lu.\n", m, n - 1); - abort (); - } - - mpz_clear (df[0]); - mpz_clear (df[1]); - mpz_clear (f); - mpz_clear (r); - - tests_end (); - - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fdiv.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fdiv.c deleted file mode 100644 index a616e5b101d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fdiv.c +++ /dev/null @@ -1,147 +0,0 @@ -/* Test mpz_abs, mpz_add, mpz_cmp, mpz_cmp_ui, mpz_fdiv_qr, mpz_fdiv_q, - mpz_fdiv_r, mpz_mul. - -Copyright 1993, 1994, 1996, 2000, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void dump_abort (mpz_t, mpz_t); -void debug_mp (mpz_t, int); - -int -main (int argc, char **argv) -{ - mpz_t dividend, divisor; - mpz_t quotient, remainder; - mpz_t quotient2, remainder2; - mpz_t temp; - mp_size_t dividend_size, divisor_size; - int i; - int reps = 1000; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - - tests_start (); - rands = RANDS; - - mpz_init (bs); - - if (argc == 2) - reps = atoi (argv[1]); - - mpz_init (dividend); - mpz_init (divisor); - mpz_init (quotient); - mpz_init (remainder); - mpz_init (quotient2); - mpz_init (remainder2); - mpz_init (temp); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 16 + 2; /* 0..131071 bit operands */ - - do - { - mpz_urandomb (bs, rands, size_range); - divisor_size = mpz_get_ui (bs); - mpz_rrandomb (divisor, rands, divisor_size); - } - while (mpz_sgn (divisor) == 0); - - mpz_urandomb (bs, rands, size_range); - dividend_size = mpz_get_ui (bs) + divisor_size; - mpz_rrandomb (dividend, rands, dividend_size); - - mpz_urandomb (bs, rands, 2); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - mpz_neg (dividend, dividend); - if ((bsi & 2) != 0) - mpz_neg (divisor, divisor); - - /* printf ("%ld %ld\n", SIZ (dividend), SIZ (divisor)); */ - - mpz_fdiv_qr (quotient, remainder, dividend, divisor); - mpz_fdiv_q (quotient2, dividend, divisor); - mpz_fdiv_r (remainder2, dividend, divisor); - - /* First determine that the quotients and remainders computed - with different functions are equal. */ - if (mpz_cmp (quotient, quotient2) != 0) - dump_abort (dividend, divisor); - if (mpz_cmp (remainder, remainder2) != 0) - dump_abort (dividend, divisor); - - /* Check if the sign of the quotient is correct. */ - if (mpz_cmp_ui (quotient, 0) != 0) - if ((mpz_cmp_ui (quotient, 0) < 0) - != ((mpz_cmp_ui (dividend, 0) ^ mpz_cmp_ui (divisor, 0)) < 0)) - dump_abort (dividend, divisor); - - /* Check if the remainder has the same sign as the divisor - (quotient rounded towards minus infinity). */ - if (mpz_cmp_ui (remainder, 0) != 0) - if ((mpz_cmp_ui (remainder, 0) < 0) != (mpz_cmp_ui (divisor, 0) < 0)) - dump_abort (dividend, divisor); - - mpz_mul (temp, quotient, divisor); - mpz_add (temp, temp, remainder); - if (mpz_cmp (temp, dividend) != 0) - dump_abort (dividend, divisor); - - mpz_abs (temp, divisor); - mpz_abs (remainder, remainder); - if (mpz_cmp (remainder, temp) >= 0) - dump_abort (dividend, divisor); - } - - mpz_clear (bs); - mpz_clear (dividend); - mpz_clear (divisor); - mpz_clear (quotient); - mpz_clear (remainder); - mpz_clear (quotient2); - mpz_clear (remainder2); - mpz_clear (temp); - - tests_end (); - exit (0); -} - -void -dump_abort (mpz_t dividend, mpz_t divisor) -{ - fprintf (stderr, "ERROR\n"); - fprintf (stderr, "dividend = "); debug_mp (dividend, -16); - fprintf (stderr, "divisor = "); debug_mp (divisor, -16); - abort(); -} - -void -debug_mp (mpz_t x, int base) -{ - mpz_out_str (stderr, base, x); fputc ('\n', stderr); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fdiv_ui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fdiv_ui.c deleted file mode 100644 index 031b519f8fe..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fdiv_ui.c +++ /dev/null @@ -1,159 +0,0 @@ -/* Test mpz_abs, mpz_add, mpz_cmp, mpz_cmp_ui, mpz_fdiv_qr_ui, mpz_fdiv_q_ui, - mpz_fdiv_r_ui, mpz_fdiv_ui, mpz_mul_ui. - -Copyright 1993, 1994, 1996, 2000-2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void dump_abort (const char *, mpz_t, unsigned long); -void debug_mp (mpz_t, int); - -int -main (int argc, char **argv) -{ - mpz_t dividend; - mpz_t quotient, remainder; - mpz_t quotient2, remainder2; - mpz_t temp; - mp_size_t dividend_size; - unsigned long divisor; - int i; - int reps = 10000; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - unsigned long r_rq, r_q, r_r, r; - - tests_start (); - rands = RANDS; - - mpz_init (bs); - - if (argc == 2) - reps = atoi (argv[1]); - - mpz_init (dividend); - mpz_init (quotient); - mpz_init (remainder); - mpz_init (quotient2); - mpz_init (remainder2); - mpz_init (temp); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 10 + 2; /* 0..2047 bit operands */ - - do - { - mpz_rrandomb (bs, rands, 64); - divisor = mpz_get_ui (bs); - } - while (divisor == 0); - - mpz_urandomb (bs, rands, size_range); - dividend_size = mpz_get_ui (bs); - mpz_rrandomb (dividend, rands, dividend_size); - - mpz_urandomb (bs, rands, 2); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - mpz_neg (dividend, dividend); - - /* printf ("%ld\n", SIZ (dividend)); */ - - r_rq = mpz_fdiv_qr_ui (quotient, remainder, dividend, divisor); - r_q = mpz_fdiv_q_ui (quotient2, dividend, divisor); - r_r = mpz_fdiv_r_ui (remainder2, dividend, divisor); - r = mpz_fdiv_ui (dividend, divisor); - - /* First determine that the quotients and remainders computed - with different functions are equal. */ - if (mpz_cmp (quotient, quotient2) != 0) - dump_abort ("quotients from mpz_fdiv_qr_ui and mpz_fdiv_q_ui differ", - dividend, divisor); - if (mpz_cmp (remainder, remainder2) != 0) - dump_abort ("remainders from mpz_fdiv_qr_ui and mpz_fdiv_r_ui differ", - dividend, divisor); - - /* Check if the sign of the quotient is correct. */ - if (mpz_cmp_ui (quotient, 0) != 0) - if ((mpz_cmp_ui (quotient, 0) < 0) - != (mpz_cmp_ui (dividend, 0) < 0)) - dump_abort ("quotient sign wrong", dividend, divisor); - - /* Check if the remainder has the same sign as the (positive) divisor - (quotient rounded towards minus infinity). */ - if (mpz_cmp_ui (remainder, 0) != 0) - if (mpz_cmp_ui (remainder, 0) < 0) - dump_abort ("remainder sign wrong", dividend, divisor); - - mpz_mul_ui (temp, quotient, divisor); - mpz_add (temp, temp, remainder); - if (mpz_cmp (temp, dividend) != 0) - dump_abort ("n mod d != n - [n/d]*d", dividend, divisor); - - mpz_abs (remainder, remainder); - if (mpz_cmp_ui (remainder, divisor) >= 0) - dump_abort ("remainder greater than divisor", dividend, divisor); - - if (mpz_cmp_ui (remainder, r_rq) != 0) - dump_abort ("remainder returned from mpz_fdiv_qr_ui is wrong", - dividend, divisor); - if (mpz_cmp_ui (remainder, r_q) != 0) - dump_abort ("remainder returned from mpz_fdiv_q_ui is wrong", - dividend, divisor); - if (mpz_cmp_ui (remainder, r_r) != 0) - dump_abort ("remainder returned from mpz_fdiv_r_ui is wrong", - dividend, divisor); - if (mpz_cmp_ui (remainder, r) != 0) - dump_abort ("remainder returned from mpz_fdiv_ui is wrong", - dividend, divisor); - } - - mpz_clear (bs); - mpz_clear (dividend); - mpz_clear (quotient); - mpz_clear (remainder); - mpz_clear (quotient2); - mpz_clear (remainder2); - mpz_clear (temp); - - tests_end (); - exit (0); -} - -void -dump_abort (const char *str, mpz_t dividend, unsigned long divisor) -{ - fprintf (stderr, "ERROR: %s\n", str); - fprintf (stderr, "dividend = "); debug_mp (dividend, -16); - fprintf (stderr, "divisor = %lX\n", divisor); - abort(); -} - -void -debug_mp (mpz_t x, int base) -{ - mpz_out_str (stderr, base, x); fputc ('\n', stderr); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fib_ui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fib_ui.c deleted file mode 100644 index a7425b5b896..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fib_ui.c +++ /dev/null @@ -1,156 +0,0 @@ -/* Test mpz_fib_ui and mpz_fib2_ui. - -Copyright 2000-2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* Usage: t-fib_ui [x|num] - - Run with no arguments, tests goes up to the initial value of "limit" - below. With a number argument tests are carried up that far, or with a - literal "x" tests are continued without limit (this being only meant for - development purposes). - - The size tests performed are designed to partially replicate what will be - going on in mpz_fib_ui. There's plenty of ASSERTs there, but of course - they're not normally enabled. - - Misfeatures: - - The tests on MPN_FIB2_SIZE are a bit useless, since that macro includes a - +2 for the internal purposes of mpn_fib2_ui. It's probably better to - give mpn_fib2_ui a run with assertion checking enabled. */ - - -#define MPZ_FIB_SIZE_FLOAT(n) \ - ((mp_size_t) ((n) * 0.6942419 / GMP_NUMB_BITS + 1)) - - -void -check_fib_table (void) -{ - int i; - mp_limb_t want; - - ASSERT_ALWAYS (FIB_TABLE(-1) == 1); - ASSERT_ALWAYS (FIB_TABLE(0) == 0); - - for (i = 1; i <= FIB_TABLE_LIMIT; i++) - { - want = FIB_TABLE(i-1) + FIB_TABLE(i-2); - if (FIB_TABLE(i) != want) - { - printf ("FIB_TABLE(%d) wrong\n", i); - gmp_printf (" got %#Nx\n", &FIB_TABLE(i), 1); - gmp_printf (" want %#Nx\n", &want, 1); - abort (); - } - } -} - - -int -main (int argc, char *argv[]) -{ - unsigned long n; - unsigned long limit = 100 * GMP_LIMB_BITS; - mpz_t want_fn, want_fn1, got_fn, got_fn1; - - tests_start (); - mp_trace_base = -16; - if (argc > 1 && argv[1][0] == 'x') - limit = ULONG_MAX; - else if (argc > 1) - limit = atoi (argv[1]); - - check_fib_table (); - - /* start at n==0 */ - mpz_init_set_ui (want_fn1, 1); /* F[-1] */ - mpz_init_set_ui (want_fn, 0); /* F[0] */ - mpz_init (got_fn); - mpz_init (got_fn1); - - for (n = 0; n < limit; n++) - { - /* check our float formula seems right */ - if (MPZ_FIB_SIZE_FLOAT (n) < SIZ(want_fn)) - { - printf ("MPZ_FIB_SIZE_FLOAT wrong at n=%lu\n", n); - printf (" MPZ_FIB_SIZE_FLOAT %ld\n", MPZ_FIB_SIZE_FLOAT (n)); - printf (" SIZ(want_fn) %d\n", SIZ(want_fn)); - abort (); - } - - /* check MPN_FIB2_SIZE seems right, compared to actual size and - compared to our float formula */ - if (MPN_FIB2_SIZE (n) < MPZ_FIB_SIZE_FLOAT (n)) - { - printf ("MPN_FIB2_SIZE wrong at n=%lu\n", n); - printf (" MPN_FIB2_SIZE %ld\n", MPN_FIB2_SIZE (n)); - printf (" MPZ_FIB_SIZE_FLOAT %ld\n", MPZ_FIB_SIZE_FLOAT (n)); - abort (); - } - if (MPN_FIB2_SIZE (n) < SIZ(want_fn)) - { - printf ("MPN_FIB2_SIZE wrong at n=%lu\n", n); - printf (" MPN_FIB2_SIZE %ld\n", MPN_FIB2_SIZE (n)); - printf (" SIZ(want_fn) %d\n", SIZ(want_fn)); - abort (); - } - - mpz_fib2_ui (got_fn, got_fn1, n); - MPZ_CHECK_FORMAT (got_fn); - MPZ_CHECK_FORMAT (got_fn1); - if (mpz_cmp (got_fn, want_fn) != 0 || mpz_cmp (got_fn1, want_fn1) != 0) - { - printf ("mpz_fib2_ui(%lu) wrong\n", n); - mpz_trace ("want fn ", want_fn); - mpz_trace ("got fn ", got_fn); - mpz_trace ("want fn1", want_fn1); - mpz_trace ("got fn1", got_fn1); - abort (); - } - - mpz_fib_ui (got_fn, n); - MPZ_CHECK_FORMAT (got_fn); - if (mpz_cmp (got_fn, want_fn) != 0) - { - printf ("mpz_fib_ui(%lu) wrong\n", n); - mpz_trace ("want fn", want_fn); - mpz_trace ("got fn", got_fn); - abort (); - } - - mpz_add (want_fn1, want_fn1, want_fn); /* F[n+1] = F[n] + F[n-1] */ - mpz_swap (want_fn1, want_fn); - } - - mpz_clear (want_fn); - mpz_clear (want_fn1); - mpz_clear (got_fn); - mpz_clear (got_fn1); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fits.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fits.c deleted file mode 100644 index 6b6de3b297e..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-fits.c +++ /dev/null @@ -1,198 +0,0 @@ -/* Test mpz_fits_*_p */ - -/* -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* Nothing sophisticated here, just exercise mpz_fits_*_p on a small amount - of data. */ - -#define EXPECT_S(fun,name,answer) \ - got = fun (z); \ - if (got != answer) \ - { \ - printf ("%s (%s) got %d want %d\n", name, expr, got, answer); \ - printf (" z size %d\n", SIZ(z)); \ - printf (" z dec "); mpz_out_str (stdout, 10, z); printf ("\n"); \ - printf (" z hex "); mpz_out_str (stdout, 16, z); printf ("\n"); \ - error = 1; \ - } - -#define EXPECT(fun,answer) EXPECT_S(fun,#fun,answer) - -int -main (void) -{ - mpz_t z; - int got; - const char *expr; - int error = 0; - - tests_start (); - mpz_init (z); - - mpz_set_ui (z, 0L); - expr = "0"; - EXPECT (mpz_fits_ulong_p, 1); - EXPECT (mpz_fits_uint_p, 1); - EXPECT (mpz_fits_ushort_p, 1); - EXPECT (mpz_fits_slong_p, 1); - EXPECT (mpz_fits_sint_p, 1); - EXPECT (mpz_fits_sshort_p, 1); - - mpz_set_ui (z, 1L); - expr = "1"; - EXPECT (mpz_fits_ulong_p, 1); - EXPECT (mpz_fits_uint_p, 1); - EXPECT (mpz_fits_ushort_p, 1); - EXPECT (mpz_fits_slong_p, 1); - EXPECT (mpz_fits_sint_p, 1); - EXPECT (mpz_fits_sshort_p, 1); - - mpz_set_si (z, -1L); - expr = "-1"; - EXPECT (mpz_fits_ulong_p, 0); - EXPECT (mpz_fits_uint_p, 0); - EXPECT (mpz_fits_ushort_p, 0); - EXPECT (mpz_fits_slong_p, 1); - EXPECT (mpz_fits_sint_p, 1); - EXPECT (mpz_fits_sshort_p, 1); - - mpz_set_ui (z, 1L); - mpz_mul_2exp (z, z, 5L*GMP_LIMB_BITS); - expr = "2^(5*BPML)"; - EXPECT (mpz_fits_ulong_p, 0); - EXPECT (mpz_fits_uint_p, 0); - EXPECT (mpz_fits_ushort_p, 0); - EXPECT (mpz_fits_slong_p, 0); - EXPECT (mpz_fits_sint_p, 0); - EXPECT (mpz_fits_sshort_p, 0); - - - mpz_set_ui (z, (unsigned long) USHRT_MAX); - expr = "USHRT_MAX"; - EXPECT (mpz_fits_ulong_p, 1); - EXPECT (mpz_fits_uint_p, 1); - EXPECT (mpz_fits_ushort_p, 1); - - mpz_set_ui (z, (unsigned long) USHRT_MAX); - mpz_add_ui (z, z, 1L); - expr = "USHRT_MAX + 1"; - EXPECT (mpz_fits_ushort_p, 0); - - - mpz_set_ui (z, (unsigned long) UINT_MAX); - expr = "UINT_MAX"; - EXPECT (mpz_fits_ulong_p, 1); - EXPECT (mpz_fits_uint_p, 1); - - mpz_set_ui (z, (unsigned long) UINT_MAX); - mpz_add_ui (z, z, 1L); - expr = "UINT_MAX + 1"; - EXPECT (mpz_fits_uint_p, 0); - - - mpz_set_ui (z, ULONG_MAX); - expr = "ULONG_MAX"; - EXPECT (mpz_fits_ulong_p, 1); - - mpz_set_ui (z, ULONG_MAX); - mpz_add_ui (z, z, 1L); - expr = "ULONG_MAX + 1"; - EXPECT (mpz_fits_ulong_p, 0); - - - mpz_set_si (z, (long) SHRT_MAX); - expr = "SHRT_MAX"; - EXPECT (mpz_fits_slong_p, 1); - EXPECT (mpz_fits_sint_p, 1); - EXPECT (mpz_fits_sshort_p, 1); - - mpz_set_si (z, (long) SHRT_MAX); - mpz_add_ui (z, z, 1L); - expr = "SHRT_MAX + 1"; - EXPECT (mpz_fits_sshort_p, 0); - - - mpz_set_si (z, (long) INT_MAX); - expr = "INT_MAX"; - EXPECT (mpz_fits_slong_p, 1); - EXPECT (mpz_fits_sint_p, 1); - - mpz_set_si (z, (long) INT_MAX); - mpz_add_ui (z, z, 1L); - expr = "INT_MAX + 1"; - EXPECT (mpz_fits_sint_p, 0); - - - mpz_set_si (z, LONG_MAX); - expr = "LONG_MAX"; - EXPECT (mpz_fits_slong_p, 1); - - mpz_set_si (z, LONG_MAX); - mpz_add_ui (z, z, 1L); - expr = "LONG_MAX + 1"; - EXPECT (mpz_fits_slong_p, 0); - - - mpz_set_si (z, (long) SHRT_MIN); - expr = "SHRT_MIN"; - EXPECT (mpz_fits_slong_p, 1); - EXPECT (mpz_fits_sint_p, 1); - EXPECT (mpz_fits_sshort_p, 1); - - mpz_set_si (z, (long) SHRT_MIN); - mpz_sub_ui (z, z, 1L); - expr = "SHRT_MIN + 1"; - EXPECT (mpz_fits_sshort_p, 0); - - - mpz_set_si (z, (long) INT_MIN); - expr = "INT_MIN"; - EXPECT (mpz_fits_slong_p, 1); - EXPECT (mpz_fits_sint_p, 1); - - mpz_set_si (z, (long) INT_MIN); - mpz_sub_ui (z, z, 1L); - expr = "INT_MIN + 1"; - EXPECT (mpz_fits_sint_p, 0); - - - mpz_set_si (z, LONG_MIN); - expr = "LONG_MIN"; - EXPECT (mpz_fits_slong_p, 1); - - mpz_set_si (z, LONG_MIN); - mpz_sub_ui (z, z, 1L); - expr = "LONG_MIN + 1"; - EXPECT (mpz_fits_slong_p, 0); - - - if (error) - abort (); - - mpz_clear (z); - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-gcd.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-gcd.c deleted file mode 100644 index fef4fde0cf7..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-gcd.c +++ /dev/null @@ -1,454 +0,0 @@ -/* Test mpz_gcd, mpz_gcdext, and mpz_gcd_ui. - -Copyright 1991, 1993, 1994, 1996, 1997, 2000-2005, 2008, 2009, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void one_test (mpz_t, mpz_t, mpz_t, int); -void debug_mp (mpz_t, int); - -static int gcdext_valid_p (const mpz_t, const mpz_t, const mpz_t, const mpz_t); - -/* Keep one_test's variables global, so that we don't need - to reinitialize them for each test. */ -mpz_t gcd1, gcd2, s, temp1, temp2, temp3; - -#define MAX_SCHOENHAGE_THRESHOLD HGCD_REDUCE_THRESHOLD - -/* Define this to make all operands be large enough for Schoenhage gcd - to be used. */ -#ifndef WHACK_SCHOENHAGE -#define WHACK_SCHOENHAGE 0 -#endif - -#if WHACK_SCHOENHAGE -#define MIN_OPERAND_BITSIZE (MAX_SCHOENHAGE_THRESHOLD * GMP_NUMB_BITS) -#else -#define MIN_OPERAND_BITSIZE 1 -#endif - - -void -check_data (void) -{ - static const struct { - const char *a; - const char *b; - const char *want; - } data[] = { - /* This tickled a bug in gmp 4.1.2 mpn/x86/k6/gcd_finda.asm. */ - { "0x3FFC000007FFFFFFFFFF00000000003F83FFFFFFFFFFFFFFF80000000000000001", - "0x1FFE0007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC000000000000000000000001", - "5" } - }; - - mpz_t a, b, got, want; - int i; - - mpz_inits (a, b, got, want, NULL); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (a, data[i].a, 0); - mpz_set_str_or_abort (b, data[i].b, 0); - mpz_set_str_or_abort (want, data[i].want, 0); - mpz_gcd (got, a, b); - MPZ_CHECK_FORMAT (got); - if (mpz_cmp (got, want) != 0) - { - printf ("mpz_gcd wrong on data[%d]\n", i); - printf (" a %s\n", data[i].a); - printf (" b %s\n", data[i].b); - mpz_trace (" a", a); - mpz_trace (" b", b); - mpz_trace (" want", want); - mpz_trace (" got ", got); - abort (); - } - } - - mpz_clears (a, b, got, want, NULL); -} - -void -make_chain_operands (mpz_t ref, mpz_t a, mpz_t b, gmp_randstate_t rs, int nb1, int nb2, int chain_len) -{ - mpz_t bs, temp1, temp2; - int j; - - mpz_inits (bs, temp1, temp2, NULL); - - /* Generate a division chain backwards, allowing otherwise unlikely huge - quotients. */ - - mpz_set_ui (a, 0); - mpz_urandomb (bs, rs, 32); - mpz_urandomb (bs, rs, mpz_get_ui (bs) % nb1 + 1); - mpz_rrandomb (b, rs, mpz_get_ui (bs)); - mpz_add_ui (b, b, 1); - mpz_set (ref, b); - - for (j = 0; j < chain_len; j++) - { - mpz_urandomb (bs, rs, 32); - mpz_urandomb (bs, rs, mpz_get_ui (bs) % nb2 + 1); - mpz_rrandomb (temp2, rs, mpz_get_ui (bs) + 1); - mpz_add_ui (temp2, temp2, 1); - mpz_mul (temp1, b, temp2); - mpz_add (a, a, temp1); - - mpz_urandomb (bs, rs, 32); - mpz_urandomb (bs, rs, mpz_get_ui (bs) % nb2 + 1); - mpz_rrandomb (temp2, rs, mpz_get_ui (bs) + 1); - mpz_add_ui (temp2, temp2, 1); - mpz_mul (temp1, a, temp2); - mpz_add (b, b, temp1); - } - - mpz_clears (bs, temp1, temp2, NULL); -} - -/* Test operands from a table of seed data. This variant creates the operands - using plain ol' mpz_rrandomb. This is a hack for better coverage of the gcd - code, which depends on that the random number generators give the exact - numbers we expect. */ -void -check_kolmo1 (void) -{ - static const struct { - unsigned int seed; - int nb; - const char *want; - } data[] = { - { 59618, 38208, "5"}, - { 76521, 49024, "3"}, - { 85869, 54976, "1"}, - { 99449, 63680, "1"}, - {112453, 72000, "1"} - }; - - gmp_randstate_t rs; - mpz_t bs, a, b, want; - int i, unb, vnb, nb; - - gmp_randinit_default (rs); - - mpz_inits (bs, a, b, want, NULL); - - for (i = 0; i < numberof (data); i++) - { - nb = data[i].nb; - - gmp_randseed_ui (rs, data[i].seed); - - mpz_urandomb (bs, rs, 32); - unb = mpz_get_ui (bs) % nb; - mpz_urandomb (bs, rs, 32); - vnb = mpz_get_ui (bs) % nb; - - mpz_rrandomb (a, rs, unb); - mpz_rrandomb (b, rs, vnb); - - mpz_set_str_or_abort (want, data[i].want, 0); - - one_test (a, b, want, -1); - } - - mpz_clears (bs, a, b, want, NULL); - gmp_randclear (rs); -} - -/* Test operands from a table of seed data. This variant creates the operands - using a division chain. This is a hack for better coverage of the gcd - code, which depends on that the random number generators give the exact - numbers we expect. */ -void -check_kolmo2 (void) -{ - static const struct { - unsigned int seed; - int nb, chain_len; - } data[] = { - { 917, 15, 5 }, - { 1032, 18, 6 }, - { 1167, 18, 6 }, - { 1174, 18, 6 }, - { 1192, 18, 6 }, - }; - - gmp_randstate_t rs; - mpz_t bs, a, b, want; - int i; - - gmp_randinit_default (rs); - - mpz_inits (bs, a, b, want, NULL); - - for (i = 0; i < numberof (data); i++) - { - gmp_randseed_ui (rs, data[i].seed); - make_chain_operands (want, a, b, rs, data[i].nb, data[i].nb, data[i].chain_len); - one_test (a, b, want, -1); - } - - mpz_clears (bs, a, b, want, NULL); - gmp_randclear (rs); -} - -int -main (int argc, char **argv) -{ - mpz_t op1, op2, ref; - int i, chain_len; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - long int reps = 200; - - tests_start (); - TESTS_REPS (reps, argv, argc); - - rands = RANDS; - - mpz_inits (bs, op1, op2, ref, gcd1, gcd2, temp1, temp2, temp3, s, NULL); - - check_data (); - check_kolmo1 (); - check_kolmo2 (); - - /* Testcase to exercise the u0 == u1 case in mpn_gcdext_lehmer_n. */ - mpz_set_ui (op2, GMP_NUMB_MAX); /* FIXME: Huge limb doesn't always fit */ - mpz_mul_2exp (op1, op2, 100); - mpz_add (op1, op1, op2); - mpz_mul_ui (op2, op2, 2); - one_test (op1, op2, NULL, -1); - - for (i = 0; i < reps; i++) - { - /* Generate plain operands with unknown gcd. These types of operands - have proven to trigger certain bugs in development versions of the - gcd code. The "hgcd->row[3].rsize > M" ASSERT is not triggered by - the division chain code below, but that is most likely just a result - of that other ASSERTs are triggered before it. */ - - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 17 + 2; - - mpz_urandomb (bs, rands, size_range); - mpz_rrandomb (op1, rands, mpz_get_ui (bs) + MIN_OPERAND_BITSIZE); - mpz_urandomb (bs, rands, size_range); - mpz_rrandomb (op2, rands, mpz_get_ui (bs) + MIN_OPERAND_BITSIZE); - - mpz_urandomb (bs, rands, 8); - bsi = mpz_get_ui (bs); - - if ((bsi & 0x3c) == 4) - mpz_mul (op1, op1, op2); /* make op1 a multiple of op2 */ - else if ((bsi & 0x3c) == 8) - mpz_mul (op2, op1, op2); /* make op2 a multiple of op1 */ - - if ((bsi & 1) != 0) - mpz_neg (op1, op1); - if ((bsi & 2) != 0) - mpz_neg (op2, op2); - - one_test (op1, op2, NULL, i); - - /* Generate a division chain backwards, allowing otherwise unlikely huge - quotients. */ - - mpz_urandomb (bs, rands, 32); - chain_len = mpz_get_ui (bs) % LOG2C (GMP_NUMB_BITS * MAX_SCHOENHAGE_THRESHOLD); - mpz_urandomb (bs, rands, 32); - chain_len = mpz_get_ui (bs) % (1 << chain_len) / 32; - - make_chain_operands (ref, op1, op2, rands, 16, 12, chain_len); - - one_test (op1, op2, ref, i); - } - - mpz_clears (bs, op1, op2, ref, gcd1, gcd2, temp1, temp2, temp3, s, NULL); - - tests_end (); - exit (0); -} - -void -debug_mp (mpz_t x, int base) -{ - mpz_out_str (stderr, base, x); fputc ('\n', stderr); -} - -void -one_test (mpz_t op1, mpz_t op2, mpz_t ref, int i) -{ - /* - printf ("%d %d %d\n", SIZ (op1), SIZ (op2), ref != NULL ? SIZ (ref) : 0); - fflush (stdout); - */ - - /* - fprintf (stderr, "op1="); debug_mp (op1, -16); - fprintf (stderr, "op2="); debug_mp (op2, -16); - */ - - mpz_gcdext (gcd1, s, NULL, op1, op2); - MPZ_CHECK_FORMAT (gcd1); - MPZ_CHECK_FORMAT (s); - - if (ref && mpz_cmp (ref, gcd1) != 0) - { - fprintf (stderr, "ERROR in test %d\n", i); - fprintf (stderr, "mpz_gcdext returned incorrect result\n"); - fprintf (stderr, "op1="); debug_mp (op1, -16); - fprintf (stderr, "op2="); debug_mp (op2, -16); - fprintf (stderr, "expected result:\n"); debug_mp (ref, -16); - fprintf (stderr, "mpz_gcdext returns:\n");debug_mp (gcd1, -16); - abort (); - } - - if (!gcdext_valid_p(op1, op2, gcd1, s)) - { - fprintf (stderr, "ERROR in test %d\n", i); - fprintf (stderr, "mpz_gcdext returned invalid result\n"); - fprintf (stderr, "op1="); debug_mp (op1, -16); - fprintf (stderr, "op2="); debug_mp (op2, -16); - fprintf (stderr, "mpz_gcdext returns:\n");debug_mp (gcd1, -16); - fprintf (stderr, "s="); debug_mp (s, -16); - abort (); - } - - mpz_gcd (gcd2, op1, op2); - MPZ_CHECK_FORMAT (gcd2); - - if (mpz_cmp (gcd2, gcd1) != 0) - { - fprintf (stderr, "ERROR in test %d\n", i); - fprintf (stderr, "mpz_gcd returned incorrect result\n"); - fprintf (stderr, "op1="); debug_mp (op1, -16); - fprintf (stderr, "op2="); debug_mp (op2, -16); - fprintf (stderr, "expected result:\n"); debug_mp (gcd1, -16); - fprintf (stderr, "mpz_gcd returns:\n"); debug_mp (gcd2, -16); - abort (); - } - - /* This should probably move to t-gcd_ui.c */ - if (mpz_fits_ulong_p (op1) || mpz_fits_ulong_p (op2)) - { - if (mpz_fits_ulong_p (op1)) - mpz_gcd_ui (gcd2, op2, mpz_get_ui (op1)); - else - mpz_gcd_ui (gcd2, op1, mpz_get_ui (op2)); - if (mpz_cmp (gcd2, gcd1)) - { - fprintf (stderr, "ERROR in test %d\n", i); - fprintf (stderr, "mpz_gcd_ui returned incorrect result\n"); - fprintf (stderr, "op1="); debug_mp (op1, -16); - fprintf (stderr, "op2="); debug_mp (op2, -16); - fprintf (stderr, "expected result:\n"); debug_mp (gcd1, -16); - fprintf (stderr, "mpz_gcd_ui returns:\n"); debug_mp (gcd2, -16); - abort (); - } - } - - mpz_gcdext (gcd2, temp1, temp2, op1, op2); - MPZ_CHECK_FORMAT (gcd2); - MPZ_CHECK_FORMAT (temp1); - MPZ_CHECK_FORMAT (temp2); - - mpz_mul (temp1, temp1, op1); - mpz_mul (temp2, temp2, op2); - mpz_add (temp1, temp1, temp2); - - if (mpz_cmp (gcd1, gcd2) != 0 - || mpz_cmp (gcd2, temp1) != 0) - { - fprintf (stderr, "ERROR in test %d\n", i); - fprintf (stderr, "mpz_gcdext returned incorrect result\n"); - fprintf (stderr, "op1="); debug_mp (op1, -16); - fprintf (stderr, "op2="); debug_mp (op2, -16); - fprintf (stderr, "expected result:\n"); debug_mp (gcd1, -16); - fprintf (stderr, "mpz_gcdext returns:\n");debug_mp (gcd2, -16); - abort (); - } -} - -/* Called when g is supposed to be gcd(a,b), and g = s a + t b, for some t. - Uses temp1, temp2 and temp3. */ -static int -gcdext_valid_p (const mpz_t a, const mpz_t b, const mpz_t g, const mpz_t s) -{ - /* It's not clear that gcd(0,0) is well defined, but we allow it and require that - gcd(0,0) = 0. */ - if (mpz_sgn (g) < 0) - return 0; - - if (mpz_sgn (a) == 0) - { - /* Must have g == abs (b). Any value for s is in some sense "correct", - but it makes sense to require that s == 0. */ - return mpz_cmpabs (g, b) == 0 && mpz_sgn (s) == 0; - } - else if (mpz_sgn (b) == 0) - { - /* Must have g == abs (a), s == sign (a) */ - return mpz_cmpabs (g, a) == 0 && mpz_cmp_si (s, mpz_sgn (a)) == 0; - } - - if (mpz_sgn (g) <= 0) - return 0; - - mpz_tdiv_qr (temp1, temp3, a, g); - if (mpz_sgn (temp3) != 0) - return 0; - - mpz_tdiv_qr (temp2, temp3, b, g); - if (mpz_sgn (temp3) != 0) - return 0; - - /* Require that 2 |s| < |b/g|, or |s| == 1. */ - if (mpz_cmpabs_ui (s, 1) > 0) - { - mpz_mul_2exp (temp3, s, 1); - if (mpz_cmpabs (temp3, temp2) >= 0) - return 0; - } - - /* Compute the other cofactor. */ - mpz_mul(temp2, s, a); - mpz_sub(temp2, g, temp2); - mpz_tdiv_qr(temp2, temp3, temp2, b); - - if (mpz_sgn (temp3) != 0) - return 0; - - /* Require that 2 |t| < |a/g| or |t| == 1*/ - if (mpz_cmpabs_ui (temp2, 1) > 0) - { - mpz_mul_2exp (temp2, temp2, 1); - if (mpz_cmpabs (temp2, temp1) >= 0) - return 0; - } - return 1; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-gcd_ui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-gcd_ui.c deleted file mode 100644 index 16f51e11b69..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-gcd_ui.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Test mpz_gcd_ui. - -Copyright 2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -/* Check mpz_gcd_ui doesn't try to return a value out of range. - This was wrong in gmp 4.1.2 with a long long limb. */ -static void -check_ui_range (void) -{ - unsigned long got; - mpz_t x; - int i; - - mpz_init_set_ui (x, ULONG_MAX); - - for (i = 0; i < 20; i++) - { - mpz_mul_2exp (x, x, 1L); - got = mpz_gcd_ui (NULL, x, 0L); - if (got != 0) - { - printf ("mpz_gcd_ui (ULONG_MAX*2^%d, 0)\n", i); - printf (" return %#lx\n", got); - printf (" should be 0\n"); - abort (); - } - } - - mpz_clear (x); -} - -int -main (void) -{ - tests_start (); - - check_ui_range (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-get_d.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-get_d.c deleted file mode 100644 index 4a4a9304982..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-get_d.c +++ /dev/null @@ -1,74 +0,0 @@ -/* Test mpz_get_d. - -Copyright 2002, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_onebit (void) -{ - int i; - mpz_t z; - double got, want; - /* FIXME: It'd be better to base this on the float format. */ -#if defined (__vax) || defined (__vax__) - int limit = 127 - 1; /* vax fp numbers have limited range */ -#else - int limit = 512; -#endif - - mpz_init (z); - - mpz_set_ui (z, 1L); - want = 1.0; - - for (i = 0; i < limit; i++) - { - got = mpz_get_d (z); - - if (got != want) - { - printf ("mpz_get_d wrong on 2**%d\n", i); - mpz_trace (" z ", z); - printf (" want %.20g\n", want); - printf (" got %.20g\n", got); - abort(); - } - - mpz_mul_2exp (z, z, 1L); - want *= 2.0; - } - mpz_clear (z); -} - - -int -main (void) -{ - tests_start (); - - check_onebit (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-get_d_2exp.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-get_d_2exp.c deleted file mode 100644 index 2f5555daf57..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-get_d_2exp.c +++ /dev/null @@ -1,223 +0,0 @@ -/* Test mpz_get_d_2exp. - -Copyright 2002, 2003, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -static void -check_zero (void) -{ - mpz_t z; - double got, want; - long got_exp, want_exp; - - mpz_init_set_ui (z, 0); - - want = 0.0; - want_exp = 0; - got = mpz_get_d_2exp (&got_exp, z); - if (got != want || got_exp != want_exp) - { - printf ("mpz_get_d_2exp wrong on zero\n"); - mpz_trace (" z ", z); - d_trace (" want ", want); - d_trace (" got ", got); - printf (" want exp %ld\n", want_exp); - printf (" got exp %ld\n", got_exp); - abort(); - } - - mpz_clear (z); -} - -static void -check_onebit (void) -{ - static const unsigned long data[] = { - 1, 32, 52, 53, 54, 63, 64, 65, 128, 256, 511, 512, 513 - }; - mpz_t z; - double got, want; - long got_exp, want_exp; - int i; - - mpz_init (z); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_ui (z, 1L); - mpz_mul_2exp (z, z, data[i]); - want = 0.5; - want_exp = data[i] + 1; - got = mpz_get_d_2exp (&got_exp, z); - if (got != want || got_exp != want_exp) - { - printf ("mpz_get_d_2exp wrong on 2**%ld\n", data[i]); - mpz_trace (" z ", z); - d_trace (" want ", want); - d_trace (" got ", got); - printf (" want exp %ld\n", want_exp); - printf (" got exp %ld\n", got_exp); - abort(); - } - - mpz_set_si (z, -1L); - mpz_mul_2exp (z, z, data[i]); - want = -0.5; - want_exp = data[i] + 1; - got = mpz_get_d_2exp (&got_exp, z); - if (got != want || got_exp != want_exp) - { - printf ("mpz_get_d_2exp wrong on -2**%ld\n", data[i]); - mpz_trace (" z ", z); - d_trace (" want ", want); - d_trace (" got ", got); - printf (" want exp %ld\n", want_exp); - printf (" got exp %ld\n", got_exp); - abort(); - } - } - mpz_clear (z); -} - -/* Check that hardware rounding doesn't make mpz_get_d_2exp return a value - outside its defined range. */ -static void -check_round (void) -{ - static const unsigned long data[] = { 1, 32, 53, 54, 64, 128, 256, 512 }; - mpz_t z; - double got; - long got_exp; - int i, rnd_mode, old_rnd_mode; - - mpz_init (z); - old_rnd_mode = tests_hardware_getround (); - - for (rnd_mode = 0; rnd_mode < 4; rnd_mode++) - { - tests_hardware_setround (rnd_mode); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_ui (z, 1L); - mpz_mul_2exp (z, z, data[i]); - mpz_sub_ui (z, z, 1L); - - got = mpz_get_d_2exp (&got_exp, z); - if (got < 0.5 || got >= 1.0) - { - printf ("mpz_get_d_2exp wrong on 2**%lu-1\n", data[i]); - printf ("result out of range, expect 0.5 <= got < 1.0\n"); - printf (" rnd_mode = %d\n", rnd_mode); - printf (" data[i] = %lu\n", data[i]); - mpz_trace (" z ", z); - d_trace (" got ", got); - printf (" got exp %ld\n", got_exp); - abort(); - } - - mpz_neg (z, z); - got = mpz_get_d_2exp (&got_exp, z); - if (got <= -1.0 || got > -0.5) - { - printf ("mpz_get_d_2exp wrong on -2**%lu-1\n", data[i]); - printf ("result out of range, expect -1.0 < got <= -0.5\n"); - printf (" rnd_mode = %d\n", rnd_mode); - printf (" data[i] = %lu\n", data[i]); - mpz_trace (" z ", z); - d_trace (" got ", got); - printf (" got exp %ld\n", got_exp); - abort(); - } - } - } - - mpz_clear (z); - tests_hardware_setround (old_rnd_mode); -} - -static void -check_rand (void) -{ - gmp_randstate_ptr rands = RANDS; - int i; - mpz_t z; - double got; - long got_exp; - unsigned long bits; - - mpz_init (z); - - for (i = 0; i < 200; i++) - { - bits = gmp_urandomm_ui (rands, 512L); - mpz_urandomb (z, rands, bits); - - got = mpz_get_d_2exp (&got_exp, z); - if (mpz_sgn (z) == 0) - continue; - bits = mpz_sizeinbase (z, 2); - - if (got < 0.5 || got >= 1.0) - { - printf ("mpz_get_d_2exp out of range, expect 0.5 <= got < 1.0\n"); - mpz_trace (" z ", z); - d_trace (" got ", got); - printf (" got exp %ld\n", got_exp); - abort(); - } - - /* FIXME: If mpz_get_d_2exp rounds upwards we might have got_exp == - bits+1, so leave this test disabled until we decide if that's what - should happen, or not. */ -#if 0 - if (got_exp != bits) - { - printf ("mpz_get_d_2exp wrong exponent\n", i); - mpz_trace (" z ", z); - d_trace (" bits ", bits); - d_trace (" got ", got); - printf (" got exp %ld\n", got_exp); - abort(); - } -#endif - } - mpz_clear (z); -} - - -int -main (void) -{ - tests_start (); - mp_trace_base = -16; - - check_zero (); - check_onebit (); - check_round (); - check_rand (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-get_si.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-get_si.c deleted file mode 100644 index 083ada7f1e6..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-get_si.c +++ /dev/null @@ -1,122 +0,0 @@ -/* Exercise mpz_get_si. - -Copyright 2000, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_data (void) -{ - static const struct { - const char *n; - long want; - } data[] = { - { "0", 0L }, - { "1", 1L }, - { "-1", -1L }, - { "2", 2L }, - { "-2", -2L }, - { "12345", 12345L }, - { "-12345", -12345L }, - }; - - int i; - mpz_t n; - long got; - - mpz_init (n); - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (n, data[i].n, 0); - - got = mpz_get_si (n); - if (got != data[i].want) - { - printf ("mpz_get_si wrong at data[%d]\n", i); - printf (" n \"%s\" (", data[i].n); - mpz_out_str (stdout, 10, n); printf (", hex "); - mpz_out_str (stdout, 16, n); printf (")\n"); - printf (" got %ld (0x%lX)\n", got, got); - printf (" want %ld (0x%lX)\n", data[i].want, data[i].want); - abort(); - } - } - mpz_clear (n); -} - - -void -check_max (void) -{ - mpz_t n; - long want; - long got; - - mpz_init (n); - -#define CHECK_MAX(name) \ - if (got != want) \ - { \ - printf ("mpz_get_si wrong on %s\n", name); \ - printf (" n "); \ - mpz_out_str (stdout, 10, n); printf (", hex "); \ - mpz_out_str (stdout, 16, n); printf ("\n"); \ - printf (" got %ld, hex %lX\n", got, got); \ - printf (" want %ld, hex %lX\n", want, want); \ - abort(); \ - } - - want = LONG_MAX; - mpz_set_si (n, want); - got = mpz_get_si (n); - CHECK_MAX ("LONG_MAX"); - - want = LONG_MIN; - mpz_set_si (n, want); - got = mpz_get_si (n); - CHECK_MAX ("LONG_MIN"); - - /* The following checks that -0x100000000 gives -0x80000000. This doesn't - actually fit in a long and the result from mpz_get_si() is undefined, - but -0x80000000 is what comes out currently, and it should be that - value irrespective of the mp_limb_t size (long or long long). */ - - want = LONG_MIN; - mpz_mul_2exp (n, n, 1); - CHECK_MAX ("-0x100...00"); - - mpz_clear (n); -} - - -int -main (void) -{ - tests_start (); - - check_data (); - check_max (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-hamdist.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-hamdist.c deleted file mode 100644 index f39c8ab8c22..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-hamdist.c +++ /dev/null @@ -1,124 +0,0 @@ -/* Test mpz_hamdist. - -Copyright 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_twobits (void) -{ - unsigned long i, j, got, want; - mpz_t x, y; - - mpz_init (x); - mpz_init (y); - for (i = 0; i < 5 * GMP_NUMB_BITS; i++) - { - for (j = 0; j < 5 * GMP_NUMB_BITS; j++) - { - mpz_set_ui (x, 0L); - mpz_setbit (x, i); - mpz_set_ui (y, 0L); - mpz_setbit (y, j); - - want = 2 * (i != j); - got = mpz_hamdist (x, y); - if (got != want) - { - printf ("mpz_hamdist wrong on 2 bits pos/pos\n"); - wrong: - printf (" i %lu\n", i); - printf (" j %lu\n", j); - printf (" got %lu\n", got); - printf (" want %lu\n", want); - mpz_trace (" x ", x); - mpz_trace (" y ", y); - abort(); - } - - mpz_neg (x, x); - mpz_neg (y, y); - want = ABS ((long) (i-j)); - got = mpz_hamdist (x, y); - if (got != want) - { - printf ("mpz_hamdist wrong on 2 bits neg/neg\n"); - goto wrong; - } - } - - } - mpz_clear (x); - mpz_clear (y); -} - - -void -check_rand (void) -{ - gmp_randstate_ptr rands = RANDS; - unsigned long got, want; - int i; - mpz_t x, y; - - mpz_init (x); - mpz_init (y); - - for (i = 0; i < 2000; i++) - { - mpz_erandomb (x, rands, 6 * GMP_NUMB_BITS); - mpz_negrandom (x, rands); - mpz_mul_2exp (x, x, urandom() % (4 * GMP_NUMB_BITS)); - - mpz_erandomb (y, rands, 6 * GMP_NUMB_BITS); - mpz_negrandom (y, rands); - mpz_mul_2exp (y, y, urandom() % (4 * GMP_NUMB_BITS)); - - want = refmpz_hamdist (x, y); - got = mpz_hamdist (x, y); - if (got != want) - { - printf ("mpz_hamdist wrong on random\n"); - printf (" got %lu\n", got); - printf (" want %lu\n", want); - mpz_trace (" x ", x); - mpz_trace (" y ", y); - abort(); - } - } - mpz_clear (x); - mpz_clear (y); -} - -int -main (void) -{ - tests_start (); - mp_trace_base = -16; - - check_twobits (); - check_rand (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-import.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-import.c deleted file mode 100644 index 8d10fdc8aa7..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-import.c +++ /dev/null @@ -1,176 +0,0 @@ -/* Test mpz_import. - -Copyright 2002, 2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_data (void) -{ - static const struct { - const char *want; - size_t count; - int order; - size_t size; - int endian; - int nail; - char src[64]; - - } data[] = { - - { "0", 0,1, 1,1, 0 }, - { "0", 1,1, 0,1, 0 }, - - { "0x12345678", 4,1, 1,1, 0, { '\22', '\64', '\126', '\170' } }, - { "0x12345678", 1,1, 4,1, 0, { '\22', '\64', '\126', '\170' } }, - { "0x12345678", 1,-1, 4,1, 0, { '\22', '\64', '\126', '\170' } }, - - { "0x12345678", 4,-1, 1,-1, 0, { '\170', '\126', '\064', '\22' } }, - { "0x12345678", 1,1, 4,-1, 0, { '\170', '\126', '\064', '\22' } }, - { "0x12345678", 1,-1, 4,-1, 0, { '\170', '\126', '\064', '\22' } }, - - { "0", 5,1, 1,1, 7, { '\376', '\376', '\376', '\376', '\376' } }, - { "0", 5,-1, 1,1, 7, { '\376', '\376', '\376', '\376', '\376' } }, - { "0x15", 5,1, 1,1, 7, { '\377', '\376', '\377', '\376', '\377' } }, - - { "0", 3,1, 2,1, 1, { '\200','\000', '\200','\000', '\200','\000' }}, - { "0", 3,1, 2,-1, 1, { '\000','\200', '\000','\200', '\000','\200' }}, - { "0", 3,1, 2,1, 15, { '\377','\376', '\377','\376', '\377','\376' }}, - - { "0x2A", 3,1, 2,1, 14, { '\377','\376', '\377','\376', '\377','\376' } }, - { "0x06", 3,1, 2,1, 14, { '\377','\374', '\377','\375', '\377','\376' } }, - { "0x24", 3,-1, 2,1, 14, { '\377','\374', '\377','\375', '\377','\376' } }, - - { "0x123456789ABC", 3,1, 2,1, 0, { - '\022','\064', '\126','\170', '\232','\274' } }, - { "0x123456789ABC", 3,-1, 2,1, 0, { - '\232','\274', '\126','\170', '\022','\064' } }, - { "0x123456789ABC", 3,1, 2,-1, 0, { - '\064','\022', '\170','\126', '\274','\232' } }, - { "0x123456789ABC", 3,-1, 2,-1, 0, { - '\274','\232', '\170','\126', '\064','\022' } }, - - { "0x112233445566778899AABBCC", 3,1, 4,1, 0, - { '\021','\042','\063','\104', - '\125','\146','\167','\210', - '\231','\252','\273','\314' } }, - { "0x112233445566778899AABBCC", 3,-1, 4,1, 0, - { '\231','\252','\273','\314', - '\125','\146','\167','\210', - '\021','\042','\063','\104' } }, - { "0x112233445566778899AABBCC", 3,1, 4,-1, 0, - { '\104','\063','\042','\021', - '\210','\167','\146','\125', - '\314','\273','\252','\231' } }, - { "0x112233445566778899AABBCC", 3,-1, 4,-1, 0, - { '\314','\273','\252','\231', - '\210','\167','\146','\125', - '\104','\063','\042','\021' } }, - - { "0x100120023003400450056006700780089009A00AB00BC00C", 3,1, 8,1, 0, - { '\020','\001','\040','\002','\060','\003','\100','\004', - '\120','\005','\140','\006','\160','\007','\200','\010', - '\220','\011','\240','\012','\260','\013','\300','\014' } }, - { "0x100120023003400450056006700780089009A00AB00BC00C", 3,-1, 8,1, 0, - { '\220','\011','\240','\012','\260','\013','\300','\014', - '\120','\005','\140','\006','\160','\007','\200','\010', - '\020','\001','\040','\002','\060','\003','\100','\004' } }, - { "0x100120023003400450056006700780089009A00AB00BC00C", 3,1, 8,-1, 0, - { '\004','\100','\003','\060','\002','\040','\001','\020', - '\010','\200','\007','\160','\006','\140','\005','\120', - '\014','\300','\013','\260','\012','\240','\011','\220' } }, - { "0x100120023003400450056006700780089009A00AB00BC00C", 3,-1, 8,-1, 0, - { '\014','\300','\013','\260','\012','\240','\011','\220', - '\010','\200','\007','\160','\006','\140','\005','\120', - '\004','\100','\003','\060','\002','\040','\001','\020' } }, - - { "0x155555555555555555555555", 3,1, 4,1, 1, - { '\325','\125','\125','\125', - '\252','\252','\252','\252', - '\325','\125','\125','\125' } }, - { "0x155555555555555555555555", 3,-1, 4,1, 1, - { '\325','\125','\125','\125', - '\252','\252','\252','\252', - '\325','\125','\125','\125' } }, - { "0x155555555555555555555555", 3,1, 4,-1, 1, - { '\125','\125','\125','\325', - '\252','\252','\252','\252', - '\125','\125','\125','\325' } }, - { "0x155555555555555555555555", 3,-1, 4,-1, 1, - { '\125','\125','\125','\325', - '\252','\252','\252','\252', - '\125','\125','\125','\325' } }, - }; - - char buf[sizeof(data[0].src) + sizeof (mp_limb_t)]; - char *src; - size_t align; - int i; - mpz_t got, want; - - mpz_init (got); - mpz_init (want); - - for (i = 0; i < numberof (data); i++) - { - for (align = 0; align < sizeof (mp_limb_t); align++) - { - mpz_set_str_or_abort (want, data[i].want, 0); - src = buf + align; - memcpy (src, data[i].src, data[i].count * data[i].size); - - mpz_set_ui (got, 0L); - mpz_import (got, data[i].count, data[i].order, - data[i].size, data[i].endian, data[i].nail, src); - - MPZ_CHECK_FORMAT (got); - if (mpz_cmp (got, want) != 0) - { - printf ("wrong at data[%d]\n", i); - printf (" count=%lu order=%d size=%lu endian=%d nail=%u align=%lu\n", - (unsigned long) data[i].count, data[i].order, - (unsigned long) data[i].size, data[i].endian, data[i].nail, - (unsigned long) align); - mpz_trace (" got ", got); - mpz_trace (" want", want); - abort (); - } - } - } - mpz_clear (got); - mpz_clear (want); -} - - -int -main (void) -{ - tests_start (); - - mp_trace_base = -16; - check_data (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-inp_str.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-inp_str.c deleted file mode 100644 index f50290bff6f..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-inp_str.c +++ /dev/null @@ -1,199 +0,0 @@ -/* Test mpz_inp_str. - -Copyright 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#if HAVE_UNISTD_H -#include <unistd.h> /* for unlink */ -#endif - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -#define FILENAME "t-inp_str.tmp" - - -void -check_data (void) -{ - static const struct { - const char *inp; - int base; - const char *want; - int want_nread; - - } data[] = { - - { "0", 10, "0", 1 }, - - { "abc", 10, "0", 0 }, - { "0xf", 10, "0", 1 }, - { "ghi", 16, "0", 0 }, - { "100", 90, "0", 0 }, - - { "ff", 16, "255", 2 }, - { "-ff", 16, "-255", 3 }, - { "FF", 16, "255", 2 }, - { "-FF", 16, "-255", 3 }, - - { "z", 36, "35", 1 }, - { "Z", 36, "35", 1 }, - { "1B", 59, "70", 2 }, - { "a", 60, "36", 1 }, - { "A", 61, "10", 1 }, - - { "0x0", 0, "0", 3 }, - { "0X10", 0, "16", 4 }, - { "-0X0", 0, "0", 4 }, - { "-0x10", 0, "-16", 5 }, - - { "0b0", 0, "0", 3 }, - { "0B10", 0, "2", 4 }, - { "-0B0", 0, "0", 4 }, - { "-0b10", 0, "-2", 5 }, - - { "00", 0, "0", 2 }, - { "010", 0, "8", 3 }, - { "-00", 0, "0", 3 }, - { "-010", 0, "-8", 4 }, - - { "0x", 0, "0", 2 }, - { "0", 0, "0", 1 }, - { " 030", 10, "30", 4 }, - }; - - mpz_t got, want; - long ftell_nread; - int i, pre, post, j, got_nread, want_nread; - FILE *fp; - - mpz_init (got); - mpz_init (want); - - for (i = 0; i < numberof (data); i++) - { - for (pre = 0; pre <= 3; pre++) - { - for (post = 0; post <= 2; post++) - { - mpz_set_str_or_abort (want, data[i].want, 0); - MPZ_CHECK_FORMAT (want); - - /* create the file new each time to ensure its length is what - we want */ - fp = fopen (FILENAME, "w+"); - ASSERT_ALWAYS (fp != NULL); - for (j = 0; j < pre; j++) - putc (' ', fp); - fputs (data[i].inp, fp); - for (j = 0; j < post; j++) - putc (' ', fp); - fflush (fp); - ASSERT_ALWAYS (! ferror(fp)); - - rewind (fp); - got_nread = mpz_inp_str (got, fp, data[i].base); - - if (got_nread != 0) - { - ftell_nread = ftell (fp); - if (got_nread != ftell_nread) - { - printf ("mpz_inp_str nread wrong\n"); - printf (" inp \"%s\"\n", data[i].inp); - printf (" base %d\n", data[i].base); - printf (" pre %d\n", pre); - printf (" post %d\n", post); - printf (" got_nread %d\n", got_nread); - printf (" ftell_nread %ld\n", ftell_nread); - abort (); - } - } - - /* if data[i].inp is a whole string to read and there's no post - whitespace then expect to have EOF */ - if (post == 0 && data[i].want_nread == strlen(data[i].inp)) - { - int c = getc(fp); - if (c != EOF) - { - printf ("mpz_inp_str didn't read to EOF\n"); - printf (" inp \"%s\"\n", data[i].inp); - printf (" base %d\n", data[i].base); - printf (" pre %d\n", pre); - printf (" post %d\n", post); - printf (" c '%c' %#x\n", c, c); - abort (); - } - } - - /* only expect "pre" included in the count when non-zero */ - want_nread = data[i].want_nread; - if (want_nread != 0) - want_nread += pre; - - if (got_nread != want_nread) - { - printf ("mpz_inp_str nread wrong\n"); - printf (" inp \"%s\"\n", data[i].inp); - printf (" base %d\n", data[i].base); - printf (" pre %d\n", pre); - printf (" post %d\n", post); - printf (" got_nread %d\n", got_nread); - printf (" want_nread %d\n", want_nread); - abort (); - } - - MPZ_CHECK_FORMAT (got); - - if (mpz_cmp (got, want) != 0) - { - printf ("mpz_inp_str wrong result\n"); - printf (" inp \"%s\"\n", data[i].inp); - printf (" base %d\n", data[i].base); - mpz_trace (" got ", got); - mpz_trace (" want", want); - abort (); - } - - ASSERT_ALWAYS (fclose (fp) == 0); - } - } - } - - mpz_clear (got); - mpz_clear (want); -} - -int -main (void) -{ - tests_start (); - - check_data (); - - unlink (FILENAME); - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-invert.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-invert.c deleted file mode 100644 index a033409a2fd..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-invert.c +++ /dev/null @@ -1,121 +0,0 @@ -/* Test mpz_invert. - -Copyright 1991, 1993, 1994, 1996, 1997, 2000-2005, 2008, 2009, 2012, 2014 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -int -main (int argc, char **argv) -{ - mpz_t a, m, ainv, t; - int test, r; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - int reps = 1000; - - tests_start (); - TESTS_REPS (reps, argv, argc); - - rands = RANDS; - - mpz_init (bs); - mpz_init (a); - mpz_init (m); - mpz_init (ainv); - mpz_init (t); - - for (test = 0; test < reps; test++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 16 + 2; - - mpz_urandomb (bs, rands, size_range); - mpz_rrandomb (a, rands, mpz_get_ui (bs)); - do { - mpz_urandomb (bs, rands, size_range); - mpz_rrandomb (m, rands, mpz_get_ui (bs)); - } while (mpz_sgn (m) == 0); - - mpz_urandomb (bs, rands, 8); - bsi = mpz_get_ui (bs); - - if ((bsi & 1) != 0) - mpz_neg (a, a); - if ((bsi & 2) != 0) - mpz_neg (m, m); - - r = mpz_invert (ainv, a, m); - if (r != 0) - { - MPZ_CHECK_FORMAT (ainv); - - if (mpz_cmp_ui (ainv, 0) < 0 || mpz_cmpabs (ainv, m) >= 0) - { - fprintf (stderr, "ERROR in test %d\n", test); - gmp_fprintf (stderr, "Inverse out of range.\n"); - gmp_fprintf (stderr, "a = %Zx\n", a); - gmp_fprintf (stderr, "1/a = %Zx\n", ainv); - gmp_fprintf (stderr, "m = %Zx\n", m); - abort (); - } - - mpz_mul (t, ainv, a); - mpz_mod (t, t, m); - - if (mpz_cmp_ui (t, mpz_cmpabs_ui (m, 1) != 0) != 0) - { - fprintf (stderr, "ERROR in test %d\n", test); - gmp_fprintf (stderr, "a^(-1)*a != 1 (mod m)\n"); - gmp_fprintf (stderr, "a = %Zx\n", a); - gmp_fprintf (stderr, "m = %Zx\n", m); - abort (); - } - } - else /* Inverse deos not exist */ - { - if (mpz_cmpabs_ui (m, 1) <= 0) - continue; /* OK */ - - mpz_gcd (t, a, m); - if (mpz_cmp_ui (t, 1) == 0) - { - fprintf (stderr, "ERROR in test %d\n", test); - gmp_fprintf (stderr, "Inverse exists, but was not found.\n"); - gmp_fprintf (stderr, "a = %Zx\n", a); - gmp_fprintf (stderr, "m = %Zx\n", m); - abort (); - } - } - } - - mpz_clear (bs); - mpz_clear (a); - mpz_clear (m); - mpz_clear (ainv); - mpz_clear (t); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-io_raw.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-io_raw.c deleted file mode 100644 index e06e7bb14b0..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-io_raw.c +++ /dev/null @@ -1,287 +0,0 @@ -/* Test mpz_inp_raw and mpz_out_raw. - -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#if HAVE_UNISTD_H -#include <unistd.h> -#endif - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#define FILENAME "t-io_raw.tmp" - - -/* In the fopen, "b" selects binary mode on DOS systems, meaning no - conversion of '\n' to and from CRLF. It's believed systems without such - nonsense will simply ignore the "b", but in case that's not so a plain - "w+" is attempted if "w+b" fails. */ - -FILE * -fopen_wplusb_or_die (const char *filename) -{ - FILE *fp; - fp = fopen (filename, "w+b"); - if (fp == NULL) - fp = fopen (filename, "w+"); - - if (fp == NULL) - { - printf ("Cannot create file %s\n", filename); - abort (); - } - return fp; -} - -/* use 0x80 to check nothing bad happens with sign extension etc */ -#define BYTEVAL(i) (((i) + 1) | 0x80) - -void -check_in (void) -{ - int i, j, zeros, neg, error = 0; - mpz_t want, got; - size_t want_ret, got_ret; - mp_size_t size; - FILE *fp; - - mpz_init (want); - mpz_init (got); - - for (i = 0; i < 32; i++) - { - for (zeros = 0; zeros < 8; zeros++) - { - for (neg = 0; neg <= 1; neg++) - { - want_ret = i + zeros + 4; - - /* need this to get the twos complement right */ - ASSERT_ALWAYS (sizeof (size) >= 4); - - size = i + zeros; - if (neg) - size = -size; - - fp = fopen_wplusb_or_die (FILENAME); - for (j = 3; j >= 0; j--) - ASSERT_ALWAYS (putc ((size >> (j*8)) & 0xFF, fp) != EOF); - for (j = 0; j < zeros; j++) - ASSERT_ALWAYS (putc ('\0', fp) != EOF); - for (j = 0; j < i; j++) - ASSERT_ALWAYS (putc (BYTEVAL (j), fp) != EOF); - /* and some trailing garbage */ - ASSERT_ALWAYS (putc ('x', fp) != EOF); - ASSERT_ALWAYS (putc ('y', fp) != EOF); - ASSERT_ALWAYS (putc ('z', fp) != EOF); - ASSERT_ALWAYS (fflush (fp) == 0); - rewind (fp); - - got_ret = mpz_inp_raw (got, fp); - ASSERT_ALWAYS (! ferror(fp)); - ASSERT_ALWAYS (fclose (fp) == 0); - - MPZ_CHECK_FORMAT (got); - - if (got_ret != want_ret) - { - printf ("check_in: return value wrong\n"); - error = 1; - } - if (mpz_cmp (got, want) != 0) - { - printf ("check_in: result wrong\n"); - error = 1; - } - if (error) - { - printf (" i=%d zeros=%d neg=%d\n", i, zeros, neg); - printf (" got_ret %lu\n", (unsigned long) got_ret); - printf (" want_ret %lu\n", (unsigned long) want_ret); - mpz_trace (" got ", got); - mpz_trace (" want ", want); - abort (); - } - - mpz_neg (want, want); - } - } - mpz_mul_2exp (want, want, 8); - mpz_add_ui (want, want, (unsigned long) BYTEVAL (i)); - } - - mpz_clear (want); - mpz_clear (got); -} - - -void -check_out (void) -{ - int i, j, neg, error = 0; - mpz_t z; - char want[256], got[256], *p; - size_t want_len, got_ret, got_read; - mp_size_t size; - FILE *fp; - - mpz_init (z); - - for (i = 0; i < 32; i++) - { - for (neg = 0; neg <= 1; neg++) - { - want_len = i + 4; - - /* need this to get the twos complement right */ - ASSERT_ALWAYS (sizeof (size) >= 4); - - size = i; - if (neg) - size = -size; - - p = want; - for (j = 3; j >= 0; j--) - *p++ = size >> (j*8); - for (j = 0; j < i; j++) - *p++ = BYTEVAL (j); - ASSERT_ALWAYS (p <= want + sizeof (want)); - - fp = fopen_wplusb_or_die (FILENAME); - got_ret = mpz_out_raw (fp, z); - ASSERT_ALWAYS (fflush (fp) == 0); - rewind (fp); - got_read = fread (got, 1, sizeof(got), fp); - ASSERT_ALWAYS (! ferror(fp)); - ASSERT_ALWAYS (fclose (fp) == 0); - - if (got_ret != want_len) - { - printf ("check_out: wrong return value\n"); - error = 1; - } - if (got_read != want_len) - { - printf ("check_out: wrong number of bytes read back\n"); - error = 1; - } - if (memcmp (want, got, want_len) != 0) - { - printf ("check_out: wrong data\n"); - error = 1; - } - if (error) - { - printf (" i=%d neg=%d\n", i, neg); - mpz_trace (" z", z); - printf (" got_ret %lu\n", (unsigned long) got_ret); - printf (" got_read %lu\n", (unsigned long) got_read); - printf (" want_len %lu\n", (unsigned long) want_len); - printf (" want"); - for (j = 0; j < want_len; j++) - printf (" %02X", (unsigned) (unsigned char) want[j]); - printf ("\n"); - printf (" got "); - for (j = 0; j < want_len; j++) - printf (" %02X", (unsigned) (unsigned char) got[j]); - printf ("\n"); - abort (); - } - - mpz_neg (z, z); - } - mpz_mul_2exp (z, z, 8); - mpz_add_ui (z, z, (unsigned long) BYTEVAL (i)); - } - - mpz_clear (z); -} - - -void -check_rand (void) -{ - gmp_randstate_ptr rands = RANDS; - int i, error = 0; - mpz_t got, want; - size_t inp_ret, out_ret; - FILE *fp; - - mpz_init (want); - mpz_init (got); - - for (i = 0; i < 500; i++) - { - mpz_erandomb (want, rands, 10*GMP_LIMB_BITS); - mpz_negrandom (want, rands); - - fp = fopen_wplusb_or_die (FILENAME); - out_ret = mpz_out_raw (fp, want); - ASSERT_ALWAYS (fflush (fp) == 0); - rewind (fp); - inp_ret = mpz_inp_raw (got, fp); - ASSERT_ALWAYS (fclose (fp) == 0); - - MPZ_CHECK_FORMAT (got); - - if (inp_ret != out_ret) - { - printf ("check_rand: different inp/out return values\n"); - error = 1; - } - if (mpz_cmp (got, want) != 0) - { - printf ("check_rand: wrong result\n"); - error = 1; - } - if (error) - { - printf (" out_ret %lu\n", (unsigned long) out_ret); - printf (" inp_ret %lu\n", (unsigned long) inp_ret); - mpz_trace (" want", want); - mpz_trace (" got ", got); - abort (); - } - } - - mpz_clear (got); - mpz_clear (want); -} - - -int -main (void) -{ - tests_start (); - mp_trace_base = -16; - - check_in (); - check_out (); - check_rand (); - - unlink (FILENAME); - tests_end (); - - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-jac.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-jac.c deleted file mode 100644 index b6a0c33106a..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-jac.c +++ /dev/null @@ -1,1012 +0,0 @@ -/* Exercise mpz_*_kronecker_*() and mpz_jacobi() functions. - -Copyright 1999-2004, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -/* With no arguments the various Kronecker/Jacobi symbol routines are - checked against some test data and a lot of derived data. - - To check the test data against PARI-GP, run - - t-jac -p | gp -q - - It takes a while because the output from "t-jac -p" is big. - - - Enhancements: - - More big test cases than those given by check_squares_zi would be good. */ - - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#ifdef _LONG_LONG_LIMB -#define LL(l,ll) ll -#else -#define LL(l,ll) l -#endif - - -int option_pari = 0; - - -unsigned long -mpz_mod4 (mpz_srcptr z) -{ - mpz_t m; - unsigned long ret; - - mpz_init (m); - mpz_fdiv_r_2exp (m, z, 2); - ret = mpz_get_ui (m); - mpz_clear (m); - return ret; -} - -int -mpz_fits_ulimb_p (mpz_srcptr z) -{ - return (SIZ(z) == 1 || SIZ(z) == 0); -} - -mp_limb_t -mpz_get_ulimb (mpz_srcptr z) -{ - if (SIZ(z) == 0) - return 0; - else - return PTR(z)[0]; -} - - -void -try_base (mp_limb_t a, mp_limb_t b, int answer) -{ - int got; - - if ((b & 1) == 0 || b == 1 || a > b) - return; - - got = mpn_jacobi_base (a, b, 0); - if (got != answer) - { - printf (LL("mpn_jacobi_base (%lu, %lu) is %d should be %d\n", - "mpn_jacobi_base (%llu, %llu) is %d should be %d\n"), - a, b, got, answer); - abort (); - } -} - - -void -try_zi_ui (mpz_srcptr a, unsigned long b, int answer) -{ - int got; - - got = mpz_kronecker_ui (a, b); - if (got != answer) - { - printf ("mpz_kronecker_ui ("); - mpz_out_str (stdout, 10, a); - printf (", %lu) is %d should be %d\n", b, got, answer); - abort (); - } -} - - -void -try_zi_si (mpz_srcptr a, long b, int answer) -{ - int got; - - got = mpz_kronecker_si (a, b); - if (got != answer) - { - printf ("mpz_kronecker_si ("); - mpz_out_str (stdout, 10, a); - printf (", %ld) is %d should be %d\n", b, got, answer); - abort (); - } -} - - -void -try_ui_zi (unsigned long a, mpz_srcptr b, int answer) -{ - int got; - - got = mpz_ui_kronecker (a, b); - if (got != answer) - { - printf ("mpz_ui_kronecker (%lu, ", a); - mpz_out_str (stdout, 10, b); - printf (") is %d should be %d\n", got, answer); - abort (); - } -} - - -void -try_si_zi (long a, mpz_srcptr b, int answer) -{ - int got; - - got = mpz_si_kronecker (a, b); - if (got != answer) - { - printf ("mpz_si_kronecker (%ld, ", a); - mpz_out_str (stdout, 10, b); - printf (") is %d should be %d\n", got, answer); - abort (); - } -} - - -/* Don't bother checking mpz_jacobi, since it only differs for b even, and - we don't have an actual expected answer for it. tests/devel/try.c does - some checks though. */ -void -try_zi_zi (mpz_srcptr a, mpz_srcptr b, int answer) -{ - int got; - - got = mpz_kronecker (a, b); - if (got != answer) - { - printf ("mpz_kronecker ("); - mpz_out_str (stdout, 10, a); - printf (", "); - mpz_out_str (stdout, 10, b); - printf (") is %d should be %d\n", got, answer); - abort (); - } -} - - -void -try_pari (mpz_srcptr a, mpz_srcptr b, int answer) -{ - printf ("try("); - mpz_out_str (stdout, 10, a); - printf (","); - mpz_out_str (stdout, 10, b); - printf (",%d)\n", answer); -} - - -void -try_each (mpz_srcptr a, mpz_srcptr b, int answer) -{ -#if 0 - fprintf(stderr, "asize = %d, bsize = %d\n", - mpz_sizeinbase (a, 2), mpz_sizeinbase (b, 2)); -#endif - if (option_pari) - { - try_pari (a, b, answer); - return; - } - - if (mpz_fits_ulimb_p (a) && mpz_fits_ulimb_p (b)) - try_base (mpz_get_ulimb (a), mpz_get_ulimb (b), answer); - - if (mpz_fits_ulong_p (b)) - try_zi_ui (a, mpz_get_ui (b), answer); - - if (mpz_fits_slong_p (b)) - try_zi_si (a, mpz_get_si (b), answer); - - if (mpz_fits_ulong_p (a)) - try_ui_zi (mpz_get_ui (a), b, answer); - - if (mpz_fits_sint_p (a)) - try_si_zi (mpz_get_si (a), b, answer); - - try_zi_zi (a, b, answer); -} - - -/* Try (a/b) and (a/-b). */ -void -try_pn (mpz_srcptr a, mpz_srcptr b_orig, int answer) -{ - mpz_t b; - - mpz_init_set (b, b_orig); - try_each (a, b, answer); - - mpz_neg (b, b); - if (mpz_sgn (a) < 0) - answer = -answer; - - try_each (a, b, answer); - - mpz_clear (b); -} - - -/* Try (a+k*p/b) for various k, using the fact (a/b) is periodic in a with - period p. For b>0, p=b if b!=2mod4 or p=4*b if b==2mod4. */ - -void -try_periodic_num (mpz_srcptr a_orig, mpz_srcptr b, int answer) -{ - mpz_t a, a_period; - int i; - - if (mpz_sgn (b) <= 0) - return; - - mpz_init_set (a, a_orig); - mpz_init_set (a_period, b); - if (mpz_mod4 (b) == 2) - mpz_mul_ui (a_period, a_period, 4); - - /* don't bother with these tests if they're only going to produce - even/even */ - if (mpz_even_p (a) && mpz_even_p (b) && mpz_even_p (a_period)) - goto done; - - for (i = 0; i < 6; i++) - { - mpz_add (a, a, a_period); - try_pn (a, b, answer); - } - - mpz_set (a, a_orig); - for (i = 0; i < 6; i++) - { - mpz_sub (a, a, a_period); - try_pn (a, b, answer); - } - - done: - mpz_clear (a); - mpz_clear (a_period); -} - - -/* Try (a/b+k*p) for various k, using the fact (a/b) is periodic in b of - period p. - - period p - a==0,1mod4 a - a==2mod4 4*a - a==3mod4 and b odd 4*a - a==3mod4 and b even 8*a - - In Henri Cohen's book the period is given as 4*a for all a==2,3mod4, but - a counterexample would seem to be (3/2)=-1 which with (3/14)=+1 doesn't - have period 4*a (but rather 8*a with (3/26)=-1). Maybe the plain 4*a is - to be read as applying to a plain Jacobi symbol with b odd, rather than - the Kronecker extension to b even. */ - -void -try_periodic_den (mpz_srcptr a, mpz_srcptr b_orig, int answer) -{ - mpz_t b, b_period; - int i; - - if (mpz_sgn (a) == 0 || mpz_sgn (b_orig) == 0) - return; - - mpz_init_set (b, b_orig); - - mpz_init_set (b_period, a); - if (mpz_mod4 (a) == 3 && mpz_even_p (b)) - mpz_mul_ui (b_period, b_period, 8L); - else if (mpz_mod4 (a) >= 2) - mpz_mul_ui (b_period, b_period, 4L); - - /* don't bother with these tests if they're only going to produce - even/even */ - if (mpz_even_p (a) && mpz_even_p (b) && mpz_even_p (b_period)) - goto done; - - for (i = 0; i < 6; i++) - { - mpz_add (b, b, b_period); - try_pn (a, b, answer); - } - - mpz_set (b, b_orig); - for (i = 0; i < 6; i++) - { - mpz_sub (b, b, b_period); - try_pn (a, b, answer); - } - - done: - mpz_clear (b); - mpz_clear (b_period); -} - - -static const unsigned long ktable[] = { - 0, 1, 2, 3, 4, 5, 6, 7, - GMP_NUMB_BITS-1, GMP_NUMB_BITS, GMP_NUMB_BITS+1, - 2*GMP_NUMB_BITS-1, 2*GMP_NUMB_BITS, 2*GMP_NUMB_BITS+1, - 3*GMP_NUMB_BITS-1, 3*GMP_NUMB_BITS, 3*GMP_NUMB_BITS+1 -}; - - -/* Try (a/b*2^k) for various k. */ -void -try_2den (mpz_srcptr a, mpz_srcptr b_orig, int answer) -{ - mpz_t b; - int kindex; - int answer_a2, answer_k; - unsigned long k; - - /* don't bother when b==0 */ - if (mpz_sgn (b_orig) == 0) - return; - - mpz_init_set (b, b_orig); - - /* (a/2) is 0 if a even, 1 if a==1 or 7 mod 8, -1 if a==3 or 5 mod 8 */ - answer_a2 = (mpz_even_p (a) ? 0 - : (((SIZ(a) >= 0 ? PTR(a)[0] : -PTR(a)[0]) + 2) & 7) < 4 ? 1 - : -1); - - for (kindex = 0; kindex < numberof (ktable); kindex++) - { - k = ktable[kindex]; - - /* answer_k = answer*(answer_a2^k) */ - answer_k = (answer_a2 == 0 && k != 0 ? 0 - : (k & 1) == 1 && answer_a2 == -1 ? -answer - : answer); - - mpz_mul_2exp (b, b_orig, k); - try_pn (a, b, answer_k); - } - - mpz_clear (b); -} - - -/* Try (a*2^k/b) for various k. If it happens mpz_ui_kronecker() gets (2/b) - wrong it will show up as wrong answers demanded. */ -void -try_2num (mpz_srcptr a_orig, mpz_srcptr b, int answer) -{ - mpz_t a; - int kindex; - int answer_2b, answer_k; - unsigned long k; - - /* don't bother when a==0 */ - if (mpz_sgn (a_orig) == 0) - return; - - mpz_init (a); - - /* (2/b) is 0 if b even, 1 if b==1 or 7 mod 8, -1 if b==3 or 5 mod 8 */ - answer_2b = (mpz_even_p (b) ? 0 - : (((SIZ(b) >= 0 ? PTR(b)[0] : -PTR(b)[0]) + 2) & 7) < 4 ? 1 - : -1); - - for (kindex = 0; kindex < numberof (ktable); kindex++) - { - k = ktable[kindex]; - - /* answer_k = answer*(answer_2b^k) */ - answer_k = (answer_2b == 0 && k != 0 ? 0 - : (k & 1) == 1 && answer_2b == -1 ? -answer - : answer); - - mpz_mul_2exp (a, a_orig, k); - try_pn (a, b, answer_k); - } - - mpz_clear (a); -} - - -/* The try_2num() and try_2den() routines don't in turn call - try_periodic_num() and try_periodic_den() because it hugely increases the - number of tests performed, without obviously increasing coverage. - - Useful extra derived cases can be added here. */ - -void -try_all (mpz_t a, mpz_t b, int answer) -{ - try_pn (a, b, answer); - try_periodic_num (a, b, answer); - try_periodic_den (a, b, answer); - try_2num (a, b, answer); - try_2den (a, b, answer); -} - - -void -check_data (void) -{ - static const struct { - const char *a; - const char *b; - int answer; - - } data[] = { - - /* Note that the various derived checks in try_all() reduce the cases - that need to be given here. */ - - /* some zeros */ - { "0", "0", 0 }, - { "0", "2", 0 }, - { "0", "6", 0 }, - { "5", "0", 0 }, - { "24", "60", 0 }, - - /* (a/1) = 1, any a - In particular note (0/1)=1 so that (a/b)=(a mod b/b). */ - { "0", "1", 1 }, - { "1", "1", 1 }, - { "2", "1", 1 }, - { "3", "1", 1 }, - { "4", "1", 1 }, - { "5", "1", 1 }, - - /* (0/b) = 0, b != 1 */ - { "0", "3", 0 }, - { "0", "5", 0 }, - { "0", "7", 0 }, - { "0", "9", 0 }, - { "0", "11", 0 }, - { "0", "13", 0 }, - { "0", "15", 0 }, - - /* (1/b) = 1 */ - { "1", "1", 1 }, - { "1", "3", 1 }, - { "1", "5", 1 }, - { "1", "7", 1 }, - { "1", "9", 1 }, - { "1", "11", 1 }, - - /* (-1/b) = (-1)^((b-1)/2) which is -1 for b==3 mod 4 */ - { "-1", "1", 1 }, - { "-1", "3", -1 }, - { "-1", "5", 1 }, - { "-1", "7", -1 }, - { "-1", "9", 1 }, - { "-1", "11", -1 }, - { "-1", "13", 1 }, - { "-1", "15", -1 }, - { "-1", "17", 1 }, - { "-1", "19", -1 }, - - /* (2/b) = (-1)^((b^2-1)/8) which is -1 for b==3,5 mod 8. - try_2num() will exercise multiple powers of 2 in the numerator. */ - { "2", "1", 1 }, - { "2", "3", -1 }, - { "2", "5", -1 }, - { "2", "7", 1 }, - { "2", "9", 1 }, - { "2", "11", -1 }, - { "2", "13", -1 }, - { "2", "15", 1 }, - { "2", "17", 1 }, - - /* (-2/b) = (-1)^((b^2-1)/8)*(-1)^((b-1)/2) which is -1 for b==5,7mod8. - try_2num() will exercise multiple powers of 2 in the numerator, which - will test that the shift in mpz_si_kronecker() uses unsigned not - signed. */ - { "-2", "1", 1 }, - { "-2", "3", 1 }, - { "-2", "5", -1 }, - { "-2", "7", -1 }, - { "-2", "9", 1 }, - { "-2", "11", 1 }, - { "-2", "13", -1 }, - { "-2", "15", -1 }, - { "-2", "17", 1 }, - - /* (a/2)=(2/a). - try_2den() will exercise multiple powers of 2 in the denominator. */ - { "3", "2", -1 }, - { "5", "2", -1 }, - { "7", "2", 1 }, - { "9", "2", 1 }, - { "11", "2", -1 }, - - /* Harriet Griffin, "Elementary Theory of Numbers", page 155, various - examples. */ - { "2", "135", 1 }, - { "135", "19", -1 }, - { "2", "19", -1 }, - { "19", "135", 1 }, - { "173", "135", 1 }, - { "38", "135", 1 }, - { "135", "173", 1 }, - { "173", "5", -1 }, - { "3", "5", -1 }, - { "5", "173", -1 }, - { "173", "3", -1 }, - { "2", "3", -1 }, - { "3", "173", -1 }, - { "253", "21", 1 }, - { "1", "21", 1 }, - { "21", "253", 1 }, - { "21", "11", -1 }, - { "-1", "11", -1 }, - - /* Griffin page 147 */ - { "-1", "17", 1 }, - { "2", "17", 1 }, - { "-2", "17", 1 }, - { "-1", "89", 1 }, - { "2", "89", 1 }, - - /* Griffin page 148 */ - { "89", "11", 1 }, - { "1", "11", 1 }, - { "89", "3", -1 }, - { "2", "3", -1 }, - { "3", "89", -1 }, - { "11", "89", 1 }, - { "33", "89", -1 }, - - /* H. Davenport, "The Higher Arithmetic", page 65, the quadratic - residues and non-residues mod 19. */ - { "1", "19", 1 }, - { "4", "19", 1 }, - { "5", "19", 1 }, - { "6", "19", 1 }, - { "7", "19", 1 }, - { "9", "19", 1 }, - { "11", "19", 1 }, - { "16", "19", 1 }, - { "17", "19", 1 }, - { "2", "19", -1 }, - { "3", "19", -1 }, - { "8", "19", -1 }, - { "10", "19", -1 }, - { "12", "19", -1 }, - { "13", "19", -1 }, - { "14", "19", -1 }, - { "15", "19", -1 }, - { "18", "19", -1 }, - - /* Residues and non-residues mod 13 */ - { "0", "13", 0 }, - { "1", "13", 1 }, - { "2", "13", -1 }, - { "3", "13", 1 }, - { "4", "13", 1 }, - { "5", "13", -1 }, - { "6", "13", -1 }, - { "7", "13", -1 }, - { "8", "13", -1 }, - { "9", "13", 1 }, - { "10", "13", 1 }, - { "11", "13", -1 }, - { "12", "13", 1 }, - - /* various */ - { "5", "7", -1 }, - { "15", "17", 1 }, - { "67", "89", 1 }, - - /* special values inducing a==b==1 at the end of jac_or_kron() */ - { "0x10000000000000000000000000000000000000000000000001", - "0x10000000000000000000000000000000000000000000000003", 1 }, - - /* Test for previous bugs in jacobi_2. */ - { "0x43900000000", "0x42400000439", -1 }, /* 32-bit limbs */ - { "0x4390000000000000000", "0x4240000000000000439", -1 }, /* 64-bit limbs */ - - { "198158408161039063", "198158360916398807", -1 }, - - /* Some tests involving large quotients in the continued fraction - expansion. */ - { "37200210845139167613356125645445281805", - "451716845976689892447895811408978421929", -1 }, - { "67674091930576781943923596701346271058970643542491743605048620644676477275152701774960868941561652032482173612421015", - "4902678867794567120224500687210807069172039735", 0 }, - { "2666617146103764067061017961903284334497474492754652499788571378062969111250584288683585223600172138551198546085281683283672592", "2666617146103764067061017961903284334497474492754652499788571378062969111250584288683585223600172138551198546085281683290481773", 1 }, - - /* Exercises the case asize == 1, btwos > 0 in mpz_jacobi. */ - { "804609", "421248363205206617296534688032638102314410556521742428832362659824", 1 } , - { "4190209", "2239744742177804210557442048984321017460028974602978995388383905961079286530650825925074203175536427000", 1 }, - - /* Exercises the case asize == 1, btwos = 63 in mpz_jacobi - (relevant when GMP_LIMB_BITS == 64). */ - { "17311973299000934401", "1675975991242824637446753124775689449936871337036614677577044717424700351103148799107651171694863695242089956242888229458836426332300124417011114380886016", 1 }, - { "3220569220116583677", "41859917623035396746", -1 }, - - /* Other test cases that triggered bugs during development. */ - { "37200210845139167613356125645445281805", "340116213441272389607827434472642576514", -1 }, - { "74400421690278335226712251290890563610", "451716845976689892447895811408978421929", -1 }, - }; - - int i; - mpz_t a, b; - - mpz_init (a); - mpz_init (b); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (a, data[i].a, 0); - mpz_set_str_or_abort (b, data[i].b, 0); - try_all (a, b, data[i].answer); - } - - mpz_clear (a); - mpz_clear (b); -} - - -/* (a^2/b)=1 if gcd(a,b)=1, or (a^2/b)=0 if gcd(a,b)!=1. - This includes when a=0 or b=0. */ -void -check_squares_zi (void) -{ - gmp_randstate_ptr rands = RANDS; - mpz_t a, b, g; - int i, answer; - mp_size_t size_range, an, bn; - mpz_t bs; - - mpz_init (bs); - mpz_init (a); - mpz_init (b); - mpz_init (g); - - for (i = 0; i < 50; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 10 + i/8 + 2; - - mpz_urandomb (bs, rands, size_range); - an = mpz_get_ui (bs); - mpz_rrandomb (a, rands, an); - - mpz_urandomb (bs, rands, size_range); - bn = mpz_get_ui (bs); - mpz_rrandomb (b, rands, bn); - - mpz_gcd (g, a, b); - if (mpz_cmp_ui (g, 1L) == 0) - answer = 1; - else - answer = 0; - - mpz_mul (a, a, a); - - try_all (a, b, answer); - } - - mpz_clear (bs); - mpz_clear (a); - mpz_clear (b); - mpz_clear (g); -} - - -/* Check the handling of asize==0, make sure it isn't affected by the low - limb. */ -void -check_a_zero (void) -{ - mpz_t a, b; - - mpz_init_set_ui (a, 0); - mpz_init (b); - - mpz_set_ui (b, 1L); - PTR(a)[0] = 0; - try_all (a, b, 1); /* (0/1)=1 */ - PTR(a)[0] = 1; - try_all (a, b, 1); /* (0/1)=1 */ - - mpz_set_si (b, -1L); - PTR(a)[0] = 0; - try_all (a, b, 1); /* (0/-1)=1 */ - PTR(a)[0] = 1; - try_all (a, b, 1); /* (0/-1)=1 */ - - mpz_set_ui (b, 0); - PTR(a)[0] = 0; - try_all (a, b, 0); /* (0/0)=0 */ - PTR(a)[0] = 1; - try_all (a, b, 0); /* (0/0)=0 */ - - mpz_set_ui (b, 2); - PTR(a)[0] = 0; - try_all (a, b, 0); /* (0/2)=0 */ - PTR(a)[0] = 1; - try_all (a, b, 0); /* (0/2)=0 */ - - mpz_clear (a); - mpz_clear (b); -} - - -/* Assumes that b = prod p_k^e_k */ -int -ref_jacobi (mpz_srcptr a, mpz_srcptr b, unsigned nprime, - mpz_t prime[], unsigned *exp) -{ - unsigned i; - int res; - - for (i = 0, res = 1; i < nprime; i++) - if (exp[i]) - { - int legendre = refmpz_legendre (a, prime[i]); - if (!legendre) - return 0; - if (exp[i] & 1) - res *= legendre; - } - return res; -} - -void -check_jacobi_factored (void) -{ -#define PRIME_N 10 -#define PRIME_MAX_SIZE 50 -#define PRIME_MAX_EXP 4 -#define PRIME_A_COUNT 10 -#define PRIME_B_COUNT 5 -#define PRIME_MAX_B_SIZE 2000 - - gmp_randstate_ptr rands = RANDS; - mpz_t prime[PRIME_N]; - unsigned exp[PRIME_N]; - mpz_t a, b, t, bs; - unsigned i; - - mpz_init (a); - mpz_init (b); - mpz_init (t); - mpz_init (bs); - - /* Generate primes */ - for (i = 0; i < PRIME_N; i++) - { - mp_size_t size; - mpz_init (prime[i]); - mpz_urandomb (bs, rands, 32); - size = mpz_get_ui (bs) % PRIME_MAX_SIZE + 2; - mpz_rrandomb (prime[i], rands, size); - if (mpz_cmp_ui (prime[i], 3) <= 0) - mpz_set_ui (prime[i], 3); - else - mpz_nextprime (prime[i], prime[i]); - } - - for (i = 0; i < PRIME_B_COUNT; i++) - { - unsigned j, k; - mp_bitcnt_t bsize; - - mpz_set_ui (b, 1); - bsize = 1; - - for (j = 0; j < PRIME_N && bsize < PRIME_MAX_B_SIZE; j++) - { - mpz_urandomb (bs, rands, 32); - exp[j] = mpz_get_ui (bs) % PRIME_MAX_EXP; - mpz_pow_ui (t, prime[j], exp[j]); - mpz_mul (b, b, t); - bsize = mpz_sizeinbase (b, 2); - } - for (k = 0; k < PRIME_A_COUNT; k++) - { - int answer; - mpz_rrandomb (a, rands, bsize + 2); - answer = ref_jacobi (a, b, j, prime, exp); - try_all (a, b, answer); - } - } - for (i = 0; i < PRIME_N; i++) - mpz_clear (prime[i]); - - mpz_clear (a); - mpz_clear (b); - mpz_clear (t); - mpz_clear (bs); - -#undef PRIME_N -#undef PRIME_MAX_SIZE -#undef PRIME_MAX_EXP -#undef PRIME_A_COUNT -#undef PRIME_B_COUNT -#undef PRIME_MAX_B_SIZE -} - -/* These tests compute (a|n), where the quotient sequence includes - large quotients, and n has a known factorization. Such inputs are - generated as follows. First, construct a large n, as a power of a - prime p of moderate size. - - Next, compute a matrix from factors (q,1;1,0), with q chosen with - uniformly distributed size. We must stop with matrix elements of - roughly half the size of n. Denote elements of M as M = (m00, m01; - m10, m11). - - We now look for solutions to - - n = m00 x + m01 y - a = m10 x + m11 y - - with x,y > 0. Since n >= m00 * m01, there exists a positive - solution to the first equation. Find those x, y, and substitute in - the second equation to get a. Then the quotient sequence for (a|n) - is precisely the quotients used when constructing M, followed by - the quotient sequence for (x|y). - - Numbers should also be large enough that we exercise hgcd_jacobi, - which means that they should be larger than - - max (GCD_DC_THRESHOLD, 3 * HGCD_THRESHOLD) - - With an n of roughly 40000 bits, this should hold on most machines. -*/ - -void -check_large_quotients (void) -{ -#define COUNT 50 -#define PBITS 200 -#define PPOWER 201 -#define MAX_QBITS 500 - - gmp_randstate_ptr rands = RANDS; - - mpz_t p, n, q, g, s, t, x, y, bs; - mpz_t M[2][2]; - mp_bitcnt_t nsize; - unsigned i; - - mpz_init (p); - mpz_init (n); - mpz_init (q); - mpz_init (g); - mpz_init (s); - mpz_init (t); - mpz_init (x); - mpz_init (y); - mpz_init (bs); - mpz_init (M[0][0]); - mpz_init (M[0][1]); - mpz_init (M[1][0]); - mpz_init (M[1][1]); - - /* First generate a number with known factorization, as a random - smallish prime raised to an odd power. Then (a|n) = (a|p). */ - mpz_rrandomb (p, rands, PBITS); - mpz_nextprime (p, p); - mpz_pow_ui (n, p, PPOWER); - - nsize = mpz_sizeinbase (n, 2); - - for (i = 0; i < COUNT; i++) - { - int answer; - mp_bitcnt_t msize; - - mpz_set_ui (M[0][0], 1); - mpz_set_ui (M[0][1], 0); - mpz_set_ui (M[1][0], 0); - mpz_set_ui (M[1][1], 1); - - for (msize = 1; 2*(msize + MAX_QBITS) + 1 < nsize ;) - { - unsigned i; - mpz_rrandomb (bs, rands, 32); - mpz_rrandomb (q, rands, 1 + mpz_get_ui (bs) % MAX_QBITS); - - /* Multiply by (q, 1; 1,0) from the right */ - for (i = 0; i < 2; i++) - { - mp_bitcnt_t size; - mpz_swap (M[i][0], M[i][1]); - mpz_addmul (M[i][0], M[i][1], q); - size = mpz_sizeinbase (M[i][0], 2); - if (size > msize) - msize = size; - } - } - mpz_gcdext (g, s, t, M[0][0], M[0][1]); - ASSERT_ALWAYS (mpz_cmp_ui (g, 1) == 0); - - /* Solve n = M[0][0] * x + M[0][1] * y */ - if (mpz_sgn (s) > 0) - { - mpz_mul (x, n, s); - mpz_fdiv_qr (q, x, x, M[0][1]); - mpz_mul (y, q, M[0][0]); - mpz_addmul (y, t, n); - ASSERT_ALWAYS (mpz_sgn (y) > 0); - } - else - { - mpz_mul (y, n, t); - mpz_fdiv_qr (q, y, y, M[0][0]); - mpz_mul (x, q, M[0][1]); - mpz_addmul (x, s, n); - ASSERT_ALWAYS (mpz_sgn (x) > 0); - } - mpz_mul (x, x, M[1][0]); - mpz_addmul (x, y, M[1][1]); - - /* Now (x|n) has the selected large quotients */ - answer = refmpz_legendre (x, p); - try_zi_zi (x, n, answer); - } - mpz_clear (p); - mpz_clear (n); - mpz_clear (q); - mpz_clear (g); - mpz_clear (s); - mpz_clear (t); - mpz_clear (x); - mpz_clear (y); - mpz_clear (bs); - mpz_clear (M[0][0]); - mpz_clear (M[0][1]); - mpz_clear (M[1][0]); - mpz_clear (M[1][1]); -#undef COUNT -#undef PBITS -#undef PPOWER -#undef MAX_QBITS -} - -int -main (int argc, char *argv[]) -{ - tests_start (); - - if (argc >= 2 && strcmp (argv[1], "-p") == 0) - { - option_pari = 1; - - printf ("\ -try(a,b,answer) =\n\ -{\n\ - if (kronecker(a,b) != answer,\n\ - print(\"wrong at \", a, \",\", b,\n\ - \" expected \", answer,\n\ - \" pari says \", kronecker(a,b)))\n\ -}\n"); - } - - check_data (); - check_squares_zi (); - check_a_zero (); - check_jacobi_factored (); - check_large_quotients (); - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-lcm.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-lcm.c deleted file mode 100644 index 3cc41483ef7..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-lcm.c +++ /dev/null @@ -1,185 +0,0 @@ -/* Test mpz_lcm and mpz_lcm_ui. - -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_all (mpz_ptr want, mpz_srcptr x_orig, mpz_srcptr y_orig) -{ - mpz_t got, x, y; - int negx, negy, swap, inplace; - - mpz_init (got); - mpz_init_set (x, x_orig); - mpz_init_set (y, y_orig); - - for (swap = 0; swap < 2; swap++) - { - mpz_swap (x, y); - - for (negx = 0; negx < 2; negx++) - { - mpz_neg (x, x); - - for (negy = 0; negy < 2; negy++) - { - mpz_neg (y, y); - - for (inplace = 0; inplace <= 1; inplace++) - { - if (inplace) - { mpz_set (got, x); mpz_lcm (got, got, y); } - else - mpz_lcm (got, x, y); - MPZ_CHECK_FORMAT (got); - - if (mpz_cmp (got, want) != 0) - { - printf ("mpz_lcm wrong, inplace=%d\n", inplace); - fail: - mpz_trace ("x", x); - mpz_trace ("y", y); - mpz_trace ("got", got); - mpz_trace ("want", want); - abort (); - } - - if (mpz_fits_ulong_p (y)) - { - unsigned long yu = mpz_get_ui (y); - if (inplace) - { mpz_set (got, x); mpz_lcm_ui (got, got, yu); } - else - mpz_lcm_ui (got, x, yu); - - if (mpz_cmp (got, want) != 0) - { - printf ("mpz_lcm_ui wrong, inplace=%d\n", inplace); - printf ("yu=%lu\n", yu); - goto fail; - } - } - } - } - } - } - - mpz_clear (got); - mpz_clear (x); - mpz_clear (y); -} - - -void -check_primes (void) -{ - static unsigned long prime[] = { - 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97, - 101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181, - 191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277, - 281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383, - 389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487, - }; - mpz_t want, x, y; - int i; - - mpz_init (want); - mpz_init (x); - mpz_init (y); - - /* Check zeros. */ - mpz_set_ui (want, 0); - mpz_set_ui (x, 1); - check_all (want, want, want); - check_all (want, want, x); - check_all (want, x, want); - - /* New prime each time. */ - mpz_set_ui (want, 1L); - for (i = 0; i < numberof (prime); i++) - { - mpz_set (x, want); - mpz_set_ui (y, prime[i]); - mpz_mul_ui (want, want, prime[i]); - check_all (want, x, y); - } - - /* Old prime each time. */ - mpz_set (x, want); - for (i = 0; i < numberof (prime); i++) - { - mpz_set_ui (y, prime[i]); - check_all (want, x, y); - } - - /* One old, one new each time. */ - mpz_set_ui (want, prime[0]); - for (i = 1; i < numberof (prime); i++) - { - mpz_set (x, want); - mpz_set_ui (y, prime[i] * prime[i-1]); - mpz_mul_ui (want, want, prime[i]); - check_all (want, x, y); - } - - /* Triplets with A,B in x and B,C in y. */ - mpz_set_ui (want, 1L); - mpz_set_ui (x, 1L); - mpz_set_ui (y, 1L); - for (i = 0; i+2 < numberof (prime); i += 3) - { - mpz_mul_ui (want, want, prime[i]); - mpz_mul_ui (want, want, prime[i+1]); - mpz_mul_ui (want, want, prime[i+2]); - - mpz_mul_ui (x, x, prime[i]); - mpz_mul_ui (x, x, prime[i+1]); - - mpz_mul_ui (y, y, prime[i+1]); - mpz_mul_ui (y, y, prime[i+2]); - - check_all (want, x, y); - } - - - mpz_clear (want); - mpz_clear (x); - mpz_clear (y); -} - - - -int -main (int argc, char *argv[]) -{ - tests_start (); - - check_primes (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-limbs.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-limbs.c deleted file mode 100644 index 43bcfb03e8c..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-limbs.c +++ /dev/null @@ -1,233 +0,0 @@ -/* Test mpz_limbs_* functions - -Copyright 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdlib.h> -#include <stdio.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#define COUNT 100 -#define BITSIZE 500 - -/* Like mpz_add. For simplicity, support positive inputs only. */ -static void -alt_add (mpz_ptr r, mpz_srcptr a, mpz_srcptr b) -{ - mp_size_t an = mpz_size (a); - mp_size_t bn = mpz_size (b); - mp_ptr rp; - - ASSERT (an > 0); - ASSERT (bn > 0); - if (an < bn) - { - MP_SIZE_T_SWAP (an, bn); - MPZ_SRCPTR_SWAP (a, b); - } - rp = mpz_limbs_modify (r, an + 1); - rp[an] = mpn_add (rp, mpz_limbs_read (a), an, mpz_limbs_read (b), bn); - mpz_limbs_finish (r, an + 1); -} - -static void -check_funcs (const char *name, - void (*f)(mpz_ptr, mpz_srcptr, mpz_srcptr), - void (*ref_f)(mpz_ptr, mpz_srcptr, mpz_srcptr), - mpz_srcptr a, mpz_srcptr b) -{ - mpz_t r, ref; - mpz_inits (r, ref, NULL); - - ref_f (ref, a, b); - MPZ_CHECK_FORMAT (ref); - f (r, a, b); - MPZ_CHECK_FORMAT (r); - - if (mpz_cmp (r, ref) != 0) - { - printf ("%s failed, abits %u, bbits %u\n", - name, - (unsigned) mpz_sizeinbase (a, 2), - (unsigned) mpz_sizeinbase (b, 2)); - gmp_printf ("a = %Zx\n", a); - gmp_printf ("b = %Zx\n", b); - gmp_printf ("r = %Zx (bad)\n", r); - gmp_printf ("ref = %Zx\n", ref); - abort (); - } - mpz_clears (r, ref, NULL); -} - -static void -check_add (void) -{ - gmp_randstate_ptr rands = RANDS; - mpz_t bs, a, b; - unsigned i; - mpz_inits (bs, a, b, NULL); - for (i = 0; i < COUNT; i++) - { - mpz_urandomb (bs, rands, 32); - mpz_rrandomb (a, rands, 1 + mpz_get_ui (bs) % BITSIZE); - mpz_urandomb (bs, rands, 32); - mpz_rrandomb (b, rands, 1 + mpz_get_ui (bs) % BITSIZE); - - check_funcs ("add", alt_add, mpz_add, a, b); - } - mpz_clears (bs, a, b, NULL); -} - -static void -alt_mul (mpz_ptr r, mpz_srcptr a, mpz_srcptr b) -{ - mp_size_t an = mpz_size (a); - mp_size_t bn = mpz_size (b); - mp_srcptr ap, bp; - TMP_DECL; - - TMP_MARK; - - ASSERT (an > 0); - ASSERT (bn > 0); - if (an < bn) - { - MP_SIZE_T_SWAP (an, bn); - MPZ_SRCPTR_SWAP (a, b); - } - /* NOTE: This copying seems unnecessary; better to allocate new - result area, and free the old area when done. */ - if (r == a) - { - mp_ptr tp = TMP_ALLOC_LIMBS (an); - MPN_COPY (tp, mpz_limbs_read (a), an); - ap = tp; - bp = (a == b) ? ap : mpz_limbs_read (b); - } - else if (r == b) - { - mp_ptr tp = TMP_ALLOC_LIMBS (bn); - MPN_COPY (tp, mpz_limbs_read (b), bn); - bp = tp; - ap = mpz_limbs_read (a); - } - else - { - ap = mpz_limbs_read (a); - bp = mpz_limbs_read (b); - } - mpn_mul (mpz_limbs_write (r, an + bn), - ap, an, bp, bn); - - mpz_limbs_finish (r, an + bn); -} - -void -check_mul (void) -{ - gmp_randstate_ptr rands = RANDS; - mpz_t bs, a, b; - unsigned i; - mpz_inits (bs, a, b, NULL); - for (i = 0; i < COUNT; i++) - { - mpz_urandomb (bs, rands, 32); - mpz_rrandomb (a, rands, 1 + mpz_get_ui (bs) % BITSIZE); - mpz_urandomb (bs, rands, 32); - mpz_rrandomb (b, rands, 1 + mpz_get_ui (bs) % BITSIZE); - - check_funcs ("mul", alt_mul, mpz_mul, a, b); - } - mpz_clears (bs, a, b, NULL); -} - -#define MAX_SIZE 100 - -static void -check_roinit (void) -{ - gmp_randstate_ptr rands = RANDS; - mpz_t bs, a, b, r, ref; - unsigned i; - - mpz_inits (bs, a, b, r, ref, NULL); - - for (i = 0; i < COUNT; i++) - { - mp_srcptr ap, bp; - mp_size_t an, bn; - mpz_urandomb (bs, rands, 32); - mpz_rrandomb (a, rands, 1 + mpz_get_ui (bs) % BITSIZE); - mpz_urandomb (bs, rands, 32); - mpz_rrandomb (b, rands, 1 + mpz_get_ui (bs) % BITSIZE); - - an = mpz_size (a); - ap = mpz_limbs_read (a); - bn = mpz_size (b); - bp = mpz_limbs_read (b); - - mpz_add (ref, a, b); - { - mpz_t a1, b1; -#if __STDC_VERSION__ >= 199901 - const mpz_t a2 = MPZ_ROINIT_N ( (mp_ptr) ap, an); - const mpz_t b2 = MPZ_ROINIT_N ( (mp_ptr) bp, bn); - - mpz_set_ui (r, 0); - mpz_add (r, a2, b2); - if (mpz_cmp (r, ref) != 0) - { - printf ("MPZ_ROINIT_N failed\n"); - gmp_printf ("a = %Zx\n", a); - gmp_printf ("b = %Zx\n", b); - gmp_printf ("r = %Zx (bad)\n", r); - gmp_printf ("ref = %Zx\n", ref); - abort (); - } -#endif - mpz_set_ui (r, 0); - mpz_add (r, mpz_roinit_n (a1, ap, an), mpz_roinit_n (b1, bp, bn)); - if (mpz_cmp (r, ref) != 0) - { - printf ("mpz_roinit_n failed\n"); - gmp_printf ("a = %Zx\n", a); - gmp_printf ("b = %Zx\n", b); - gmp_printf ("r = %Zx (bad)\n", r); - gmp_printf ("ref = %Zx\n", ref); - abort (); - } - } - } - mpz_clears (bs, a, b, r, ref, NULL); -} - -int -main (int argc, char *argv[]) -{ - tests_start (); - tests_end (); - - check_add (); - check_mul (); - check_roinit (); - - return 0; - -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-lucnum_ui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-lucnum_ui.c deleted file mode 100644 index 7cb734195bc..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-lucnum_ui.c +++ /dev/null @@ -1,97 +0,0 @@ -/* Test mpz_lucnum_ui and mpz_lucnum2_ui. - -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* Usage: t-lucnum_ui [n] - - Test up to L[n], or if n is omitted then the default limit below. A - literal "x" for the limit means continue forever, this being meant only - for development. */ - - -void -check_sequence (int argc, char *argv[]) -{ - unsigned long n; - unsigned long limit = 100 * GMP_LIMB_BITS; - mpz_t want_ln, want_ln1, got_ln, got_ln1; - - if (argc > 1 && argv[1][0] == 'x') - limit = ULONG_MAX; - else if (argc > 1) - limit = atoi (argv[1]); - - /* start at n==0 */ - mpz_init_set_si (want_ln1, -1); /* L[-1] */ - mpz_init_set_ui (want_ln, 2); /* L[0] */ - mpz_init (got_ln); - mpz_init (got_ln1); - - for (n = 0; n < limit; n++) - { - mpz_lucnum2_ui (got_ln, got_ln1, n); - MPZ_CHECK_FORMAT (got_ln); - MPZ_CHECK_FORMAT (got_ln1); - if (mpz_cmp (got_ln, want_ln) != 0 || mpz_cmp (got_ln1, want_ln1) != 0) - { - printf ("mpz_lucnum2_ui(%lu) wrong\n", n); - mpz_trace ("want ln ", want_ln); - mpz_trace ("got ln ", got_ln); - mpz_trace ("want ln1", want_ln1); - mpz_trace ("got ln1", got_ln1); - abort (); - } - - mpz_lucnum_ui (got_ln, n); - MPZ_CHECK_FORMAT (got_ln); - if (mpz_cmp (got_ln, want_ln) != 0) - { - printf ("mpz_lucnum_ui(%lu) wrong\n", n); - mpz_trace ("want ln", want_ln); - mpz_trace ("got ln", got_ln); - abort (); - } - - mpz_add (want_ln1, want_ln1, want_ln); /* L[n+1] = L[n] + L[n-1] */ - mpz_swap (want_ln1, want_ln); - } - - mpz_clear (want_ln); - mpz_clear (want_ln1); - mpz_clear (got_ln); - mpz_clear (got_ln1); -} - -int -main (int argc, char *argv[]) -{ - tests_start (); - mp_trace_base = -16; - - check_sequence (argc, argv); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-mfac_uiui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-mfac_uiui.c deleted file mode 100644 index 7bf51a5dacb..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-mfac_uiui.c +++ /dev/null @@ -1,136 +0,0 @@ -/* Exercise mpz_mfac_uiui. - -Copyright 2000-2002, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* Usage: t-mfac_uiui [x|num] - - With no arguments testing goes up to the initial value of "limit" below. - With a number argument tests are carried that far, or with a literal "x" - tests are continued without limit (this being meant only for development - purposes). */ - -#define MULTIFAC_WHEEL (2*3*11) -#define MULTIFAC_WHEEL2 (5*13) - -int -main (int argc, char *argv[]) -{ - mpz_t ref[MULTIFAC_WHEEL], ref2[MULTIFAC_WHEEL2], res; - unsigned long n, j, m, m2; - unsigned long limit = 2222, step = 1; - - tests_start (); - - if (argc > 1 && argv[1][0] == 'x') - limit = ULONG_MAX; - else if (argc > 1) - limit = atoi (argv[1]); - - /* for small limb testing */ - limit = MIN (limit, MP_LIMB_T_MAX); - - for (m = 0; m < MULTIFAC_WHEEL; m++) - mpz_init_set_ui(ref [m],1); - for (m2 = 0; m2 < MULTIFAC_WHEEL2; m2++) - mpz_init_set_ui(ref2 [m2],1); - - mpz_init (res); - - m = 0; - m2 = 0; - for (n = 0; n <= limit;) - { - mpz_mfac_uiui (res, n, MULTIFAC_WHEEL); - MPZ_CHECK_FORMAT (res); - if (mpz_cmp (ref[m], res) != 0) - { - printf ("mpz_mfac_uiui(%lu,%d) wrong\n", n, MULTIFAC_WHEEL); - printf (" got "); mpz_out_str (stdout, 10, res); printf("\n"); - printf (" want "); mpz_out_str (stdout, 10, ref[m]); printf("\n"); - abort (); - } - mpz_mfac_uiui (res, n, MULTIFAC_WHEEL2); - MPZ_CHECK_FORMAT (res); - if (mpz_cmp (ref2[m2], res) != 0) - { - printf ("mpz_mfac_uiui(%lu,%d) wrong\n", n, MULTIFAC_WHEEL2); - printf (" got "); mpz_out_str (stdout, 10, res); printf("\n"); - printf (" want "); mpz_out_str (stdout, 10, ref2[m2]); printf("\n"); - abort (); - } - if (n + step <= limit) - for (j = 0; j < step; j++) { - n++; m++; m2++; - if (m >= MULTIFAC_WHEEL) m -= MULTIFAC_WHEEL; - if (m2 >= MULTIFAC_WHEEL2) m2 -= MULTIFAC_WHEEL2; - mpz_mul_ui (ref[m], ref[m], n); /* Compute a reference, with current library */ - mpz_mul_ui (ref2[m2], ref2[m2], n); /* Compute a reference, with current library */ - } - else n += step; - } - mpz_fac_ui (ref[0], n); - mpz_mfac_uiui (res, n, 1); - MPZ_CHECK_FORMAT (res); - if (mpz_cmp (ref[0], res) != 0) - { - printf ("mpz_mfac_uiui(%lu,1) wrong\n", n); - printf (" got "); mpz_out_str (stdout, 10, res); printf("\n"); - printf (" want "); mpz_out_str (stdout, 10, ref[0]); printf("\n"); - abort (); - } - - mpz_2fac_ui (ref[0], n); - mpz_mfac_uiui (res, n, 2); - MPZ_CHECK_FORMAT (res); - if (mpz_cmp (ref[0], res) != 0) - { - printf ("mpz_mfac_uiui(%lu,1) wrong\n", n); - printf (" got "); mpz_out_str (stdout, 10, res); printf("\n"); - printf (" want "); mpz_out_str (stdout, 10, ref[0]); printf("\n"); - abort (); - } - - n++; - mpz_2fac_ui (ref[0], n); - mpz_mfac_uiui (res, n, 2); - MPZ_CHECK_FORMAT (res); - if (mpz_cmp (ref[0], res) != 0) - { - printf ("mpz_mfac_uiui(%lu,2) wrong\n", n); - printf (" got "); mpz_out_str (stdout, 10, res); printf("\n"); - printf (" want "); mpz_out_str (stdout, 10, ref[0]); printf("\n"); - abort (); - } - - for (m = 0; m < MULTIFAC_WHEEL; m++) - mpz_clear (ref[m]); - for (m2 = 0; m2 < MULTIFAC_WHEEL2; m2++) - mpz_clear (ref2[m2]); - mpz_clear (res); - - tests_end (); - - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-mul.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-mul.c deleted file mode 100644 index 690b89f7fde..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-mul.c +++ /dev/null @@ -1,219 +0,0 @@ -/* Test mpz_cmp, mpz_mul. - -Copyright 1991, 1993, 1994, 1996, 1997, 2000-2004 Free Software Foundation, -Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" -#include "tests.h" - -void debug_mp (mpz_t); -static void refmpz_mul (mpz_t, const mpz_t, const mpz_t); -void dump_abort (int, const char *, mpz_t, mpz_t, mpz_t, mpz_t); - -#define FFT_MIN_BITSIZE 100000 - -char *extra_fft; - -void -one (int i, mpz_t multiplicand, mpz_t multiplier) -{ - mpz_t product, ref_product; - - mpz_init (product); - mpz_init (ref_product); - - /* Test plain multiplication comparing results against reference code. */ - mpz_mul (product, multiplier, multiplicand); - refmpz_mul (ref_product, multiplier, multiplicand); - if (mpz_cmp (product, ref_product)) - dump_abort (i, "incorrect plain product", - multiplier, multiplicand, product, ref_product); - - /* Test squaring, comparing results against plain multiplication */ - mpz_mul (product, multiplier, multiplier); - mpz_set (multiplicand, multiplier); - mpz_mul (ref_product, multiplier, multiplicand); - if (mpz_cmp (product, ref_product)) - dump_abort (i, "incorrect square product", - multiplier, multiplier, product, ref_product); - - mpz_clear (product); - mpz_clear (ref_product); -} - -int -main (int argc, char **argv) -{ - mpz_t op1, op2; - int i; - int fft_max_2exp; - - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range, fsize_range; - - tests_start (); - rands = RANDS; - - extra_fft = getenv ("GMP_CHECK_FFT"); - fft_max_2exp = 0; - if (extra_fft != NULL) - fft_max_2exp = atoi (extra_fft); - - if (fft_max_2exp <= 1) /* compat with old use of GMP_CHECK_FFT */ - fft_max_2exp = 22; /* default limit, good for any machine */ - - mpz_init (bs); - mpz_init (op1); - mpz_init (op2); - - fsize_range = 4 << 8; /* a fraction 1/256 of size_range */ - for (i = 0;; i++) - { - size_range = fsize_range >> 8; - fsize_range = fsize_range * 33 / 32; - - if (size_range > fft_max_2exp) - break; - - mpz_urandomb (bs, rands, size_range); - mpz_rrandomb (op1, rands, mpz_get_ui (bs)); - if (i & 1) - mpz_urandomb (bs, rands, size_range); - mpz_rrandomb (op2, rands, mpz_get_ui (bs)); - - mpz_urandomb (bs, rands, 4); - bsi = mpz_get_ui (bs); - if ((bsi & 0x3) == 0) - mpz_neg (op1, op1); - if ((bsi & 0xC) == 0) - mpz_neg (op2, op2); - - /* printf ("%d %d\n", SIZ (op1), SIZ (op2)); */ - one (i, op2, op1); - } - - for (i = -50; i < 0; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % fft_max_2exp; - - mpz_urandomb (bs, rands, size_range); - mpz_rrandomb (op1, rands, mpz_get_ui (bs) + FFT_MIN_BITSIZE); - mpz_urandomb (bs, rands, size_range); - mpz_rrandomb (op2, rands, mpz_get_ui (bs) + FFT_MIN_BITSIZE); - - /* printf ("%d: %d %d\n", i, SIZ (op1), SIZ (op2)); */ - fflush (stdout); - one (-1, op2, op1); - } - - mpz_clear (bs); - mpz_clear (op1); - mpz_clear (op2); - - tests_end (); - exit (0); -} - -static void -refmpz_mul (mpz_t w, const mpz_t u, const mpz_t v) -{ - mp_size_t usize = u->_mp_size; - mp_size_t vsize = v->_mp_size; - mp_size_t wsize; - mp_size_t sign_product; - mp_ptr up, vp; - mp_ptr wp; - mp_size_t talloc; - - sign_product = usize ^ vsize; - usize = ABS (usize); - vsize = ABS (vsize); - - if (usize == 0 || vsize == 0) - { - SIZ (w) = 0; - return; - } - - talloc = usize + vsize; - - up = u->_mp_d; - vp = v->_mp_d; - - wp = __GMP_ALLOCATE_FUNC_LIMBS (talloc); - - if (usize > vsize) - refmpn_mul (wp, up, usize, vp, vsize); - else - refmpn_mul (wp, vp, vsize, up, usize); - wsize = usize + vsize; - wsize -= wp[wsize - 1] == 0; - MPZ_REALLOC (w, wsize); - MPN_COPY (PTR(w), wp, wsize); - - SIZ(w) = sign_product < 0 ? -wsize : wsize; - __GMP_FREE_FUNC_LIMBS (wp, talloc); -} - -void -dump_abort (int i, const char *s, - mpz_t op1, mpz_t op2, mpz_t product, mpz_t ref_product) -{ - mp_size_t b, e; - fprintf (stderr, "ERROR: %s in test %d\n", s, i); - fprintf (stderr, "op1 = "); debug_mp (op1); - fprintf (stderr, "op2 = "); debug_mp (op2); - fprintf (stderr, " product = "); debug_mp (product); - fprintf (stderr, "ref_product = "); debug_mp (ref_product); - for (b = 0; b < ABSIZ(ref_product); b++) - if (PTR(ref_product)[b] != PTR(product)[b]) - break; - for (e = ABSIZ(ref_product) - 1; e >= 0; e--) - if (PTR(ref_product)[e] != PTR(product)[e]) - break; - printf ("ERRORS in %ld--%ld\n", b, e); - abort(); -} - -void -debug_mp (mpz_t x) -{ - size_t siz = mpz_sizeinbase (x, 16); - - if (siz > 65) - { - mpz_t q; - mpz_init (q); - mpz_tdiv_q_2exp (q, x, 4 * (mpz_sizeinbase (x, 16) - 25)); - gmp_fprintf (stderr, "%ZX...", q); - mpz_tdiv_r_2exp (q, x, 4 * 25); - gmp_fprintf (stderr, "%025ZX [%d]\n", q, (int) siz); - mpz_clear (q); - } - else - { - gmp_fprintf (stderr, "%ZX\n", x); - } -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-mul_i.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-mul_i.c deleted file mode 100644 index cbbe54d40df..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-mul_i.c +++ /dev/null @@ -1,135 +0,0 @@ -/* Test mpz_mul_ui and mpz_mul_si. - -Copyright 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -mpz_t got, want, x; - -void -compare_si (long y) -{ - if (mpz_cmp (got, want) != 0) - { - printf ("mpz_mul_si wrong\n"); - mpz_trace (" x", x); - printf (" y=%ld (0x%lX)\n", y, y); - mpz_trace (" got ", got); - mpz_trace (" want", want); - abort (); - } -} - -void -compare_ui (unsigned long y) -{ - if (mpz_cmp (got, want) != 0) - { - printf ("mpz_mul_ui wrong\n"); - mpz_trace (" x", x); - printf (" y=%lu (0x%lX)\n", y, y); - mpz_trace (" got ", got); - mpz_trace (" want", want); - abort (); - } -} - -void -check_samples (void) -{ - { - long y; - - mpz_set_ui (x, 1L); - y = 0; - mpz_mul_si (got, x, y); - mpz_set_si (want, y); - compare_si (y); - - mpz_set_ui (x, 1L); - y = 1; - mpz_mul_si (got, x, y); - mpz_set_si (want, y); - compare_si (y); - - mpz_set_ui (x, 1L); - y = -1; - mpz_mul_si (got, x, y); - mpz_set_si (want, y); - compare_si (y); - - mpz_set_ui (x, 1L); - y = LONG_MIN; - mpz_mul_si (got, x, y); - mpz_set_si (want, y); - compare_si (y); - - mpz_set_ui (x, 1L); - y = LONG_MAX; - mpz_mul_si (got, x, y); - mpz_set_si (want, y); - compare_si (y); - } - - { - unsigned long y; - - mpz_set_ui (x, 1L); - y = 0; - mpz_mul_ui (got, x, y); - mpz_set_ui (want, y); - compare_ui (y); - - mpz_set_ui (x, 1L); - y = 1; - mpz_mul_ui (got, x, y); - mpz_set_ui (want, y); - compare_ui (y); - - mpz_set_ui (x, 1L); - y = ULONG_MAX; - mpz_mul_ui (got, x, y); - mpz_set_ui (want, y); - compare_ui (y); - } -} - -int -main (int argc, char **argv) -{ - tests_start (); - - mpz_init (x); - mpz_init (got); - mpz_init (want); - - check_samples (); - - mpz_clear (x); - mpz_clear (got); - mpz_clear (want); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-nextprime.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-nextprime.c deleted file mode 100644 index 6e291c334d6..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-nextprime.c +++ /dev/null @@ -1,222 +0,0 @@ -/* Test mpz_nextprime. - -Copyright 2009 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void -refmpz_nextprime (mpz_ptr p, mpz_srcptr t) -{ - mpz_add_ui (p, t, 1L); - while (! mpz_probab_prime_p (p, 10)) - mpz_add_ui (p, p, 1L); -} - -void -run (const char *start, int reps, const char *end, short diffs[]) -{ - mpz_t x, y; - int i; - - mpz_init_set_str (x, start, 0); - mpz_init (y); - - for (i = 0; i < reps; i++) - { - mpz_nextprime (y, x); - mpz_sub (x, y, x); - if (diffs != NULL && diffs[i] != mpz_get_ui (x)) - { - gmp_printf ("diff list discrepancy\n"); - abort (); - } - mpz_set (x, y); - } - - mpz_set_str (y, end, 0); - - if (mpz_cmp (x, y) != 0) - { - gmp_printf ("got %Zx\n", x); - gmp_printf ("want %Zx\n", y); - abort (); - } - - mpz_clear (y); - mpz_clear (x); -} - -extern short diff1[]; -extern short diff3[]; -extern short diff4[]; -extern short diff5[]; - -int -main (int argc, char **argv) -{ - int i; - int reps = 20; - gmp_randstate_ptr rands; - mpz_t bs, x, nxtp, ref_nxtp; - unsigned long size_range; - - tests_start(); - rands = RANDS; - - run ("2", 1000, "0x1ef7", diff1); - - run ("3", 1000 - 1, "0x1ef7", NULL); - - run ("0x8a43866f5776ccd5b02186e90d28946aeb0ed914", 50, - "0x8a43866f5776ccd5b02186e90d28946aeb0eeec5", diff3); - - run ("0x10000000000000000000000000000000000000", 50, - "0x100000000000000000000000000000000010ab", diff4); - - run ("0x1c2c26be55317530311facb648ea06b359b969715db83292ab8cf898d8b1b", 50, - "0x1c2c26be55317530311facb648ea06b359b969715db83292ab8cf898da957", diff5); - - mpz_init (bs); - mpz_init (x); - mpz_init (nxtp); - mpz_init (ref_nxtp); - - if (argc == 2) - reps = atoi (argv[1]); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 8 + 2; /* 0..1024 bit operands */ - - mpz_urandomb (bs, rands, size_range); - mpz_rrandomb (x, rands, mpz_get_ui (bs)); - -/* gmp_printf ("%ld: %Zd\n", mpz_sizeinbase (x, 2), x); */ - - mpz_nextprime (nxtp, x); - refmpz_nextprime (ref_nxtp, x); - if (mpz_cmp (nxtp, ref_nxtp) != 0) - abort (); - } - - mpz_clear (bs); - mpz_clear (x); - mpz_clear (nxtp); - mpz_clear (ref_nxtp); - - tests_end (); - return 0; -} - -short diff1[] = -{ - 1,2,2,4,2,4,2,4,6,2,6,4,2,4,6,6, - 2,6,4,2,6,4,6,8,4,2,4,2,4,14,4,6, - 2,10,2,6,6,4,6,6,2,10,2,4,2,12,12,4, - 2,4,6,2,10,6,6,6,2,6,4,2,10,14,4,2, - 4,14,6,10,2,4,6,8,6,6,4,6,8,4,8,10, - 2,10,2,6,4,6,8,4,2,4,12,8,4,8,4,6, - 12,2,18,6,10,6,6,2,6,10,6,6,2,6,6,4, - 2,12,10,2,4,6,6,2,12,4,6,8,10,8,10,8, - 6,6,4,8,6,4,8,4,14,10,12,2,10,2,4,2, - 10,14,4,2,4,14,4,2,4,20,4,8,10,8,4,6, - 6,14,4,6,6,8,6,12,4,6,2,10,2,6,10,2, - 10,2,6,18,4,2,4,6,6,8,6,6,22,2,10,8, - 10,6,6,8,12,4,6,6,2,6,12,10,18,2,4,6, - 2,6,4,2,4,12,2,6,34,6,6,8,18,10,14,4, - 2,4,6,8,4,2,6,12,10,2,4,2,4,6,12,12, - 8,12,6,4,6,8,4,8,4,14,4,6,2,4,6,2, - 6,10,20,6,4,2,24,4,2,10,12,2,10,8,6,6, - 6,18,6,4,2,12,10,12,8,16,14,6,4,2,4,2, - 10,12,6,6,18,2,16,2,22,6,8,6,4,2,4,8, - 6,10,2,10,14,10,6,12,2,4,2,10,12,2,16,2, - 6,4,2,10,8,18,24,4,6,8,16,2,4,8,16,2, - 4,8,6,6,4,12,2,22,6,2,6,4,6,14,6,4, - 2,6,4,6,12,6,6,14,4,6,12,8,6,4,26,18, - 10,8,4,6,2,6,22,12,2,16,8,4,12,14,10,2, - 4,8,6,6,4,2,4,6,8,4,2,6,10,2,10,8, - 4,14,10,12,2,6,4,2,16,14,4,6,8,6,4,18, - 8,10,6,6,8,10,12,14,4,6,6,2,28,2,10,8, - 4,14,4,8,12,6,12,4,6,20,10,2,16,26,4,2, - 12,6,4,12,6,8,4,8,22,2,4,2,12,28,2,6, - 6,6,4,6,2,12,4,12,2,10,2,16,2,16,6,20, - 16,8,4,2,4,2,22,8,12,6,10,2,4,6,2,6, - 10,2,12,10,2,10,14,6,4,6,8,6,6,16,12,2, - 4,14,6,4,8,10,8,6,6,22,6,2,10,14,4,6, - 18,2,10,14,4,2,10,14,4,8,18,4,6,2,4,6, - 2,12,4,20,22,12,2,4,6,6,2,6,22,2,6,16, - 6,12,2,6,12,16,2,4,6,14,4,2,18,24,10,6, - 2,10,2,10,2,10,6,2,10,2,10,6,8,30,10,2, - 10,8,6,10,18,6,12,12,2,18,6,4,6,6,18,2, - 10,14,6,4,2,4,24,2,12,6,16,8,6,6,18,16, - 2,4,6,2,6,6,10,6,12,12,18,2,6,4,18,8, - 24,4,2,4,6,2,12,4,14,30,10,6,12,14,6,10, - 12,2,4,6,8,6,10,2,4,14,6,6,4,6,2,10, - 2,16,12,8,18,4,6,12,2,6,6,6,28,6,14,4, - 8,10,8,12,18,4,2,4,24,12,6,2,16,6,6,14, - 10,14,4,30,6,6,6,8,6,4,2,12,6,4,2,6, - 22,6,2,4,18,2,4,12,2,6,4,26,6,6,4,8, - 10,32,16,2,6,4,2,4,2,10,14,6,4,8,10,6, - 20,4,2,6,30,4,8,10,6,6,8,6,12,4,6,2, - 6,4,6,2,10,2,16,6,20,4,12,14,28,6,20,4, - 18,8,6,4,6,14,6,6,10,2,10,12,8,10,2,10, - 8,12,10,24,2,4,8,6,4,8,18,10,6,6,2,6, - 10,12,2,10,6,6,6,8,6,10,6,2,6,6,6,10, - 8,24,6,22,2,18,4,8,10,30,8,18,4,2,10,6, - 2,6,4,18,8,12,18,16,6,2,12,6,10,2,10,2, - 6,10,14,4,24,2,16,2,10,2,10,20,4,2,4,8, - 16,6,6,2,12,16,8,4,6,30,2,10,2,6,4,6, - 6,8,6,4,12,6,8,12,4,14,12,10,24,6,12,6, - 2,22,8,18,10,6,14,4,2,6,10,8,6,4,6,30, - 14,10,2,12,10,2,16,2,18,24,18,6,16,18,6,2, - 18,4,6,2,10,8,10,6,6,8,4,6,2,10,2,12, - 4,6,6,2,12,4,14,18,4,6,20,4,8,6,4,8, - 4,14,6,4,14,12,4,2,30,4,24,6,6,12,12,14, - 6,4,2,4,18,6,12,8 -}; - -short diff3[] = -{ - 33,32,136,116,24,22,104,114,76,278,238,162,36,44,388,134, - 130,26,312,42,138,28,24,80,138,108,270,12,330,130,98,102, - 162,34,36,170,90,34,14,6,24,66,154,218,70,132,188,88, - 80,82 -}; - -short diff4[] = -{ - 91,92,64,6,104,24,46,258,68,18,54,100,68,154,26,4, - 38,142,168,42,18,26,286,104,136,116,40,2,28,110,52,78, - 104,24,54,96,4,626,196,24,56,36,52,102,48,156,26,18, - 42,40 -}; - -short diff5[] = -{ - 268,120,320,184,396,2,94,108,20,318,274,14,64,122,220,108, - 18,174,6,24,348,32,64,116,268,162,20,156,28,110,52,428, - 196,14,262,30,194,120,300,66,268,12,428,370,212,198,192,130, - 30,80 -}; diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-oddeven.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-oddeven.c deleted file mode 100644 index 107f2436ab1..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-oddeven.c +++ /dev/null @@ -1,88 +0,0 @@ -/* Test mpz_odd_p and mpz_even_p. - -Copyright 2000, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void -check_data (void) -{ - static const struct { - const char *n; - int odd, even; - } data[] = { - { "0", 0, 1 }, - { "1", 1, 0 }, - { "2", 0, 1 }, - { "3", 1, 0 }, - { "4", 0, 1 }, - - { "-4", 0, 1 }, - { "-3", 1, 0 }, - { "-2", 0, 1 }, - { "-1", 1, 0 }, - - { "0x1000000000000000000000000000000000000000000000000000", 0, 1 }, - { "0x1000000000000000000000000000000000000000000000000001", 1, 0 }, - { "0x1000000000000000000000000000000000000000000000000002", 0, 1 }, - { "0x1000000000000000000000000000000000000000000000000003", 1, 0 }, - - { "-0x1000000000000000000000000000000000000000000000000004", 0, 1 }, - { "-0x1000000000000000000000000000000000000000000000000003", 1, 0 }, - { "-0x1000000000000000000000000000000000000000000000000002", 0, 1 }, - { "-0x1000000000000000000000000000000000000000000000000001", 1, 0 }, - }; - - mpz_t n; - int i; - - mpz_init (n); - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (n, data[i].n, 0); - - if ((mpz_odd_p (n) != 0) != data[i].odd) - { - printf ("mpz_odd_p wrong on data[%d]\n", i); - abort(); - } - - if ((mpz_even_p (n) != 0) != data[i].even) - { - printf ("mpz_even_p wrong on data[%d]\n", i); - abort(); - } - } - - mpz_clear (n); -} - -int -main (void) -{ - tests_start (); - - check_data (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-perfpow.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-perfpow.c deleted file mode 100644 index f5f2c34764b..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-perfpow.c +++ /dev/null @@ -1,248 +0,0 @@ -/* Test mpz_perfect_power_p. - - Contributed to the GNU project by Torbjorn Granlund and Martin Boij. - -Copyright 2008-2010, 2014 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -struct -{ - const char *num_as_str; - char want; -} static tests[] = - { - { "0", 1}, - { "1", 1}, - {"-1", 1}, - { "2", 0}, - {"-2", 0}, - { "3", 0}, - {"-3", 0}, - { "4", 1}, - {"-4", 0}, - { "64", 1}, - {"-64", 1}, - { "128", 1}, - {"-128", 1}, - { "256", 1}, - {"-256", 0}, - { "512", 1}, - {"-512", 1}, - { "0x4000000", 1}, - {"-0x4000000", 1}, - { "0x3cab640", 1}, - {"-0x3cab640", 0}, - { "0x3e23840", 1}, - {"-0x3e23840", 0}, - { "0x3d3a7ed1", 1}, - {"-0x3d3a7ed1", 1}, - { "0x30a7a6000", 1}, - {"-0x30a7a6000", 1}, - { "0xf33e5a5a59", 1}, - {"-0xf33e5a5a59", 0}, - { "0xed1b1182118135d", 1}, - {"-0xed1b1182118135d", 1}, - { "0xe71f6eb7689cc276b2f1", 1}, - {"-0xe71f6eb7689cc276b2f1", 0}, - { "0x12644507fe78cf563a4b342c92e7da9fe5e99cb75a01", 1}, - {"-0x12644507fe78cf563a4b342c92e7da9fe5e99cb75a01", 0}, - { "0x1ff2e7c581bb0951df644885bd33f50e472b0b73a204e13cbe98fdb424d66561e4000000", 1}, - {"-0x1ff2e7c581bb0951df644885bd33f50e472b0b73a204e13cbe98fdb424d66561e4000000", 1}, - { "0x2b9b44db2d91a6f8165c8c7339ef73633228ea29e388592e80354e4380004aad84000000", 1}, - {"-0x2b9b44db2d91a6f8165c8c7339ef73633228ea29e388592e80354e4380004aad84000000", 1}, - { "0x28d5a2b8f330910a9d3cda06036ae0546442e5b1a83b26a436efea5b727bf1bcbe7e12b47d81", 1}, - {"-0x28d5a2b8f330910a9d3cda06036ae0546442e5b1a83b26a436efea5b727bf1bcbe7e12b47d81", 1}, - {NULL, 0} - }; - - -void -check_tests () -{ - mpz_t x; - int i; - int got, want; - - mpz_init (x); - - for (i = 0; tests[i].num_as_str != NULL; i++) - { - mpz_set_str (x, tests[i].num_as_str, 0); - got = mpz_perfect_power_p (x); - want = tests[i].want; - if (got != want) - { - fprintf (stderr, "mpz_perfect_power_p returns %d when %d was expected\n", got, want); - fprintf (stderr, "fault operand: %s\n", tests[i].num_as_str); - abort (); - } - } - - mpz_clear (x); -} - -#define NRP 15 - -void -check_random (int reps) -{ - mpz_t n, np, temp, primes[NRP]; - int i, j, k, unique, destroy, res; - unsigned long int nrprimes, primebits; - mp_limb_t g, exp[NRP], e; - gmp_randstate_ptr rands; - - rands = RANDS; - - mpz_init (n); - mpz_init (np); - mpz_init (temp); - - for (i = 0; i < NRP; i++) - mpz_init (primes[i]); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (np, rands, 32); - nrprimes = mpz_get_ui (np) % NRP + 1; /* 1-NRP unique primes */ - - mpz_urandomb (np, rands, 32); - g = mpz_get_ui (np) % 32 + 2; /* gcd 2-33 */ - - for (j = 0; j < nrprimes;) - { - mpz_urandomb (np, rands, 32); - primebits = mpz_get_ui (np) % 100 + 3; /* 3-102 bit primes */ - mpz_urandomb (primes[j], rands, primebits); - mpz_nextprime (primes[j], primes[j]); - unique = 1; - for (k = 0; k < j; k++) - { - if (mpz_cmp (primes[j], primes[k]) == 0) - { - unique = 0; - break; - } - } - if (unique) - { - mpz_urandomb (np, rands, 32); - e = 371 / (10 * primebits) + mpz_get_ui (np) % 11 + 1; /* Magic constants */ - exp[j++] = g * e; - } - } - - if (nrprimes > 1) - { - /* Destroy d exponents, d in [1, nrprimes - 1] */ - if (nrprimes == 2) - { - destroy = 1; - } - else - { - mpz_urandomb (np, rands, 32); - destroy = mpz_get_ui (np) % (nrprimes - 2); - } - - g = exp[destroy]; - for (k = destroy + 1; k < nrprimes; k++) - g = mpn_gcd_1 (&g, 1, exp[k]); - - for (j = 0; j < destroy; j++) - { - mpz_urandomb (np, rands, 32); - e = mpz_get_ui (np) % 50 + 1; - while (mpn_gcd_1 (&g, 1, e) > 1) - e++; - - exp[j] = e; - } - } - - /* Compute n */ - mpz_pow_ui (n, primes[0], exp[0]); - for (j = 1; j < nrprimes; j++) - { - mpz_pow_ui (temp, primes[j], exp[j]); - mpz_mul (n, n, temp); - } - - res = mpz_perfect_power_p (n); - - if (nrprimes == 1) - { - if (res == 0 && exp[0] > 1) - { - printf("n is a perfect power, perfpow_p disagrees\n"); - gmp_printf("n = %Zu\nprimes[0] = %Zu\nexp[0] = %lu\n", n, primes[0], exp[0]); - abort (); - } - else if (res == 1 && exp[0] == 1) - { - gmp_printf("n = %Zu\n", n); - printf("n is now a prime number, but perfpow_p still believes n is a perfect power\n"); - abort (); - } - } - else - { - if (res == 1 && destroy != 0) - { - gmp_printf("n = %Zu\nn was destroyed, but perfpow_p still believes n is a perfect power\n", n); - abort (); - } - else if (res == 0 && destroy == 0) - { - gmp_printf("n = %Zu\nn is a perfect power, perfpow_p disagrees\n", n); - abort (); - } - } - } - - mpz_clear (n); - mpz_clear (np); - mpz_clear (temp); - for (i = 0; i < NRP; i++) - mpz_clear (primes[i]); -} - -int -main (int argc, char **argv) -{ - int n_tests; - - tests_start (); - mp_trace_base = -16; - - check_tests (); - - n_tests = 500; - if (argc == 2) - n_tests = atoi (argv[1]); - check_random (n_tests); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-perfsqr.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-perfsqr.c deleted file mode 100644 index 2a54e59e650..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-perfsqr.c +++ /dev/null @@ -1,155 +0,0 @@ -/* Test mpz_perfect_square_p. - -Copyright 2000-2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#include "mpn/perfsqr.h" - - -/* check_modulo() exercises mpz_perfect_square_p on squares which cover each - possible quadratic residue to each divisor used within - mpn_perfect_square_p, ensuring those residues aren't incorrectly claimed - to be non-residues. - - Each divisor is taken separately. It's arranged that n is congruent to 0 - modulo the other divisors, 0 of course being a quadratic residue to any - modulus. - - The values "(j*others)^2" cover all quadratic residues mod divisor[i], - but in no particular order. j is run from 1<=j<=divisor[i] so that zero - is excluded. A literal n==0 doesn't reach the residue tests. */ - -void -check_modulo (void) -{ - static const unsigned long divisor[] = PERFSQR_DIVISORS; - unsigned long i, j; - - mpz_t alldiv, others, n; - - mpz_init (alldiv); - mpz_init (others); - mpz_init (n); - - /* product of all divisors */ - mpz_set_ui (alldiv, 1L); - for (i = 0; i < numberof (divisor); i++) - mpz_mul_ui (alldiv, alldiv, divisor[i]); - - for (i = 0; i < numberof (divisor); i++) - { - /* product of all divisors except i */ - mpz_set_ui (others, 1L); - for (j = 0; j < numberof (divisor); j++) - if (i != j) - mpz_mul_ui (others, others, divisor[j]); - - for (j = 1; j <= divisor[i]; j++) - { - /* square */ - mpz_mul_ui (n, others, j); - mpz_mul (n, n, n); - if (! mpz_perfect_square_p (n)) - { - printf ("mpz_perfect_square_p got 0, want 1\n"); - mpz_trace (" n", n); - abort (); - } - } - } - - mpz_clear (alldiv); - mpz_clear (others); - mpz_clear (n); -} - - -/* Exercise mpz_perfect_square_p compared to what mpz_sqrt says. */ -void -check_sqrt (int reps) -{ - mpz_t x2, x2t, x; - mp_size_t x2n; - int res; - int i; - /* int cnt = 0; */ - gmp_randstate_ptr rands = RANDS; - mpz_t bs; - - mpz_init (bs); - - mpz_init (x2); - mpz_init (x); - mpz_init (x2t); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 9); - x2n = mpz_get_ui (bs); - mpz_rrandomb (x2, rands, x2n); - /* mpz_out_str (stdout, -16, x2); puts (""); */ - - res = mpz_perfect_square_p (x2); - mpz_sqrt (x, x2); - mpz_mul (x2t, x, x); - - if (res != (mpz_cmp (x2, x2t) == 0)) - { - printf ("mpz_perfect_square_p and mpz_sqrt differ\n"); - mpz_trace (" x ", x); - mpz_trace (" x2 ", x2); - mpz_trace (" x2t", x2t); - printf (" mpz_perfect_square_p %d\n", res); - printf (" mpz_sqrt %d\n", mpz_cmp (x2, x2t) == 0); - abort (); - } - - /* cnt += res != 0; */ - } - /* printf ("%d/%d perfect squares\n", cnt, reps); */ - - mpz_clear (bs); - mpz_clear (x2); - mpz_clear (x); - mpz_clear (x2t); -} - - -int -main (int argc, char **argv) -{ - int reps = 200000; - - tests_start (); - mp_trace_base = -16; - - if (argc == 2) - reps = atoi (argv[1]); - - check_modulo (); - check_sqrt (reps); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-popcount.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-popcount.c deleted file mode 100644 index c27c4efda96..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-popcount.c +++ /dev/null @@ -1,168 +0,0 @@ -/* Test mpz_popcount. - -Copyright 2001, 2005 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - - -void -check_onebit (void) -{ - mpz_t n; - unsigned long i, got; - - mpz_init (n); - for (i = 0; i < 5 * GMP_LIMB_BITS; i++) - { - mpz_setbit (n, i); - got = mpz_popcount (n); - if (got != 1) - { - printf ("mpz_popcount wrong on single bit at %lu\n", i); - printf (" got %lu, want 1\n", got); - abort(); - } - mpz_clrbit (n, i); - } - mpz_clear (n); -} - - -void -check_data (void) -{ - static const struct { - const char *n; - unsigned long want; - } data[] = { - { "-1", ~ (unsigned long) 0 }, - { "-12345678", ~ (unsigned long) 0 }, - { "0", 0 }, - { "1", 1 }, - { "3", 2 }, - { "5", 2 }, - { "0xFFFF", 16 }, - { "0xFFFFFFFF", 32 }, - { "0xFFFFFFFFFFFFFFFF", 64 }, - { "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", 128 }, - }; - - unsigned long got; - int i; - mpz_t n; - - mpz_init (n); - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (n, data[i].n, 0); - got = mpz_popcount (n); - if (got != data[i].want) - { - printf ("mpz_popcount wrong at data[%d]\n", i); - printf (" n \"%s\"\n", data[i].n); - printf (" "); mpz_out_str (stdout, 10, n); printf ("\n"); - printf (" 0x"); mpz_out_str (stdout, 16, n); printf ("\n"); - printf (" got %lu\n", got); - printf (" want %lu\n", data[i].want); - abort (); - } - } - mpz_clear (n); -} - -unsigned long -refmpz_popcount (mpz_t arg) -{ - mp_size_t n, i; - unsigned long cnt; - mp_limb_t x; - - n = SIZ(arg); - if (n < 0) - return ~(unsigned long) 0; - - cnt = 0; - for (i = 0; i < n; i++) - { - x = PTR(arg)[i]; - while (x != 0) - { - cnt += (x & 1); - x >>= 1; - } - } - return cnt; -} - -void -check_random (void) -{ - gmp_randstate_ptr rands; - mpz_t bs; - mpz_t arg; - unsigned long arg_size, size_range; - unsigned long got, ref; - int i; - - rands = RANDS; - - mpz_init (bs); - mpz_init (arg); - - for (i = 0; i < 10000; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 11 + 2; /* 0..4096 bit operands */ - - mpz_urandomb (bs, rands, size_range); - arg_size = mpz_get_ui (bs); - mpz_rrandomb (arg, rands, arg_size); - - got = mpz_popcount (arg); - ref = refmpz_popcount (arg); - if (got != ref) - { - printf ("mpz_popcount wrong on random\n"); - printf (" "); mpz_out_str (stdout, 10, arg); printf ("\n"); - printf (" 0x"); mpz_out_str (stdout, 16, arg); printf ("\n"); - printf (" got %lu\n", got); - printf (" want %lu\n", ref); - abort (); - } - } - mpz_clear (arg); - mpz_clear (bs); -} - -int -main (void) -{ - tests_start (); - - check_onebit (); - check_data (); - check_random (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-pow.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-pow.c deleted file mode 100644 index 312ef98884a..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-pow.c +++ /dev/null @@ -1,218 +0,0 @@ -/* Test mpz_pow_ui and mpz_ui_pow_ui. - -Copyright 1997, 1999-2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_one (mpz_srcptr want, mpz_srcptr base, unsigned long exp) -{ - mpz_t got; - - mpz_init (got); - - MPZ_CHECK_FORMAT (want); - - mpz_pow_ui (got, base, exp); - if (mpz_cmp (got, want)) - { - printf ("mpz_pow_ui wrong\n"); - mpz_trace (" base", base); - printf (" exp = %lu (0x%lX)\n", exp, exp); - mpz_trace (" got ", got); - mpz_trace (" want", want); - abort (); - } - - mpz_set (got, base); - mpz_pow_ui (got, got, exp); - if (mpz_cmp (got, want)) - { - printf ("mpz_pow_ui wrong\n"); - mpz_trace (" base", base); - printf (" exp = %lu (0x%lX)\n", exp, exp); - mpz_trace (" got ", got); - mpz_trace (" want", want); - abort (); - } - - if (mpz_fits_ulong_p (base)) - { - unsigned long base_u = mpz_get_ui (base); - mpz_ui_pow_ui (got, base_u, exp); - if (mpz_cmp (got, want)) - { - printf ("mpz_ui_pow_ui wrong\n"); - printf (" base=%lu (0x%lX)\n", base_u, base_u); - printf (" exp = %lu (0x%lX)\n", exp, exp); - mpz_trace (" got ", got); - mpz_trace (" want", want); - abort (); - } - } - - mpz_clear (got); -} - -void -check_base (mpz_srcptr base) -{ - unsigned long exp; - mpz_t want; - - mpz_init (want); - mpz_set_ui (want, 1L); - - for (exp = 0; exp < 20; exp++) - { - check_one (want, base, exp); - mpz_mul (want, want, base); - } - - mpz_clear (want); -} - -void -check_various (void) -{ - static const struct { - const char *base; - } data[] = { - { "0" }, - { "1" }, - { "2" }, - { "3" }, - { "4" }, - { "5" }, - { "6" }, - { "10" }, - { "15" }, - { "16" }, - - { "0x1F" }, - { "0xFF" }, - { "0x1001" }, - { "0xFFFF" }, - { "0x10000001" }, - { "0x1000000000000001" }, - - /* actual size closest to estimate */ - { "0xFFFFFFFF" }, - { "0xFFFFFFFFFFFFFFFF" }, - - /* same after rshift */ - { "0xFFFFFFFF0" }, - { "0xFFFFFFFF00" }, - { "0xFFFFFFFFFFFFFFFF0" }, - { "0xFFFFFFFFFFFFFFFF00" }, - - /* change from 2 limbs to 1 after rshift */ - { "0x180000000" }, - { "0x18000000000000000" }, - - /* change from 3 limbs to 2 after rshift */ - { "0x18000000100000000" }, - { "0x180000000000000010000000000000000" }, - - /* handling of absolute value */ - { "-0x80000000" }, - { "-0x8000000000000000" }, - - /* low zero limb, and size>2, checking argument overlap detection */ - { "0x3000000000000000300000000000000030000000000000000" }, - }; - - mpz_t base; - int i; - - mpz_init (base); - - for (i = 0; i < numberof (data); i++) - { - mpz_set_str_or_abort (base, data[i].base, 0); - check_base (base); - } - - mpz_clear (base); -} - -void -check_random (int reps) -{ - mpz_t base, want; - mp_size_t base_size; - int i; - unsigned long size_range, exp; - gmp_randstate_ptr rands = RANDS; - - mpz_init (base); - mpz_init (want); - - for (i = 0; i < reps; i++) - { - /* exponentially random 0 to 2^13 bits for base */ - mpz_urandomb (want, rands, 32); - size_range = mpz_get_ui (want) % 12 + 2; - mpz_urandomb (want, rands, size_range); - base_size = mpz_get_ui (want); - mpz_rrandomb (base, rands, base_size); - - /* randomly signed base */ - mpz_urandomb (want, rands, 2); - if ((mpz_get_ui (want) & 1) != 0) - mpz_neg (base, base); - - /* random 5 bits for exponent */ - mpz_urandomb (want, rands, 5L); - exp = mpz_get_ui (want); - - refmpz_pow_ui (want, base, exp); - check_one (want, base, exp); - } - - mpz_clear (base); - mpz_clear (want); -} - -int -main (int argc, char **argv) -{ - int reps = 5000; - - /* dummy call to drag in refmpn.o for testing mpz/n_pow_ui.c with - refmpn_mul_2 */ - refmpn_zero_p (NULL, (mp_size_t) 0); - - tests_start (); - mp_trace_base = -16; - - if (argc == 2) - reps = atoi (argv[1]); - - check_various (); - check_random (reps); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-powm.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-powm.c deleted file mode 100644 index 240e1c89b96..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-powm.c +++ /dev/null @@ -1,184 +0,0 @@ -/* Test mpz_powm, mpz_mul, mpz_mod, mpz_mod_ui, mpz_div_ui. - -Copyright 1991, 1993, 1994, 1996, 1999-2001, 2009, 2012 Free Software -Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void debug_mp (mpz_t, int); - -#define SIZEM 13 - -/* Check that all sizes up to just above MUL_TOOM22_THRESHOLD have been tested - a few times. FIXME: If SIZEM is set too low, this will never happen. */ -int -allsizes_seen (unsigned int *allsizes) -{ - mp_size_t i; - - for (i = 1; i < MUL_TOOM22_THRESHOLD + 4; i++) - if (allsizes[i] < 4) - return 0; - return 1; -} - -int -main (int argc, char **argv) -{ - mpz_t base, exp, mod; - mpz_t r1, r2, t1, exp2, base2; - mp_size_t base_size, exp_size, mod_size; - int i; - int reps = 1000; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - unsigned int allsizes[1 << (SIZEM + 2 - 1)]; - - tests_start (); - TESTS_REPS (reps, argv, argc); - - rands = RANDS; - - mpz_init (bs); - - mpz_init (base); - mpz_init (exp); - mpz_init (mod); - mpz_init (r1); - mpz_init (r2); - mpz_init (t1); - mpz_init (exp2); - mpz_init (base2); - - memset (allsizes, 0, (1 << (SIZEM + 2 - 1)) * sizeof (int)); - - for (i = 0; i < reps || ! allsizes_seen (allsizes); i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % SIZEM + 2; - - do /* Loop until mathematically well-defined. */ - { - mpz_urandomb (bs, rands, size_range); - base_size = mpz_get_ui (bs); - mpz_rrandomb (base, rands, base_size); - - mpz_urandomb (bs, rands, 7L); - exp_size = mpz_get_ui (bs); - mpz_rrandomb (exp, rands, exp_size); - } - while (mpz_cmp_ui (base, 0) == 0 && mpz_cmp_ui (exp, 0) == 0); - - do - { - mpz_urandomb (bs, rands, size_range); - mod_size = mpz_get_ui (bs); - mpz_rrandomb (mod, rands, mod_size); - } - while (mpz_cmp_ui (mod, 0) == 0); - - allsizes[SIZ(mod)] += 1; - - mpz_urandomb (bs, rands, 2); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - mpz_neg (base, base); - - /* printf ("%ld %ld %ld\n", SIZ (base), SIZ (exp), SIZ (mod)); */ - - mpz_set_ui (r2, 1); - mpz_mod (base2, base, mod); - mpz_set (exp2, exp); - mpz_mod (r2, r2, mod); - - for (;;) - { - if (mpz_tstbit (exp2, 0)) - { - mpz_mul (r2, r2, base2); - mpz_mod (r2, r2, mod); - } - if (mpz_cmp_ui (exp2, 1) <= 0) - break; - mpz_mul (base2, base2, base2); - mpz_mod (base2, base2, mod); - mpz_tdiv_q_2exp (exp2, exp2, 1); - } - - mpz_powm (r1, base, exp, mod); - MPZ_CHECK_FORMAT (r1); - - if (mpz_cmp (r1, r2) != 0) - { - fprintf (stderr, "\nIncorrect results in test %d for operands:\n", i); - debug_mp (base, -16); - debug_mp (exp, -16); - debug_mp (mod, -16); - fprintf (stderr, "mpz_powm result:\n"); - debug_mp (r1, -16); - fprintf (stderr, "reference result:\n"); - debug_mp (r2, -16); - abort (); - } - - if (mpz_tdiv_ui (mod, 2) == 0) - continue; - - mpz_powm_sec (r1, base, exp, mod); - MPZ_CHECK_FORMAT (r1); - - if (mpz_cmp (r1, r2) != 0) - { - fprintf (stderr, "\nIncorrect results in test %d for operands:\n", i); - debug_mp (base, -16); - debug_mp (exp, -16); - debug_mp (mod, -16); - fprintf (stderr, "mpz_powm_sec result:\n"); - debug_mp (r1, -16); - fprintf (stderr, "reference result:\n"); - debug_mp (r2, -16); - abort (); - } - } - - mpz_clear (bs); - mpz_clear (base); - mpz_clear (exp); - mpz_clear (mod); - mpz_clear (r1); - mpz_clear (r2); - mpz_clear (t1); - mpz_clear (exp2); - mpz_clear (base2); - - tests_end (); - exit (0); -} - -void -debug_mp (mpz_t x, int base) -{ - mpz_out_str (stderr, base, x); fputc ('\n', stderr); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-powm_ui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-powm_ui.c deleted file mode 100644 index a95e473c329..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-powm_ui.c +++ /dev/null @@ -1,128 +0,0 @@ -/* Test mpz_powm_ui, mpz_mul, mpz_mod. - -Copyright 1991, 1993, 1994, 1996, 1997, 2000-2002, 2013 Free Software -Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -int -main (int argc, char **argv) -{ - mpz_t base, exp, mod; - mpz_t r1, r2, base2; - mp_size_t base_size, exp_size, mod_size; - unsigned long int exp2; - int i; - int reps = 100; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - - tests_start (); - rands = RANDS; - - TESTS_REPS (reps, argv, argc); - - mpz_inits (bs, base, exp, mod, r1, r2, base2, NULL); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 18 + 2; - - do /* Loop until mathematically well-defined. */ - { - mpz_urandomb (bs, rands, size_range); - base_size = mpz_get_ui (bs); - mpz_rrandomb (base, rands, base_size); - - mpz_urandomb (bs, rands, 6L); - exp_size = mpz_get_ui (bs); - mpz_rrandomb (exp, rands, exp_size); - exp2 = mpz_getlimbn (exp, (mp_size_t) 0); - } - while (mpz_cmp_ui (base, 0) == 0 && exp2 == 0); - - do - { - mpz_urandomb (bs, rands, size_range); - mod_size = mpz_get_ui (bs); - mpz_rrandomb (mod, rands, mod_size); - } - while (mpz_cmp_ui (mod, 0) == 0); - - mpz_urandomb (bs, rands, 2); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - mpz_neg (base, base); - - /* printf ("%ld %ld\n", SIZ (base), SIZ (mod)); */ - -#if 0 - putc ('\n', stderr); - gmp_fprintf (stderr, "B = 0x%Zx\n", base); - gmp_fprintf (stderr, "M = 0x%Zx\n", mod); -#endif - - exp2 = mpz_getlimbn (exp, (mp_size_t) 0); - mpz_set_ui (r2, 1); - mpz_set (base2, base); - mpz_mod (r2, r2, mod); /* needed when exp==0 and mod==1 */ - while (exp2 != 0) - { - if (exp2 % 2 != 0) - { - mpz_mul (r2, r2, base2); - mpz_mod (r2, r2, mod); - } - mpz_mul (base2, base2, base2); - mpz_mod (base2, base2, mod); - exp2 = exp2 / 2; - } - - exp2 = mpz_getlimbn (exp, (mp_size_t) 0); - mpz_powm_ui (r1, base, exp2, mod); - MPZ_CHECK_FORMAT (r1); - -#if 0 - gmp_fprintf (stderr, "R = 0x%Zx\n", r1); - gmp_fprintf (stderr, "REF = 0x%Zx\n", r2); -#endif - - if (mpz_cmp (r1, r2) != 0) - { - fprintf (stderr, "\ntest %d: Incorrect results for operands:\n", i); - gmp_fprintf (stderr, "B = 0x%Zx\n", base); - gmp_fprintf (stderr, "E = 0x%Zx\n", exp); - gmp_fprintf (stderr, "M = 0x%Zx\n", mod); - gmp_fprintf (stderr, "R = 0x%Zx\n", r1); - gmp_fprintf (stderr, "REF = 0x%Zx\n", r2); - abort (); - } - } - - mpz_clears (bs, base, exp, mod, r1, r2, base2, NULL); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-pprime_p.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-pprime_p.c deleted file mode 100644 index d437299e535..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-pprime_p.c +++ /dev/null @@ -1,190 +0,0 @@ -/* Exercise mpz_probab_prime_p. - -Copyright 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* Enhancements: - - - Test some big primes don't come back claimed to be composite. - - Test some big composites don't come back claimed to be certainly prime. - - Test some big composites with small factors are identified as certainly - composite. */ - - -/* return 1 if prime, 0 if composite */ -int -isprime (long n) -{ - long i; - - n = ABS(n); - - if (n < 2) - return 0; - if (n == 2) - return 1; - if ((n & 1) == 0) - return 0; - - for (i = 3; i < n; i++) - if ((n % i) == 0) - return 0; - - return 1; -} - -void -check_one (mpz_srcptr n, int want) -{ - int got; - - got = mpz_probab_prime_p (n, 25); - - /* "definitely prime" is fine if we only wanted "probably prime" */ - if (got == 2 && want == 1) - want = 2; - - if (got != want) - { - printf ("mpz_probab_prime_p\n"); - mpz_trace (" n ", n); - printf (" got =%d", got); - printf (" want=%d", want); - abort (); - } -} - -void -check_pn (mpz_ptr n, int want) -{ - check_one (n, want); - mpz_neg (n, n); - check_one (n, want); -} - -/* expect certainty for small n */ -void -check_small (void) -{ - mpz_t n; - long i; - - mpz_init (n); - - for (i = 0; i < 300; i++) - { - mpz_set_si (n, i); - check_pn (n, isprime (i)); - } - - mpz_clear (n); -} - -void -check_composites (int count) -{ - int i; - mpz_t a, b, n, bs; - unsigned long size_range, size; - gmp_randstate_ptr rands = RANDS; - - mpz_init (a); - mpz_init (b); - mpz_init (n); - mpz_init (bs); - - for (i = 0; i < count; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 13 + 1; /* 0..8192 bit operands */ - - mpz_urandomb (bs, rands, size_range); - size = mpz_get_ui (bs); - mpz_rrandomb (a, rands, size); - - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 13 + 1; /* 0..8192 bit operands */ - mpz_rrandomb (b, rands, size); - - /* Exclude trivial factors */ - if (mpz_cmp_ui (a, 1) == 0) - mpz_set_ui (a, 2); - if (mpz_cmp_ui (b, 1) == 0) - mpz_set_ui (b, 2); - - mpz_mul (n, a, b); - - check_pn (n, 0); - } - mpz_clear (a); - mpz_clear (b); - mpz_clear (n); - mpz_clear (bs); -} - -static void -check_primes (void) -{ - static const char * const primes[] = { - "2", "17", "65537", - /* diffie-hellman-group1-sha1, also "Well known group 2" in RFC - 2412, 2^1024 - 2^960 - 1 + 2^64 * { [2^894 pi] + 129093 } */ - "0xFFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" - "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" - "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" - "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" - "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381" - "FFFFFFFFFFFFFFFF", - NULL - }; - - mpz_t n; - int i; - - mpz_init (n); - - for (i = 0; primes[i]; i++) - { - mpz_set_str_or_abort (n, primes[i], 0); - check_one (n, 1); - } - mpz_clear (n); -} - -int -main (int argc, char **argv) -{ - int count = 1000; - - TESTS_REPS (count, argv, argc); - - tests_start (); - - check_small (); - check_composites (count); - check_primes (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-primorial_ui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-primorial_ui.c deleted file mode 100644 index 253040ca1e3..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-primorial_ui.c +++ /dev/null @@ -1,97 +0,0 @@ -/* Exercise mpz_primorial_ui. - -Copyright 2000-2002, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* Usage: t-primorial_ui [x|num] - - With no arguments testing goes up to the initial value of "limit" below. - With a number argument tests are carried that far, or with a literal "x" - tests are continued without limit (this being meant only for development - purposes). */ - -static int isprime (unsigned long int t); - -int -main (int argc, char *argv[]) -{ - unsigned long n; - unsigned long limit = 2222; - mpz_t f, r; - - tests_start (); - - if (argc > 1 && argv[1][0] == 'x') - limit = ULONG_MAX; - else if (argc > 1) - limit = atoi (argv[1]); - - /* for small limb testing */ - limit = MIN (limit, MP_LIMB_T_MAX); - - mpz_init_set_ui (f, 1); /* 0# = 1 */ - mpz_init (r); - - for (n = 0; n < limit; n++) - { - mpz_primorial_ui (r, n); - MPZ_CHECK_FORMAT (r); - - if (mpz_cmp (f, r) != 0) - { - printf ("mpz_primorial_ui(%lu) wrong\n", n); - printf (" got "); mpz_out_str (stdout, 10, r); printf("\n"); - printf (" want "); mpz_out_str (stdout, 10, f); printf("\n"); - abort (); - } - - if (isprime (n+1)) - mpz_mul_ui (f, f, n+1); /* p# = (p-1)# * (p) */ - } - - mpz_clear (f); - mpz_clear (r); - - tests_end (); - - exit (0); -} - -static int -isprime (unsigned long int t) -{ - unsigned long int q, r, d; - - if (t < 3 || (t & 1) == 0) - return t == 2; - - for (d = 3, r = 1; r != 0; d += 2) - { - q = t / d; - r = t - q * d; - if (q < d) - return 1; - } - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-remove.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-remove.c deleted file mode 100644 index 4de74675fdf..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-remove.c +++ /dev/null @@ -1,147 +0,0 @@ -/* Test mpz_remove. - -Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001, 2009, 2012, 2013 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void debug_mp (mpz_t); -unsigned long int mpz_refremove (mpz_t, const mpz_t, const mpz_t); - -int -main (int argc, char **argv) -{ - unsigned long int exp; - mpz_t t, dest, refdest, dividend, divisor; - mp_size_t dividend_size, divisor_size; - int i; - int reps = 1000; - unsigned long int pwr, refpwr; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long size_range; - - tests_start (); - rands = RANDS; - - if (argc == 2) - reps = atoi (argv[1]); - - mpz_inits (bs, t, dest, refdest, dividend, divisor, NULL); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 18 + 1; /* 1..524288 bit operands */ - - do - { - mpz_urandomb (bs, rands, size_range); - divisor_size = mpz_get_ui (bs); - mpz_rrandomb (divisor, rands, divisor_size); - } - while (mpz_sgn (divisor) == 0); - - mpz_urandomb (bs, rands, size_range); - dividend_size = mpz_get_ui (bs) + divisor_size; - mpz_rrandomb (dividend, rands, dividend_size); - - mpz_urandomb (bs, rands, 32); - exp = mpz_get_ui (bs) % (5 + 10000 / mpz_sizeinbase (divisor, 2)); - if (mpz_get_ui (bs) & 2) - mpz_neg (divisor, divisor); - mpz_pow_ui (t, divisor, exp); - mpz_mul (dividend, dividend, t); - - refpwr = mpz_refremove (refdest, dividend, divisor); - pwr = mpz_remove (dest, dividend, divisor); - - if (refpwr != pwr || mpz_cmp (refdest, dest) != 0) - { - fprintf (stderr, "ERROR after %d tests\n", i); - fprintf (stderr, "refpower = %lu\n", refpwr); - fprintf (stderr, " power = %lu\n", pwr); - fprintf (stderr, " op1 = "); debug_mp (dividend); - fprintf (stderr, " op2 = "); debug_mp (divisor); - fprintf (stderr, "refdest = "); debug_mp (refdest); - fprintf (stderr, " dest = "); debug_mp (dest); - abort (); - } - } - - mpz_clears (bs, t, dest, refdest, dividend, divisor, NULL); - - tests_end (); - exit (0); -} - -unsigned long int -mpz_refremove (mpz_t dest, const mpz_t src, const mpz_t f) -{ - unsigned long int pwr; - - pwr = 0; - - mpz_set (dest, src); - if (mpz_cmpabs_ui (f, 1) > 0) - { - mpz_t rem, x; - - mpz_init (x); - mpz_init (rem); - - for (;; pwr++) - { - mpz_tdiv_qr (x, rem, dest, f); - if (mpz_cmp_ui (rem, 0) != 0) - break; - mpz_swap (dest, x); - } - - mpz_clear (x); - mpz_clear (rem); - } - - return pwr; -} - -void -debug_mp (mpz_t x) -{ - size_t siz = mpz_sizeinbase (x, 16); - - if (siz > 65) - { - mpz_t q; - mpz_init (q); - mpz_tdiv_q_2exp (q, x, 4 * (mpz_sizeinbase (x, 16) - 25)); - gmp_fprintf (stderr, "%ZX...", q); - mpz_tdiv_r_2exp (q, x, 4 * 25); - gmp_fprintf (stderr, "%025ZX [%d]\n", q, (int) siz); - mpz_clear (q); - } - else - { - gmp_fprintf (stderr, "%ZX\n", x); - } -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-root.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-root.c deleted file mode 100644 index 05a82631276..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-root.c +++ /dev/null @@ -1,175 +0,0 @@ -/* Test mpz_root, mpz_rootrem, and mpz_perfect_power_p. - -Copyright 1991, 1993, 1994, 1996, 2000, 2001, 2009, 2015 Free Software -Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void debug_mp (mpz_t, int); - -void -check_one (mpz_t root1, mpz_t x2, unsigned long nth, int res, int i) -{ - mpz_t temp, temp2; - mpz_t root2, rem2; - - mpz_init (root2); - mpz_init (rem2); - mpz_init (temp); - mpz_init (temp2); - - MPZ_CHECK_FORMAT (root1); - - mpz_rootrem (root2, rem2, x2, nth); - MPZ_CHECK_FORMAT (root2); - MPZ_CHECK_FORMAT (rem2); - - mpz_pow_ui (temp, root1, nth); - MPZ_CHECK_FORMAT (temp); - - mpz_add (temp2, temp, rem2); - - /* Is power of result > argument? */ - if (mpz_cmp (root1, root2) != 0 || mpz_cmp (x2, temp2) != 0 || mpz_cmpabs (temp, x2) > 0 || res == mpz_cmp_ui (rem2, 0)) - { - fprintf (stderr, "ERROR after test %d\n", i); - debug_mp (x2, 10); - debug_mp (root1, 10); - debug_mp (root2, 10); - fprintf (stderr, "nth: %lu ,res: %i\n", nth, res); - abort (); - } - - if (nth > 1 && mpz_cmp_ui (temp, 1L) > 0 && ! mpz_perfect_power_p (temp)) - { - fprintf (stderr, "ERROR in mpz_perfect_power_p after test %d\n", i); - debug_mp (temp, 10); - debug_mp (root1, 10); - fprintf (stderr, "nth: %lu\n", nth); - abort (); - } - - if (nth <= 10000 && mpz_sgn(x2) > 0) /* skip too expensive test */ - { - mpz_add_ui (temp2, root1, 1L); - mpz_pow_ui (temp2, temp2, nth); - MPZ_CHECK_FORMAT (temp2); - - /* Is square of (result + 1) <= argument? */ - if (mpz_cmp (temp2, x2) <= 0) - { - fprintf (stderr, "ERROR after test %d\n", i); - debug_mp (x2, 10); - debug_mp (root1, 10); - fprintf (stderr, "nth: %lu\n", nth); - abort (); - } - } - - mpz_clear (root2); - mpz_clear (rem2); - mpz_clear (temp); - mpz_clear (temp2); -} - -int -main (int argc, char **argv) -{ - mpz_t x2; - mpz_t root1; - mp_size_t x2_size; - int i, res; - int reps = 500; - unsigned long nth; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - - tests_start (); - TESTS_REPS (reps, argv, argc); - - rands = RANDS; - - mpz_init (bs); - - mpz_init (x2); - mpz_init (root1); - - /* This triggers a gcc 4.3.2 bug */ - mpz_set_str (x2, "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80000000000000000000000000000000000000000000000000000000000000002", 16); - res = mpz_root (root1, x2, 2); - check_one (root1, x2, 2, res, -1); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 17 + 2; - - mpz_urandomb (bs, rands, size_range); - x2_size = mpz_get_ui (bs) + 10; - mpz_rrandomb (x2, rands, x2_size); - - mpz_urandomb (bs, rands, 15); - nth = mpz_getlimbn (bs, 0) % mpz_sizeinbase (x2, 2) + 2; - - res = mpz_root (root1, x2, nth); - - mpz_urandomb (bs, rands, 4); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - { - /* With 50% probability, set x2 near a perfect power. */ - mpz_pow_ui (x2, root1, nth); - if ((bsi & 2) != 0) - { - mpz_sub_ui (x2, x2, bsi >> 2); - mpz_abs (x2, x2); - } - else - mpz_add_ui (x2, x2, bsi >> 2); - res = mpz_root (root1, x2, nth); - } - - check_one (root1, x2, nth, res, i); - - if (((nth & 1) != 0) && ((bsi & 2) != 0)) - { - mpz_neg (x2, x2); - mpz_neg (root1, root1); - check_one (root1, x2, nth, res, i); - } - } - - mpz_clear (bs); - mpz_clear (x2); - mpz_clear (root1); - - tests_end (); - exit (0); -} - -void -debug_mp (mpz_t x, int base) -{ - mpz_out_str (stderr, base, x); fputc ('\n', stderr); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-scan.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-scan.c deleted file mode 100644 index 95b896b1be4..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-scan.c +++ /dev/null @@ -1,132 +0,0 @@ -/* Tests of mpz_scan0 and mpz_scan1. - -Copyright 2000-2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -unsigned long -refmpz_scan (mpz_srcptr z, unsigned long i, int sought) -{ - unsigned long z_bits = (unsigned long) ABSIZ(z) * GMP_NUMB_BITS; - - do - { - if (mpz_tstbit (z, i) == sought) - return i; - i++; - } - while (i <= z_bits); - - return ULONG_MAX; -} - -unsigned long -refmpz_scan0 (mpz_srcptr z, unsigned long starting_bit) -{ - return refmpz_scan (z, starting_bit, 0); -} - -unsigned long -refmpz_scan1 (mpz_srcptr z, unsigned long starting_bit) -{ - return refmpz_scan (z, starting_bit, 1); -} - - -void -check_ref (void) -{ - static const int offset[] = { - -2, -1, 0, 1, 2, 3 - }; - - mpz_t z; - int test, neg, sought, oindex, o; - mp_size_t size, isize; - unsigned long start, got, want; - - mpz_init (z); - for (test = 0; test < 5; test++) - { - for (size = 0; size < 5; size++) - { - mpz_random2 (z, size); - - for (neg = 0; neg <= 1; neg++) - { - if (neg) - mpz_neg (z, z); - - for (isize = 0; isize <= size; isize++) - { - for (oindex = 0; oindex < numberof (offset); oindex++) - { - o = offset[oindex]; - if ((int) isize*GMP_NUMB_BITS < -o) - continue; /* start would be negative */ - - start = isize*GMP_NUMB_BITS + o; - - for (sought = 0; sought <= 1; sought++) - { - if (sought == 0) - { - got = mpz_scan0 (z, start); - want = refmpz_scan0 (z, start); - } - else - { - got = mpz_scan1 (z, start); - want = refmpz_scan1 (z, start); - } - - if (got != want) - { - printf ("wrong at test=%d, size=%ld, neg=%d, start=%lu, sought=%d\n", - test, size, neg, start, sought); - printf (" z 0x"); - mpz_out_str (stdout, -16, z); - printf ("\n"); - printf (" got=%lu, want=%lu\n", got, want); - exit (1); - } - } - } - } - } - } - } - mpz_clear (z); -} - - -int -main (int argc, char *argv[]) -{ - tests_start (); - - check_ref (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-set_d.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-set_d.c deleted file mode 100644 index d587e654428..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-set_d.c +++ /dev/null @@ -1,140 +0,0 @@ -/* Test mpz_set_d and mpz_init_set_d. - -Copyright 2000-2003, 2006 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_data (void) -{ - static const struct { - double d; - mp_size_t want_size; - mp_limb_t want_data[2]; - } data[] = { - - { 0.0, 0 }, - { 1.0, 1, { 1 } }, - { -1.0, -1, { 1 } }, - - { 123.0, 1, { 123 } }, - { -123.0, -1, { 123 } }, - - { 1e-1, 0, { 0 } }, - { -1e-1, 0, { 0 } }, - { 2.328306436538696e-10, 0, { 0 } }, - { -2.328306436538696e-10, 0, { 0 } }, - { 5.421010862427522e-20, 0, { 0 } }, - { -5.421010862427522e-20, 0, { 0 } }, - { 2.938735877055719e-39, 0, { 0 } }, - { -2.938735877055719e-39, 0, { 0 } }, - }; - - mpz_t z; - int i; - - for (i = 0; i < numberof (data); i++) - { - mpz_init (z); - mpz_set_d (z, data[i].d); - MPZ_CHECK_FORMAT (z); - if (z->_mp_size != data[i].want_size - || refmpn_cmp_allowzero (z->_mp_d, data[i].want_data, - ABS (data[i].want_size)) != 0) - { - printf ("mpz_set_d wrong on data[%d]\n", i); - bad: - d_trace (" d ", data[i].d); - printf (" got size %ld\n", (long) z->_mp_size); - printf (" want size %ld\n", (long) data[i].want_size); - mpn_trace (" got z", z->_mp_d, z->_mp_size); - mpn_trace (" want z", data[i].want_data, data[i].want_size); - abort(); - } - mpz_clear (z); - - mpz_init_set_d (z, data[i].d); - MPZ_CHECK_FORMAT (z); - if (z->_mp_size != data[i].want_size - || refmpn_cmp_allowzero (z->_mp_d, data[i].want_data, - ABS (data[i].want_size)) != 0) - { - printf ("mpz_init_set_d wrong on data[%d]\n", i); - goto bad; - } - mpz_clear (z); - } -} - -/* Try mpz_set_d on values 2^i+1, while such a value fits a double. */ -void -check_2n_plus_1 (void) -{ - volatile double p, d, diff; - mpz_t want, got; - int i; - - mpz_init (want); - mpz_init (got); - - p = 1.0; - mpz_set_ui (want, 2L); /* gives 3 on first step */ - - for (i = 1; i < 500; i++) - { - mpz_mul_2exp (want, want, 1L); - mpz_sub_ui (want, want, 1L); /* want = 2^i+1 */ - - p *= 2.0; /* p = 2^i */ - d = p + 1.0; - diff = d - p; - if (diff != 1.0) - break; /* rounding occurred, stop now */ - - mpz_set_d (got, d); - MPZ_CHECK_FORMAT (got); - if (mpz_cmp (got, want) != 0) - { - printf ("mpz_set_d wrong on 2^%d+1\n", i); - d_trace (" d ", d); - mpz_trace (" got ", got); - mpz_trace (" want ", want); - abort (); - } - } - - mpz_clear (want); - mpz_clear (got); -} - -int -main (void) -{ - tests_start (); - - check_data (); - check_2n_plus_1 (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-set_f.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-set_f.c deleted file mode 100644 index 38b5a2c438f..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-set_f.c +++ /dev/null @@ -1,126 +0,0 @@ -/* Test mpz_set_f. - -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_one (mpz_srcptr z) -{ - static const int shift[] = { - 0, 1, GMP_LIMB_BITS, 2*GMP_LIMB_BITS, 5*GMP_LIMB_BITS - }; - - int sh, shneg, neg; - mpf_t f; - mpz_t got, want; - - mpf_init2 (f, mpz_sizeinbase(z,2)); - mpz_init (got); - mpz_init (want); - - for (sh = 0; sh < numberof(shift); sh++) - { - for (shneg = 0; shneg <= 1; shneg++) - { - for (neg = 0; neg <= 1; neg++) - { - mpf_set_z (f, z); - mpz_set (want, z); - - if (neg) - { - mpf_neg (f, f); - mpz_neg (want, want); - } - - if (shneg) - { - mpz_tdiv_q_2exp (want, want, shift[sh]); - mpf_div_2exp (f, f, shift[sh]); - } - else - { - mpz_mul_2exp (want, want, shift[sh]); - mpf_mul_2exp (f, f, shift[sh]); - } - - mpz_set_f (got, f); - MPZ_CHECK_FORMAT (got); - - if (mpz_cmp (got, want) != 0) - { - printf ("wrong result\n"); - printf (" shift %d\n", shneg ? -shift[sh] : shift[sh]); - printf (" neg %d\n", neg); - mpf_trace (" f", f); - mpz_trace (" got", got); - mpz_trace (" want", want); - abort (); - } - } - } - } - - mpf_clear (f); - mpz_clear (got); - mpz_clear (want); -} - - -void -check_various (void) -{ - mpz_t z; - - mpz_init (z); - - mpz_set_ui (z, 0L); - check_one (z); - - mpz_set_si (z, 123L); - check_one (z); - - mpz_rrandomb (z, RANDS, 2*GMP_LIMB_BITS); - check_one (z); - - mpz_rrandomb (z, RANDS, 5*GMP_LIMB_BITS); - check_one (z); - - mpz_clear (z); -} - - -int -main (int argc, char *argv[]) -{ -#if GMP_NAIL_BITS == 0 - tests_start (); - mp_trace_base = 16; - - check_various (); - - tests_end (); -#endif - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-set_si.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-set_si.c deleted file mode 100644 index b1e55ede332..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-set_si.c +++ /dev/null @@ -1,97 +0,0 @@ -/* Test mpz_set_si and mpz_init_set_si. - -Copyright 2000-2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_data (void) -{ -#if GMP_NUMB_BITS <= BITS_PER_ULONG -#define ENTRY(n) { n, { n, 0 } } -#else -#define ENTRY(n) { n, { (n) & GMP_NUMB_MASK, (n) >> GMP_NUMB_BITS } } -#endif - - static const struct { - long n; - mp_size_t want_size; - mp_limb_t want_data[2]; - } data[] = { - - { 0L, 0 }, - { 1L, 1, { 1 } }, - { -1L, -1, { 1 } }, - -#if GMP_NUMB_BITS >= BITS_PER_ULONG - { LONG_MAX, 1, { LONG_MAX, 0 } }, - { -LONG_MAX, -1, { LONG_MAX, 0 } }, - { LONG_HIGHBIT, -1, { ULONG_HIGHBIT, 0 } }, -#else - { LONG_MAX, 2, { LONG_MAX & GMP_NUMB_MASK, LONG_MAX >> GMP_NUMB_BITS } }, - { -LONG_MAX, -2, { LONG_MAX & GMP_NUMB_MASK, LONG_MAX >> GMP_NUMB_BITS }}, - { LONG_HIGHBIT, -2, { 0, ULONG_HIGHBIT >> GMP_NUMB_BITS } }, -#endif - }; - - mpz_t n; - int i; - - for (i = 0; i < numberof (data); i++) - { - mpz_init (n); - mpz_set_si (n, data[i].n); - MPZ_CHECK_FORMAT (n); - if (n->_mp_size != data[i].want_size - || refmpn_cmp_allowzero (n->_mp_d, data[i].want_data, - ABS (data[i].want_size)) != 0) - { - printf ("mpz_set_si wrong on data[%d]\n", i); - abort(); - } - mpz_clear (n); - - mpz_init_set_si (n, data[i].n); - MPZ_CHECK_FORMAT (n); - if (n->_mp_size != data[i].want_size - || refmpn_cmp_allowzero (n->_mp_d, data[i].want_data, - ABS (data[i].want_size)) != 0) - { - printf ("mpz_init_set_si wrong on data[%d]\n", i); - abort(); - } - mpz_clear (n); - } -} - - -int -main (void) -{ - tests_start (); - - check_data (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-set_str.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-set_str.c deleted file mode 100644 index c6a59f2fede..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-set_str.c +++ /dev/null @@ -1,109 +0,0 @@ -/* Test mpz_set_str. - -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -check_one (mpz_srcptr want, int fail, int base, const char *str) -{ - mpz_t got; - - MPZ_CHECK_FORMAT (want); - mp_trace_base = (base == 0 ? 16 : base); - - mpz_init (got); - - if (mpz_set_str (got, str, base) != fail) - { - printf ("mpz_set_str unexpectedly failed\n"); - printf (" base %d\n", base); - printf (" str \"%s\"\n", str); - abort (); - } - MPZ_CHECK_FORMAT (got); - - if (fail == 0 && mpz_cmp (got, want) != 0) - { - printf ("mpz_set_str wrong\n"); - printf (" base %d\n", base); - printf (" str \"%s\"\n", str); - mpz_trace ("got ", got); - mpz_trace ("want", want); - abort (); - } - - mpz_clear (got); -} - -void -check_samples (void) -{ - mpz_t z; - - mpz_init (z); - - mpz_set_ui (z, 0L); - check_one (z, 0, 0, "0 "); - check_one (z, 0, 0, " 0 0 0 "); - check_one (z, 0, 0, " -0B 0 "); - check_one (z, 0, 0, " 0X 0 "); - check_one (z, 0, 10, "0 "); - check_one (z, 0, 10, "-0 "); - check_one (z, 0, 10, " 0 000 000 "); - - mpz_set_ui (z, 123L); - check_one (z, 0, 0, "123 "); - check_one (z, 0, 0, "123 "); - check_one (z, 0, 0, "0173 "); - check_one (z, 0, 0, " 0b 1 11 10 11 "); - check_one (z, 0, 0, " 0x 7b "); - check_one (z, 0, 0, "0x7B"); - check_one (z, 0, 10, "123 "); - check_one (z, 0, 10, "123 "); - check_one (z, 0, 0, " 123 "); - check_one (z, 0, 0, " 123 "); - check_one (z, 0, 10, " 0000123 "); - check_one (z, 0, 10, " 123 "); - check_one (z,-1, 10, "1%"); - check_one (z,-1, 0, "3!"); - check_one (z,-1, 0, "0123456789"); - check_one (z,-1, 0, "13579BDF"); - check_one (z,-1, 0, "0b0102"); - check_one (z,-1, 0, "0x010G"); - check_one (z,-1, 37,"0x010G"); - check_one (z,-1, 99,"0x010G"); - - mpz_clear (z); -} - -int -main (void) -{ - tests_start (); - - check_samples (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-sizeinbase.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-sizeinbase.c deleted file mode 100644 index b5eab8846f8..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-sizeinbase.c +++ /dev/null @@ -1,90 +0,0 @@ -/* Test mpz_sizeinbase. - -Copyright 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -#if 0 - /* Disabled due to the bogosity of trying to fake an _mp_d pointer to - below an object. Has been seen to fail on a hppa system and on ia64. */ - - -/* Create a fake mpz consisting of just a single 1 bit, with totbits being - the total number of bits, inclusive of that 1 bit. */ -void -mpz_fake_bits (mpz_ptr z, unsigned long totbits) -{ - static mp_limb_t n; - unsigned long zero_bits, zero_limbs; - - zero_bits = totbits - 1; - zero_limbs = zero_bits / GMP_NUMB_BITS; - zero_bits %= GMP_NUMB_BITS; - - SIZ(z) = zero_limbs + 1; - PTR(z) = (&n) - (SIZ(z) - 1); - n = CNST_LIMB(1) << zero_bits; - - ASSERT_ALWAYS (mpz_sizeinbase (z, 2) == totbits); -} - - -/* This was seen to fail on a GNU/Linux powerpc32 with gcc 2.95.2, - apparently due to a doubtful value of mp_bases[10].chars_per_bit_exactly - (0X1.34413509F79FDP-2 whereas 0X1.34413509F79FFP-2 is believed correct). - Presumably this is a glibc problem when gcc converts the decimal string - in mp_bases.c, or maybe it's only a function of the rounding mode during - compilation. */ -void -check_sample (void) -{ - unsigned long totbits = 198096465; - int base = 10; - size_t want = 59632979; - size_t got; - mpz_t z; - - mpz_fake_bits (z, totbits); - got = mpz_sizeinbase (z, base); - if (got != want) - { - printf ("mpz_sizeinbase\n"); - printf (" base %d\n", base); - printf (" totbits %lu\n", totbits); - printf (" got %u\n", got); - printf (" want %u\n", want); - abort (); - } -} -#endif - -int -main (void) -{ - tests_start (); - - /* check_sample (); */ - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-sqrtrem.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-sqrtrem.c deleted file mode 100644 index a3f896e1a10..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-sqrtrem.c +++ /dev/null @@ -1,123 +0,0 @@ -/* Test mpz_add, mpz_add_ui, mpz_cmp, mpz_cmp, mpz_mul, mpz_sqrtrem. - -Copyright 1991, 1993, 1994, 1996, 2000-2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void dump_abort (mpz_t, mpz_t, mpz_t); -void debug_mp (mpz_t, int); - -int -main (int argc, char **argv) -{ - mpz_t x2; - mpz_t x, rem; - mpz_t temp, temp2; - mp_size_t x2_size; - int i; - int reps = 1000; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long size_range; - - tests_start (); - TESTS_REPS (reps, argv, argc); - - rands = RANDS; - - mpz_init (bs); - - mpz_init (x2); - mpz_init (x); - mpz_init (rem); - mpz_init (temp); - mpz_init (temp2); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 17 + 2; /* 0..262144 bit operands */ - - mpz_urandomb (bs, rands, size_range); - x2_size = mpz_get_ui (bs); - mpz_rrandomb (x2, rands, x2_size); - - /* printf ("%ld\n", SIZ (x2)); */ - - mpz_sqrt (temp, x2); - MPZ_CHECK_FORMAT (temp); - - mpz_sqrtrem (x, rem, x2); - MPZ_CHECK_FORMAT (x); - MPZ_CHECK_FORMAT (rem); - - /* Are results different? */ - if (mpz_cmp (temp, x) != 0) - dump_abort (x2, x, rem); - - mpz_mul (temp, x, x); - - /* Is square of result > argument? */ - if (mpz_cmp (temp, x2) > 0) - dump_abort (x2, x, rem); - - mpz_add_ui (temp2, x, 1); - mpz_mul (temp2, temp2, temp2); - - /* Is square of (result + 1) <= argument? */ - if (mpz_cmp (temp2, x2) <= 0) - dump_abort (x2, x, rem); - - mpz_add (temp2, temp, rem); - - /* Is the remainder wrong? */ - if (mpz_cmp (x2, temp2) != 0) - dump_abort (x2, x, rem); - } - - mpz_clear (bs); - mpz_clear (x2); - mpz_clear (x); - mpz_clear (rem); - mpz_clear (temp); - mpz_clear (temp2); - - tests_end (); - exit (0); -} - -void -dump_abort (mpz_t x2, mpz_t x, mpz_t rem) -{ - fprintf (stderr, "ERROR\n"); - fprintf (stderr, "x2 = "); debug_mp (x2, -16); - fprintf (stderr, "x = "); debug_mp (x, -16); - fprintf (stderr, "remainder = "); debug_mp (rem, -16); - abort(); -} - -void -debug_mp (mpz_t x, int base) -{ - mpz_out_str (stderr, base, x); fputc ('\n', stderr); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-tdiv.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-tdiv.c deleted file mode 100644 index 902b51c0038..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-tdiv.c +++ /dev/null @@ -1,146 +0,0 @@ -/* Test mpz_abs, mpz_add, mpz_cmp, mpz_cmp_ui, mpz_tdiv_qr, mpz_tdiv_q, - mpz_tdiv_r, mpz_mul. - -Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void dump_abort (mpz_t, mpz_t); -void debug_mp (mpz_t, int); - -int -main (int argc, char **argv) -{ - mpz_t dividend, divisor; - mpz_t quotient, remainder; - mpz_t quotient2, remainder2; - mpz_t temp; - mp_size_t dividend_size, divisor_size; - int i; - int reps = 1000; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - - tests_start (); - TESTS_REPS (reps, argv, argc); - - rands = RANDS; - - mpz_init (bs); - - mpz_init (dividend); - mpz_init (divisor); - mpz_init (quotient); - mpz_init (remainder); - mpz_init (quotient2); - mpz_init (remainder2); - mpz_init (temp); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 18 + 2; /* 0..524288 bit operands */ - - do - { - mpz_urandomb (bs, rands, size_range); - divisor_size = mpz_get_ui (bs); - mpz_rrandomb (divisor, rands, divisor_size); - } - while (mpz_sgn (divisor) == 0); - - mpz_urandomb (bs, rands, size_range); - dividend_size = mpz_get_ui (bs) + divisor_size; - mpz_rrandomb (dividend, rands, dividend_size); - - mpz_urandomb (bs, rands, 2); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - mpz_neg (dividend, dividend); - if ((bsi & 2) != 0) - mpz_neg (divisor, divisor); - - /* printf ("%ld %ld\n", SIZ (dividend), SIZ (divisor)); */ - - mpz_tdiv_qr (quotient, remainder, dividend, divisor); - mpz_tdiv_q (quotient2, dividend, divisor); - mpz_tdiv_r (remainder2, dividend, divisor); - - /* First determine that the quotients and remainders computed - with different functions are equal. */ - if (mpz_cmp (quotient, quotient2) != 0) - dump_abort (dividend, divisor); - if (mpz_cmp (remainder, remainder2) != 0) - dump_abort (dividend, divisor); - - /* Check if the sign of the quotient is correct. */ - if (mpz_cmp_ui (quotient, 0) != 0) - if ((mpz_cmp_ui (quotient, 0) < 0) - != ((mpz_cmp_ui (dividend, 0) ^ mpz_cmp_ui (divisor, 0)) < 0)) - dump_abort (dividend, divisor); - - /* Check if the remainder has the same sign as the dividend - (quotient rounded towards 0). */ - if (mpz_cmp_ui (remainder, 0) != 0) - if ((mpz_cmp_ui (remainder, 0) < 0) != (mpz_cmp_ui (dividend, 0) < 0)) - dump_abort (dividend, divisor); - - mpz_mul (temp, quotient, divisor); - mpz_add (temp, temp, remainder); - if (mpz_cmp (temp, dividend) != 0) - dump_abort (dividend, divisor); - - mpz_abs (temp, divisor); - mpz_abs (remainder, remainder); - if (mpz_cmp (remainder, temp) >= 0) - dump_abort (dividend, divisor); - } - - mpz_clear (bs); - mpz_clear (dividend); - mpz_clear (divisor); - mpz_clear (quotient); - mpz_clear (remainder); - mpz_clear (quotient2); - mpz_clear (remainder2); - mpz_clear (temp); - - tests_end (); - exit (0); -} - -void -dump_abort (mpz_t dividend, mpz_t divisor) -{ - fprintf (stderr, "ERROR\n"); - fprintf (stderr, "dividend = "); debug_mp (dividend, -16); - fprintf (stderr, "divisor = "); debug_mp (divisor, -16); - abort(); -} - -void -debug_mp (mpz_t x, int base) -{ - mpz_out_str (stderr, base, x); fputc ('\n', stderr); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-tdiv_ui.c b/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-tdiv_ui.c deleted file mode 100644 index db266eb9d00..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/mpz/t-tdiv_ui.c +++ /dev/null @@ -1,159 +0,0 @@ -/* Test mpz_abs, mpz_add, mpz_cmp, mpz_cmp_ui, mpz_tdiv_qr_ui, mpz_tdiv_q_ui, - mpz_tdiv_r_ui, mpz_tdiv_ui, mpz_mul_ui. - -Copyright 1993, 1994, 1996, 2000-2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void dump_abort (const char *, mpz_t, unsigned long); -void debug_mp (mpz_t, int); - -int -main (int argc, char **argv) -{ - mpz_t dividend; - mpz_t quotient, remainder; - mpz_t quotient2, remainder2; - mpz_t temp; - mp_size_t dividend_size; - unsigned long divisor; - int i; - int reps = 200000; - gmp_randstate_ptr rands; - mpz_t bs; - unsigned long bsi, size_range; - unsigned long r_rq, r_q, r_r, r; - - tests_start (); - rands = RANDS; - - mpz_init (bs); - - if (argc == 2) - reps = atoi (argv[1]); - - mpz_init (dividend); - mpz_init (quotient); - mpz_init (remainder); - mpz_init (quotient2); - mpz_init (remainder2); - mpz_init (temp); - - for (i = 0; i < reps; i++) - { - mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 10 + 2; /* 0..2047 bit operands */ - - do - { - mpz_rrandomb (bs, rands, 64); - divisor = mpz_get_ui (bs); - } - while (divisor == 0); - - mpz_urandomb (bs, rands, size_range); - dividend_size = mpz_get_ui (bs); - mpz_rrandomb (dividend, rands, dividend_size); - - mpz_urandomb (bs, rands, 2); - bsi = mpz_get_ui (bs); - if ((bsi & 1) != 0) - mpz_neg (dividend, dividend); - - /* printf ("%ld\n", SIZ (dividend)); */ - - r_rq = mpz_tdiv_qr_ui (quotient, remainder, dividend, divisor); - r_q = mpz_tdiv_q_ui (quotient2, dividend, divisor); - r_r = mpz_tdiv_r_ui (remainder2, dividend, divisor); - r = mpz_tdiv_ui (dividend, divisor); - - /* First determine that the quotients and remainders computed - with different functions are equal. */ - if (mpz_cmp (quotient, quotient2) != 0) - dump_abort ("quotients from mpz_tdiv_qr_ui and mpz_tdiv_q_ui differ", - dividend, divisor); - if (mpz_cmp (remainder, remainder2) != 0) - dump_abort ("remainders from mpz_tdiv_qr_ui and mpz_tdiv_r_ui differ", - dividend, divisor); - - /* Check if the sign of the quotient is correct. */ - if (mpz_cmp_ui (quotient, 0) != 0) - if ((mpz_cmp_ui (quotient, 0) < 0) - != (mpz_cmp_ui (dividend, 0) < 0)) - dump_abort ("quotient sign wrong", dividend, divisor); - - /* Check if the remainder has the same sign as the dividend - (quotient rounded towards 0). */ - if (mpz_cmp_ui (remainder, 0) != 0) - if ((mpz_cmp_ui (remainder, 0) < 0) != (mpz_cmp_ui (dividend, 0) < 0)) - dump_abort ("remainder sign wrong", dividend, divisor); - - mpz_mul_ui (temp, quotient, divisor); - mpz_add (temp, temp, remainder); - if (mpz_cmp (temp, dividend) != 0) - dump_abort ("n mod d != n - [n/d]*d", dividend, divisor); - - mpz_abs (remainder, remainder); - if (mpz_cmp_ui (remainder, divisor) >= 0) - dump_abort ("remainder greater than divisor", dividend, divisor); - - if (mpz_cmp_ui (remainder, r_rq) != 0) - dump_abort ("remainder returned from mpz_tdiv_qr_ui is wrong", - dividend, divisor); - if (mpz_cmp_ui (remainder, r_q) != 0) - dump_abort ("remainder returned from mpz_tdiv_q_ui is wrong", - dividend, divisor); - if (mpz_cmp_ui (remainder, r_r) != 0) - dump_abort ("remainder returned from mpz_tdiv_r_ui is wrong", - dividend, divisor); - if (mpz_cmp_ui (remainder, r) != 0) - dump_abort ("remainder returned from mpz_tdiv_ui is wrong", - dividend, divisor); - } - - mpz_clear (bs); - mpz_clear (dividend); - mpz_clear (quotient); - mpz_clear (remainder); - mpz_clear (quotient2); - mpz_clear (remainder2); - mpz_clear (temp); - - tests_end (); - exit (0); -} - -void -dump_abort (const char *str, mpz_t dividend, unsigned long divisor) -{ - fprintf (stderr, "ERROR: %s\n", str); - fprintf (stderr, "dividend = "); debug_mp (dividend, -16); - fprintf (stderr, "divisor = %lX\n", divisor); - abort(); -} - -void -debug_mp (mpz_t x, int base) -{ - mpz_out_str (stderr, base, x); fputc ('\n', stderr); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/rand/Makefile.am b/src/plugins/e-acsl/contrib/libgmp/tests/rand/Makefile.am deleted file mode 100644 index 19dacf7041d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/rand/Makefile.am +++ /dev/null @@ -1,89 +0,0 @@ -## Process this file with automake to generate Makefile.in - -# Copyright 2000-2003 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. - - -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la - -check_PROGRAMS = t-iset t-lc2exp t-mt t-rand t-urbui t-urmui t-urndmm -TESTS = $(check_PROGRAMS) - -EXTRA_PROGRAMS = findlc gen gen.static spect stat -gen_static_SOURCES = gen.c -gen_static_LDFLAGS = -static -findlc_LDADD = libstat.la -spect_LDADD = libstat.la -stat_LDADD = libstat.la - -EXTRA_LTLIBRARIES = libstat.la -libstat_la_SOURCES = gmpstat.h statlib.c zdiv_round.c -libstat_la_LIBADD = $(top_builddir)/libgmp.la $(LIBM) - -CLEANFILES = $(EXTRA_PROGRAMS) $(EXTRA_LTLIBRARIES) - -allprogs: $(EXTRA_PROGRAMS) - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la - -manual-test: gen$(EXEEXT) stat$(EXEEXT) - @(echo -n '16i: '; ./gen -f mpz_urandomb -z 16 1000 \ - | ./stat -i 0xffff | grep '^[0-9]') - @(echo -n '32i: '; ./gen -f mpz_urandomb -z 32 1000 \ - | ./stat -i 0xffffffff | grep '^[0-9]') - @(echo -n '33i: '; ./gen -f mpz_urandomb -z 33 1000 \ - | ./stat -i 0x1ffffffff | grep '^[0-9]') - @(echo -n '64i: '; ./gen -f mpz_urandomb -z 64 1000 \ - | ./stat -i 0xffffffffffffffff | grep '^[0-9]') - @(echo -n '128i: '; ./gen -f mpz_urandomb -z 128 1000 \ - | ./stat -i 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | grep '^[0-9]') - - @(echo -n '16f: '; ./gen -f mpf_urandomb -z 16 1000 \ - | ./stat | grep '^[0-9]') - @(echo -n '32f: '; ./gen -f mpf_urandomb -z 32 1000 \ - | ./stat | grep '^[0-9]') - @(echo -n '33f: '; ./gen -f mpf_urandomb -z 33 1000 \ - | ./stat | grep '^[0-9]') - @(echo -n '64f: '; ./gen -f mpf_urandomb -z 64 1000 \ - | ./stat | grep '^[0-9]') - @(echo -n '128f: '; ./gen -f mpf_urandomb -z 128 1000 \ - | ./stat | grep '^[0-9]') - -manual-bigtest: gen$(EXEEXT) stat$(EXEEXT) - @(echo '16i: '; ./gen -f mpz_urandomb -z 16 50000 \ - | ./stat -2 1000 -i 0xffff | grep '^K[mp]') - @(echo '32i: '; ./gen -f mpz_urandomb -z 32 50000 \ - | ./stat -2 1000 -i 0xffffffff | grep '^K[mp]') - @(echo '33i: '; ./gen -f mpz_urandomb -z 33 50000 \ - | ./stat -2 1000 -i 0x1ffffffff | grep '^K[mp]') - @(echo '64i: '; ./gen -f mpz_urandomb -z 64 50000 \ - | ./stat -2 1000 -i 0xffffffffffffffff | grep '^K[mp]') - @(echo '128i: '; ./gen -f mpz_urandomb -z 128 50000 \ - | ./stat -2 1000 -i 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | grep '^K[mp]') - - @(echo '16f: '; ./gen -f mpf_urandomb -z 16 50000 \ - | ./stat -2 1000 | grep '^K[mp]') - @(echo '32f: '; ./gen -f mpf_urandomb -z 32 50000 \ - | ./stat -2 1000 | grep '^K[mp]') - @(echo '33f: '; ./gen -f mpf_urandomb -z 33 50000 \ - | ./stat -2 1000 | grep '^K[mp]') - @(echo '64f: '; ./gen -f mpf_urandomb -z 64 50000 \ - | ./stat -2 1000 | grep '^K[mp]') - @(echo '128f: '; ./gen -f mpf_urandomb -z 128 50000 \ - | ./stat -2 1000 | grep '^K[mp]') diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/rand/Makefile.in b/src/plugins/e-acsl/contrib/libgmp/tests/rand/Makefile.in deleted file mode 100644 index c4a7044b197..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/rand/Makefile.in +++ /dev/null @@ -1,1214 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright 2000-2003 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library test suite. -# -# The GNU MP Library test suite is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# The GNU MP Library test suite is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -check_PROGRAMS = t-iset$(EXEEXT) t-lc2exp$(EXEEXT) t-mt$(EXEEXT) \ - t-rand$(EXEEXT) t-urbui$(EXEEXT) t-urmui$(EXEEXT) \ - t-urndmm$(EXEEXT) -EXTRA_PROGRAMS = findlc$(EXEEXT) gen$(EXEEXT) gen.static$(EXEEXT) \ - spect$(EXEEXT) stat$(EXEEXT) -subdir = tests/rand -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__DEPENDENCIES_1 = -libstat_la_DEPENDENCIES = $(top_builddir)/libgmp.la \ - $(am__DEPENDENCIES_1) -am_libstat_la_OBJECTS = statlib.lo zdiv_round.lo -libstat_la_OBJECTS = $(am_libstat_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -findlc_SOURCES = findlc.c -findlc_OBJECTS = findlc.$(OBJEXT) -findlc_DEPENDENCIES = libstat.la -gen_SOURCES = gen.c -gen_OBJECTS = gen.$(OBJEXT) -gen_LDADD = $(LDADD) -gen_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -am_gen_static_OBJECTS = gen.$(OBJEXT) -gen_static_OBJECTS = $(am_gen_static_OBJECTS) -gen_static_LDADD = $(LDADD) -gen_static_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -gen_static_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(gen_static_LDFLAGS) $(LDFLAGS) -o $@ -spect_SOURCES = spect.c -spect_OBJECTS = spect.$(OBJEXT) -spect_DEPENDENCIES = libstat.la -stat_SOURCES = stat.c -stat_OBJECTS = stat.$(OBJEXT) -stat_DEPENDENCIES = libstat.la -t_iset_SOURCES = t-iset.c -t_iset_OBJECTS = t-iset.$(OBJEXT) -t_iset_LDADD = $(LDADD) -t_iset_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_lc2exp_SOURCES = t-lc2exp.c -t_lc2exp_OBJECTS = t-lc2exp.$(OBJEXT) -t_lc2exp_LDADD = $(LDADD) -t_lc2exp_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_mt_SOURCES = t-mt.c -t_mt_OBJECTS = t-mt.$(OBJEXT) -t_mt_LDADD = $(LDADD) -t_mt_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_rand_SOURCES = t-rand.c -t_rand_OBJECTS = t-rand.$(OBJEXT) -t_rand_LDADD = $(LDADD) -t_rand_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_urbui_SOURCES = t-urbui.c -t_urbui_OBJECTS = t-urbui.$(OBJEXT) -t_urbui_LDADD = $(LDADD) -t_urbui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_urmui_SOURCES = t-urmui.c -t_urmui_OBJECTS = t-urmui.$(OBJEXT) -t_urmui_LDADD = $(LDADD) -t_urmui_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -t_urndmm_SOURCES = t-urndmm.c -t_urndmm_OBJECTS = t-urndmm.$(OBJEXT) -t_urndmm_LDADD = $(LDADD) -t_urndmm_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ - $(top_builddir)/libgmp.la -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(libstat_la_SOURCES) findlc.c gen.c $(gen_static_SOURCES) \ - spect.c stat.c t-iset.c t-lc2exp.c t-mt.c t-rand.c t-urbui.c \ - t-urmui.c t-urndmm.c -DIST_SOURCES = $(libstat_la_SOURCES) findlc.c gen.c \ - $(gen_static_SOURCES) spect.c stat.c t-iset.c t-lc2exp.c \ - t-mt.c t-rand.c t-urbui.c t-urmui.c t-urndmm.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red='[0;31m'; \ - grn='[0;32m'; \ - lgn='[1;32m'; \ - blu='[1;34m'; \ - mgn='[0;35m'; \ - brg='[1m'; \ - std='[m'; \ - fi; \ -} -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck -TEST_SUITE_LOG = test-suite.log -TEST_EXTENSIONS = @EXEEXT@ .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/test-driver -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ABI = @ABI@ -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -ASMFLAGS = @ASMFLAGS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ -CC = @CC@ -CCAS = @CCAS@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CPP_FOR_BUILD = @CPP_FOR_BUILD@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@ -DEFS = @DEFS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -FGREP = @FGREP@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIMB_BITS = @GMP_LIMB_BITS@ -GMP_NAIL_BITS = @GMP_NAIL_BITS@ -GREP = @GREP@ -HAVE_CLOCK_01 = @HAVE_CLOCK_01@ -HAVE_CPUTIME_01 = @HAVE_CPUTIME_01@ -HAVE_GETRUSAGE_01 = @HAVE_GETRUSAGE_01@ -HAVE_GETTIMEOFDAY_01 = @HAVE_GETTIMEOFDAY_01@ -HAVE_HOST_CPU_FAMILY_power = @HAVE_HOST_CPU_FAMILY_power@ -HAVE_HOST_CPU_FAMILY_powerpc = @HAVE_HOST_CPU_FAMILY_powerpc@ -HAVE_SIGACTION_01 = @HAVE_SIGACTION_01@ -HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@ -HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@ -HAVE_STACK_T_01 = @HAVE_STACK_T_01@ -HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBCURSES = @LIBCURSES@ -LIBGMPXX_LDFLAGS = @LIBGMPXX_LDFLAGS@ -LIBGMP_DLL = @LIBGMP_DLL@ -LIBGMP_LDFLAGS = @LIBGMP_LDFLAGS@ -LIBM = @LIBM@ -LIBM_FOR_BUILD = @LIBM_FOR_BUILD@ -LIBOBJS = @LIBOBJS@ -LIBREADLINE = @LIBREADLINE@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -M4 = @M4@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@ -STRIP = @STRIP@ -TAL_OBJECT = @TAL_OBJECT@ -TUNE_LIBS = @TUNE_LIBS@ -TUNE_SQR_OBJ = @TUNE_SQR_OBJ@ -U_FOR_BUILD = @U_FOR_BUILD@ -VERSION = @VERSION@ -WITH_READLINE_01 = @WITH_READLINE_01@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gmp_srclinks = @gmp_srclinks@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -mpn_objects = @mpn_objects@ -mpn_objs_in_libgmp = @mpn_objs_in_libgmp@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests -LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la -TESTS = $(check_PROGRAMS) -gen_static_SOURCES = gen.c -gen_static_LDFLAGS = -static -findlc_LDADD = libstat.la -spect_LDADD = libstat.la -stat_LDADD = libstat.la -EXTRA_LTLIBRARIES = libstat.la -libstat_la_SOURCES = gmpstat.h statlib.c zdiv_round.c -libstat_la_LIBADD = $(top_builddir)/libgmp.la $(LIBM) -CLEANFILES = $(EXTRA_PROGRAMS) $(EXTRA_LTLIBRARIES) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps tests/rand/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu --ignore-deps tests/rand/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -libstat.la: $(libstat_la_OBJECTS) $(libstat_la_DEPENDENCIES) $(EXTRA_libstat_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(libstat_la_OBJECTS) $(libstat_la_LIBADD) $(LIBS) - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -findlc$(EXEEXT): $(findlc_OBJECTS) $(findlc_DEPENDENCIES) $(EXTRA_findlc_DEPENDENCIES) - @rm -f findlc$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(findlc_OBJECTS) $(findlc_LDADD) $(LIBS) - -gen$(EXEEXT): $(gen_OBJECTS) $(gen_DEPENDENCIES) $(EXTRA_gen_DEPENDENCIES) - @rm -f gen$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gen_OBJECTS) $(gen_LDADD) $(LIBS) - -gen.static$(EXEEXT): $(gen_static_OBJECTS) $(gen_static_DEPENDENCIES) $(EXTRA_gen_static_DEPENDENCIES) - @rm -f gen.static$(EXEEXT) - $(AM_V_CCLD)$(gen_static_LINK) $(gen_static_OBJECTS) $(gen_static_LDADD) $(LIBS) - -spect$(EXEEXT): $(spect_OBJECTS) $(spect_DEPENDENCIES) $(EXTRA_spect_DEPENDENCIES) - @rm -f spect$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(spect_OBJECTS) $(spect_LDADD) $(LIBS) - -stat$(EXEEXT): $(stat_OBJECTS) $(stat_DEPENDENCIES) $(EXTRA_stat_DEPENDENCIES) - @rm -f stat$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(stat_OBJECTS) $(stat_LDADD) $(LIBS) - -t-iset$(EXEEXT): $(t_iset_OBJECTS) $(t_iset_DEPENDENCIES) $(EXTRA_t_iset_DEPENDENCIES) - @rm -f t-iset$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_iset_OBJECTS) $(t_iset_LDADD) $(LIBS) - -t-lc2exp$(EXEEXT): $(t_lc2exp_OBJECTS) $(t_lc2exp_DEPENDENCIES) $(EXTRA_t_lc2exp_DEPENDENCIES) - @rm -f t-lc2exp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_lc2exp_OBJECTS) $(t_lc2exp_LDADD) $(LIBS) - -t-mt$(EXEEXT): $(t_mt_OBJECTS) $(t_mt_DEPENDENCIES) $(EXTRA_t_mt_DEPENDENCIES) - @rm -f t-mt$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_mt_OBJECTS) $(t_mt_LDADD) $(LIBS) - -t-rand$(EXEEXT): $(t_rand_OBJECTS) $(t_rand_DEPENDENCIES) $(EXTRA_t_rand_DEPENDENCIES) - @rm -f t-rand$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_rand_OBJECTS) $(t_rand_LDADD) $(LIBS) - -t-urbui$(EXEEXT): $(t_urbui_OBJECTS) $(t_urbui_DEPENDENCIES) $(EXTRA_t_urbui_DEPENDENCIES) - @rm -f t-urbui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_urbui_OBJECTS) $(t_urbui_LDADD) $(LIBS) - -t-urmui$(EXEEXT): $(t_urmui_OBJECTS) $(t_urmui_DEPENDENCIES) $(EXTRA_t_urmui_DEPENDENCIES) - @rm -f t-urmui$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_urmui_OBJECTS) $(t_urmui_LDADD) $(LIBS) - -t-urndmm$(EXEEXT): $(t_urndmm_OBJECTS) $(t_urndmm_DEPENDENCIES) $(EXTRA_t_urndmm_DEPENDENCIES) - @rm -f t-urndmm$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(t_urndmm_OBJECTS) $(t_urndmm_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(AM_V_CC)$(COMPILE) -c -o $@ $< - -.c.obj: - $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -recheck: all $(check_PROGRAMS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -t-iset.log: t-iset$(EXEEXT) - @p='t-iset$(EXEEXT)'; \ - b='t-iset'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-lc2exp.log: t-lc2exp$(EXEEXT) - @p='t-lc2exp$(EXEEXT)'; \ - b='t-lc2exp'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-mt.log: t-mt$(EXEEXT) - @p='t-mt$(EXEEXT)'; \ - b='t-mt'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-rand.log: t-rand$(EXEEXT) - @p='t-rand$(EXEEXT)'; \ - b='t-rand'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-urbui.log: t-urbui$(EXEEXT) - @p='t-urbui$(EXEEXT)'; \ - b='t-urbui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-urmui.log: t-urmui$(EXEEXT) - @p='t-urmui$(EXEEXT)'; \ - b='t-urmui'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -t-urndmm.log: t-urndmm$(EXEEXT) - @p='t-urndmm$(EXEEXT)'; \ - b='t-urndmm'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.test$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -allprogs: $(EXTRA_PROGRAMS) - -$(top_builddir)/tests/libtests.la: - cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la - -manual-test: gen$(EXEEXT) stat$(EXEEXT) - @(echo -n '16i: '; ./gen -f mpz_urandomb -z 16 1000 \ - | ./stat -i 0xffff | grep '^[0-9]') - @(echo -n '32i: '; ./gen -f mpz_urandomb -z 32 1000 \ - | ./stat -i 0xffffffff | grep '^[0-9]') - @(echo -n '33i: '; ./gen -f mpz_urandomb -z 33 1000 \ - | ./stat -i 0x1ffffffff | grep '^[0-9]') - @(echo -n '64i: '; ./gen -f mpz_urandomb -z 64 1000 \ - | ./stat -i 0xffffffffffffffff | grep '^[0-9]') - @(echo -n '128i: '; ./gen -f mpz_urandomb -z 128 1000 \ - | ./stat -i 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | grep '^[0-9]') - - @(echo -n '16f: '; ./gen -f mpf_urandomb -z 16 1000 \ - | ./stat | grep '^[0-9]') - @(echo -n '32f: '; ./gen -f mpf_urandomb -z 32 1000 \ - | ./stat | grep '^[0-9]') - @(echo -n '33f: '; ./gen -f mpf_urandomb -z 33 1000 \ - | ./stat | grep '^[0-9]') - @(echo -n '64f: '; ./gen -f mpf_urandomb -z 64 1000 \ - | ./stat | grep '^[0-9]') - @(echo -n '128f: '; ./gen -f mpf_urandomb -z 128 1000 \ - | ./stat | grep '^[0-9]') - -manual-bigtest: gen$(EXEEXT) stat$(EXEEXT) - @(echo '16i: '; ./gen -f mpz_urandomb -z 16 50000 \ - | ./stat -2 1000 -i 0xffff | grep '^K[mp]') - @(echo '32i: '; ./gen -f mpz_urandomb -z 32 50000 \ - | ./stat -2 1000 -i 0xffffffff | grep '^K[mp]') - @(echo '33i: '; ./gen -f mpz_urandomb -z 33 50000 \ - | ./stat -2 1000 -i 0x1ffffffff | grep '^K[mp]') - @(echo '64i: '; ./gen -f mpz_urandomb -z 64 50000 \ - | ./stat -2 1000 -i 0xffffffffffffffff | grep '^K[mp]') - @(echo '128i: '; ./gen -f mpz_urandomb -z 128 50000 \ - | ./stat -2 1000 -i 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | grep '^K[mp]') - - @(echo '16f: '; ./gen -f mpf_urandomb -z 16 50000 \ - | ./stat -2 1000 | grep '^K[mp]') - @(echo '32f: '; ./gen -f mpf_urandomb -z 32 50000 \ - | ./stat -2 1000 | grep '^K[mp]') - @(echo '33f: '; ./gen -f mpf_urandomb -z 33 50000 \ - | ./stat -2 1000 | grep '^K[mp]') - @(echo '64f: '; ./gen -f mpf_urandomb -z 64 50000 \ - | ./stat -2 1000 | grep '^K[mp]') - @(echo '128f: '; ./gen -f mpf_urandomb -z 128 50000 \ - | ./stat -2 1000 | grep '^K[mp]') - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/rand/findlc.c b/src/plugins/e-acsl/contrib/libgmp/tests/rand/findlc.c deleted file mode 100644 index 2406c3b645e..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/rand/findlc.c +++ /dev/null @@ -1,252 +0,0 @@ -/* -Copyright 2000 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <signal.h> -#include <math.h> -#include "gmp.h" -#include "gmpstat.h" - -#define RCSID(msg) \ -static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } - -RCSID("$Id$"); - -int g_debug = 0; - -static mpz_t a; - -static void -sh_status (int sig) -{ - printf ("sh_status: signal %d caught. dumping status.\n", sig); - - printf (" a = "); - mpz_out_str (stdout, 10, a); - printf ("\n"); - fflush (stdout); - - if (SIGSEGV == sig) /* remove SEGV handler */ - signal (SIGSEGV, SIG_DFL); -} - -/* Input is a modulus (m). We shall find multiplier (a) and adder (c) - conforming to the rules found in the first comment block in file - mpz/urandom.c. - - Then run a spectral test on the generator and discard any - multipliers not passing. */ - -/* TODO: - - . find a better algorithm than a+=8; bigger jumps perhaps? - -*/ - -void -mpz_true_random (mpz_t s, unsigned long int nbits) -{ -#if __FreeBSD__ - FILE *fs; - char c[1]; - int i; - - mpz_set_ui (s, 0); - for (i = 0; i < nbits; i += 8) - { - for (;;) - { - int nread; - fs = fopen ("/dev/random", "r"); - nread = fread (c, 1, 1, fs); - fclose (fs); - if (nread != 0) - break; - sleep (1); - } - mpz_mul_2exp (s, s, 8); - mpz_add_ui (s, s, ((unsigned long int) c[0]) & 0xff); - printf ("%d random bits\n", i + 8); - } - if (nbits % 8 != 0) - mpz_mod_2exp (s, s, nbits); -#endif -} - -int -main (int argc, char *argv[]) -{ - const char usage[] = "usage: findlc [-dv] m2exp [low_merit [high_merit]]\n"; - int f; - int v_lose, m_lose, v_best, m_best; - int c; - int debug = 1; - int cnt_high_merit; - mpz_t m; - unsigned long int m2exp; -#define DIMS 6 /* dimensions run in spectral test */ - mpf_t v[DIMS-1]; /* spectral test result (there's no v - for 1st dimension */ - mpf_t f_merit, low_merit, high_merit; - mpz_t acc, minus8; - mpz_t min, max; - mpz_t s; - - - mpz_init (m); - mpz_init (a); - for (f = 0; f < DIMS-1; f++) - mpf_init (v[f]); - mpf_init (f_merit); - mpf_init_set_d (low_merit, .1); - mpf_init_set_d (high_merit, .1); - - while ((c = getopt (argc, argv, "a:di:hv")) != -1) - switch (c) - { - case 'd': /* debug */ - g_debug++; - break; - - case 'v': /* print version */ - puts (rcsid[1]); - exit (0); - - case 'h': - case '?': - default: - fputs (usage, stderr); - exit (1); - } - - argc -= optind; - argv += optind; - - if (argc < 1) - { - fputs (usage, stderr); - exit (1); - } - - /* Install signal handler. */ - if (SIG_ERR == signal (SIGSEGV, sh_status)) - { - perror ("signal (SIGSEGV)"); - exit (1); - } - if (SIG_ERR == signal (SIGHUP, sh_status)) - { - perror ("signal (SIGHUP)"); - exit (1); - } - - printf ("findlc: version: %s\n", rcsid[1]); - m2exp = atol (argv[0]); - mpz_init_set_ui (m, 1); - mpz_mul_2exp (m, m, m2exp); - printf ("m = 0x"); - mpz_out_str (stdout, 16, m); - puts (""); - - if (argc > 1) /* have low_merit */ - mpf_set_str (low_merit, argv[1], 0); - if (argc > 2) /* have high_merit */ - mpf_set_str (high_merit, argv[2], 0); - - if (debug) - { - fprintf (stderr, "low_merit = "); - mpf_out_str (stderr, 10, 2, low_merit); - fprintf (stderr, "; high_merit = "); - mpf_out_str (stderr, 10, 2, high_merit); - fputs ("\n", stderr); - } - - mpz_init (minus8); - mpz_set_si (minus8, -8L); - mpz_init_set_ui (acc, 0); - mpz_init (s); - mpz_init_set_d (min, 0.01 * pow (2.0, (double) m2exp)); - mpz_init_set_d (max, 0.99 * pow (2.0, (double) m2exp)); - - mpz_true_random (s, m2exp); /* Start. */ - mpz_setbit (s, 0); /* Make it odd. */ - - v_best = m_best = 2*(DIMS-1); - for (;;) - { - mpz_add (acc, acc, s); - mpz_mod_2exp (acc, acc, m2exp); -#if later - mpz_and_si (a, acc, -8L); -#else - mpz_and (a, acc, minus8); -#endif - mpz_add_ui (a, a, 5); - if (mpz_cmp (a, min) <= 0 || mpz_cmp (a, max) >= 0) - continue; - - spectral_test (v, DIMS, a, m); - for (f = 0, v_lose = m_lose = 0, cnt_high_merit = DIMS-1; - f < DIMS-1; f++) - { - merit (f_merit, f + 2, v[f], m); - - if (mpf_cmp_ui (v[f], 1 << (30 / (f + 2) + (f == 2))) < 0) - v_lose++; - - if (mpf_cmp (f_merit, low_merit) < 0) - m_lose++; - - if (mpf_cmp (f_merit, high_merit) >= 0) - cnt_high_merit--; - } - - if (0 == v_lose && 0 == m_lose) - { - mpz_out_str (stdout, 10, a); puts (""); fflush (stdout); - if (0 == cnt_high_merit) - break; /* leave loop */ - } - if (v_lose < v_best) - { - v_best = v_lose; - printf ("best (v_lose=%d; m_lose=%d): ", v_lose, m_lose); - mpz_out_str (stdout, 10, a); puts (""); fflush (stdout); - } - if (m_lose < m_best) - { - m_best = m_lose; - printf ("best (v_lose=%d; m_lose=%d): ", v_lose, m_lose); - mpz_out_str (stdout, 10, a); puts (""); fflush (stdout); - } - } - - mpz_clear (m); - mpz_clear (a); - for (f = 0; f < DIMS-1; f++) - mpf_clear (v[f]); - mpf_clear (f_merit); - mpf_clear (low_merit); - mpf_clear (high_merit); - - printf ("done.\n"); - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/rand/gen.c b/src/plugins/e-acsl/contrib/libgmp/tests/rand/gen.c deleted file mode 100644 index 65401e37515..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/rand/gen.c +++ /dev/null @@ -1,481 +0,0 @@ -/* gen.c -- Generate pseudorandom numbers. - -Copyright 1999, 2000, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -/* Examples: - - $ gen 10 -10 integers 0 <= X < 2^32 generated by mpz_urandomb() - - $ gen -f mpf_urandomb 10 -10 real numbers 0 <= X < 1 - - $ gen -z 127 10 -10 integers 0 <= X < 2^127 - - $ gen -f mpf_urandomb -x .9,1 10 -10 real numbers 0 <= X < .9 - - $ gen -s 1 10 -10 integers, sequence seeded with 1 - -*/ - -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <limits.h> -#include <errno.h> -#include <time.h> -#include <string.h> - -#if !HAVE_DECL_OPTARG -extern char *optarg; -extern int optind, opterr; -#endif - -#include "gmp.h" -#include "gmp-impl.h" - -int main (argc, argv) - int argc; - char *argv[]; -{ - const char usage[] = - "usage: gen [-bhpq] [-a n] [-c a,c,m2exp] [-C a,c,m] [-f func] [-g alg] [-m n] [-s n] " \ - "[-x f,t] [-z n] [n]\n" \ - " n number of random numbers to generate\n" \ - " -a n ASCII output in radix n (default, with n=10)\n" \ - " -b binary output\n" \ - " -c a,c,m2exp use supplied LC scheme\n" \ - " -f func random function, one of\n" \ - " mpz_urandomb (default), mpz_urandomm, mpf_urandomb, rand, random\n" \ - " -g alg algorithm, one of mt (default), lc\n" \ - " -h print this text and exit\n" \ - " -m n maximum size of generated number plus 1 (0<= X < n) for mpz_urandomm\n" \ - " -p print used seed on stderr\n" \ - " -q quiet, no output\n" \ - " -s n initial seed (default: output from time(3))\n" \ - " -x f,t exclude all numbers f <= x <= t\n" \ - " -z n size in bits of generated numbers (0<= X <2^n) (default 32)\n" \ - ""; - - unsigned long int f; - unsigned long int n = 0; - unsigned long int seed; - unsigned long int m2exp = 0; - unsigned int size = 32; - int seed_from_user = 0; - int ascout = 1, binout = 0, printseed = 0; - int output_radix = 10; - int lc_scheme_from_user = 0; - int quiet_flag = 0; - mpz_t z_seed; - mpz_t z1; - mpf_t f1; - gmp_randstate_t rstate; - int c, i; - double drand; - long lrand; - int do_exclude = 0; - mpf_t f_xf, f_xt; /* numbers to exclude from sequence */ - char *str_xf, *str_xt; /* numbers to exclude from sequence */ - char *str_a, *str_adder, *str_m; - mpz_t z_a, z_m, z_mmax; - unsigned long int ul_adder; - - enum - { - RFUNC_mpz_urandomb = 0, - RFUNC_mpz_urandomm, - RFUNC_mpf_urandomb, - RFUNC_rand, - RFUNC_random, - } rfunc = RFUNC_mpz_urandomb; - char *rfunc_str[] = { "mpz_urandomb", "mpz_urandomm", "mpf_urandomb", - "rand", "random" }; - enum - { - RNG_MT = 0, - RNG_LC - }; - gmp_randalg_t ralg = RNG_MT; - /* Texts for the algorithms. The index of each must match the - corresponding algorithm in the enum above. */ - char *ralg_str[] = { "mt", "lc" }; - - mpf_init (f_xf); - mpf_init (f_xt); - mpf_init (f1); - mpz_init (z1); - mpz_init (z_seed); - mpz_init_set_ui (z_mmax, 0); - - - while ((c = getopt (argc, argv, "a:bc:f:g:hm:n:pqs:z:x:")) != -1) - switch (c) - { - case 'a': - ascout = 1; - binout = 0; - output_radix = atoi (optarg); - break; - - case 'b': - ascout = 0; - binout = 1; - break; - - case 'c': /* User supplied LC scheme: a,c,m2exp */ - if (NULL == (str_a = strtok (optarg, ",")) - || NULL == (str_adder = strtok (NULL, ",")) - || NULL == (str_m = strtok (NULL, ","))) - { - fprintf (stderr, "gen: bad LC scheme parameters: %s\n", optarg); - exit (1); - } -#ifdef HAVE_STRTOUL - ul_adder = strtoul (str_adder, NULL, 0); -#elif HAVE_STRTOL - ul_adder = (unsigned long int) strtol (str_adder, NULL, 0); -#else - ul_adder = (unsigned long int) atoi (str_adder); -#endif - - if (mpz_init_set_str (z_a, str_a, 0)) - { - fprintf (stderr, "gen: bad LC scheme parameter `a': %s\n", str_a); - exit (1); - } - if (ULONG_MAX == ul_adder) - { - fprintf (stderr, "gen: bad LC scheme parameter `c': %s\n", - str_adder); - exit (1); - } - m2exp = atol (str_m); - - lc_scheme_from_user = 1; - break; - - - case 'f': - rfunc = -1; - for (f = 0; f < sizeof (rfunc_str) / sizeof (*rfunc_str); f++) - if (!strcmp (optarg, rfunc_str[f])) - { - rfunc = f; - break; - } - if (rfunc == -1) - { - fputs (usage, stderr); - exit (1); - } - break; - - case 'g': /* algorithm */ - ralg = -1; - for (f = 0; f < sizeof (ralg_str) / sizeof (*ralg_str); f++) - if (!strcmp (optarg, ralg_str[f])) - { - ralg = f; - break; - } - if (ralg == -1) - { - fputs (usage, stderr); - exit (1); - } - break; - - case 'm': /* max for mpz_urandomm() */ - if (mpz_set_str (z_mmax, optarg, 0)) - { - fprintf (stderr, "gen: bad max value: %s\n", optarg); - exit (1); - } - break; - - case 'p': /* print seed on stderr */ - printseed = 1; - break; - - case 'q': /* quiet */ - quiet_flag = 1; - break; - - case 's': /* user provided seed */ - if (mpz_set_str (z_seed, optarg, 0)) - { - fprintf (stderr, "gen: bad seed argument %s\n", optarg); - exit (1); - } - seed_from_user = 1; - break; - - case 'z': - size = atoi (optarg); - if (size < 1) - { - fprintf (stderr, "gen: bad size argument (-z %u)\n", size); - exit (1); - } - break; - - case 'x': /* Exclude. from,to */ - str_xf = optarg; - str_xt = strchr (optarg, ','); - if (NULL == str_xt) - { - fprintf (stderr, "gen: bad exclusion parameters: %s\n", optarg); - exit (1); - } - *str_xt++ = '\0'; - do_exclude = 1; - break; - - case 'h': - case '?': - default: - fputs (usage, stderr); - exit (1); - } - argc -= optind; - argv += optind; - - if (! seed_from_user) - mpz_set_ui (z_seed, (unsigned long int) time (NULL)); - seed = mpz_get_ui (z_seed); - if (printseed) - { - fprintf (stderr, "gen: seed used: "); - mpz_out_str (stderr, output_radix, z_seed); - fprintf (stderr, "\n"); - } - - mpf_set_prec (f1, size); - - /* init random state and plant seed */ - switch (rfunc) - { - case RFUNC_mpf_urandomb: -#if 0 - /* Don't init a too small generator. */ - size = PREC (f1) * GMP_LIMB_BITS; - /* Fall through. */ -#endif - case RFUNC_mpz_urandomb: - case RFUNC_mpz_urandomm: - switch (ralg) - { - case RNG_MT: - gmp_randinit_mt (rstate); - break; - - case RNG_LC: - if (! lc_scheme_from_user) - gmp_randinit_lc_2exp_size (rstate, MIN (128, size)); - else - gmp_randinit_lc_2exp (rstate, z_a, ul_adder, m2exp); - break; - - default: - fprintf (stderr, "gen: unsupported algorithm\n"); - exit (1); - } - - gmp_randseed (rstate, z_seed); - break; - - case RFUNC_rand: - srand (seed); - break; - - case RFUNC_random: -#ifdef __FreeBSD__ /* FIXME */ - if (seed_from_user) - srandom (seed); - else - srandomdev (); -#else - fprintf (stderr, "gen: unsupported algorithm\n"); -#endif - break; - - default: - fprintf (stderr, "gen: random function not implemented\n"); - exit (1); - } - - /* set up excludes */ - if (do_exclude) - switch (rfunc) - { - case RFUNC_mpf_urandomb: - - if (mpf_set_str (f_xf, str_xf, 10) || - mpf_set_str (f_xt, str_xt, 10)) - { - fprintf (stderr, "gen: bad exclusion-from (\"%s\") " \ - "or exclusion-to (\"%s\") string. no exclusion done.\n", - str_xf, str_xt); - do_exclude = 0; - } - break; - - default: - fprintf (stderr, "gen: exclusion not implemented for chosen " \ - "randomization function. all numbers included in sequence.\n"); - } - - /* generate and print */ - if (argc > 0) - { -#if HAVE_STRTOUL - n = strtoul (argv[0], (char **) NULL, 10); -#elif HAVE_STRTOL - n = (unsigned long int) strtol (argv[0], (char **) NULL, 10); -#else - n = (unsigned long int) atoi (argv[0]); -#endif - } - - for (f = 0; n == 0 || f < n; f++) - { - switch (rfunc) - { - case RFUNC_mpz_urandomb: - mpz_urandomb (z1, rstate, size); - if (quiet_flag) - break; - if (binout) - { - /*fwrite ((unsigned int *) z1->_mp_d, 4, 1, stdout);*/ - fprintf (stderr, "gen: binary output for mpz_urandom* is broken\n"); - exit (1); - } - else - { - mpz_out_str (stdout, output_radix, z1); - puts (""); - } - break; - - case RFUNC_mpz_urandomm: - mpz_urandomm (z1, rstate, z_mmax); - if (quiet_flag) - break; - if (binout) - { - /*fwrite ((unsigned int *) z1->_mp_d, 4, 1, stdout);*/ - fprintf (stderr, "gen: binary output for mpz_urandom* is broken\n"); - exit (1); - } - else - { - mpz_out_str (stdout, output_radix, z1); - puts (""); - } - break; - - case RFUNC_mpf_urandomb: - mpf_urandomb (f1, rstate, size); - if (do_exclude) - if (mpf_cmp (f1, f_xf) >= 0 && mpf_cmp (f1, f_xt) <= 0) - break; - if (quiet_flag) - break; - if (binout) - { - fprintf (stderr, "gen: binary output for floating point numbers "\ - "not implemented\n"); - exit (1); - } - else - { - mpf_out_str (stdout, output_radix, 0, f1); - puts (""); - } - break; - - case RFUNC_rand: - i = rand (); -#ifdef FLOAT_OUTPUT - if (i) - drand = (double) i / (double) RAND_MAX; - else - drand = 0.0; - if (quiet_flag) - break; - if (binout) - fwrite (&drand, sizeof (drand), 1, stdout); - else - printf ("%e\n", drand); -#else - if (quiet_flag) - break; - if (binout) - fwrite (&i, sizeof (i), 1, stdout); - else - printf ("%d\n", i); -#endif - break; - - case RFUNC_random: - lrand = random (); - if (lrand) - drand = (double) lrand / (double) 0x7fffffff; - else - drand = 0; - if (quiet_flag) - break; - if (binout) - fwrite (&drand, sizeof (drand), 1, stdout); - else - printf ("%e\n", drand); - break; - - default: - fprintf (stderr, "gen: random function not implemented\n"); - exit (1); - } - - } - - /* clean up */ - switch (rfunc) - { - case RFUNC_mpz_urandomb: - case RFUNC_mpf_urandomb: - gmp_randclear (rstate); - break; - default: - break; - } - mpf_clear (f1); - mpf_clear (f_xf); - mpf_clear (f_xt); - mpz_clear (z1); - mpz_clear (z_seed); - - return 0; -} - -static void *debug_dummyz = mpz_dump; -static void *debug_dummyf = mpf_dump; diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/rand/gmpstat.h b/src/plugins/e-acsl/contrib/libgmp/tests/rand/gmpstat.h deleted file mode 100644 index 99c5cca195a..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/rand/gmpstat.h +++ /dev/null @@ -1,75 +0,0 @@ -/* gmpstat.h */ - -/* -Copyright 1999 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -/* This file requires the following header files: gmp.h */ - -#ifndef __GMPSTAT_H__ -#define __GMPSTAT_H__ - -/* Global debug flag. FIXME: Remove. */ -extern int g_debug; -#define DEBUG_1 0 -#define DEBUG_2 1 - -/* Max number of dimensions in spectral test. FIXME: Makw dynamic. */ -#define GMP_SPECT_MAXT 10 - -void -mpf_freqt (mpf_t Kp, - mpf_t Km, - mpf_t X[], - const unsigned long int n); -unsigned long int -mpz_freqt (mpf_t V, - mpz_t X[], - unsigned int imax, - const unsigned long int n); - -/* Low level functions. */ -void -ks (mpf_t Kp, - mpf_t Km, - mpf_t X[], - void (P) (mpf_t, mpf_t), - const unsigned long int n); - -void -ks_table (mpf_t p, mpf_t val, const unsigned int n); - -void -x2_table (double t[], - unsigned int v); - -void -spectral_test (mpf_t rop[], unsigned int T, mpz_t a, mpz_t m); -void -vz_dot (mpz_t rop, mpz_t V1[], mpz_t V2[], unsigned int n); -void -f_floor (mpf_t rop, mpf_t op); - -void -merit (mpf_t rop, unsigned int t, mpf_t v, mpz_t m); -double -merit_u (unsigned int t, mpf_t v, mpz_t m); - -/* From separate source files: */ -void zdiv_round (mpz_t rop, mpz_t n, mpz_t d); - -#endif /* !__GMPSTAT_H__ */ diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/rand/spect.c b/src/plugins/e-acsl/contrib/libgmp/tests/rand/spect.c deleted file mode 100644 index 596ff3a9c4d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/rand/spect.c +++ /dev/null @@ -1,137 +0,0 @@ -/* spect.c -- the spectral test */ - -/* -Copyright 1999 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -/* T is upper dimension. Z_A is the LC multiplier, which is - relatively prime to Z_M, the LC modulus. The result is put in - rop[] with v[t] in rop[t-2]. */ - -/* BUGS: Due to lazy allocation scheme, maximum T is hard coded to MAXT. */ - -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <math.h> -#include "gmp.h" - -#include "gmpstat.h" - -int g_debug = 0; - -int -main (int argc, char *argv[]) -{ - const char usage[] = "usage: spect [-d] a m n\n"; - int c; - unsigned int n; - mpz_t a, m; - mpf_t res[GMP_SPECT_MAXT], res_min[GMP_SPECT_MAXT], f_tmp; - int f; - - - mpz_init (a); - mpz_init (m); - for (f = 0; f < GMP_SPECT_MAXT; f++) - { - mpf_init (res[f]); - mpf_init (res_min[f]); - } - mpf_init (f_tmp); - mpf_set_ui (res_min[0], 32768); /* 2^15 */ - mpf_set_ui (res_min[1], 1024); /* 2^10 */ - mpf_set_ui (res_min[2], 256); /* 2^8 */ - mpf_set_ui (res_min[3], 64); /* 2^6 */ - mpf_set_ui (res_min[4], 32); /* 2^5 */ - - while ((c = getopt (argc, argv, "dh")) != -1) - switch (c) - { - case 'd': /* debug */ - g_debug++; - break; - case 'h': - default: - fputs (usage, stderr); - exit (1); - } - argc -= optind; - argv += optind; - - if (argc < 3) - { - fputs (usage, stderr); - exit (1); - } - - mpz_set_str (a, argv[0], 0); - mpz_set_str (m, argv[1], 0); - n = (unsigned int) atoi (argv[2]); - if (n + 1 > GMP_SPECT_MAXT) - n = GMP_SPECT_MAXT + 1; - - spectral_test (res, n, a, m); - - for (f = 0; f < n - 1; f++) - { - /* print v */ - printf ("%d: v = ", f + 2); - mpf_out_str (stdout, 10, 4, res[f]); - -#ifdef PRINT_RAISED_BY_TWO_AS_WELL - printf (" (^2 = "); - mpf_mul (f_tmp, res[f], res[f]); - mpf_out_str (stdout, 10, 4, f_tmp); - printf (")"); -#endif /* PRINT_RAISED_BY_TWO_AS_WELL */ - - /* print merit */ - printf (" m = "); - merit (f_tmp, f + 2, res[f], m); - mpf_out_str (stdout, 10, 4, f_tmp); - - if (mpf_cmp (res[f], res_min[f]) < 0) - printf ("\t*** v too low ***"); - if (mpf_get_d (f_tmp) < .1) - printf ("\t*** merit too low ***"); - - puts (""); - } - - mpz_clear (a); - mpz_clear (m); - for (f = 0; f < GMP_SPECT_MAXT; f++) - { - mpf_clear (res[f]); - mpf_clear (res_min[f]); - } - mpf_clear (f_tmp); - - return 0; -} - - -void -debug_foo() -{ - if (0) - { - mpz_dump (0); - mpf_dump (0); - } -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/rand/stat.c b/src/plugins/e-acsl/contrib/libgmp/tests/rand/stat.c deleted file mode 100644 index 1285ccfb9f9..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/rand/stat.c +++ /dev/null @@ -1,407 +0,0 @@ -/* stat.c -- statistical tests of random number sequences. */ - -/* -Copyright 1999, 2000 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -/* Examples: - - $ gen 1000 | stat -Test 1000 real numbers. - - $ gen 30000 | stat -2 1000 -Test 1000 real numbers 30 times and then test the 30 results in a -``second level''. - - $ gen -f mpz_urandomb 1000 | stat -i 0xffffffff -Test 1000 integers 0 <= X <= 2^32-1. - - $ gen -f mpz_urandomb -z 34 1000 | stat -i 0x3ffffffff -Test 1000 integers 0 <= X <= 2^34-1. - -*/ - -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <math.h> -#include "gmp.h" -#include "gmpstat.h" - -#if !HAVE_DECL_OPTARG -extern char *optarg; -extern int optind, opterr; -#endif - -#define FVECSIZ (100000L) - -int g_debug = 0; - -static void -print_ks_results (mpf_t f_p, mpf_t f_p_prob, - mpf_t f_m, mpf_t f_m_prob, - FILE *fp) -{ - double p, pp, m, mp; - - p = mpf_get_d (f_p); - m = mpf_get_d (f_m); - pp = mpf_get_d (f_p_prob); - mp = mpf_get_d (f_m_prob); - - fprintf (fp, "%.4f (%.0f%%)\t", p, pp * 100.0); - fprintf (fp, "%.4f (%.0f%%)\n", m, mp * 100.0); -} - -static void -print_x2_table (unsigned int v, FILE *fp) -{ - double t[7]; - int f; - - - fprintf (fp, "Chi-square table for v=%u\n", v); - fprintf (fp, "1%%\t5%%\t25%%\t50%%\t75%%\t95%%\t99%%\n"); - x2_table (t, v); - for (f = 0; f < 7; f++) - fprintf (fp, "%.2f\t", t[f]); - fputs ("\n", fp); -} - - - -/* Pks () -- Distribution function for KS results with a big n (like 1000 - or so): F(x) = 1 - pow(e, -2*x^2) [Knuth, vol 2, p.51]. */ -/* gnuplot: plot [0:1] Pks(x), Pks(x) = 1-exp(-2*x**2) */ - -static void -Pks (mpf_t p, mpf_t x) -{ - double dt; /* temp double */ - - mpf_set (p, x); - mpf_mul (p, p, p); /* p = x^2 */ - mpf_mul_ui (p, p, 2); /* p = 2*x^2 */ - mpf_neg (p, p); /* p = -2*x^2 */ - /* No pow() in gmp. Use doubles. */ - /* FIXME: Use exp()? */ - dt = pow (M_E, mpf_get_d (p)); - mpf_set_d (p, dt); - mpf_ui_sub (p, 1, p); -} - -/* f_freq() -- frequency test on real numbers 0<=f<1*/ -static void -f_freq (const unsigned l1runs, const unsigned l2runs, - mpf_t fvec[], const unsigned long n) -{ - unsigned f; - mpf_t f_p, f_p_prob; - mpf_t f_m, f_m_prob; - mpf_t *l1res; /* level 1 result array */ - - mpf_init (f_p); mpf_init (f_m); - mpf_init (f_p_prob); mpf_init (f_m_prob); - - - /* Allocate space for 1st level results. */ - l1res = (mpf_t *) malloc (l2runs * 2 * sizeof (mpf_t)); - if (NULL == l1res) - { - fprintf (stderr, "stat: malloc failure\n"); - exit (1); - } - - printf ("\nEquidistribution/Frequency test on real numbers (0<=X<1):\n"); - printf ("\tKp\t\tKm\n"); - - for (f = 0; f < l2runs; f++) - { - /* f_printvec (fvec, n); */ - mpf_freqt (f_p, f_m, fvec + f * n, n); - - /* what's the probability of getting these results? */ - ks_table (f_p_prob, f_p, n); - ks_table (f_m_prob, f_m, n); - - if (l1runs == 0) - { - /*printf ("%u:\t", f + 1);*/ - print_ks_results (f_p, f_p_prob, f_m, f_m_prob, stdout); - } - else - { - /* save result */ - mpf_init_set (l1res[f], f_p); - mpf_init_set (l1res[f + l2runs], f_m); - } - } - - /* Now, apply the KS test on the results from the 1st level rounds - with the distribution - F(x) = 1 - pow(e, -2*x^2) [Knuth, vol 2, p.51] */ - - if (l1runs != 0) - { - /*printf ("-------------------------------------\n");*/ - - /* The Kp's. */ - ks (f_p, f_m, l1res, Pks, l2runs); - ks_table (f_p_prob, f_p, l2runs); - ks_table (f_m_prob, f_m, l2runs); - printf ("Kp:\t"); - print_ks_results (f_p, f_p_prob, f_m, f_m_prob, stdout); - - /* The Km's. */ - ks (f_p, f_m, l1res + l2runs, Pks, l2runs); - ks_table (f_p_prob, f_p, l2runs); - ks_table (f_m_prob, f_m, l2runs); - printf ("Km:\t"); - print_ks_results (f_p, f_p_prob, f_m, f_m_prob, stdout); - } - - mpf_clear (f_p); mpf_clear (f_m); - mpf_clear (f_p_prob); mpf_clear (f_m_prob); - free (l1res); -} - -/* z_freq(l1runs, l2runs, zvec, n, max) -- frequency test on integers - 0<=z<=MAX */ -static void -z_freq (const unsigned l1runs, - const unsigned l2runs, - mpz_t zvec[], - const unsigned long n, - unsigned int max) -{ - mpf_t V; /* result */ - double d_V; /* result as a double */ - - mpf_init (V); - - - printf ("\nEquidistribution/Frequency test on integers (0<=X<=%u):\n", max); - print_x2_table (max, stdout); - - mpz_freqt (V, zvec, max, n); - - d_V = mpf_get_d (V); - printf ("V = %.2f (n = %lu)\n", d_V, n); - - mpf_clear (V); -} - -unsigned int stat_debug = 0; - -int -main (argc, argv) - int argc; - char *argv[]; -{ - const char usage[] = - "usage: stat [-d] [-2 runs] [-i max | -r max] [file]\n" \ - " file filename\n" \ - " -2 runs perform 2-level test with RUNS runs on 1st level\n" \ - " -d increase debugging level\n" \ - " -i max input is integers 0 <= Z <= MAX\n" \ - " -r max input is real numbers 0 <= R < 1 and use MAX as\n" \ - " maximum value when converting real numbers to integers\n" \ - ""; - - mpf_t fvec[FVECSIZ]; - mpz_t zvec[FVECSIZ]; - unsigned long int f, n, vecentries; - char *filen; - FILE *fp; - int c; - int omitoutput = 0; - int realinput = -1; /* 1: input is real numbers 0<=R<1; - 0: input is integers 0 <= Z <= MAX. */ - long l1runs = 0, /* 1st level runs */ - l2runs = 1; /* 2nd level runs */ - mpf_t f_temp; - mpz_t z_imax; /* max value when converting between - real number and integer. */ - mpf_t f_imax_plus1; /* f_imax + 1 stored in an mpf_t for - convenience */ - mpf_t f_imax_minus1; /* f_imax - 1 stored in an mpf_t for - convenience */ - - - mpf_init (f_temp); - mpz_init_set_ui (z_imax, 0x7fffffff); - mpf_init (f_imax_plus1); - mpf_init (f_imax_minus1); - - while ((c = getopt (argc, argv, "d2:i:r:")) != -1) - switch (c) - { - case '2': - l1runs = atol (optarg); - l2runs = -1; /* set later on */ - break; - case 'd': /* increase debug level */ - stat_debug++; - break; - case 'i': - if (1 == realinput) - { - fputs ("stat: options -i and -r are mutually exclusive\n", stderr); - exit (1); - } - if (mpz_set_str (z_imax, optarg, 0)) - { - fprintf (stderr, "stat: bad max value %s\n", optarg); - exit (1); - } - realinput = 0; - break; - case 'r': - if (0 == realinput) - { - fputs ("stat: options -i and -r are mutually exclusive\n", stderr); - exit (1); - } - if (mpz_set_str (z_imax, optarg, 0)) - { - fprintf (stderr, "stat: bad max value %s\n", optarg); - exit (1); - } - realinput = 1; - break; - case 'o': - omitoutput = atoi (optarg); - break; - case '?': - default: - fputs (usage, stderr); - exit (1); - } - argc -= optind; - argv += optind; - - if (argc < 1) - fp = stdin; - else - filen = argv[0]; - - if (fp != stdin) - if (NULL == (fp = fopen (filen, "r"))) - { - perror (filen); - exit (1); - } - - if (-1 == realinput) - realinput = 1; /* default is real numbers */ - - /* read file and fill appropriate vec */ - if (1 == realinput) /* real input */ - { - for (f = 0; f < FVECSIZ ; f++) - { - mpf_init (fvec[f]); - if (!mpf_inp_str (fvec[f], fp, 10)) - break; - } - } - else /* integer input */ - { - for (f = 0; f < FVECSIZ ; f++) - { - mpz_init (zvec[f]); - if (!mpz_inp_str (zvec[f], fp, 10)) - break; - } - } - vecentries = n = f; /* number of entries read */ - fclose (fp); - - if (FVECSIZ == f) - fprintf (stderr, "stat: warning: discarding input due to lazy allocation "\ - "of only %ld entries. sorry.\n", FVECSIZ); - - printf ("Got %lu numbers.\n", n); - - /* convert and fill the other vec */ - /* since fvec[] contains 0<=f<1 and we want ivec[] to contain - 0<=z<=imax and we are truncating all fractions when - converting float to int, we have to add 1 to imax.*/ - mpf_set_z (f_imax_plus1, z_imax); - mpf_add_ui (f_imax_plus1, f_imax_plus1, 1); - if (1 == realinput) /* fill zvec[] */ - { - for (f = 0; f < n; f++) - { - mpf_mul (f_temp, fvec[f], f_imax_plus1); - mpz_init (zvec[f]); - mpz_set_f (zvec[f], f_temp); /* truncating fraction */ - if (stat_debug > 1) - { - mpz_out_str (stderr, 10, zvec[f]); - fputs ("\n", stderr); - } - } - } - else /* integer input; fill fvec[] */ - { - /* mpf_set_z (f_imax_minus1, z_imax); - mpf_sub_ui (f_imax_minus1, f_imax_minus1, 1);*/ - for (f = 0; f < n; f++) - { - mpf_init (fvec[f]); - mpf_set_z (fvec[f], zvec[f]); - mpf_div (fvec[f], fvec[f], f_imax_plus1); - if (stat_debug > 1) - { - mpf_out_str (stderr, 10, 0, fvec[f]); - fputs ("\n", stderr); - } - } - } - - /* 2 levels? */ - if (1 != l2runs) - { - l2runs = n / l1runs; - printf ("Doing %ld second level rounds "\ - "with %ld entries in each round", l2runs, l1runs); - if (n % l1runs) - printf (" (discarding %ld entr%s)", n % l1runs, - n % l1runs == 1 ? "y" : "ies"); - puts ("."); - n = l1runs; - } - -#ifndef DONT_FFREQ - f_freq (l1runs, l2runs, fvec, n); -#endif -#ifdef DO_ZFREQ - z_freq (l1runs, l2runs, zvec, n, mpz_get_ui (z_imax)); -#endif - - mpf_clear (f_temp); mpz_clear (z_imax); - mpf_clear (f_imax_plus1); - mpf_clear (f_imax_minus1); - for (f = 0; f < vecentries; f++) - { - mpf_clear (fvec[f]); - mpz_clear (zvec[f]); - } - - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/rand/statlib.c b/src/plugins/e-acsl/contrib/libgmp/tests/rand/statlib.c deleted file mode 100644 index 7cecd6dee2d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/rand/statlib.c +++ /dev/null @@ -1,837 +0,0 @@ -/* statlib.c -- Statistical functions for testing the randomness of - number sequences. */ - -/* -Copyright 1999, 2000 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -/* The theories for these functions are taken from D. Knuth's "The Art -of Computer Programming: Volume 2, Seminumerical Algorithms", Third -Edition, Addison Wesley, 1998. */ - -/* Implementation notes. - -The Kolmogorov-Smirnov test. - -Eq. (13) in Knuth, p. 50, says that if X1, X2, ..., Xn are independent -observations arranged into ascending order - - Kp = sqr(n) * max(j/n - F(Xj)) for all 1<=j<=n - Km = sqr(n) * max(F(Xj) - (j-1)/n)) for all 1<=j<=n - -where F(x) = Pr(X <= x) = probability that (X <= x), which for a -uniformly distributed random real number between zero and one is -exactly the number itself (x). - - -The answer to exercise 23 gives the following implementation, which -doesn't need the observations to be sorted in ascending order: - -for (k = 0; k < m; k++) - a[k] = 1.0 - b[k] = 0.0 - c[k] = 0 - -for (each observation Xj) - Y = F(Xj) - k = floor (m * Y) - a[k] = min (a[k], Y) - b[k] = max (b[k], Y) - c[k] += 1 - - j = 0 - rp = rm = 0 - for (k = 0; k < m; k++) - if (c[k] > 0) - rm = max (rm, a[k] - j/n) - j += c[k] - rp = max (rp, j/n - b[k]) - -Kp = sqr (n) * rp -Km = sqr (n) * rm - -*/ - -#include <stdio.h> -#include <stdlib.h> -#include <math.h> - -#include "gmp.h" -#include "gmpstat.h" - -/* ks (Kp, Km, X, P, n) -- Perform a Kolmogorov-Smirnov test on the N - real numbers between zero and one in vector X. P is the - distribution function, called for each entry in X, which should - calculate the probability of X being greater than or equal to any - number in the sequence. (For a uniformly distributed sequence of - real numbers between zero and one, this is simply equal to X.) The - result is put in Kp and Km. */ - -void -ks (mpf_t Kp, - mpf_t Km, - mpf_t X[], - void (P) (mpf_t, mpf_t), - unsigned long int n) -{ - mpf_t Kt; /* temp */ - mpf_t f_x; - mpf_t f_j; /* j */ - mpf_t f_jnq; /* j/n or (j-1)/n */ - unsigned long int j; - - /* Sort the vector in ascending order. */ - qsort (X, n, sizeof (__mpf_struct), mpf_cmp); - - /* K-S test. */ - /* Kp = sqr(n) * max(j/n - F(Xj)) for all 1<=j<=n - Km = sqr(n) * max(F(Xj) - (j-1)/n)) for all 1<=j<=n - */ - - mpf_init (Kt); mpf_init (f_x); mpf_init (f_j); mpf_init (f_jnq); - mpf_set_ui (Kp, 0); mpf_set_ui (Km, 0); - for (j = 1; j <= n; j++) - { - P (f_x, X[j-1]); - mpf_set_ui (f_j, j); - - mpf_div_ui (f_jnq, f_j, n); - mpf_sub (Kt, f_jnq, f_x); - if (mpf_cmp (Kt, Kp) > 0) - mpf_set (Kp, Kt); - if (g_debug > DEBUG_2) - { - printf ("j=%lu ", j); - printf ("P()="); mpf_out_str (stdout, 10, 2, f_x); printf ("\t"); - - printf ("jnq="); mpf_out_str (stdout, 10, 2, f_jnq); printf (" "); - printf ("diff="); mpf_out_str (stdout, 10, 2, Kt); printf (" "); - printf ("Kp="); mpf_out_str (stdout, 10, 2, Kp); printf ("\t"); - } - mpf_sub_ui (f_j, f_j, 1); - mpf_div_ui (f_jnq, f_j, n); - mpf_sub (Kt, f_x, f_jnq); - if (mpf_cmp (Kt, Km) > 0) - mpf_set (Km, Kt); - - if (g_debug > DEBUG_2) - { - printf ("jnq="); mpf_out_str (stdout, 10, 2, f_jnq); printf (" "); - printf ("diff="); mpf_out_str (stdout, 10, 2, Kt); printf (" "); - printf ("Km="); mpf_out_str (stdout, 10, 2, Km); printf (" "); - printf ("\n"); - } - } - mpf_sqrt_ui (Kt, n); - mpf_mul (Kp, Kp, Kt); - mpf_mul (Km, Km, Kt); - - mpf_clear (Kt); mpf_clear (f_x); mpf_clear (f_j); mpf_clear (f_jnq); -} - -/* ks_table(val, n) -- calculate probability for Kp/Km less than or - equal to VAL with N observations. See [Knuth section 3.3.1] */ - -void -ks_table (mpf_t p, mpf_t val, const unsigned int n) -{ - /* We use Eq. (27), Knuth p.58, skipping O(1/n) for simplicity. - This shortcut will result in too high probabilities, especially - when n is small. - - Pr(Kp(n) <= s) = 1 - pow(e, -2*s^2) * (1 - 2/3*s/sqrt(n) + O(1/n)) */ - - /* We have 's' in variable VAL and store the result in P. */ - - mpf_t t1, t2; - - mpf_init (t1); mpf_init (t2); - - /* t1 = 1 - 2/3 * s/sqrt(n) */ - mpf_sqrt_ui (t1, n); - mpf_div (t1, val, t1); - mpf_mul_ui (t1, t1, 2); - mpf_div_ui (t1, t1, 3); - mpf_ui_sub (t1, 1, t1); - - /* t2 = pow(e, -2*s^2) */ -#ifndef OLDGMP - mpf_pow_ui (t2, val, 2); /* t2 = s^2 */ - mpf_set_d (t2, exp (-(2.0 * mpf_get_d (t2)))); -#else - /* hmmm, gmp doesn't have pow() for floats. use doubles. */ - mpf_set_d (t2, pow (M_E, -(2 * pow (mpf_get_d (val), 2)))); -#endif - - /* p = 1 - t1 * t2 */ - mpf_mul (t1, t1, t2); - mpf_ui_sub (p, 1, t1); - - mpf_clear (t1); mpf_clear (t2); -} - -static double x2_table_X[][7] = { - { -2.33, -1.64, -.674, 0.0, 0.674, 1.64, 2.33 }, /* x */ - { 5.4289, 2.6896, .454276, 0.0, .454276, 2.6896, 5.4289} /* x^2 */ -}; - -#define _2D3 ((double) .6666666666) - -/* x2_table (t, v, n) -- return chi-square table row for V in T[]. */ -void -x2_table (double t[], - unsigned int v) -{ - int f; - - - /* FIXME: Do a table lookup for v <= 30 since the following formula - [Knuth, vol 2, 3.3.1] is only good for v > 30. */ - - /* value = v + sqrt(2*v) * X[p] + (2/3) * X[p]^2 - 2/3 + O(1/sqrt(t) */ - /* NOTE: The O() term is ignored for simplicity. */ - - for (f = 0; f < 7; f++) - t[f] = - v + - sqrt (2 * v) * x2_table_X[0][f] + - _2D3 * x2_table_X[1][f] - _2D3; -} - - -/* P(p, x) -- Distribution function. Calculate the probability of X -being greater than or equal to any number in the sequence. For a -random real number between zero and one given by a uniformly -distributed random number generator, this is simply equal to X. */ - -static void -P (mpf_t p, mpf_t x) -{ - mpf_set (p, x); -} - -/* mpf_freqt() -- Frequency test using KS on N real numbers between zero - and one. See [Knuth vol 2, p.61]. */ -void -mpf_freqt (mpf_t Kp, - mpf_t Km, - mpf_t X[], - const unsigned long int n) -{ - ks (Kp, Km, X, P, n); -} - - -/* The Chi-square test. Eq. (8) in Knuth vol. 2 says that if Y[] - holds the observations and p[] is the probability for.. (to be - continued!) - - V = 1/n * sum((s=1 to k) Y[s]^2 / p[s]) - n */ - -void -x2 (mpf_t V, /* result */ - unsigned long int X[], /* data */ - unsigned int k, /* #of categories */ - void (P) (mpf_t, unsigned long int, void *), /* probability func */ - void *x, /* extra user data passed to P() */ - unsigned long int n) /* #of samples */ -{ - unsigned int f; - mpf_t f_t, f_t2; /* temp floats */ - - mpf_init (f_t); mpf_init (f_t2); - - - mpf_set_ui (V, 0); - for (f = 0; f < k; f++) - { - if (g_debug > DEBUG_2) - fprintf (stderr, "%u: P()=", f); - mpf_set_ui (f_t, X[f]); - mpf_mul (f_t, f_t, f_t); /* f_t = X[f]^2 */ - P (f_t2, f, x); /* f_t2 = Pr(f) */ - if (g_debug > DEBUG_2) - mpf_out_str (stderr, 10, 2, f_t2); - mpf_div (f_t, f_t, f_t2); - mpf_add (V, V, f_t); - if (g_debug > DEBUG_2) - { - fprintf (stderr, "\tV="); - mpf_out_str (stderr, 10, 2, V); - fprintf (stderr, "\t"); - } - } - if (g_debug > DEBUG_2) - fprintf (stderr, "\n"); - mpf_div_ui (V, V, n); - mpf_sub_ui (V, V, n); - - mpf_clear (f_t); mpf_clear (f_t2); -} - -/* Pzf(p, s, x) -- Probability for category S in mpz_freqt(). It's - 1/d for all S. X is a pointer to an unsigned int holding 'd'. */ -static void -Pzf (mpf_t p, unsigned long int s, void *x) -{ - mpf_set_ui (p, 1); - mpf_div_ui (p, p, *((unsigned int *) x)); -} - -/* mpz_freqt(V, X, imax, n) -- Frequency test on integers. [Knuth, - vol 2, 3.3.2]. Keep IMAX low on this one, since we loop from 0 to - IMAX. 128 or 256 could be nice. - - X[] must not contain numbers outside the range 0 <= X <= IMAX. - - Return value is number of observations actually used, after - discarding entries out of range. - - Since X[] contains integers between zero and IMAX, inclusive, we - have IMAX+1 categories. - - Note that N should be at least 5*IMAX. Result is put in V and can - be compared to output from x2_table (v=IMAX). */ - -unsigned long int -mpz_freqt (mpf_t V, - mpz_t X[], - unsigned int imax, - const unsigned long int n) -{ - unsigned long int *v; /* result */ - unsigned int f; - unsigned int d; /* number of categories = imax+1 */ - unsigned int uitemp; - unsigned long int usedn; - - - d = imax + 1; - - v = (unsigned long int *) calloc (imax + 1, sizeof (unsigned long int)); - if (NULL == v) - { - fprintf (stderr, "mpz_freqt(): out of memory\n"); - exit (1); - } - - /* count */ - usedn = n; /* actual number of observations */ - for (f = 0; f < n; f++) - { - uitemp = mpz_get_ui(X[f]); - if (uitemp > imax) /* sanity check */ - { - if (g_debug) - fprintf (stderr, "mpz_freqt(): warning: input insanity: %u, "\ - "ignored.\n", uitemp); - usedn--; - continue; - } - v[uitemp]++; - } - - if (g_debug > DEBUG_2) - { - fprintf (stderr, "counts:\n"); - for (f = 0; f <= imax; f++) - fprintf (stderr, "%u:\t%lu\n", f, v[f]); - } - - /* chi-square with k=imax+1 and P(x)=1/(imax+1) for all x.*/ - x2 (V, v, d, Pzf, (void *) &d, usedn); - - free (v); - return (usedn); -} - -/* debug dummy to drag in dump funcs */ -void -foo_debug () -{ - if (0) - { - mpf_dump (0); -#ifndef OLDGMP - mpz_dump (0); -#endif - } -} - -/* merit (rop, t, v, m) -- calculate merit for spectral test result in - dimension T, see Knuth p. 105. BUGS: Only valid for 2 <= T <= - 6. */ -void -merit (mpf_t rop, unsigned int t, mpf_t v, mpz_t m) -{ - int f; - mpf_t f_m, f_const, f_pi; - - mpf_init (f_m); - mpf_set_z (f_m, m); - mpf_init_set_d (f_const, M_PI); - mpf_init_set_d (f_pi, M_PI); - - switch (t) - { - case 2: /* PI */ - break; - case 3: /* PI * 4/3 */ - mpf_mul_ui (f_const, f_const, 4); - mpf_div_ui (f_const, f_const, 3); - break; - case 4: /* PI^2 * 1/2 */ - mpf_mul (f_const, f_const, f_pi); - mpf_div_ui (f_const, f_const, 2); - break; - case 5: /* PI^2 * 8/15 */ - mpf_mul (f_const, f_const, f_pi); - mpf_mul_ui (f_const, f_const, 8); - mpf_div_ui (f_const, f_const, 15); - break; - case 6: /* PI^3 * 1/6 */ - mpf_mul (f_const, f_const, f_pi); - mpf_mul (f_const, f_const, f_pi); - mpf_div_ui (f_const, f_const, 6); - break; - default: - fprintf (stderr, - "spect (merit): can't calculate merit for dimensions > 6\n"); - mpf_set_ui (f_const, 0); - break; - } - - /* rop = v^t */ - mpf_set (rop, v); - for (f = 1; f < t; f++) - mpf_mul (rop, rop, v); - mpf_mul (rop, rop, f_const); - mpf_div (rop, rop, f_m); - - mpf_clear (f_m); - mpf_clear (f_const); - mpf_clear (f_pi); -} - -double -merit_u (unsigned int t, mpf_t v, mpz_t m) -{ - mpf_t rop; - double res; - - mpf_init (rop); - merit (rop, t, v, m); - res = mpf_get_d (rop); - mpf_clear (rop); - return res; -} - -/* f_floor (rop, op) -- Set rop = floor (op). */ -void -f_floor (mpf_t rop, mpf_t op) -{ - mpz_t z; - - mpz_init (z); - - /* No mpf_floor(). Convert to mpz and back. */ - mpz_set_f (z, op); - mpf_set_z (rop, z); - - mpz_clear (z); -} - - -/* vz_dot (rop, v1, v2, nelem) -- compute dot product of z-vectors V1, - V2. N is number of elements in vectors V1 and V2. */ - -void -vz_dot (mpz_t rop, mpz_t V1[], mpz_t V2[], unsigned int n) -{ - mpz_t t; - - mpz_init (t); - mpz_set_ui (rop, 0); - while (n--) - { - mpz_mul (t, V1[n], V2[n]); - mpz_add (rop, rop, t); - } - - mpz_clear (t); -} - -void -spectral_test (mpf_t rop[], unsigned int T, mpz_t a, mpz_t m) -{ - /* Knuth "Seminumerical Algorithms, Third Edition", section 3.3.4 - (pp. 101-103). */ - - /* v[t] = min { sqrt (x[1]^2 + ... + x[t]^2) | - x[1] + a*x[2] + ... + pow (a, t-1) * x[t] is congruent to 0 (mod m) } */ - - - /* Variables. */ - unsigned int ui_t; - unsigned int ui_i, ui_j, ui_k, ui_l; - mpf_t f_tmp1, f_tmp2; - mpz_t tmp1, tmp2, tmp3; - mpz_t U[GMP_SPECT_MAXT][GMP_SPECT_MAXT], - V[GMP_SPECT_MAXT][GMP_SPECT_MAXT], - X[GMP_SPECT_MAXT], - Y[GMP_SPECT_MAXT], - Z[GMP_SPECT_MAXT]; - mpz_t h, hp, r, s, p, pp, q, u, v; - - /* GMP inits. */ - mpf_init (f_tmp1); - mpf_init (f_tmp2); - for (ui_i = 0; ui_i < GMP_SPECT_MAXT; ui_i++) - { - for (ui_j = 0; ui_j < GMP_SPECT_MAXT; ui_j++) - { - mpz_init_set_ui (U[ui_i][ui_j], 0); - mpz_init_set_ui (V[ui_i][ui_j], 0); - } - mpz_init_set_ui (X[ui_i], 0); - mpz_init_set_ui (Y[ui_i], 0); - mpz_init (Z[ui_i]); - } - mpz_init (tmp1); - mpz_init (tmp2); - mpz_init (tmp3); - mpz_init (h); - mpz_init (hp); - mpz_init (r); - mpz_init (s); - mpz_init (p); - mpz_init (pp); - mpz_init (q); - mpz_init (u); - mpz_init (v); - - /* Implementation inits. */ - if (T > GMP_SPECT_MAXT) - T = GMP_SPECT_MAXT; /* FIXME: Lazy. */ - - /* S1 [Initialize.] */ - ui_t = 2 - 1; /* NOTE: `t' in description == ui_t + 1 - for easy indexing */ - mpz_set (h, a); - mpz_set (hp, m); - mpz_set_ui (p, 1); - mpz_set_ui (pp, 0); - mpz_set (r, a); - mpz_pow_ui (s, a, 2); - mpz_add_ui (s, s, 1); /* s = 1 + a^2 */ - - /* S2 [Euclidean step.] */ - while (1) - { - if (g_debug > DEBUG_1) - { - mpz_mul (tmp1, h, pp); - mpz_mul (tmp2, hp, p); - mpz_sub (tmp1, tmp1, tmp2); - if (mpz_cmpabs (m, tmp1)) - { - printf ("***BUG***: h*pp - hp*p = "); - mpz_out_str (stdout, 10, tmp1); - printf ("\n"); - } - } - if (g_debug > DEBUG_2) - { - printf ("hp = "); - mpz_out_str (stdout, 10, hp); - printf ("\nh = "); - mpz_out_str (stdout, 10, h); - printf ("\n"); - fflush (stdout); - } - - if (mpz_sgn (h)) - mpz_tdiv_q (q, hp, h); /* q = floor(hp/h) */ - else - mpz_set_ui (q, 1); - - if (g_debug > DEBUG_2) - { - printf ("q = "); - mpz_out_str (stdout, 10, q); - printf ("\n"); - fflush (stdout); - } - - mpz_mul (tmp1, q, h); - mpz_sub (u, hp, tmp1); /* u = hp - q*h */ - - mpz_mul (tmp1, q, p); - mpz_sub (v, pp, tmp1); /* v = pp - q*p */ - - mpz_pow_ui (tmp1, u, 2); - mpz_pow_ui (tmp2, v, 2); - mpz_add (tmp1, tmp1, tmp2); - if (mpz_cmp (tmp1, s) < 0) - { - mpz_set (s, tmp1); /* s = u^2 + v^2 */ - mpz_set (hp, h); /* hp = h */ - mpz_set (h, u); /* h = u */ - mpz_set (pp, p); /* pp = p */ - mpz_set (p, v); /* p = v */ - } - else - break; - } - - /* S3 [Compute v2.] */ - mpz_sub (u, u, h); - mpz_sub (v, v, p); - - mpz_pow_ui (tmp1, u, 2); - mpz_pow_ui (tmp2, v, 2); - mpz_add (tmp1, tmp1, tmp2); - if (mpz_cmp (tmp1, s) < 0) - { - mpz_set (s, tmp1); /* s = u^2 + v^2 */ - mpz_set (hp, u); - mpz_set (pp, v); - } - mpf_set_z (f_tmp1, s); - mpf_sqrt (rop[ui_t - 1], f_tmp1); - - /* S4 [Advance t.] */ - mpz_neg (U[0][0], h); - mpz_set (U[0][1], p); - mpz_neg (U[1][0], hp); - mpz_set (U[1][1], pp); - - mpz_set (V[0][0], pp); - mpz_set (V[0][1], hp); - mpz_neg (V[1][0], p); - mpz_neg (V[1][1], h); - if (mpz_cmp_ui (pp, 0) > 0) - { - mpz_neg (V[0][0], V[0][0]); - mpz_neg (V[0][1], V[0][1]); - mpz_neg (V[1][0], V[1][0]); - mpz_neg (V[1][1], V[1][1]); - } - - while (ui_t + 1 != T) /* S4 loop */ - { - ui_t++; - mpz_mul (r, a, r); - mpz_mod (r, r, m); - - /* Add new row and column to U and V. They are initialized with - all elements set to zero, so clearing is not necessary. */ - - mpz_neg (U[ui_t][0], r); /* U: First col in new row. */ - mpz_set_ui (U[ui_t][ui_t], 1); /* U: Last col in new row. */ - - mpz_set (V[ui_t][ui_t], m); /* V: Last col in new row. */ - - /* "Finally, for 1 <= i < t, - set q = round (vi1 * r / m), - vit = vi1*r - q*m, - and Ut=Ut+q*Ui */ - - for (ui_i = 0; ui_i < ui_t; ui_i++) - { - mpz_mul (tmp1, V[ui_i][0], r); /* tmp1=vi1*r */ - zdiv_round (q, tmp1, m); /* q=round(vi1*r/m) */ - mpz_mul (tmp2, q, m); /* tmp2=q*m */ - mpz_sub (V[ui_i][ui_t], tmp1, tmp2); - - for (ui_j = 0; ui_j <= ui_t; ui_j++) /* U[t] = U[t] + q*U[i] */ - { - mpz_mul (tmp1, q, U[ui_i][ui_j]); /* tmp=q*uij */ - mpz_add (U[ui_t][ui_j], U[ui_t][ui_j], tmp1); /* utj = utj + q*uij */ - } - } - - /* s = min (s, zdot (U[t], U[t]) */ - vz_dot (tmp1, U[ui_t], U[ui_t], ui_t + 1); - if (mpz_cmp (tmp1, s) < 0) - mpz_set (s, tmp1); - - ui_k = ui_t; - ui_j = 0; /* WARNING: ui_j no longer a temp. */ - - /* S5 [Transform.] */ - if (g_debug > DEBUG_2) - printf ("(t, k, j, q1, q2, ...)\n"); - do - { - if (g_debug > DEBUG_2) - printf ("(%u, %u, %u", ui_t + 1, ui_k + 1, ui_j + 1); - - for (ui_i = 0; ui_i <= ui_t; ui_i++) - { - if (ui_i != ui_j) - { - vz_dot (tmp1, V[ui_i], V[ui_j], ui_t + 1); /* tmp1=dot(Vi,Vj). */ - mpz_abs (tmp2, tmp1); - mpz_mul_ui (tmp2, tmp2, 2); /* tmp2 = 2*abs(dot(Vi,Vj) */ - vz_dot (tmp3, V[ui_j], V[ui_j], ui_t + 1); /* tmp3=dot(Vj,Vj). */ - - if (mpz_cmp (tmp2, tmp3) > 0) - { - zdiv_round (q, tmp1, tmp3); /* q=round(Vi.Vj/Vj.Vj) */ - if (g_debug > DEBUG_2) - { - printf (", "); - mpz_out_str (stdout, 10, q); - } - - for (ui_l = 0; ui_l <= ui_t; ui_l++) - { - mpz_mul (tmp1, q, V[ui_j][ui_l]); - mpz_sub (V[ui_i][ui_l], V[ui_i][ui_l], tmp1); /* Vi=Vi-q*Vj */ - mpz_mul (tmp1, q, U[ui_i][ui_l]); - mpz_add (U[ui_j][ui_l], U[ui_j][ui_l], tmp1); /* Uj=Uj+q*Ui */ - } - - vz_dot (tmp1, U[ui_j], U[ui_j], ui_t + 1); /* tmp1=dot(Uj,Uj) */ - if (mpz_cmp (tmp1, s) < 0) /* s = min(s,dot(Uj,Uj)) */ - mpz_set (s, tmp1); - ui_k = ui_j; - } - else if (g_debug > DEBUG_2) - printf (", #"); /* 2|Vi.Vj| <= Vj.Vj */ - } - else if (g_debug > DEBUG_2) - printf (", *"); /* i == j */ - } - - if (g_debug > DEBUG_2) - printf (")\n"); - - /* S6 [Advance j.] */ - if (ui_j == ui_t) - ui_j = 0; - else - ui_j++; - } - while (ui_j != ui_k); /* S5 */ - - /* From Knuth p. 104: "The exhaustive search in steps S8-S10 - reduces the value of s only rarely." */ -#ifdef DO_SEARCH - /* S7 [Prepare for search.] */ - /* Find minimum in (x[1], ..., x[t]) satisfying condition - x[k]^2 <= f(y[1], ...,y[t]) * dot(V[k],V[k]) */ - - ui_k = ui_t; - if (g_debug > DEBUG_2) - { - printf ("searching..."); - /*for (f = 0; f < ui_t*/ - fflush (stdout); - } - - /* Z[i] = floor (sqrt (floor (dot(V[i],V[i]) * s / m^2))); */ - mpz_pow_ui (tmp1, m, 2); - mpf_set_z (f_tmp1, tmp1); - mpf_set_z (f_tmp2, s); - mpf_div (f_tmp1, f_tmp2, f_tmp1); /* f_tmp1 = s/m^2 */ - for (ui_i = 0; ui_i <= ui_t; ui_i++) - { - vz_dot (tmp1, V[ui_i], V[ui_i], ui_t + 1); - mpf_set_z (f_tmp2, tmp1); - mpf_mul (f_tmp2, f_tmp2, f_tmp1); - f_floor (f_tmp2, f_tmp2); - mpf_sqrt (f_tmp2, f_tmp2); - mpz_set_f (Z[ui_i], f_tmp2); - } - - /* S8 [Advance X[k].] */ - do - { - if (g_debug > DEBUG_2) - { - printf ("X[%u] = ", ui_k); - mpz_out_str (stdout, 10, X[ui_k]); - printf ("\tZ[%u] = ", ui_k); - mpz_out_str (stdout, 10, Z[ui_k]); - printf ("\n"); - fflush (stdout); - } - - if (mpz_cmp (X[ui_k], Z[ui_k])) - { - mpz_add_ui (X[ui_k], X[ui_k], 1); - for (ui_i = 0; ui_i <= ui_t; ui_i++) - mpz_add (Y[ui_i], Y[ui_i], U[ui_k][ui_i]); - - /* S9 [Advance k.] */ - while (++ui_k <= ui_t) - { - mpz_neg (X[ui_k], Z[ui_k]); - mpz_mul_ui (tmp1, Z[ui_k], 2); - for (ui_i = 0; ui_i <= ui_t; ui_i++) - { - mpz_mul (tmp2, tmp1, U[ui_k][ui_i]); - mpz_sub (Y[ui_i], Y[ui_i], tmp2); - } - } - vz_dot (tmp1, Y, Y, ui_t + 1); - if (mpz_cmp (tmp1, s) < 0) - mpz_set (s, tmp1); - } - } - while (--ui_k); -#endif /* DO_SEARCH */ - mpf_set_z (f_tmp1, s); - mpf_sqrt (rop[ui_t - 1], f_tmp1); -#ifdef DO_SEARCH - if (g_debug > DEBUG_2) - printf ("done.\n"); -#endif /* DO_SEARCH */ - } /* S4 loop */ - - /* Clear GMP variables. */ - - mpf_clear (f_tmp1); - mpf_clear (f_tmp2); - for (ui_i = 0; ui_i < GMP_SPECT_MAXT; ui_i++) - { - for (ui_j = 0; ui_j < GMP_SPECT_MAXT; ui_j++) - { - mpz_clear (U[ui_i][ui_j]); - mpz_clear (V[ui_i][ui_j]); - } - mpz_clear (X[ui_i]); - mpz_clear (Y[ui_i]); - mpz_clear (Z[ui_i]); - } - mpz_clear (tmp1); - mpz_clear (tmp2); - mpz_clear (tmp3); - mpz_clear (h); - mpz_clear (hp); - mpz_clear (r); - mpz_clear (s); - mpz_clear (p); - mpz_clear (pp); - mpz_clear (q); - mpz_clear (u); - mpz_clear (v); - - return; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-iset.c b/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-iset.c deleted file mode 100644 index 0414037c191..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-iset.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Test gmp_randinit_set. - -Copyright 2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -/* expect after a gmp_randinit_set that the new and old generators will - produce the same sequence of numbers */ -void -check_one (const char *name, gmp_randstate_ptr src) -{ - gmp_randstate_t dst; - mpz_t sz, dz; - int i; - - gmp_randinit_set (dst, src); - mpz_init (sz); - mpz_init (dz); - - for (i = 0; i < 20; i++) - { - mpz_urandomb (sz, src, 123); - mpz_urandomb (dz, dst, 123); - - if (mpz_cmp (sz, dz) != 0) - { - printf ("gmp_randinit_set didn't duplicate randstate\n"); - printf (" algorithm: %s\n", name); - gmp_printf (" from src: %#Zx\n", sz); - gmp_printf (" from dst: %#Zx\n", dz); - abort (); - } - } - - mpz_clear (sz); - mpz_clear (dz); - gmp_randclear (dst); -} - -int -main (int argc, char *argv[]) -{ - tests_start (); - - call_rand_algs (check_one); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-lc2exp.c b/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-lc2exp.c deleted file mode 100644 index b524441f293..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-lc2exp.c +++ /dev/null @@ -1,217 +0,0 @@ -/* Exercise the lc2exp random functions. - -Copyright 2002, 2011 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* a=0 and c=0 produces zero results always. */ -void -check_zero (unsigned long m2exp) -{ - gmp_randstate_t r; - mpz_t a; - unsigned long c; - int i; - - mpz_init_set_ui (a, 0L); - c = 0L; - - gmp_randinit_lc_2exp (r, a, c, m2exp); - gmp_randseed_ui (r, 0L); - - for (i = 0; i < 5; i++) - { - mpz_urandomb (a, r, 123L); - if (mpz_sgn (a) != 0) - { - printf ("check_zero m2exp=%lu: didn't get zero\n", m2exp); - gmp_printf (" rand=%#Zx\n", a); - abort (); - } - } - - mpz_clear (a); - gmp_randclear (r); -} - -/* negative a */ -void -check_nega (void) -{ - gmp_randstate_t r; - mpz_t a; - unsigned long c, m2exp; - int i; - - mpz_init (a); - mpz_setbit (a, 1000L); - mpz_neg (a, a); - c = 0L; - m2exp = 45L; - - gmp_randinit_lc_2exp (r, a, c, m2exp); - gmp_randseed_ui (r, 0L); - - for (i = 0; i < 5; i++) - { - mpz_urandomb (a, r, 123L); - if (mpz_sgn (a) != 0) - printf ("check_nega m2exp=%lu: didn't get zero\n", m2exp); - } - - mpz_clear (a); - gmp_randclear (r); -} - -void -check_bigc (void) -{ - gmp_randstate_t r; - mpz_t a; - unsigned long c, m2exp, bits; - int i; - - mpz_init_set_ui (a, 0L); - c = ULONG_MAX; - m2exp = 8; - - gmp_randinit_lc_2exp (r, a, c, m2exp); - gmp_randseed_ui (r, 0L); - - for (i = 0; i < 20; i++) - { - bits = 123L; - mpz_urandomb (a, r, bits); - if (mpz_sgn (a) < 0 || mpz_sizeinbase (a, 2) > bits) - { - printf ("check_bigc: mpz_urandomb out of range\n"); - printf (" m2exp=%lu\n", m2exp); - gmp_printf (" rand=%#ZX\n", a); - gmp_printf (" sizeinbase2=%u\n", mpz_sizeinbase (a, 2)); - abort (); - } - } - - mpz_clear (a); - gmp_randclear (r); -} - -void -check_bigc1 (void) -{ - gmp_randstate_t r; - mpz_t a; - unsigned long c, m2exp; - int i; - - mpz_init_set_ui (a, 0L); - c = ULONG_MAX; - m2exp = 2; - - gmp_randinit_lc_2exp (r, a, c, m2exp); - gmp_randseed_ui (r, 0L); - - for (i = 0; i < 20; i++) - { - mpz_urandomb (a, r, 1L); - if (mpz_cmp_ui (a, 1L) != 0) - { - printf ("check_bigc1: mpz_urandomb didn't give 1\n"); - printf (" m2exp=%lu\n", m2exp); - gmp_printf (" got rand=%#ZX\n", a); - abort (); - } - } - - mpz_clear (a); - gmp_randclear (r); -} - -/* Checks parameters which triggered an assertion failure in the past. - Happened when limbs(a)+limbs(c) < bits_to_limbs(m2exp). */ -void -check_bigm (void) -{ - gmp_randstate_t rstate; - mpz_t a; - - mpz_init_set_ui (a, 5L); - gmp_randinit_lc_2exp (rstate, a, 1L, 384L); - - mpz_urandomb (a, rstate, 20L); - - gmp_randclear (rstate); - mpz_clear (a); -} - -/* Checks for seeds bigger than the modulus. */ -void -check_bigs (void) -{ - gmp_randstate_t rstate; - mpz_t sd, a; - int i; - - mpz_init (sd); - mpz_setbit (sd, 300L); - mpz_sub_ui (sd, sd, 1L); - mpz_clrbit (sd, 13L); - mpz_init_set_ui (a, 123456789L); - - gmp_randinit_lc_2exp (rstate, a, 5L, 64L); - - for (i = 0; i < 20; i++) - { - mpz_neg (sd, sd); - gmp_randseed (rstate, sd); - mpz_mul_ui (sd, sd, 7L); - - mpz_urandomb (a, rstate, 80L); - } - - gmp_randclear (rstate); - mpz_clear (a); - mpz_clear (sd); -} - -int -main (void) -{ - tests_start (); - - check_zero (2L); - check_zero (7L); - check_zero (32L); - check_zero (64L); - check_zero (1000L); - - check_nega (); - check_bigc (); - check_bigc1 (); - - check_bigm (); - check_bigs (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-mt.c b/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-mt.c deleted file mode 100644 index 3aabffe88d1..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-mt.c +++ /dev/null @@ -1,83 +0,0 @@ -/* Test the Mersenne Twister random number generator. - -Copyright 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#ifndef TRUE -#define TRUE (1) -#endif -#ifndef FALSE -#define FALSE (0) -#endif - -/* Test that the sequence without seeding equals the sequence with the - default seed. */ -int -chk_default_seed (void) -{ - gmp_randstate_t r1, r2; - mpz_t a, b; - int i; - int ok = TRUE; - - mpz_init2 (a, 19936L); - mpz_init2 (b, 19936L); - - gmp_randinit_mt (r1); - gmp_randinit_mt (r2); - gmp_randseed_ui (r2, 5489L); /* Must match DEFAULT_SEED in randmt.c */ - for (i = 0; i < 3; i++) - { - /* Extract one whole buffer per iteration. */ - mpz_urandomb (a, r1, 19936L); - mpz_urandomb (b, r2, 19936L); - if (mpz_cmp (a, b) != 0) - { - ok = FALSE; - printf ("Default seed fails in iteration %d\n", i); - break; - } - } - gmp_randclear (r1); - gmp_randclear (r2); - - mpz_clear (a); - mpz_clear (b); - return ok; -} - -int -main (int argc, char *argv[]) -{ - int ok; - - tests_start (); - - ok = chk_default_seed (); - - tests_end (); - - if (ok) - return 0; /* pass */ - else - return 1; /* fail */ -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-rand.c b/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-rand.c deleted file mode 100644 index 1265a0d0a51..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-rand.c +++ /dev/null @@ -1,290 +0,0 @@ -/* t-rand -- Test random number generators. */ - -/* -Copyright 2000, 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdlib.h> -#include <stdio.h> -#include "gmp.h" - -#define SEED 1 -#define BASE 16 -#define ENTS 10 /* Number of entries in array when - printing. */ - -/* These were generated by this very program. Do not edit! */ -/* Integers. */ -const char *z1[ENTS] = {"0", "1", "1", "1", "1", "0", "1", "1", "1", "1"}; -const char *z2[ENTS] = {"0", "3", "1", "3", "3", "0", "3", "3", "3", "1"}; -const char *z3[ENTS] = {"4", "3", "1", "7", "3", "0", "3", "3", "3", "1"}; -const char *z4[ENTS] = {"c", "3", "1", "f", "b", "8", "3", "3", "3", "1"}; -const char *z5[ENTS] = {"1c", "13", "11", "1f", "b", "18", "3", "13", "3", "1"}; - -const char *z10[ENTS] = {"29c", "213", "f1", "17f", "12b", "178", "383", "d3", "3a3", "281"}; - -const char *z15[ENTS] = {"29c", "1a13", "74f1", "257f", "592b", "4978", "4783", "7cd3", "5ba3", "4681"}; -const char *z16[ENTS] = {"29c", "9a13", "74f1", "a57f", "d92b", "4978", "c783", "fcd3", "5ba3", "c681"}; -const char *z17[ENTS] = {"51e", "f17a", "54ff", "1a335", "cf65", "5d6f", "583f", "618f", "1bc6", "98ff"}; - -const char *z31[ENTS] = {"3aecd515", "13ae8ec6", "518c8090", "81ca077", "70b7134", "7ee78d71", "323a7636", "2122cb1a", "19811941", "41fd605"}; -const char *z32[ENTS] = {"baecd515", "13ae8ec6", "518c8090", "881ca077", "870b7134", "7ee78d71", "323a7636", "a122cb1a", "99811941", "841fd605"}; -const char *z33[ENTS] = {"1faf4cca", "15d6ef83b", "9095fe72", "1b6a3dff6", "b17cbddd", "16e5209d4", "6f65b12c", "493bbbc6", "abf2a5d5", "6d491a3c"}; - -const char *z63[ENTS] = {"48a74f367fa7b5c8", "3ba9e9dc1b263076", "1e0ac84e7678e0fb", "11416581728b3e35", "36ab610523f0f1f7", "3e540e8e95c0eb4b", "439ae16057dbc9d3", "734fb260db243950", "7d3a317effc289bf", "1d80301fb3d1a0d1"}; -const char *z64[ENTS] = {"48a74f367fa7b5c8", "bba9e9dc1b263076", "9e0ac84e7678e0fb", "11416581728b3e35", "b6ab610523f0f1f7", "be540e8e95c0eb4b", "439ae16057dbc9d3", "f34fb260db243950", "fd3a317effc289bf", "1d80301fb3d1a0d1"}; -const char *z65[ENTS] = {"1ff77710d846d49f0", "1b1411701d709ee10", "31ffa81a208b6af4", "446638d431d3c681", "df5c569d5baa8b55", "197d99ea9bf28e5a0", "191ade09edd94cfae", "194acefa6dde5e18d", "1afc1167c56272d92", "d092994da72f206f"}; - -const char *z127[ENTS] = {"2f66ba932aaf58a071fd8f0742a99a0c", "73cfa3c664c9c1753507ca60ec6b8425", "53ea074ca131dec12cd68b8aa8e20278", "3cf5ac8c343532f8a53cc0eb47581f73", "50c11d5869e208aa1b9aa317b8c2d0a9", "b23163c892876472b1ef19642eace09", "489f4c03d41f87509c8d6c90ce674f95", "2ab8748c96aa6762ea1932b44c9d7164", "98cb5591fc05ad31afbbc1d67b90edd", "77848bb991fd0be331adcf1457fbc672"}; -const char *z128[ENTS] = {"af66ba932aaf58a071fd8f0742a99a0c", "73cfa3c664c9c1753507ca60ec6b8425", "53ea074ca131dec12cd68b8aa8e20278", "3cf5ac8c343532f8a53cc0eb47581f73", "50c11d5869e208aa1b9aa317b8c2d0a9", "8b23163c892876472b1ef19642eace09", "489f4c03d41f87509c8d6c90ce674f95", "aab8748c96aa6762ea1932b44c9d7164", "98cb5591fc05ad31afbbc1d67b90edd", "f7848bb991fd0be331adcf1457fbc672"}; - -/* Floats. */ -const char *f1[ENTS] = {"0.@0", "0.8@0", "0.8@0", "0.8@0", "0.8@0", "0.@0", "0.8@0", "0.8@0", "0.8@0", "0.8@0"}; -const char *f2[ENTS] = {"0.@0", "0.c@0", "0.4@0", "0.c@0", "0.c@0", "0.@0", "0.c@0", "0.c@0", "0.c@0", "0.4@0"}; -const char *f3[ENTS] = {"0.8@0", "0.6@0", "0.2@0", "0.e@0", "0.6@0", "0.@0", "0.6@0", "0.6@0", "0.6@0", "0.2@0"}; -const char *f4[ENTS] = {"0.c@0", "0.3@0", "0.1@0", "0.f@0", "0.b@0", "0.8@0", "0.3@0", "0.3@0", "0.3@0", "0.1@0"}; -const char *f5[ENTS] = {"0.e@0", "0.98@0", "0.88@0", "0.f8@0", "0.58@0", "0.c@0", "0.18@0", "0.98@0", "0.18@0", "0.8@-1"}; - -const char *f10[ENTS] = {"0.a7@0", "0.84c@0", "0.3c4@0", "0.5fc@0", "0.4ac@0", "0.5e@0", "0.e0c@0", "0.34c@0", "0.e8c@0", "0.a04@0"}; - -const char *f15[ENTS] = {"0.538@-1", "0.3426@0", "0.e9e2@0", "0.4afe@0", "0.b256@0", "0.92f@0", "0.8f06@0", "0.f9a6@0", "0.b746@0", "0.8d02@0"}; -const char *f16[ENTS] = {"0.29c@-1", "0.9a13@0", "0.74f1@0", "0.a57f@0", "0.d92b@0", "0.4978@0", "0.c783@0", "0.fcd3@0", "0.5ba3@0", "0.c681@0"}; -const char *f17[ENTS] = {"0.28f@-1", "0.78bd@0", "0.2a7f8@0", "0.d19a8@0", "0.67b28@0", "0.2eb78@0", "0.2c1f8@0", "0.30c78@0", "0.de3@-1", "0.4c7f8@0"}; - -const char *f31[ENTS] = {"0.75d9aa2a@0", "0.275d1d8c@0", "0.a319012@0", "0.103940ee@0", "0.e16e268@-1", "0.fdcf1ae2@0", "0.6474ec6c@0", "0.42459634@0", "0.33023282@0", "0.83fac0a@-1"}; -const char *f32[ENTS] = {"0.baecd515@0", "0.13ae8ec6@0", "0.518c809@0", "0.881ca077@0", "0.870b7134@0", "0.7ee78d71@0", "0.323a7636@0", "0.a122cb1a@0", "0.99811941@0", "0.841fd605@0"}; -const char *f33[ENTS] = {"0.fd7a665@-1", "0.aeb77c1d8@0", "0.484aff39@0", "0.db51effb@0", "0.58be5eee8@0", "0.b72904ea@0", "0.37b2d896@0", "0.249ddde3@0", "0.55f952ea8@0", "0.36a48d1e@0"}; - -const char *f63[ENTS] = {"0.914e9e6cff4f6b9@0", "0.7753d3b8364c60ec@0", "0.3c15909cecf1c1f6@0", "0.2282cb02e5167c6a@0", "0.6d56c20a47e1e3ee@0", "0.7ca81d1d2b81d696@0", "0.8735c2c0afb793a6@0", "0.e69f64c1b64872a@0", "0.fa7462fdff85137e@0", "0.3b00603f67a341a2@0"}; -const char *f64[ENTS] = {"0.48a74f367fa7b5c8@0", "0.bba9e9dc1b263076@0", "0.9e0ac84e7678e0fb@0", "0.11416581728b3e35@0", "0.b6ab610523f0f1f7@0", "0.be540e8e95c0eb4b@0", "0.439ae16057dbc9d3@0", "0.f34fb260db24395@0", "0.fd3a317effc289bf@0", "0.1d80301fb3d1a0d1@0"}; -const char *f65[ENTS] = {"0.ffbbb886c236a4f8@0", "0.d8a08b80eb84f708@0", "0.18ffd40d1045b57a@0", "0.22331c6a18e9e3408@0", "0.6fae2b4eadd545aa8@0", "0.cbeccf54df9472d@0", "0.c8d6f04f6eca67d7@0", "0.ca5677d36ef2f0c68@0", "0.d7e08b3e2b1396c9@0", "0.68494ca6d39790378@0"}; - -const char *f127[ENTS] = {"0.5ecd7526555eb140e3fb1e0e85533418@0", "0.e79f478cc99382ea6a0f94c1d8d7084a@0", "0.a7d40e994263bd8259ad171551c404f@0", "0.79eb5918686a65f14a7981d68eb03ee6@0", "0.a1823ab0d3c411543735462f7185a152@0", "0.16462c791250ec8e563de32c85d59c12@0", "0.913e9807a83f0ea1391ad9219cce9f2a@0", "0.5570e9192d54cec5d4326568993ae2c8@0", "0.13196ab23f80b5a635f7783acf721dba@0", "0.ef09177323fa17c6635b9e28aff78ce4@0"}; -const char *f128[ENTS] = {"0.af66ba932aaf58a071fd8f0742a99a0c@0", "0.73cfa3c664c9c1753507ca60ec6b8425@0", "0.53ea074ca131dec12cd68b8aa8e20278@0", "0.3cf5ac8c343532f8a53cc0eb47581f73@0", "0.50c11d5869e208aa1b9aa317b8c2d0a9@0", "0.8b23163c892876472b1ef19642eace09@0", "0.489f4c03d41f87509c8d6c90ce674f95@0", "0.aab8748c96aa6762ea1932b44c9d7164@0", "0.98cb5591fc05ad31afbbc1d67b90edd@-1", "0.f7848bb991fd0be331adcf1457fbc672@0"}; - - -struct rt -{ - const char **s; - int nbits; -}; - -static struct rt zarr[] = -{ - {z1, 1}, - {z2, 2}, - {z3, 3}, - {z4, 4}, - {z5, 5}, - {z10, 10}, - {z15, 15}, - {z16, 16}, - {z17, 17}, - {z31, 31}, - {z32, 32}, - {z33, 33}, - {z63, 63}, - {z64, 64}, - {z65, 65}, - {z127, 127}, - {z128, 128}, - {NULL, 0} -}; - -static struct rt farr[] = -{ - {f1, 1}, - {f2, 2}, - {f3, 3}, - {f4, 4}, - {f5, 5}, - {f10, 10}, - {f15, 15}, - {f16, 16}, - {f17, 17}, - {f31, 31}, - {f32, 32}, - {f33, 33}, - {f63, 63}, - {f64, 64}, - {f65, 65}, - {f127, 127}, - {f128, 128}, - {NULL, 0} -}; - - -int -main (int argc, char *argv[]) -{ - static char usage[] = "\ -usage: t-rand [function nbits]\n\ - function is one of z, f\n\ - nbits is number of bits\n\ -"; - gmp_randstate_t rstate; - mpz_t z, rz; - mpf_t f, rf; - enum { Z, F } func = Z; - int nbits = 1; - int verify_mode_flag = 1; - int i; - struct rt *a; - - - if (argc > 1) - { - if (argc < 3) - { - fputs (usage, stderr); - exit (1); - } - verify_mode_flag = 0; - if (*argv[1] == 'z') - func = Z; - if (*argv[1] == 'f') - func = F; - nbits = atoi (argv[2]); - } - - mpz_init (rz); - - if (verify_mode_flag) - { -#ifdef VERBOSE - printf ("%s: verifying random numbers: ", argv[0]); -#endif - - /* Test z. */ - mpz_init (z); - for (a = zarr; a->s != NULL; a++) - { - gmp_randinit (rstate, GMP_RAND_ALG_LC, a->nbits); - if (gmp_errno != GMP_ERROR_NONE) - exit (1); - gmp_randseed_ui (rstate, SEED); - - for (i = 0; i < ENTS; i++) - { - mpz_urandomb (rz, rstate, a->nbits); - mpz_set_str (z, a->s[i], BASE); - if (mpz_cmp (z, rz) != 0) - { - printf ("z%d: ", a->nbits); - mpz_out_str (stdout, BASE, rz); - printf (" should be "); - mpz_out_str (stdout, BASE, z); - puts (""); - exit (1); - } - } -#ifdef VERBOSE - printf ("z%d ", a->nbits); -#endif - gmp_randclear (rstate); - } - mpz_clear (z); - - - /* Test f. */ - for (a = farr; a->s != NULL; a++) - { - gmp_randinit (rstate, GMP_RAND_ALG_LC, a->nbits); - if (gmp_errno != GMP_ERROR_NONE) - exit (1); - gmp_randseed_ui (rstate, SEED); - - mpf_init2 (f, a->nbits); - mpf_init2 (rf, a->nbits); - for (i = 0; i < ENTS; i++) - { - mpf_urandomb (rf, rstate, a->nbits); - mpf_set_str (f, a->s[i], BASE); - if (mpf_cmp (f, rf) != 0) - { - printf ("f%d: ", a->nbits); - mpf_out_str (stdout, BASE, a->nbits, rf); - printf (" should be "); - mpf_out_str (stdout, BASE, a->nbits, f); - puts (""); - exit (1); - } - } -#ifdef VERBOSE - printf ("f%d ", a->nbits); -#endif - gmp_randclear (rstate); - mpf_clear (f); - mpf_clear (rf); - } - -#ifdef VERBOSE - puts (""); -#endif - } - else /* Print mode. */ - { - gmp_randinit (rstate, GMP_RAND_ALG_LC, nbits); - if (gmp_errno != GMP_ERROR_NONE) - exit (1); - gmp_randseed_ui (rstate, SEED); - - switch (func) - { - case Z: - printf ("char *z%d[ENTS] = {", nbits); - for (i = 0; i < ENTS; i++) - { - mpz_urandomb (rz, rstate, nbits); - printf ("\""); - mpz_out_str (stdout, BASE, rz); - printf ("\""); - if (i != ENTS - 1) - printf (", "); - } - printf ("};\n"); - printf (" {z%d, %d},\n", nbits, nbits); - break; - - case F: - printf ("char *f%d[ENTS] = {", nbits); - mpf_init2 (rf, nbits); - for (i = 0; i < ENTS; i++) - { - mpf_urandomb (rf, rstate, nbits); - printf ("\""); - mpf_out_str (stdout, BASE, nbits, rf); - printf ("\""); - if (i != ENTS - 1) - printf (", "); - } - printf ("};\n"); - printf (" {f%d, %d},\n", nbits, nbits); - mpf_clear (rf); - break; - - default: - exit (1); - } - - gmp_randclear (rstate); - } - - mpz_clear (rz); - - return 0; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-urbui.c b/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-urbui.c deleted file mode 100644 index bac8b6d5a04..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-urbui.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Test gmp_urandomb_ui. - -Copyright 2003, 2005 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -/* Expect numbers generated by rstate to obey the number of bits requested. - No point testing bits==BITS_PER_ULONG, since any return is acceptable in - that case. */ -void -check_one (const char *name, gmp_randstate_ptr rstate) -{ - unsigned long bits, limit, got; - int i; - - for (bits = 0; bits < BITS_PER_ULONG; bits++) - { - /* will demand got < limit */ - limit = (1UL << bits); - - for (i = 0; i < 5; i++) - { - got = gmp_urandomb_ui (rstate, bits); - if (got >= limit) - { - printf ("Return value out of range:\n"); - printf (" algorithm: %s\n", name); - printf (" bits: %lu\n", bits); - printf (" limit: %#lx\n", limit); - printf (" got: %#lx\n", got); - abort (); - } - } - } -} - -int -main (int argc, char *argv[]) -{ - tests_start (); - - call_rand_algs (check_one); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-urmui.c b/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-urmui.c deleted file mode 100644 index c58d740f4e2..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-urmui.c +++ /dev/null @@ -1,75 +0,0 @@ -/* Test gmp_urandomm_ui. - -Copyright 2003, 2005 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -/* Expect numbers generated by rstate to obey the limit requested. */ -void -check_one (const char *name, gmp_randstate_ptr rstate) -{ - static const unsigned long n_table[] = { - 1, 2, 3, 4, 5, 6, 7, 8, - 123, 456, 789, - - 255, 256, 257, - 1023, 1024, 1025, - 32767, 32768, 32769, - - ULONG_MAX/2-2, ULONG_MAX/2-1, ULONG_MAX/2, ULONG_MAX/2+1, ULONG_MAX/2+2, - - ULONG_MAX-2, ULONG_MAX-1, ULONG_MAX, - }; - - unsigned long got, n; - int i, j; - - for (i = 0; i < numberof (n_table); i++) - { - n = n_table[i]; - - for (j = 0; j < 5; j++) - { - got = gmp_urandomm_ui (rstate, n); - if (got >= n) - { - printf ("Return value out of range:\n"); - printf (" algorithm: %s\n", name); - printf (" n: %#lx\n", n); - printf (" got: %#lx\n", got); - abort (); - } - } - } -} - - -int -main (int argc, char *argv[]) -{ - tests_start (); - - call_rand_algs (check_one); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-urndmm.c b/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-urndmm.c deleted file mode 100644 index d5a9217b402..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/rand/t-urndmm.c +++ /dev/null @@ -1,159 +0,0 @@ -/* Test mpz_urandomm. - -Copyright 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -#ifndef TRUE -#define TRUE (1) -#endif -#ifndef FALSE -#define FALSE (0) -#endif - -int -check_params (void) -{ - gmp_randstate_t r1, r2; - mpz_t a, b, m; - int i; - int result; - - result = TRUE; - - mpz_init (a); - mpz_init (b); - mpz_init (m); - - if (result) - { - /* Test the consistency between urandomm and urandomb. */ - gmp_randinit_default (r1); - gmp_randinit_default (r2); - gmp_randseed_ui (r1, 85L); - gmp_randseed_ui (r2, 85L); - mpz_set_ui (m, 0L); - mpz_setbit (m, 80L); - for (i = 0; i < 100; i++) - { - mpz_urandomm (a, r1, m); - mpz_urandomb (b, r2, 80L); - if (mpz_cmp (a, b) != 0) - { - result = FALSE; - printf ("mpz_urandomm != mpz_urandomb\n"); - break; - } - } - gmp_randclear (r1); - gmp_randclear (r2); - } - - if (result) - { - /* Test that mpz_urandomm returns the correct result with a - broken LC. */ - mpz_set_ui (a, 0L); - gmp_randinit_lc_2exp (r1, a, 0xffL, 8L); - mpz_set_ui (m, 5L); - /* Warning: This code hangs in gmp 4.1 and below */ - for (i = 0; i < 100; i++) - { - mpz_urandomm (a, r1, m); - if (mpz_cmp_ui (a, 2L) != 0) - { - result = FALSE; - gmp_printf ("mpz_urandomm returns %Zd instead of 2\n", a); - break; - } - } - gmp_randclear (r1); - } - - if (result) - { - /* Test that the results are always in range for either - positive or negative values of m. */ - gmp_randinit_default (r1); - mpz_set_ui (m, 5L); - mpz_set_si (b, -5L); - for (i = 0; i < 100; i++) - { - mpz_urandomm (a, r1, m); - if (mpz_cmp_ui (a, 5L) >= 0 || mpz_sgn (a) < 0) - { - result = FALSE; - gmp_printf ("Out-of-range or non-positive value: %Zd\n", a); - break; - } - mpz_urandomm (a, r1, b); - if (mpz_cmp_ui (a, 5L) >= 0 || mpz_sgn (a) < 0) - { - result = FALSE; - gmp_printf ("Out-of-range or non-positive value (from negative modulus): %Zd\n", a); - break; - } - } - gmp_randclear (r1); - } - - if (result) - { - /* Test that m=1 forces always result=0. */ - gmp_randinit_default (r1); - mpz_set_ui (m, 1L); - for (i = 0; i < 100; i++) - { - mpz_urandomm (a, r1, m); - if (mpz_sgn (a) != 0) - { - result = FALSE; - gmp_printf ("mpz_urandomm fails with m=1 (result=%Zd)\n", a); - break; - } - } - gmp_randclear (r1); - } - - mpz_clear (a); - mpz_clear (b); - mpz_clear (m); - return result; -} - -int -main (int argc, char *argv[]) -{ - int result = TRUE; - - tests_start (); - - if (result) - if (!check_params ()) - result = FALSE; - - tests_end (); - - if (result) - return 0; /* pass */ - else - return 1; /* fail */ -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/rand/zdiv_round.c b/src/plugins/e-acsl/contrib/libgmp/tests/rand/zdiv_round.c deleted file mode 100644 index 3a91e3092c1..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/rand/zdiv_round.c +++ /dev/null @@ -1,44 +0,0 @@ -/* zdiv_round() -- divide integers, round to nearest */ - -/* -Copyright 1999 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "gmp.h" - -void -zdiv_round (mpz_t rop, mpz_t n, mpz_t d) -{ - mpf_t f_n, f_d; - - mpf_init (f_n); - mpf_init (f_d); - - mpf_set_z (f_d, d); - mpf_set_z (f_n, n); - - mpf_div (f_n, f_n, f_d); - mpf_set_d (f_d, .5); - if (mpf_sgn (f_n) < 0) - mpf_neg (f_d, f_d); - mpf_add (f_n, f_n, f_d); - mpz_set_f (rop, f_n); - - mpf_clear (f_n); - mpf_clear (f_d); - return; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/refmpf.c b/src/plugins/e-acsl/contrib/libgmp/tests/refmpf.c deleted file mode 100644 index 0ba9fbca3ae..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/refmpf.c +++ /dev/null @@ -1,428 +0,0 @@ -/* Reference floating point routines. - -Copyright 1996, 2001, 2004, 2005 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -refmpf_add (mpf_ptr w, mpf_srcptr u, mpf_srcptr v) -{ - mp_size_t hi, lo, size; - mp_ptr ut, vt, wt; - int neg; - mp_exp_t exp; - mp_limb_t cy; - TMP_DECL; - - TMP_MARK; - - if (SIZ (u) == 0) - { - size = ABSIZ (v); - wt = TMP_ALLOC_LIMBS (size + 1); - MPN_COPY (wt, PTR (v), size); - exp = EXP (v); - neg = SIZ (v) < 0; - goto done; - } - if (SIZ (v) == 0) - { - size = ABSIZ (u); - wt = TMP_ALLOC_LIMBS (size + 1); - MPN_COPY (wt, PTR (u), size); - exp = EXP (u); - neg = SIZ (u) < 0; - goto done; - } - if ((SIZ (u) ^ SIZ (v)) < 0) - { - mpf_t tmp; - SIZ (tmp) = -SIZ (v); - EXP (tmp) = EXP (v); - PTR (tmp) = PTR (v); - refmpf_sub (w, u, tmp); - return; - } - neg = SIZ (u) < 0; - - /* Compute the significance of the hi and lo end of the result. */ - hi = MAX (EXP (u), EXP (v)); - lo = MIN (EXP (u) - ABSIZ (u), EXP (v) - ABSIZ (v)); - size = hi - lo; - ut = TMP_ALLOC_LIMBS (size + 1); - vt = TMP_ALLOC_LIMBS (size + 1); - wt = TMP_ALLOC_LIMBS (size + 1); - MPN_ZERO (ut, size); - MPN_ZERO (vt, size); - {int off; - off = size + (EXP (u) - hi) - ABSIZ (u); - MPN_COPY (ut + off, PTR (u), ABSIZ (u)); - off = size + (EXP (v) - hi) - ABSIZ (v); - MPN_COPY (vt + off, PTR (v), ABSIZ (v)); - } - - cy = mpn_add_n (wt, ut, vt, size); - wt[size] = cy; - size += cy; - exp = hi + cy; - -done: - if (size > PREC (w)) - { - wt += size - PREC (w); - size = PREC (w); - } - MPN_COPY (PTR (w), wt, size); - SIZ (w) = neg == 0 ? size : -size; - EXP (w) = exp; - TMP_FREE; -} - - -/* Add 1 "unit in last place" (ie. in the least significant limb) to f. - f cannot be zero, since that has no well-defined "last place". - - This routine is designed for use in cases where we pay close attention to - the size of the data value and are using that (and the exponent) to - indicate the accurate part of a result, or similar. For this reason, if - there's a carry out we don't store 1 and adjust the exponent, we just - leave 100..00. We don't even adjust if there's a carry out of prec+1 - limbs, but instead give up in that case (which we intend shouldn't arise - in normal circumstances). */ - -void -refmpf_add_ulp (mpf_ptr f) -{ - mp_ptr fp = PTR(f); - mp_size_t fsize = SIZ(f); - mp_size_t abs_fsize = ABSIZ(f); - mp_limb_t c; - - if (fsize == 0) - { - printf ("Oops, refmpf_add_ulp called with f==0\n"); - abort (); - } - - c = refmpn_add_1 (fp, fp, abs_fsize, CNST_LIMB(1)); - if (c != 0) - { - if (abs_fsize >= PREC(f) + 1) - { - printf ("Oops, refmpf_add_ulp carried out of prec+1 limbs\n"); - abort (); - } - - fp[abs_fsize] = c; - abs_fsize++; - SIZ(f) = (fsize > 0 ? abs_fsize : - abs_fsize); - EXP(f)++; - } -} - -/* Fill f with size limbs of the given value, setup as an integer. */ -void -refmpf_fill (mpf_ptr f, mp_size_t size, mp_limb_t value) -{ - ASSERT (size >= 0); - size = MIN (PREC(f) + 1, size); - SIZ(f) = size; - EXP(f) = size; - refmpn_fill (PTR(f), size, value); -} - -/* Strip high zero limbs from the f data, adjusting exponent accordingly. */ -void -refmpf_normalize (mpf_ptr f) -{ - while (SIZ(f) != 0 && PTR(f)[ABSIZ(f)-1] == 0) - { - SIZ(f) = (SIZ(f) >= 0 ? SIZ(f)-1 : SIZ(f)+1); - EXP(f) --; - } - if (SIZ(f) == 0) - EXP(f) = 0; -} - -/* refmpf_set_overlap sets up dst as a copy of src, but with PREC(dst) - unchanged, in preparation for an overlap test. - - The full value of src is copied, and the space at PTR(dst) is extended as - necessary. The way PREC(dst) is unchanged is as per an mpf_set_prec_raw. - The return value is the new PTR(dst) space precision, in bits, ready for - a restoring mpf_set_prec_raw before mpf_clear. */ - -unsigned long -refmpf_set_overlap (mpf_ptr dst, mpf_srcptr src) -{ - mp_size_t dprec = PREC(dst); - mp_size_t ssize = ABSIZ(src); - unsigned long ret; - - refmpf_set_prec_limbs (dst, (unsigned long) MAX (dprec, ssize)); - mpf_set (dst, src); - - ret = mpf_get_prec (dst); - PREC(dst) = dprec; - return ret; -} - -/* Like mpf_set_prec, but taking a precision in limbs. - PREC(f) ends up as the given "prec" value. */ -void -refmpf_set_prec_limbs (mpf_ptr f, unsigned long prec) -{ - mpf_set_prec (f, __GMPF_PREC_TO_BITS (prec)); -} - - -void -refmpf_sub (mpf_ptr w, mpf_srcptr u, mpf_srcptr v) -{ - mp_size_t hi, lo, size; - mp_ptr ut, vt, wt; - int neg; - mp_exp_t exp; - TMP_DECL; - - TMP_MARK; - - if (SIZ (u) == 0) - { - size = ABSIZ (v); - wt = TMP_ALLOC_LIMBS (size + 1); - MPN_COPY (wt, PTR (v), size); - exp = EXP (v); - neg = SIZ (v) > 0; - goto done; - } - if (SIZ (v) == 0) - { - size = ABSIZ (u); - wt = TMP_ALLOC_LIMBS (size + 1); - MPN_COPY (wt, PTR (u), size); - exp = EXP (u); - neg = SIZ (u) < 0; - goto done; - } - if ((SIZ (u) ^ SIZ (v)) < 0) - { - mpf_t tmp; - SIZ (tmp) = -SIZ (v); - EXP (tmp) = EXP (v); - PTR (tmp) = PTR (v); - refmpf_add (w, u, tmp); - if (SIZ (u) < 0) - mpf_neg (w, w); - return; - } - neg = SIZ (u) < 0; - - /* Compute the significance of the hi and lo end of the result. */ - hi = MAX (EXP (u), EXP (v)); - lo = MIN (EXP (u) - ABSIZ (u), EXP (v) - ABSIZ (v)); - size = hi - lo; - ut = TMP_ALLOC_LIMBS (size + 1); - vt = TMP_ALLOC_LIMBS (size + 1); - wt = TMP_ALLOC_LIMBS (size + 1); - MPN_ZERO (ut, size); - MPN_ZERO (vt, size); - {int off; - off = size + (EXP (u) - hi) - ABSIZ (u); - MPN_COPY (ut + off, PTR (u), ABSIZ (u)); - off = size + (EXP (v) - hi) - ABSIZ (v); - MPN_COPY (vt + off, PTR (v), ABSIZ (v)); - } - - if (mpn_cmp (ut, vt, size) >= 0) - mpn_sub_n (wt, ut, vt, size); - else - { - mpn_sub_n (wt, vt, ut, size); - neg ^= 1; - } - exp = hi; - while (size != 0 && wt[size - 1] == 0) - { - size--; - exp--; - } - -done: - if (size > PREC (w)) - { - wt += size - PREC (w); - size = PREC (w); - } - MPN_COPY (PTR (w), wt, size); - SIZ (w) = neg == 0 ? size : -size; - EXP (w) = exp; - TMP_FREE; -} - - -/* Validate got by comparing to want. Return 1 if good, 0 if bad. - - The data in got is compared to that in want, up to either PREC(got) limbs - or the size of got, whichever is bigger. Clearly we always demand - PREC(got) of accuracy, but we go further and say that if got is bigger - then any extra must be correct too. - - want needs to have enough data to allow this comparison. The size in - want doesn't have to be that big though, if it's smaller then further low - limbs are taken to be zero. - - This validation approach is designed to allow some flexibility in exactly - how much data is generated by an mpf function, ie. either prec or prec+1 - limbs. We don't try to make a reference function that emulates that same - size decision, instead the idea is for a validation function to generate - at least as much data as the real function, then compare. */ - -int -refmpf_validate (const char *name, mpf_srcptr got, mpf_srcptr want) -{ - int bad = 0; - mp_size_t gsize, wsize, cmpsize, i; - mp_srcptr gp, wp; - mp_limb_t glimb, wlimb; - - MPF_CHECK_FORMAT (got); - - if (EXP (got) != EXP (want)) - { - printf ("%s: wrong exponent\n", name); - bad = 1; - } - - gsize = SIZ (got); - wsize = SIZ (want); - if ((gsize < 0 && wsize > 0) || (gsize > 0 && wsize < 0)) - { - printf ("%s: wrong sign\n", name); - bad = 1; - } - - gsize = ABS (gsize); - wsize = ABS (wsize); - - /* most significant limb of respective data */ - gp = PTR (got) + gsize - 1; - wp = PTR (want) + wsize - 1; - - /* compare limb data */ - cmpsize = MAX (PREC (got), gsize); - for (i = 0; i < cmpsize; i++) - { - glimb = (i < gsize ? gp[-i] : 0); - wlimb = (i < wsize ? wp[-i] : 0); - - if (glimb != wlimb) - { - printf ("%s: wrong data starting at index %ld from top\n", - name, (long) i); - bad = 1; - break; - } - } - - if (bad) - { - printf (" prec %d\n", PREC(got)); - printf (" exp got %ld\n", (long) EXP(got)); - printf (" exp want %ld\n", (long) EXP(want)); - printf (" size got %d\n", SIZ(got)); - printf (" size want %d\n", SIZ(want)); - printf (" limbs (high to low)\n"); - printf (" got "); - for (i = ABSIZ(got)-1; i >= 0; i--) - { - gmp_printf ("%MX", PTR(got)[i]); - if (i != 0) - printf (","); - } - printf ("\n"); - printf (" want "); - for (i = ABSIZ(want)-1; i >= 0; i--) - { - gmp_printf ("%MX", PTR(want)[i]); - if (i != 0) - printf (","); - } - printf ("\n"); - return 0; - } - - return 1; -} - - -int -refmpf_validate_division (const char *name, mpf_srcptr got, - mpf_srcptr n, mpf_srcptr d) -{ - mp_size_t nsize, dsize, sign, prec, qsize, tsize; - mp_srcptr np, dp; - mp_ptr tp, qp, rp; - mpf_t want; - int ret; - - nsize = SIZ (n); - dsize = SIZ (d); - ASSERT_ALWAYS (dsize != 0); - - sign = nsize ^ dsize; - nsize = ABS (nsize); - dsize = ABS (dsize); - - np = PTR (n); - dp = PTR (d); - prec = PREC (got); - - EXP (want) = EXP (n) - EXP (d) + 1; - - qsize = prec + 2; /* at least prec+1 limbs, after high zero */ - tsize = qsize + dsize - 1; /* dividend size to give desired qsize */ - - /* dividend n, extended or truncated */ - tp = refmpn_malloc_limbs (tsize); - refmpn_copy_extend (tp, tsize, np, nsize); - - qp = refmpn_malloc_limbs (qsize); - rp = refmpn_malloc_limbs (dsize); /* remainder, unused */ - - ASSERT_ALWAYS (qsize == tsize - dsize + 1); - refmpn_tdiv_qr (qp, rp, (mp_size_t) 0, tp, tsize, dp, dsize); - - PTR (want) = qp; - SIZ (want) = (sign >= 0 ? qsize : -qsize); - refmpf_normalize (want); - - ret = refmpf_validate (name, got, want); - - free (tp); - free (qp); - free (rp); - - return ret; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/refmpn.c b/src/plugins/e-acsl/contrib/libgmp/tests/refmpn.c deleted file mode 100644 index 2e11f9dbd7f..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/refmpn.c +++ /dev/null @@ -1,2582 +0,0 @@ -/* Reference mpn functions, designed to be simple, portable and independent - of the normal gmp code. Speed isn't a consideration. - -Copyright 1996-2009, 2011-2014 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -/* Most routines have assertions representing what the mpn routines are - supposed to accept. Many of these reference routines do sensible things - outside these ranges (eg. for size==0), but the assertions are present to - pick up bad parameters passed here that are about to be passed the same - to a real mpn routine being compared. */ - -/* always do assertion checking */ -#define WANT_ASSERT 1 - -#include <stdio.h> /* for NULL */ -#include <stdlib.h> /* for malloc */ - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" - -#include "tests.h" - - - -/* Return non-zero if regions {xp,xsize} and {yp,ysize} overlap, with sizes - in bytes. */ -int -byte_overlap_p (const void *v_xp, mp_size_t xsize, - const void *v_yp, mp_size_t ysize) -{ - const char *xp = (const char *) v_xp; - const char *yp = (const char *) v_yp; - - ASSERT (xsize >= 0); - ASSERT (ysize >= 0); - - /* no wraparounds */ - ASSERT (xp+xsize >= xp); - ASSERT (yp+ysize >= yp); - - if (xp + xsize <= yp) - return 0; - - if (yp + ysize <= xp) - return 0; - - return 1; -} - -/* Return non-zero if limb regions {xp,xsize} and {yp,ysize} overlap. */ -int -refmpn_overlap_p (mp_srcptr xp, mp_size_t xsize, mp_srcptr yp, mp_size_t ysize) -{ - return byte_overlap_p (xp, xsize * GMP_LIMB_BYTES, - yp, ysize * GMP_LIMB_BYTES); -} - -/* Check overlap for a routine defined to work low to high. */ -int -refmpn_overlap_low_to_high_p (mp_srcptr dst, mp_srcptr src, mp_size_t size) -{ - return (dst <= src || ! refmpn_overlap_p (dst, size, src, size)); -} - -/* Check overlap for a routine defined to work high to low. */ -int -refmpn_overlap_high_to_low_p (mp_srcptr dst, mp_srcptr src, mp_size_t size) -{ - return (dst >= src || ! refmpn_overlap_p (dst, size, src, size)); -} - -/* Check overlap for a standard routine requiring equal or separate. */ -int -refmpn_overlap_fullonly_p (mp_srcptr dst, mp_srcptr src, mp_size_t size) -{ - return (dst == src || ! refmpn_overlap_p (dst, size, src, size)); -} -int -refmpn_overlap_fullonly_two_p (mp_srcptr dst, mp_srcptr src1, mp_srcptr src2, - mp_size_t size) -{ - return (refmpn_overlap_fullonly_p (dst, src1, size) - && refmpn_overlap_fullonly_p (dst, src2, size)); -} - - -mp_ptr -refmpn_malloc_limbs (mp_size_t size) -{ - mp_ptr p; - ASSERT (size >= 0); - if (size == 0) - size = 1; - p = (mp_ptr) malloc ((size_t) (size * GMP_LIMB_BYTES)); - ASSERT (p != NULL); - return p; -} - -/* Free limbs allocated by refmpn_malloc_limbs. NOTE: Can't free - * memory allocated by refmpn_malloc_limbs_aligned. */ -void -refmpn_free_limbs (mp_ptr p) -{ - free (p); -} - -mp_ptr -refmpn_memdup_limbs (mp_srcptr ptr, mp_size_t size) -{ - mp_ptr p; - p = refmpn_malloc_limbs (size); - refmpn_copyi (p, ptr, size); - return p; -} - -/* malloc n limbs on a multiple of m bytes boundary */ -mp_ptr -refmpn_malloc_limbs_aligned (mp_size_t n, size_t m) -{ - return (mp_ptr) align_pointer (refmpn_malloc_limbs (n + m-1), m); -} - - -void -refmpn_fill (mp_ptr ptr, mp_size_t size, mp_limb_t value) -{ - mp_size_t i; - ASSERT (size >= 0); - for (i = 0; i < size; i++) - ptr[i] = value; -} - -void -refmpn_zero (mp_ptr ptr, mp_size_t size) -{ - refmpn_fill (ptr, size, CNST_LIMB(0)); -} - -void -refmpn_zero_extend (mp_ptr ptr, mp_size_t oldsize, mp_size_t newsize) -{ - ASSERT (newsize >= oldsize); - refmpn_zero (ptr+oldsize, newsize-oldsize); -} - -int -refmpn_zero_p (mp_srcptr ptr, mp_size_t size) -{ - mp_size_t i; - for (i = 0; i < size; i++) - if (ptr[i] != 0) - return 0; - return 1; -} - -mp_size_t -refmpn_normalize (mp_srcptr ptr, mp_size_t size) -{ - ASSERT (size >= 0); - while (size > 0 && ptr[size-1] == 0) - size--; - return size; -} - -/* the highest one bit in x */ -mp_limb_t -refmpn_msbone (mp_limb_t x) -{ - mp_limb_t n = (mp_limb_t) 1 << (GMP_LIMB_BITS-1); - - while (n != 0) - { - if (x & n) - break; - n >>= 1; - } - return n; -} - -/* a mask of the highest one bit plus and all bits below */ -mp_limb_t -refmpn_msbone_mask (mp_limb_t x) -{ - if (x == 0) - return 0; - - return (refmpn_msbone (x) << 1) - 1; -} - -/* How many digits in the given base will fit in a limb. - Notice that the product b is allowed to be equal to the limit - 2^GMP_NUMB_BITS, this ensures the result for base==2 will be - GMP_NUMB_BITS (and similarly other powers of 2). */ -int -refmpn_chars_per_limb (int base) -{ - mp_limb_t limit[2], b[2]; - int chars_per_limb; - - ASSERT (base >= 2); - - limit[0] = 0; /* limit = 2^GMP_NUMB_BITS */ - limit[1] = 1; - b[0] = 1; /* b = 1 */ - b[1] = 0; - - chars_per_limb = 0; - for (;;) - { - if (refmpn_mul_1 (b, b, (mp_size_t) 2, (mp_limb_t) base)) - break; - if (refmpn_cmp (b, limit, (mp_size_t) 2) > 0) - break; - chars_per_limb++; - } - return chars_per_limb; -} - -/* The biggest value base**n which fits in GMP_NUMB_BITS. */ -mp_limb_t -refmpn_big_base (int base) -{ - int chars_per_limb = refmpn_chars_per_limb (base); - int i; - mp_limb_t bb; - - ASSERT (base >= 2); - bb = 1; - for (i = 0; i < chars_per_limb; i++) - bb *= base; - return bb; -} - - -void -refmpn_setbit (mp_ptr ptr, unsigned long bit) -{ - ptr[bit/GMP_NUMB_BITS] |= CNST_LIMB(1) << (bit%GMP_NUMB_BITS); -} - -void -refmpn_clrbit (mp_ptr ptr, unsigned long bit) -{ - ptr[bit/GMP_NUMB_BITS] &= ~ (CNST_LIMB(1) << (bit%GMP_NUMB_BITS)); -} - -#define REFMPN_TSTBIT(ptr,bit) \ - (((ptr)[(bit)/GMP_NUMB_BITS] & (CNST_LIMB(1) << ((bit)%GMP_NUMB_BITS))) != 0) - -int -refmpn_tstbit (mp_srcptr ptr, unsigned long bit) -{ - return REFMPN_TSTBIT (ptr, bit); -} - -unsigned long -refmpn_scan0 (mp_srcptr ptr, unsigned long bit) -{ - while (REFMPN_TSTBIT (ptr, bit) != 0) - bit++; - return bit; -} - -unsigned long -refmpn_scan1 (mp_srcptr ptr, unsigned long bit) -{ - while (REFMPN_TSTBIT (ptr, bit) == 0) - bit++; - return bit; -} - -void -refmpn_copy (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ - ASSERT (refmpn_overlap_fullonly_p (rp, sp, size)); - refmpn_copyi (rp, sp, size); -} - -void -refmpn_copyi (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ - mp_size_t i; - - ASSERT (refmpn_overlap_low_to_high_p (rp, sp, size)); - ASSERT (size >= 0); - - for (i = 0; i < size; i++) - rp[i] = sp[i]; -} - -void -refmpn_copyd (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ - mp_size_t i; - - ASSERT (refmpn_overlap_high_to_low_p (rp, sp, size)); - ASSERT (size >= 0); - - for (i = size-1; i >= 0; i--) - rp[i] = sp[i]; -} - -/* Copy {xp,xsize} to {wp,wsize}. If x is shorter, then pad w with low - zeros to wsize. If x is longer, then copy just the high wsize limbs. */ -void -refmpn_copy_extend (mp_ptr wp, mp_size_t wsize, mp_srcptr xp, mp_size_t xsize) -{ - ASSERT (wsize >= 0); - ASSERT (xsize >= 0); - - /* high part of x if x bigger than w */ - if (xsize > wsize) - { - xp += xsize - wsize; - xsize = wsize; - } - - refmpn_copy (wp + wsize-xsize, xp, xsize); - refmpn_zero (wp, wsize-xsize); -} - -int -refmpn_cmp (mp_srcptr xp, mp_srcptr yp, mp_size_t size) -{ - mp_size_t i; - - ASSERT (size >= 1); - ASSERT_MPN (xp, size); - ASSERT_MPN (yp, size); - - for (i = size-1; i >= 0; i--) - { - if (xp[i] > yp[i]) return 1; - if (xp[i] < yp[i]) return -1; - } - return 0; -} - -int -refmpn_cmp_allowzero (mp_srcptr xp, mp_srcptr yp, mp_size_t size) -{ - if (size == 0) - return 0; - else - return refmpn_cmp (xp, yp, size); -} - -int -refmpn_cmp_twosizes (mp_srcptr xp, mp_size_t xsize, - mp_srcptr yp, mp_size_t ysize) -{ - int opp, cmp; - - ASSERT_MPN (xp, xsize); - ASSERT_MPN (yp, ysize); - - opp = (xsize < ysize); - if (opp) - MPN_SRCPTR_SWAP (xp,xsize, yp,ysize); - - if (! refmpn_zero_p (xp+ysize, xsize-ysize)) - cmp = 1; - else - cmp = refmpn_cmp (xp, yp, ysize); - - return (opp ? -cmp : cmp); -} - -int -refmpn_equal_anynail (mp_srcptr xp, mp_srcptr yp, mp_size_t size) -{ - mp_size_t i; - ASSERT (size >= 0); - - for (i = 0; i < size; i++) - if (xp[i] != yp[i]) - return 0; - return 1; -} - - -#define LOGOPS(operation) \ - { \ - mp_size_t i; \ - \ - ASSERT (refmpn_overlap_fullonly_two_p (rp, s1p, s2p, size)); \ - ASSERT (size >= 1); \ - ASSERT_MPN (s1p, size); \ - ASSERT_MPN (s2p, size); \ - \ - for (i = 0; i < size; i++) \ - rp[i] = operation; \ - } - -void -refmpn_and_n (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size) -{ - LOGOPS (s1p[i] & s2p[i]); -} -void -refmpn_andn_n (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size) -{ - LOGOPS (s1p[i] & ~s2p[i]); -} -void -refmpn_nand_n (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size) -{ - LOGOPS ((s1p[i] & s2p[i]) ^ GMP_NUMB_MASK); -} -void -refmpn_ior_n (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size) -{ - LOGOPS (s1p[i] | s2p[i]); -} -void -refmpn_iorn_n (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size) -{ - LOGOPS (s1p[i] | (s2p[i] ^ GMP_NUMB_MASK)); -} -void -refmpn_nior_n (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size) -{ - LOGOPS ((s1p[i] | s2p[i]) ^ GMP_NUMB_MASK); -} -void -refmpn_xor_n (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size) -{ - LOGOPS (s1p[i] ^ s2p[i]); -} -void -refmpn_xnor_n (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size) -{ - LOGOPS ((s1p[i] ^ s2p[i]) ^ GMP_NUMB_MASK); -} - - -/* set *dh,*dl to mh:ml - sh:sl, in full limbs */ -void -refmpn_sub_ddmmss (mp_limb_t *dh, mp_limb_t *dl, - mp_limb_t mh, mp_limb_t ml, mp_limb_t sh, mp_limb_t sl) -{ - *dl = ml - sl; - *dh = mh - sh - (ml < sl); -} - - -/* set *w to x+y, return 0 or 1 carry */ -mp_limb_t -ref_addc_limb (mp_limb_t *w, mp_limb_t x, mp_limb_t y) -{ - mp_limb_t sum, cy; - - ASSERT_LIMB (x); - ASSERT_LIMB (y); - - sum = x + y; -#if GMP_NAIL_BITS == 0 - *w = sum; - cy = (sum < x); -#else - *w = sum & GMP_NUMB_MASK; - cy = (sum >> GMP_NUMB_BITS); -#endif - return cy; -} - -/* set *w to x-y, return 0 or 1 borrow */ -mp_limb_t -ref_subc_limb (mp_limb_t *w, mp_limb_t x, mp_limb_t y) -{ - mp_limb_t diff, cy; - - ASSERT_LIMB (x); - ASSERT_LIMB (y); - - diff = x - y; -#if GMP_NAIL_BITS == 0 - *w = diff; - cy = (diff > x); -#else - *w = diff & GMP_NUMB_MASK; - cy = (diff >> GMP_NUMB_BITS) & 1; -#endif - return cy; -} - -/* set *w to x+y+c (where c is 0 or 1), return 0 or 1 carry */ -mp_limb_t -adc (mp_limb_t *w, mp_limb_t x, mp_limb_t y, mp_limb_t c) -{ - mp_limb_t r; - - ASSERT_LIMB (x); - ASSERT_LIMB (y); - ASSERT (c == 0 || c == 1); - - r = ref_addc_limb (w, x, y); - return r + ref_addc_limb (w, *w, c); -} - -/* set *w to x-y-c (where c is 0 or 1), return 0 or 1 borrow */ -mp_limb_t -sbb (mp_limb_t *w, mp_limb_t x, mp_limb_t y, mp_limb_t c) -{ - mp_limb_t r; - - ASSERT_LIMB (x); - ASSERT_LIMB (y); - ASSERT (c == 0 || c == 1); - - r = ref_subc_limb (w, x, y); - return r + ref_subc_limb (w, *w, c); -} - - -#define AORS_1(operation) \ - { \ - mp_size_t i; \ - \ - ASSERT (refmpn_overlap_fullonly_p (rp, sp, size)); \ - ASSERT (size >= 1); \ - ASSERT_MPN (sp, size); \ - ASSERT_LIMB (n); \ - \ - for (i = 0; i < size; i++) \ - n = operation (&rp[i], sp[i], n); \ - return n; \ - } - -mp_limb_t -refmpn_add_1 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_limb_t n) -{ - AORS_1 (ref_addc_limb); -} -mp_limb_t -refmpn_sub_1 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_limb_t n) -{ - AORS_1 (ref_subc_limb); -} - -#define AORS_NC(operation) \ - { \ - mp_size_t i; \ - \ - ASSERT (refmpn_overlap_fullonly_two_p (rp, s1p, s2p, size)); \ - ASSERT (carry == 0 || carry == 1); \ - ASSERT (size >= 1); \ - ASSERT_MPN (s1p, size); \ - ASSERT_MPN (s2p, size); \ - \ - for (i = 0; i < size; i++) \ - carry = operation (&rp[i], s1p[i], s2p[i], carry); \ - return carry; \ - } - -mp_limb_t -refmpn_add_nc (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size, - mp_limb_t carry) -{ - AORS_NC (adc); -} -mp_limb_t -refmpn_sub_nc (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size, - mp_limb_t carry) -{ - AORS_NC (sbb); -} - - -mp_limb_t -refmpn_add_n (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size) -{ - return refmpn_add_nc (rp, s1p, s2p, size, CNST_LIMB(0)); -} -mp_limb_t -refmpn_sub_n (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size) -{ - return refmpn_sub_nc (rp, s1p, s2p, size, CNST_LIMB(0)); -} - -mp_limb_t -refmpn_cnd_add_n (mp_limb_t cnd, mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size) -{ - if (cnd != 0) - return refmpn_add_n (rp, s1p, s2p, size); - else - { - refmpn_copyi (rp, s1p, size); - return 0; - } -} -mp_limb_t -refmpn_cnd_sub_n (mp_limb_t cnd, mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size) -{ - if (cnd != 0) - return refmpn_sub_n (rp, s1p, s2p, size); - else - { - refmpn_copyi (rp, s1p, size); - return 0; - } -} - - -#define AORS_ERR1_N(operation) \ - { \ - mp_size_t i; \ - mp_limb_t carry2; \ - \ - ASSERT (refmpn_overlap_fullonly_p (rp, s1p, size)); \ - ASSERT (refmpn_overlap_fullonly_p (rp, s2p, size)); \ - ASSERT (! refmpn_overlap_p (rp, size, yp, size)); \ - ASSERT (! refmpn_overlap_p (ep, 2, s1p, size)); \ - ASSERT (! refmpn_overlap_p (ep, 2, s2p, size)); \ - ASSERT (! refmpn_overlap_p (ep, 2, yp, size)); \ - ASSERT (! refmpn_overlap_p (ep, 2, rp, size)); \ - \ - ASSERT (carry == 0 || carry == 1); \ - ASSERT (size >= 1); \ - ASSERT_MPN (s1p, size); \ - ASSERT_MPN (s2p, size); \ - ASSERT_MPN (yp, size); \ - \ - ep[0] = ep[1] = CNST_LIMB(0); \ - \ - for (i = 0; i < size; i++) \ - { \ - carry = operation (&rp[i], s1p[i], s2p[i], carry); \ - if (carry == 1) \ - { \ - carry2 = ref_addc_limb (&ep[0], ep[0], yp[size - 1 - i]); \ - carry2 = ref_addc_limb (&ep[1], ep[1], carry2); \ - ASSERT (carry2 == 0); \ - } \ - } \ - return carry; \ - } - -mp_limb_t -refmpn_add_err1_n (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, - mp_ptr ep, mp_srcptr yp, - mp_size_t size, mp_limb_t carry) -{ - AORS_ERR1_N (adc); -} -mp_limb_t -refmpn_sub_err1_n (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, - mp_ptr ep, mp_srcptr yp, - mp_size_t size, mp_limb_t carry) -{ - AORS_ERR1_N (sbb); -} - - -#define AORS_ERR2_N(operation) \ - { \ - mp_size_t i; \ - mp_limb_t carry2; \ - \ - ASSERT (refmpn_overlap_fullonly_p (rp, s1p, size)); \ - ASSERT (refmpn_overlap_fullonly_p (rp, s2p, size)); \ - ASSERT (! refmpn_overlap_p (rp, size, y1p, size)); \ - ASSERT (! refmpn_overlap_p (rp, size, y2p, size)); \ - ASSERT (! refmpn_overlap_p (ep, 4, s1p, size)); \ - ASSERT (! refmpn_overlap_p (ep, 4, s2p, size)); \ - ASSERT (! refmpn_overlap_p (ep, 4, y1p, size)); \ - ASSERT (! refmpn_overlap_p (ep, 4, y2p, size)); \ - ASSERT (! refmpn_overlap_p (ep, 4, rp, size)); \ - \ - ASSERT (carry == 0 || carry == 1); \ - ASSERT (size >= 1); \ - ASSERT_MPN (s1p, size); \ - ASSERT_MPN (s2p, size); \ - ASSERT_MPN (y1p, size); \ - ASSERT_MPN (y2p, size); \ - \ - ep[0] = ep[1] = CNST_LIMB(0); \ - ep[2] = ep[3] = CNST_LIMB(0); \ - \ - for (i = 0; i < size; i++) \ - { \ - carry = operation (&rp[i], s1p[i], s2p[i], carry); \ - if (carry == 1) \ - { \ - carry2 = ref_addc_limb (&ep[0], ep[0], y1p[size - 1 - i]); \ - carry2 = ref_addc_limb (&ep[1], ep[1], carry2); \ - ASSERT (carry2 == 0); \ - carry2 = ref_addc_limb (&ep[2], ep[2], y2p[size - 1 - i]); \ - carry2 = ref_addc_limb (&ep[3], ep[3], carry2); \ - ASSERT (carry2 == 0); \ - } \ - } \ - return carry; \ - } - -mp_limb_t -refmpn_add_err2_n (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, - mp_ptr ep, mp_srcptr y1p, mp_srcptr y2p, - mp_size_t size, mp_limb_t carry) -{ - AORS_ERR2_N (adc); -} -mp_limb_t -refmpn_sub_err2_n (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, - mp_ptr ep, mp_srcptr y1p, mp_srcptr y2p, - mp_size_t size, mp_limb_t carry) -{ - AORS_ERR2_N (sbb); -} - - -#define AORS_ERR3_N(operation) \ - { \ - mp_size_t i; \ - mp_limb_t carry2; \ - \ - ASSERT (refmpn_overlap_fullonly_p (rp, s1p, size)); \ - ASSERT (refmpn_overlap_fullonly_p (rp, s2p, size)); \ - ASSERT (! refmpn_overlap_p (rp, size, y1p, size)); \ - ASSERT (! refmpn_overlap_p (rp, size, y2p, size)); \ - ASSERT (! refmpn_overlap_p (rp, size, y3p, size)); \ - ASSERT (! refmpn_overlap_p (ep, 6, s1p, size)); \ - ASSERT (! refmpn_overlap_p (ep, 6, s2p, size)); \ - ASSERT (! refmpn_overlap_p (ep, 6, y1p, size)); \ - ASSERT (! refmpn_overlap_p (ep, 6, y2p, size)); \ - ASSERT (! refmpn_overlap_p (ep, 6, y3p, size)); \ - ASSERT (! refmpn_overlap_p (ep, 6, rp, size)); \ - \ - ASSERT (carry == 0 || carry == 1); \ - ASSERT (size >= 1); \ - ASSERT_MPN (s1p, size); \ - ASSERT_MPN (s2p, size); \ - ASSERT_MPN (y1p, size); \ - ASSERT_MPN (y2p, size); \ - ASSERT_MPN (y3p, size); \ - \ - ep[0] = ep[1] = CNST_LIMB(0); \ - ep[2] = ep[3] = CNST_LIMB(0); \ - ep[4] = ep[5] = CNST_LIMB(0); \ - \ - for (i = 0; i < size; i++) \ - { \ - carry = operation (&rp[i], s1p[i], s2p[i], carry); \ - if (carry == 1) \ - { \ - carry2 = ref_addc_limb (&ep[0], ep[0], y1p[size - 1 - i]); \ - carry2 = ref_addc_limb (&ep[1], ep[1], carry2); \ - ASSERT (carry2 == 0); \ - carry2 = ref_addc_limb (&ep[2], ep[2], y2p[size - 1 - i]); \ - carry2 = ref_addc_limb (&ep[3], ep[3], carry2); \ - ASSERT (carry2 == 0); \ - carry2 = ref_addc_limb (&ep[4], ep[4], y3p[size - 1 - i]); \ - carry2 = ref_addc_limb (&ep[5], ep[5], carry2); \ - ASSERT (carry2 == 0); \ - } \ - } \ - return carry; \ - } - -mp_limb_t -refmpn_add_err3_n (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, - mp_ptr ep, mp_srcptr y1p, mp_srcptr y2p, mp_srcptr y3p, - mp_size_t size, mp_limb_t carry) -{ - AORS_ERR3_N (adc); -} -mp_limb_t -refmpn_sub_err3_n (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, - mp_ptr ep, mp_srcptr y1p, mp_srcptr y2p, mp_srcptr y3p, - mp_size_t size, mp_limb_t carry) -{ - AORS_ERR3_N (sbb); -} - - -mp_limb_t -refmpn_addlsh_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, - mp_size_t n, unsigned int s) -{ - mp_limb_t cy; - mp_ptr tp; - - ASSERT (refmpn_overlap_fullonly_two_p (rp, up, vp, n)); - ASSERT (n >= 1); - ASSERT (0 < s && s < GMP_NUMB_BITS); - ASSERT_MPN (up, n); - ASSERT_MPN (vp, n); - - tp = refmpn_malloc_limbs (n); - cy = refmpn_lshift (tp, vp, n, s); - cy += refmpn_add_n (rp, up, tp, n); - free (tp); - return cy; -} -mp_limb_t -refmpn_addlsh1_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) -{ - return refmpn_addlsh_n (rp, up, vp, n, 1); -} -mp_limb_t -refmpn_addlsh2_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) -{ - return refmpn_addlsh_n (rp, up, vp, n, 2); -} -mp_limb_t -refmpn_addlsh_n_ip1 (mp_ptr rp, mp_srcptr vp, mp_size_t n, unsigned int s) -{ - return refmpn_addlsh_n (rp, rp, vp, n, s); -} -mp_limb_t -refmpn_addlsh1_n_ip1 (mp_ptr rp, mp_srcptr vp, mp_size_t n) -{ - return refmpn_addlsh_n (rp, rp, vp, n, 1); -} -mp_limb_t -refmpn_addlsh2_n_ip1 (mp_ptr rp, mp_srcptr vp, mp_size_t n) -{ - return refmpn_addlsh_n (rp, rp, vp, n, 2); -} -mp_limb_t -refmpn_addlsh_n_ip2 (mp_ptr rp, mp_srcptr vp, mp_size_t n, unsigned int s) -{ - return refmpn_addlsh_n (rp, vp, rp, n, s); -} -mp_limb_t -refmpn_addlsh1_n_ip2 (mp_ptr rp, mp_srcptr vp, mp_size_t n) -{ - return refmpn_addlsh_n (rp, vp, rp, n, 1); -} -mp_limb_t -refmpn_addlsh2_n_ip2 (mp_ptr rp, mp_srcptr vp, mp_size_t n) -{ - return refmpn_addlsh_n (rp, vp, rp, n, 2); -} -mp_limb_t -refmpn_addlsh_nc (mp_ptr rp, mp_srcptr up, mp_srcptr vp, - mp_size_t n, unsigned int s, mp_limb_t carry) -{ - mp_limb_t cy; - - ASSERT (carry <= (CNST_LIMB(1) << s)); - - cy = refmpn_addlsh_n (rp, up, vp, n, s); - cy += refmpn_add_1 (rp, rp, n, carry); - return cy; -} -mp_limb_t -refmpn_addlsh1_nc (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n, mp_limb_t carry) -{ - return refmpn_addlsh_nc (rp, up, vp, n, 1, carry); -} -mp_limb_t -refmpn_addlsh2_nc (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n, mp_limb_t carry) -{ - return refmpn_addlsh_nc (rp, up, vp, n, 2, carry); -} - -mp_limb_t -refmpn_sublsh_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, - mp_size_t n, unsigned int s) -{ - mp_limb_t cy; - mp_ptr tp; - - ASSERT (refmpn_overlap_fullonly_two_p (rp, up, vp, n)); - ASSERT (n >= 1); - ASSERT (0 < s && s < GMP_NUMB_BITS); - ASSERT_MPN (up, n); - ASSERT_MPN (vp, n); - - tp = refmpn_malloc_limbs (n); - cy = mpn_lshift (tp, vp, n, s); - cy += mpn_sub_n (rp, up, tp, n); - free (tp); - return cy; -} -mp_limb_t -refmpn_sublsh1_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) -{ - return refmpn_sublsh_n (rp, up, vp, n, 1); -} -mp_limb_t -refmpn_sublsh2_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) -{ - return refmpn_sublsh_n (rp, up, vp, n, 2); -} -mp_limb_t -refmpn_sublsh_n_ip1 (mp_ptr rp, mp_srcptr vp, mp_size_t n, unsigned int s) -{ - return refmpn_sublsh_n (rp, rp, vp, n, s); -} -mp_limb_t -refmpn_sublsh1_n_ip1 (mp_ptr rp, mp_srcptr vp, mp_size_t n) -{ - return refmpn_sublsh_n (rp, rp, vp, n, 1); -} -mp_limb_t -refmpn_sublsh2_n_ip1 (mp_ptr rp, mp_srcptr vp, mp_size_t n) -{ - return refmpn_sublsh_n (rp, rp, vp, n, 2); -} -mp_limb_t -refmpn_sublsh_n_ip2 (mp_ptr rp, mp_srcptr vp, mp_size_t n, unsigned int s) -{ - return refmpn_sublsh_n (rp, vp, rp, n, s); -} -mp_limb_t -refmpn_sublsh1_n_ip2 (mp_ptr rp, mp_srcptr vp, mp_size_t n) -{ - return refmpn_sublsh_n (rp, vp, rp, n, 1); -} -mp_limb_t -refmpn_sublsh2_n_ip2 (mp_ptr rp, mp_srcptr vp, mp_size_t n) -{ - return refmpn_sublsh_n (rp, vp, rp, n, 2); -} -mp_limb_t -refmpn_sublsh_nc (mp_ptr rp, mp_srcptr up, mp_srcptr vp, - mp_size_t n, unsigned int s, mp_limb_t carry) -{ - mp_limb_t cy; - - ASSERT (carry <= (CNST_LIMB(1) << s)); - - cy = refmpn_sublsh_n (rp, up, vp, n, s); - cy += refmpn_sub_1 (rp, rp, n, carry); - return cy; -} -mp_limb_t -refmpn_sublsh1_nc (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n, mp_limb_t carry) -{ - return refmpn_sublsh_nc (rp, up, vp, n, 1, carry); -} -mp_limb_t -refmpn_sublsh2_nc (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n, mp_limb_t carry) -{ - return refmpn_sublsh_nc (rp, up, vp, n, 2, carry); -} - -mp_limb_signed_t -refmpn_rsblsh_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, - mp_size_t n, unsigned int s) -{ - mp_limb_signed_t cy; - mp_ptr tp; - - ASSERT (refmpn_overlap_fullonly_two_p (rp, up, vp, n)); - ASSERT (n >= 1); - ASSERT (0 < s && s < GMP_NUMB_BITS); - ASSERT_MPN (up, n); - ASSERT_MPN (vp, n); - - tp = refmpn_malloc_limbs (n); - cy = mpn_lshift (tp, vp, n, s); - cy -= mpn_sub_n (rp, tp, up, n); - free (tp); - return cy; -} -mp_limb_signed_t -refmpn_rsblsh1_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) -{ - return refmpn_rsblsh_n (rp, up, vp, n, 1); -} -mp_limb_signed_t -refmpn_rsblsh2_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) -{ - return refmpn_rsblsh_n (rp, up, vp, n, 2); -} -mp_limb_signed_t -refmpn_rsblsh_nc (mp_ptr rp, mp_srcptr up, mp_srcptr vp, - mp_size_t n, unsigned int s, mp_limb_signed_t carry) -{ - mp_limb_signed_t cy; - - ASSERT (carry == -1 || (carry >> s) == 0); - - cy = refmpn_rsblsh_n (rp, up, vp, n, s); - if (carry > 0) - cy += refmpn_add_1 (rp, rp, n, carry); - else - cy -= refmpn_sub_1 (rp, rp, n, -carry); - return cy; -} -mp_limb_signed_t -refmpn_rsblsh1_nc (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n, mp_limb_signed_t carry) -{ - return refmpn_rsblsh_nc (rp, up, vp, n, 1, carry); -} -mp_limb_signed_t -refmpn_rsblsh2_nc (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n, mp_limb_signed_t carry) -{ - return refmpn_rsblsh_nc (rp, up, vp, n, 2, carry); -} - -mp_limb_t -refmpn_rsh1add_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) -{ - mp_limb_t cya, cys; - - ASSERT (refmpn_overlap_fullonly_two_p (rp, up, vp, n)); - ASSERT (n >= 1); - ASSERT_MPN (up, n); - ASSERT_MPN (vp, n); - - cya = mpn_add_n (rp, up, vp, n); - cys = mpn_rshift (rp, rp, n, 1) >> (GMP_NUMB_BITS - 1); - rp[n - 1] |= cya << (GMP_NUMB_BITS - 1); - return cys; -} -mp_limb_t -refmpn_rsh1sub_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) -{ - mp_limb_t cya, cys; - - ASSERT (refmpn_overlap_fullonly_two_p (rp, up, vp, n)); - ASSERT (n >= 1); - ASSERT_MPN (up, n); - ASSERT_MPN (vp, n); - - cya = mpn_sub_n (rp, up, vp, n); - cys = mpn_rshift (rp, rp, n, 1) >> (GMP_NUMB_BITS - 1); - rp[n - 1] |= cya << (GMP_NUMB_BITS - 1); - return cys; -} - -/* Twos complement, return borrow. */ -mp_limb_t -refmpn_neg (mp_ptr dst, mp_srcptr src, mp_size_t size) -{ - mp_ptr zeros; - mp_limb_t ret; - - ASSERT (size >= 1); - - zeros = refmpn_malloc_limbs (size); - refmpn_fill (zeros, size, CNST_LIMB(0)); - ret = refmpn_sub_n (dst, zeros, src, size); - free (zeros); - return ret; -} - - -#define AORS(aors_n, aors_1) \ - { \ - mp_limb_t c; \ - ASSERT (s1size >= s2size); \ - ASSERT (s2size >= 1); \ - c = aors_n (rp, s1p, s2p, s2size); \ - if (s1size-s2size != 0) \ - c = aors_1 (rp+s2size, s1p+s2size, s1size-s2size, c); \ - return c; \ - } -mp_limb_t -refmpn_add (mp_ptr rp, - mp_srcptr s1p, mp_size_t s1size, - mp_srcptr s2p, mp_size_t s2size) -{ - AORS (refmpn_add_n, refmpn_add_1); -} -mp_limb_t -refmpn_sub (mp_ptr rp, - mp_srcptr s1p, mp_size_t s1size, - mp_srcptr s2p, mp_size_t s2size) -{ - AORS (refmpn_sub_n, refmpn_sub_1); -} - - -#define SHIFTHIGH(x) ((x) << GMP_LIMB_BITS/2) -#define SHIFTLOW(x) ((x) >> GMP_LIMB_BITS/2) - -#define LOWMASK (((mp_limb_t) 1 << GMP_LIMB_BITS/2)-1) -#define HIGHMASK SHIFTHIGH(LOWMASK) - -#define LOWPART(x) ((x) & LOWMASK) -#define HIGHPART(x) SHIFTLOW((x) & HIGHMASK) - -/* Set return:*lo to x*y, using full limbs not nails. */ -mp_limb_t -refmpn_umul_ppmm (mp_limb_t *lo, mp_limb_t x, mp_limb_t y) -{ - mp_limb_t hi, s; - - *lo = LOWPART(x) * LOWPART(y); - hi = HIGHPART(x) * HIGHPART(y); - - s = LOWPART(x) * HIGHPART(y); - hi += HIGHPART(s); - s = SHIFTHIGH(LOWPART(s)); - *lo += s; - hi += (*lo < s); - - s = HIGHPART(x) * LOWPART(y); - hi += HIGHPART(s); - s = SHIFTHIGH(LOWPART(s)); - *lo += s; - hi += (*lo < s); - - return hi; -} - -mp_limb_t -refmpn_umul_ppmm_r (mp_limb_t x, mp_limb_t y, mp_limb_t *lo) -{ - return refmpn_umul_ppmm (lo, x, y); -} - -mp_limb_t -refmpn_mul_1c (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_limb_t multiplier, - mp_limb_t carry) -{ - mp_size_t i; - mp_limb_t hi, lo; - - ASSERT (refmpn_overlap_low_to_high_p (rp, sp, size)); - ASSERT (size >= 1); - ASSERT_MPN (sp, size); - ASSERT_LIMB (multiplier); - ASSERT_LIMB (carry); - - multiplier <<= GMP_NAIL_BITS; - for (i = 0; i < size; i++) - { - hi = refmpn_umul_ppmm (&lo, sp[i], multiplier); - lo >>= GMP_NAIL_BITS; - ASSERT_NOCARRY (ref_addc_limb (&hi, hi, ref_addc_limb (&lo, lo, carry))); - rp[i] = lo; - carry = hi; - } - return carry; -} - -mp_limb_t -refmpn_mul_1 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_limb_t multiplier) -{ - return refmpn_mul_1c (rp, sp, size, multiplier, CNST_LIMB(0)); -} - - -mp_limb_t -refmpn_mul_N (mp_ptr dst, mp_srcptr src, mp_size_t size, - mp_srcptr mult, mp_size_t msize) -{ - mp_ptr src_copy; - mp_limb_t ret; - mp_size_t i; - - ASSERT (refmpn_overlap_fullonly_p (dst, src, size)); - ASSERT (! refmpn_overlap_p (dst, size+msize-1, mult, msize)); - ASSERT (size >= msize); - ASSERT_MPN (mult, msize); - - /* in case dst==src */ - src_copy = refmpn_malloc_limbs (size); - refmpn_copyi (src_copy, src, size); - src = src_copy; - - dst[size] = refmpn_mul_1 (dst, src, size, mult[0]); - for (i = 1; i < msize-1; i++) - dst[size+i] = refmpn_addmul_1 (dst+i, src, size, mult[i]); - ret = refmpn_addmul_1 (dst+i, src, size, mult[i]); - - free (src_copy); - return ret; -} - -mp_limb_t -refmpn_mul_2 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_srcptr mult) -{ - return refmpn_mul_N (rp, sp, size, mult, (mp_size_t) 2); -} -mp_limb_t -refmpn_mul_3 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_srcptr mult) -{ - return refmpn_mul_N (rp, sp, size, mult, (mp_size_t) 3); -} -mp_limb_t -refmpn_mul_4 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_srcptr mult) -{ - return refmpn_mul_N (rp, sp, size, mult, (mp_size_t) 4); -} -mp_limb_t -refmpn_mul_5 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_srcptr mult) -{ - return refmpn_mul_N (rp, sp, size, mult, (mp_size_t) 5); -} -mp_limb_t -refmpn_mul_6 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_srcptr mult) -{ - return refmpn_mul_N (rp, sp, size, mult, (mp_size_t) 6); -} - -#define AORSMUL_1C(operation_n) \ - { \ - mp_ptr p; \ - mp_limb_t ret; \ - \ - ASSERT (refmpn_overlap_fullonly_p (rp, sp, size)); \ - \ - p = refmpn_malloc_limbs (size); \ - ret = refmpn_mul_1c (p, sp, size, multiplier, carry); \ - ret += operation_n (rp, rp, p, size); \ - \ - free (p); \ - return ret; \ - } - -mp_limb_t -refmpn_addmul_1c (mp_ptr rp, mp_srcptr sp, mp_size_t size, - mp_limb_t multiplier, mp_limb_t carry) -{ - AORSMUL_1C (refmpn_add_n); -} -mp_limb_t -refmpn_submul_1c (mp_ptr rp, mp_srcptr sp, mp_size_t size, - mp_limb_t multiplier, mp_limb_t carry) -{ - AORSMUL_1C (refmpn_sub_n); -} - - -mp_limb_t -refmpn_addmul_1 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_limb_t multiplier) -{ - return refmpn_addmul_1c (rp, sp, size, multiplier, CNST_LIMB(0)); -} -mp_limb_t -refmpn_submul_1 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_limb_t multiplier) -{ - return refmpn_submul_1c (rp, sp, size, multiplier, CNST_LIMB(0)); -} - - -mp_limb_t -refmpn_addmul_N (mp_ptr dst, mp_srcptr src, mp_size_t size, - mp_srcptr mult, mp_size_t msize) -{ - mp_ptr src_copy; - mp_limb_t ret; - mp_size_t i; - - ASSERT (dst == src || ! refmpn_overlap_p (dst, size+msize-1, src, size)); - ASSERT (! refmpn_overlap_p (dst, size+msize-1, mult, msize)); - ASSERT (size >= msize); - ASSERT_MPN (mult, msize); - - /* in case dst==src */ - src_copy = refmpn_malloc_limbs (size); - refmpn_copyi (src_copy, src, size); - src = src_copy; - - for (i = 0; i < msize-1; i++) - dst[size+i] = refmpn_addmul_1 (dst+i, src, size, mult[i]); - ret = refmpn_addmul_1 (dst+i, src, size, mult[i]); - - free (src_copy); - return ret; -} - -mp_limb_t -refmpn_addmul_2 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_srcptr mult) -{ - return refmpn_addmul_N (rp, sp, size, mult, (mp_size_t) 2); -} -mp_limb_t -refmpn_addmul_3 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_srcptr mult) -{ - return refmpn_addmul_N (rp, sp, size, mult, (mp_size_t) 3); -} -mp_limb_t -refmpn_addmul_4 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_srcptr mult) -{ - return refmpn_addmul_N (rp, sp, size, mult, (mp_size_t) 4); -} -mp_limb_t -refmpn_addmul_5 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_srcptr mult) -{ - return refmpn_addmul_N (rp, sp, size, mult, (mp_size_t) 5); -} -mp_limb_t -refmpn_addmul_6 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_srcptr mult) -{ - return refmpn_addmul_N (rp, sp, size, mult, (mp_size_t) 6); -} -mp_limb_t -refmpn_addmul_7 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_srcptr mult) -{ - return refmpn_addmul_N (rp, sp, size, mult, (mp_size_t) 7); -} -mp_limb_t -refmpn_addmul_8 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_srcptr mult) -{ - return refmpn_addmul_N (rp, sp, size, mult, (mp_size_t) 8); -} - -mp_limb_t -refmpn_add_n_sub_nc (mp_ptr r1p, mp_ptr r2p, - mp_srcptr s1p, mp_srcptr s2p, mp_size_t size, - mp_limb_t carry) -{ - mp_ptr p; - mp_limb_t acy, scy; - - /* Destinations can't overlap. */ - ASSERT (! refmpn_overlap_p (r1p, size, r2p, size)); - ASSERT (refmpn_overlap_fullonly_two_p (r1p, s1p, s2p, size)); - ASSERT (refmpn_overlap_fullonly_two_p (r2p, s1p, s2p, size)); - ASSERT (size >= 1); - - /* in case r1p==s1p or r1p==s2p */ - p = refmpn_malloc_limbs (size); - - acy = refmpn_add_nc (p, s1p, s2p, size, carry >> 1); - scy = refmpn_sub_nc (r2p, s1p, s2p, size, carry & 1); - refmpn_copyi (r1p, p, size); - - free (p); - return 2 * acy + scy; -} - -mp_limb_t -refmpn_add_n_sub_n (mp_ptr r1p, mp_ptr r2p, - mp_srcptr s1p, mp_srcptr s2p, mp_size_t size) -{ - return refmpn_add_n_sub_nc (r1p, r2p, s1p, s2p, size, CNST_LIMB(0)); -} - - -/* Right shift hi,lo and return the low limb of the result. - Note a shift by GMP_LIMB_BITS isn't assumed to work (doesn't on x86). */ -mp_limb_t -rshift_make (mp_limb_t hi, mp_limb_t lo, unsigned shift) -{ - ASSERT (shift < GMP_NUMB_BITS); - if (shift == 0) - return lo; - else - return ((hi << (GMP_NUMB_BITS-shift)) | (lo >> shift)) & GMP_NUMB_MASK; -} - -/* Left shift hi,lo and return the high limb of the result. - Note a shift by GMP_LIMB_BITS isn't assumed to work (doesn't on x86). */ -mp_limb_t -lshift_make (mp_limb_t hi, mp_limb_t lo, unsigned shift) -{ - ASSERT (shift < GMP_NUMB_BITS); - if (shift == 0) - return hi; - else - return ((hi << shift) | (lo >> (GMP_NUMB_BITS-shift))) & GMP_NUMB_MASK; -} - - -mp_limb_t -refmpn_rshift (mp_ptr rp, mp_srcptr sp, mp_size_t size, unsigned shift) -{ - mp_limb_t ret; - mp_size_t i; - - ASSERT (refmpn_overlap_low_to_high_p (rp, sp, size)); - ASSERT (size >= 1); - ASSERT (shift >= 1 && shift < GMP_NUMB_BITS); - ASSERT_MPN (sp, size); - - ret = rshift_make (sp[0], CNST_LIMB(0), shift); - - for (i = 0; i < size-1; i++) - rp[i] = rshift_make (sp[i+1], sp[i], shift); - - rp[i] = rshift_make (CNST_LIMB(0), sp[i], shift); - return ret; -} - -mp_limb_t -refmpn_lshift (mp_ptr rp, mp_srcptr sp, mp_size_t size, unsigned shift) -{ - mp_limb_t ret; - mp_size_t i; - - ASSERT (refmpn_overlap_high_to_low_p (rp, sp, size)); - ASSERT (size >= 1); - ASSERT (shift >= 1 && shift < GMP_NUMB_BITS); - ASSERT_MPN (sp, size); - - ret = lshift_make (CNST_LIMB(0), sp[size-1], shift); - - for (i = size-2; i >= 0; i--) - rp[i+1] = lshift_make (sp[i+1], sp[i], shift); - - rp[i+1] = lshift_make (sp[i+1], CNST_LIMB(0), shift); - return ret; -} - -void -refmpn_com (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ - mp_size_t i; - - /* We work downwards since mpn_lshiftc needs that. */ - ASSERT (refmpn_overlap_high_to_low_p (rp, sp, size)); - - for (i = size - 1; i >= 0; i--) - rp[i] = (~sp[i]) & GMP_NUMB_MASK; -} - -mp_limb_t -refmpn_lshiftc (mp_ptr rp, mp_srcptr sp, mp_size_t size, unsigned shift) -{ - mp_limb_t res; - - /* No asserts here, refmpn_lshift will assert what we need. */ - - res = refmpn_lshift (rp, sp, size, shift); - refmpn_com (rp, rp, size); - return res; -} - -/* accepting shift==0 and doing a plain copyi or copyd in that case */ -mp_limb_t -refmpn_rshift_or_copy (mp_ptr rp, mp_srcptr sp, mp_size_t size, unsigned shift) -{ - if (shift == 0) - { - refmpn_copyi (rp, sp, size); - return 0; - } - else - { - return refmpn_rshift (rp, sp, size, shift); - } -} -mp_limb_t -refmpn_lshift_or_copy (mp_ptr rp, mp_srcptr sp, mp_size_t size, unsigned shift) -{ - if (shift == 0) - { - refmpn_copyd (rp, sp, size); - return 0; - } - else - { - return refmpn_lshift (rp, sp, size, shift); - } -} - -/* accepting size==0 too */ -mp_limb_t -refmpn_rshift_or_copy_any (mp_ptr rp, mp_srcptr sp, mp_size_t size, - unsigned shift) -{ - return (size == 0 ? 0 : refmpn_rshift_or_copy (rp, sp, size, shift)); -} -mp_limb_t -refmpn_lshift_or_copy_any (mp_ptr rp, mp_srcptr sp, mp_size_t size, - unsigned shift) -{ - return (size == 0 ? 0 : refmpn_lshift_or_copy (rp, sp, size, shift)); -} - -/* Divide h,l by d, return quotient, store remainder to *rp. - Operates on full limbs, not nails. - Must have h < d. - __udiv_qrnnd_c isn't simple, and it's a bit slow, but it works. */ -mp_limb_t -refmpn_udiv_qrnnd (mp_limb_t *rp, mp_limb_t h, mp_limb_t l, mp_limb_t d) -{ - mp_limb_t q, r; - int n; - - ASSERT (d != 0); - ASSERT (h < d); - -#if 0 - udiv_qrnnd (q, r, h, l, d); - *rp = r; - return q; -#endif - - n = refmpn_count_leading_zeros (d); - d <<= n; - - if (n != 0) - { - h = (h << n) | (l >> (GMP_LIMB_BITS - n)); - l <<= n; - } - - __udiv_qrnnd_c (q, r, h, l, d); - r >>= n; - *rp = r; - return q; -} - -mp_limb_t -refmpn_udiv_qrnnd_r (mp_limb_t h, mp_limb_t l, mp_limb_t d, mp_limb_t *rp) -{ - return refmpn_udiv_qrnnd (rp, h, l, d); -} - -/* This little subroutine avoids some bad code generation from i386 gcc 3.0 - -fPIC -O2 -fomit-frame-pointer (%ebp being used uninitialized). */ -static mp_limb_t -refmpn_divmod_1c_workaround (mp_ptr rp, mp_srcptr sp, mp_size_t size, - mp_limb_t divisor, mp_limb_t carry) -{ - mp_size_t i; - mp_limb_t rem[1]; - for (i = size-1; i >= 0; i--) - { - rp[i] = refmpn_udiv_qrnnd (rem, carry, - sp[i] << GMP_NAIL_BITS, - divisor << GMP_NAIL_BITS); - carry = *rem >> GMP_NAIL_BITS; - } - return carry; -} - -mp_limb_t -refmpn_divmod_1c (mp_ptr rp, mp_srcptr sp, mp_size_t size, - mp_limb_t divisor, mp_limb_t carry) -{ - mp_ptr sp_orig; - mp_ptr prod; - mp_limb_t carry_orig; - - ASSERT (refmpn_overlap_fullonly_p (rp, sp, size)); - ASSERT (size >= 0); - ASSERT (carry < divisor); - ASSERT_MPN (sp, size); - ASSERT_LIMB (divisor); - ASSERT_LIMB (carry); - - if (size == 0) - return carry; - - sp_orig = refmpn_memdup_limbs (sp, size); - prod = refmpn_malloc_limbs (size); - carry_orig = carry; - - carry = refmpn_divmod_1c_workaround (rp, sp, size, divisor, carry); - - /* check by multiplying back */ -#if 0 - printf ("size=%ld divisor=0x%lX carry=0x%lX remainder=0x%lX\n", - size, divisor, carry_orig, carry); - mpn_trace("s",sp_copy,size); - mpn_trace("r",rp,size); - printf ("mul_1c %lX\n", refmpn_mul_1c (prod, rp, size, divisor, carry)); - mpn_trace("p",prod,size); -#endif - ASSERT (refmpn_mul_1c (prod, rp, size, divisor, carry) == carry_orig); - ASSERT (refmpn_cmp (prod, sp_orig, size) == 0); - free (sp_orig); - free (prod); - - return carry; -} - -mp_limb_t -refmpn_divmod_1 (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_limb_t divisor) -{ - return refmpn_divmod_1c (rp, sp, size, divisor, CNST_LIMB(0)); -} - - -mp_limb_t -refmpn_mod_1c (mp_srcptr sp, mp_size_t size, mp_limb_t divisor, - mp_limb_t carry) -{ - mp_ptr p = refmpn_malloc_limbs (size); - carry = refmpn_divmod_1c (p, sp, size, divisor, carry); - free (p); - return carry; -} - -mp_limb_t -refmpn_mod_1 (mp_srcptr sp, mp_size_t size, mp_limb_t divisor) -{ - return refmpn_mod_1c (sp, size, divisor, CNST_LIMB(0)); -} - -mp_limb_t -refmpn_preinv_mod_1 (mp_srcptr sp, mp_size_t size, mp_limb_t divisor, - mp_limb_t inverse) -{ - ASSERT (divisor & GMP_NUMB_HIGHBIT); - ASSERT (inverse == refmpn_invert_limb (divisor)); - return refmpn_mod_1 (sp, size, divisor); -} - -/* This implementation will be rather slow, but has the advantage of being - in a different style than the libgmp versions. */ -mp_limb_t -refmpn_mod_34lsub1 (mp_srcptr p, mp_size_t n) -{ - ASSERT ((GMP_NUMB_BITS % 4) == 0); - return mpn_mod_1 (p, n, (CNST_LIMB(1) << (3 * GMP_NUMB_BITS / 4)) - 1); -} - - -mp_limb_t -refmpn_divrem_1c (mp_ptr rp, mp_size_t xsize, - mp_srcptr sp, mp_size_t size, mp_limb_t divisor, - mp_limb_t carry) -{ - mp_ptr z; - - z = refmpn_malloc_limbs (xsize); - refmpn_fill (z, xsize, CNST_LIMB(0)); - - carry = refmpn_divmod_1c (rp+xsize, sp, size, divisor, carry); - carry = refmpn_divmod_1c (rp, z, xsize, divisor, carry); - - free (z); - return carry; -} - -mp_limb_t -refmpn_divrem_1 (mp_ptr rp, mp_size_t xsize, - mp_srcptr sp, mp_size_t size, mp_limb_t divisor) -{ - return refmpn_divrem_1c (rp, xsize, sp, size, divisor, CNST_LIMB(0)); -} - -mp_limb_t -refmpn_preinv_divrem_1 (mp_ptr rp, mp_size_t xsize, - mp_srcptr sp, mp_size_t size, - mp_limb_t divisor, mp_limb_t inverse, unsigned shift) -{ - ASSERT (size >= 0); - ASSERT (shift == refmpn_count_leading_zeros (divisor)); - ASSERT (inverse == refmpn_invert_limb (divisor << shift)); - - return refmpn_divrem_1 (rp, xsize, sp, size, divisor); -} - -mp_limb_t -refmpn_divrem_2 (mp_ptr qp, mp_size_t qxn, - mp_ptr np, mp_size_t nn, - mp_srcptr dp) -{ - mp_ptr tp; - mp_limb_t qh; - - tp = refmpn_malloc_limbs (nn + qxn); - refmpn_zero (tp, qxn); - refmpn_copyi (tp + qxn, np, nn); - qh = refmpn_sb_div_qr (qp, tp, nn + qxn, dp, 2); - refmpn_copyi (np, tp, 2); - free (tp); - return qh; -} - -/* Inverse is floor((b*(b-d)-1) / d), per division by invariant integers - paper, figure 8.1 m', where b=2^GMP_LIMB_BITS. Note that -d-1 < d - since d has the high bit set. */ - -mp_limb_t -refmpn_invert_limb (mp_limb_t d) -{ - mp_limb_t r; - ASSERT (d & GMP_LIMB_HIGHBIT); - return refmpn_udiv_qrnnd (&r, -d-1, MP_LIMB_T_MAX, d); -} - -void -refmpn_invert (mp_ptr rp, mp_srcptr up, mp_size_t n, mp_ptr scratch) -{ - mp_ptr qp, tp; - TMP_DECL; - TMP_MARK; - - tp = TMP_ALLOC_LIMBS (2 * n); - qp = TMP_ALLOC_LIMBS (n + 1); - - MPN_ZERO (tp, 2 * n); mpn_sub_1 (tp, tp, 2 * n, 1); - - refmpn_tdiv_qr (qp, rp, 0, tp, 2 * n, up, n); - refmpn_copyi (rp, qp, n); - - TMP_FREE; -} - -void -refmpn_binvert (mp_ptr rp, mp_srcptr up, mp_size_t n, mp_ptr scratch) -{ - mp_ptr tp; - mp_limb_t binv; - TMP_DECL; - TMP_MARK; - - /* We use the library mpn_sbpi1_bdiv_q here, which isn't kosher in testing - code. To make up for it, we check that the inverse is correct using a - multiply. */ - - tp = TMP_ALLOC_LIMBS (2 * n); - - MPN_ZERO (tp, n); - tp[0] = 1; - binvert_limb (binv, up[0]); - mpn_sbpi1_bdiv_q (rp, tp, n, up, n, -binv); - - refmpn_mul_n (tp, rp, up, n); - ASSERT_ALWAYS (tp[0] == 1 && mpn_zero_p (tp + 1, n - 1)); - - TMP_FREE; -} - -/* The aim is to produce a dst quotient and return a remainder c, satisfying - c*b^n + src-i == 3*dst, where i is the incoming carry. - - Some value c==0, c==1 or c==2 will satisfy, so just try each. - - If GMP_NUMB_BITS is even then 2^GMP_NUMB_BITS==1mod3 and a non-zero - remainder from the first division attempt determines the correct - remainder (3-c), but don't bother with that, since we can't guarantee - anything about GMP_NUMB_BITS when using nails. - - If the initial src-i produces a borrow then refmpn_sub_1 leaves a twos - complement negative, ie. b^n+a-i, and the calculation produces c1 - satisfying c1*b^n + b^n+src-i == 3*dst, from which clearly c=c1+1. This - means it's enough to just add any borrow back at the end. - - A borrow only occurs when a==0 or a==1, and, by the same reasoning as in - mpn/generic/diveby3.c, the c1 that results in those cases will only be 0 - or 1 respectively, so with 1 added the final return value is still in the - prescribed range 0 to 2. */ - -mp_limb_t -refmpn_divexact_by3c (mp_ptr rp, mp_srcptr sp, mp_size_t size, mp_limb_t carry) -{ - mp_ptr spcopy; - mp_limb_t c, cs; - - ASSERT (refmpn_overlap_fullonly_p (rp, sp, size)); - ASSERT (size >= 1); - ASSERT (carry <= 2); - ASSERT_MPN (sp, size); - - spcopy = refmpn_malloc_limbs (size); - cs = refmpn_sub_1 (spcopy, sp, size, carry); - - for (c = 0; c <= 2; c++) - if (refmpn_divmod_1c (rp, spcopy, size, CNST_LIMB(3), c) == 0) - goto done; - ASSERT_FAIL (no value of c satisfies); - - done: - c += cs; - ASSERT (c <= 2); - - free (spcopy); - return c; -} - -mp_limb_t -refmpn_divexact_by3 (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ - return refmpn_divexact_by3c (rp, sp, size, CNST_LIMB(0)); -} - - -/* The same as mpn/generic/mul_basecase.c, but using refmpn functions. */ -void -refmpn_mul_basecase (mp_ptr prodp, - mp_srcptr up, mp_size_t usize, - mp_srcptr vp, mp_size_t vsize) -{ - mp_size_t i; - - ASSERT (! refmpn_overlap_p (prodp, usize+vsize, up, usize)); - ASSERT (! refmpn_overlap_p (prodp, usize+vsize, vp, vsize)); - ASSERT (usize >= vsize); - ASSERT (vsize >= 1); - ASSERT_MPN (up, usize); - ASSERT_MPN (vp, vsize); - - prodp[usize] = refmpn_mul_1 (prodp, up, usize, vp[0]); - for (i = 1; i < vsize; i++) - prodp[usize+i] = refmpn_addmul_1 (prodp+i, up, usize, vp[i]); -} - - -/* The same as mpn/generic/mulmid_basecase.c, but using refmpn functions. */ -void -refmpn_mulmid_basecase (mp_ptr rp, - mp_srcptr up, mp_size_t un, - mp_srcptr vp, mp_size_t vn) -{ - mp_limb_t cy; - mp_size_t i; - - ASSERT (un >= vn); - ASSERT (vn >= 1); - ASSERT (! refmpn_overlap_p (rp, un - vn + 3, up, un)); - ASSERT (! refmpn_overlap_p (rp, un - vn + 3, vp, vn)); - ASSERT_MPN (up, un); - ASSERT_MPN (vp, vn); - - rp[un - vn + 1] = refmpn_mul_1 (rp, up + vn - 1, un - vn + 1, vp[0]); - rp[un - vn + 2] = CNST_LIMB (0); - for (i = 1; i < vn; i++) - { - cy = refmpn_addmul_1 (rp, up + vn - i - 1, un - vn + 1, vp[i]); - cy = ref_addc_limb (&rp[un - vn + 1], rp[un - vn + 1], cy); - cy = ref_addc_limb (&rp[un - vn + 2], rp[un - vn + 2], cy); - ASSERT (cy == 0); - } -} - -void -refmpn_toom42_mulmid (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n, - mp_ptr scratch) -{ - refmpn_mulmid_basecase (rp, up, 2*n - 1, vp, n); -} - -void -refmpn_mulmid_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) -{ - /* FIXME: this could be made faster by using refmpn_mul and then subtracting - off products near the middle product region boundary */ - refmpn_mulmid_basecase (rp, up, 2*n - 1, vp, n); -} - -void -refmpn_mulmid (mp_ptr rp, mp_srcptr up, mp_size_t un, - mp_srcptr vp, mp_size_t vn) -{ - /* FIXME: this could be made faster by using refmpn_mul and then subtracting - off products near the middle product region boundary */ - refmpn_mulmid_basecase (rp, up, un, vp, vn); -} - - - -#define TOOM3_THRESHOLD (MAX (MUL_TOOM33_THRESHOLD, SQR_TOOM3_THRESHOLD)) -#define TOOM4_THRESHOLD (MAX (MUL_TOOM44_THRESHOLD, SQR_TOOM4_THRESHOLD)) -#define TOOM6_THRESHOLD (MAX (MUL_TOOM6H_THRESHOLD, SQR_TOOM6_THRESHOLD)) -#if WANT_FFT -#define FFT_THRESHOLD (MAX (MUL_FFT_THRESHOLD, SQR_FFT_THRESHOLD)) -#else -#define FFT_THRESHOLD MP_SIZE_T_MAX /* don't use toom44 here */ -#endif - -void -refmpn_mul (mp_ptr wp, mp_srcptr up, mp_size_t un, mp_srcptr vp, mp_size_t vn) -{ - mp_ptr tp, rp; - mp_size_t tn; - - if (vn < TOOM3_THRESHOLD) - { - /* In the mpn_mul_basecase and toom2 ranges, use our own mul_basecase. */ - if (vn != 0) - refmpn_mul_basecase (wp, up, un, vp, vn); - else - MPN_ZERO (wp, un); - return; - } - - MPN_ZERO (wp, vn); - rp = refmpn_malloc_limbs (2 * vn); - - if (vn < TOOM4_THRESHOLD) - tn = mpn_toom22_mul_itch (vn, vn); - else if (vn < TOOM6_THRESHOLD) - tn = mpn_toom33_mul_itch (vn, vn); - else if (vn < FFT_THRESHOLD) - tn = mpn_toom44_mul_itch (vn, vn); - else - tn = mpn_toom6h_mul_itch (vn, vn); - tp = refmpn_malloc_limbs (tn); - - while (un >= vn) - { - if (vn < TOOM4_THRESHOLD) - /* In the toom3 range, use mpn_toom22_mul. */ - mpn_toom22_mul (rp, up, vn, vp, vn, tp); - else if (vn < TOOM6_THRESHOLD) - /* In the toom4 range, use mpn_toom33_mul. */ - mpn_toom33_mul (rp, up, vn, vp, vn, tp); - else if (vn < FFT_THRESHOLD) - /* In the toom6 range, use mpn_toom44_mul. */ - mpn_toom44_mul (rp, up, vn, vp, vn, tp); - else - /* For the largest operands, use mpn_toom6h_mul. */ - mpn_toom6h_mul (rp, up, vn, vp, vn, tp); - - ASSERT_NOCARRY (refmpn_add (wp, rp, 2 * vn, wp, vn)); - wp += vn; - - up += vn; - un -= vn; - } - - free (tp); - - if (un != 0) - { - refmpn_mul (rp, vp, vn, up, un); - ASSERT_NOCARRY (refmpn_add (wp, rp, un + vn, wp, vn)); - } - free (rp); -} - -void -refmpn_mul_n (mp_ptr prodp, mp_srcptr up, mp_srcptr vp, mp_size_t size) -{ - refmpn_mul (prodp, up, size, vp, size); -} - -void -refmpn_mullo_n (mp_ptr prodp, mp_srcptr up, mp_srcptr vp, mp_size_t size) -{ - mp_ptr tp = refmpn_malloc_limbs (2*size); - refmpn_mul (tp, up, size, vp, size); - refmpn_copyi (prodp, tp, size); - free (tp); -} - -void -refmpn_sqr (mp_ptr dst, mp_srcptr src, mp_size_t size) -{ - refmpn_mul (dst, src, size, src, size); -} - -void -refmpn_sqrlo (mp_ptr dst, mp_srcptr src, mp_size_t size) -{ - refmpn_mullo_n (dst, src, src, size); -} - -/* Allowing usize<vsize, usize==0 or vsize==0. */ -void -refmpn_mul_any (mp_ptr prodp, - mp_srcptr up, mp_size_t usize, - mp_srcptr vp, mp_size_t vsize) -{ - ASSERT (! refmpn_overlap_p (prodp, usize+vsize, up, usize)); - ASSERT (! refmpn_overlap_p (prodp, usize+vsize, vp, vsize)); - ASSERT (usize >= 0); - ASSERT (vsize >= 0); - ASSERT_MPN (up, usize); - ASSERT_MPN (vp, vsize); - - if (usize == 0) - { - refmpn_fill (prodp, vsize, CNST_LIMB(0)); - return; - } - - if (vsize == 0) - { - refmpn_fill (prodp, usize, CNST_LIMB(0)); - return; - } - - if (usize >= vsize) - refmpn_mul (prodp, up, usize, vp, vsize); - else - refmpn_mul (prodp, vp, vsize, up, usize); -} - - -mp_limb_t -refmpn_gcd_1 (mp_srcptr xp, mp_size_t xsize, mp_limb_t y) -{ - mp_limb_t x; - int twos; - - ASSERT (y != 0); - ASSERT (! refmpn_zero_p (xp, xsize)); - ASSERT_MPN (xp, xsize); - ASSERT_LIMB (y); - - x = refmpn_mod_1 (xp, xsize, y); - if (x == 0) - return y; - - twos = 0; - while ((x & 1) == 0 && (y & 1) == 0) - { - x >>= 1; - y >>= 1; - twos++; - } - - for (;;) - { - while ((x & 1) == 0) x >>= 1; - while ((y & 1) == 0) y >>= 1; - - if (x < y) - MP_LIMB_T_SWAP (x, y); - - x -= y; - if (x == 0) - break; - } - - return y << twos; -} - - -/* Based on the full limb x, not nails. */ -unsigned -refmpn_count_leading_zeros (mp_limb_t x) -{ - unsigned n = 0; - - ASSERT (x != 0); - - while ((x & GMP_LIMB_HIGHBIT) == 0) - { - x <<= 1; - n++; - } - return n; -} - -/* Full limbs allowed, not limited to nails. */ -unsigned -refmpn_count_trailing_zeros (mp_limb_t x) -{ - unsigned n = 0; - - ASSERT (x != 0); - ASSERT_LIMB (x); - - while ((x & 1) == 0) - { - x >>= 1; - n++; - } - return n; -} - -/* Strip factors of two (low zero bits) from {p,size} by right shifting. - The return value is the number of twos stripped. */ -mp_size_t -refmpn_strip_twos (mp_ptr p, mp_size_t size) -{ - mp_size_t limbs; - unsigned shift; - - ASSERT (size >= 1); - ASSERT (! refmpn_zero_p (p, size)); - ASSERT_MPN (p, size); - - for (limbs = 0; p[0] == 0; limbs++) - { - refmpn_copyi (p, p+1, size-1); - p[size-1] = 0; - } - - shift = refmpn_count_trailing_zeros (p[0]); - if (shift) - refmpn_rshift (p, p, size, shift); - - return limbs*GMP_NUMB_BITS + shift; -} - -mp_limb_t -refmpn_gcd (mp_ptr gp, mp_ptr xp, mp_size_t xsize, mp_ptr yp, mp_size_t ysize) -{ - int cmp; - - ASSERT (ysize >= 1); - ASSERT (xsize >= ysize); - ASSERT ((xp[0] & 1) != 0); - ASSERT ((yp[0] & 1) != 0); - /* ASSERT (xp[xsize-1] != 0); */ /* don't think x needs to be odd */ - ASSERT (yp[ysize-1] != 0); - ASSERT (refmpn_overlap_fullonly_p (gp, xp, xsize)); - ASSERT (refmpn_overlap_fullonly_p (gp, yp, ysize)); - ASSERT (! refmpn_overlap_p (xp, xsize, yp, ysize)); - if (xsize == ysize) - ASSERT (refmpn_msbone (xp[xsize-1]) >= refmpn_msbone (yp[ysize-1])); - ASSERT_MPN (xp, xsize); - ASSERT_MPN (yp, ysize); - - refmpn_strip_twos (xp, xsize); - MPN_NORMALIZE (xp, xsize); - MPN_NORMALIZE (yp, ysize); - - for (;;) - { - cmp = refmpn_cmp_twosizes (xp, xsize, yp, ysize); - if (cmp == 0) - break; - if (cmp < 0) - MPN_PTR_SWAP (xp,xsize, yp,ysize); - - ASSERT_NOCARRY (refmpn_sub (xp, xp, xsize, yp, ysize)); - - refmpn_strip_twos (xp, xsize); - MPN_NORMALIZE (xp, xsize); - } - - refmpn_copyi (gp, xp, xsize); - return xsize; -} - -unsigned long -ref_popc_limb (mp_limb_t src) -{ - unsigned long count; - int i; - - count = 0; - for (i = 0; i < GMP_LIMB_BITS; i++) - { - count += (src & 1); - src >>= 1; - } - return count; -} - -unsigned long -refmpn_popcount (mp_srcptr sp, mp_size_t size) -{ - unsigned long count = 0; - mp_size_t i; - - ASSERT (size >= 0); - ASSERT_MPN (sp, size); - - for (i = 0; i < size; i++) - count += ref_popc_limb (sp[i]); - return count; -} - -unsigned long -refmpn_hamdist (mp_srcptr s1p, mp_srcptr s2p, mp_size_t size) -{ - mp_ptr d; - unsigned long count; - - ASSERT (size >= 0); - ASSERT_MPN (s1p, size); - ASSERT_MPN (s2p, size); - - if (size == 0) - return 0; - - d = refmpn_malloc_limbs (size); - refmpn_xor_n (d, s1p, s2p, size); - count = refmpn_popcount (d, size); - free (d); - return count; -} - - -/* set r to a%d */ -void -refmpn_mod2 (mp_limb_t r[2], const mp_limb_t a[2], const mp_limb_t d[2]) -{ - mp_limb_t D[2]; - int n; - - ASSERT (! refmpn_overlap_p (r, (mp_size_t) 2, d, (mp_size_t) 2)); - ASSERT_MPN (a, 2); - ASSERT_MPN (d, 2); - - D[1] = d[1], D[0] = d[0]; - r[1] = a[1], r[0] = a[0]; - n = 0; - - for (;;) - { - if (D[1] & GMP_NUMB_HIGHBIT) - break; - if (refmpn_cmp (r, D, (mp_size_t) 2) <= 0) - break; - refmpn_lshift (D, D, (mp_size_t) 2, 1); - n++; - ASSERT (n <= GMP_NUMB_BITS); - } - - while (n >= 0) - { - if (refmpn_cmp (r, D, (mp_size_t) 2) >= 0) - ASSERT_NOCARRY (refmpn_sub_n (r, r, D, (mp_size_t) 2)); - refmpn_rshift (D, D, (mp_size_t) 2, 1); - n--; - } - - ASSERT (refmpn_cmp (r, d, (mp_size_t) 2) < 0); -} - - - -/* Similar to the old mpn/generic/sb_divrem_mn.c, but somewhat simplified, in - particular the trial quotient is allowed to be 2 too big. */ -mp_limb_t -refmpn_sb_div_qr (mp_ptr qp, - mp_ptr np, mp_size_t nsize, - mp_srcptr dp, mp_size_t dsize) -{ - mp_limb_t retval = 0; - mp_size_t i; - mp_limb_t d1 = dp[dsize-1]; - mp_ptr np_orig = refmpn_memdup_limbs (np, nsize); - - ASSERT (nsize >= dsize); - /* ASSERT (dsize > 2); */ - ASSERT (dsize >= 2); - ASSERT (dp[dsize-1] & GMP_NUMB_HIGHBIT); - ASSERT (! refmpn_overlap_p (qp, nsize-dsize, np, nsize) || qp+dsize >= np); - ASSERT_MPN (np, nsize); - ASSERT_MPN (dp, dsize); - - i = nsize-dsize; - if (refmpn_cmp (np+i, dp, dsize) >= 0) - { - ASSERT_NOCARRY (refmpn_sub_n (np+i, np+i, dp, dsize)); - retval = 1; - } - - for (i--; i >= 0; i--) - { - mp_limb_t n0 = np[i+dsize]; - mp_limb_t n1 = np[i+dsize-1]; - mp_limb_t q, dummy_r; - - ASSERT (n0 <= d1); - if (n0 == d1) - q = GMP_NUMB_MAX; - else - q = refmpn_udiv_qrnnd (&dummy_r, n0, n1 << GMP_NAIL_BITS, - d1 << GMP_NAIL_BITS); - - n0 -= refmpn_submul_1 (np+i, dp, dsize, q); - ASSERT (n0 == 0 || n0 == MP_LIMB_T_MAX); - if (n0) - { - q--; - if (! refmpn_add_n (np+i, np+i, dp, dsize)) - { - q--; - ASSERT_CARRY (refmpn_add_n (np+i, np+i, dp, dsize)); - } - } - np[i+dsize] = 0; - - qp[i] = q; - } - - /* remainder < divisor */ -#if 0 /* ASSERT triggers gcc 4.2.1 bug */ - ASSERT (refmpn_cmp (np, dp, dsize) < 0); -#endif - - /* multiply back to original */ - { - mp_ptr mp = refmpn_malloc_limbs (nsize); - - refmpn_mul_any (mp, qp, nsize-dsize, dp, dsize); - if (retval) - ASSERT_NOCARRY (refmpn_add_n (mp+nsize-dsize,mp+nsize-dsize, dp, dsize)); - ASSERT_NOCARRY (refmpn_add (mp, mp, nsize, np, dsize)); - ASSERT (refmpn_cmp (mp, np_orig, nsize) == 0); - - free (mp); - } - - free (np_orig); - return retval; -} - -/* Similar to the old mpn/generic/sb_divrem_mn.c, but somewhat simplified, in - particular the trial quotient is allowed to be 2 too big. */ -void -refmpn_tdiv_qr (mp_ptr qp, mp_ptr rp, mp_size_t qxn, - mp_ptr np, mp_size_t nsize, - mp_srcptr dp, mp_size_t dsize) -{ - ASSERT (qxn == 0); - ASSERT_MPN (np, nsize); - ASSERT_MPN (dp, dsize); - ASSERT (dsize > 0); - ASSERT (dp[dsize-1] != 0); - - if (dsize == 1) - { - rp[0] = refmpn_divmod_1 (qp, np, nsize, dp[0]); - return; - } - else - { - mp_ptr n2p = refmpn_malloc_limbs (nsize+1); - mp_ptr d2p = refmpn_malloc_limbs (dsize); - int norm = refmpn_count_leading_zeros (dp[dsize-1]) - GMP_NAIL_BITS; - - n2p[nsize] = refmpn_lshift_or_copy (n2p, np, nsize, norm); - ASSERT_NOCARRY (refmpn_lshift_or_copy (d2p, dp, dsize, norm)); - - refmpn_sb_div_qr (qp, n2p, nsize+1, d2p, dsize); - refmpn_rshift_or_copy (rp, n2p, dsize, norm); - - /* ASSERT (refmpn_zero_p (tp+dsize, nsize-dsize)); */ - free (n2p); - free (d2p); - } -} - -mp_limb_t -refmpn_redc_1 (mp_ptr rp, mp_ptr up, mp_srcptr mp, mp_size_t n, mp_limb_t invm) -{ - mp_size_t j; - mp_limb_t cy; - - ASSERT_MPN (up, 2*n); - /* ASSERT about directed overlap rp, up */ - /* ASSERT about overlap rp, mp */ - /* ASSERT about overlap up, mp */ - - for (j = n - 1; j >= 0; j--) - { - up[0] = refmpn_addmul_1 (up, mp, n, (up[0] * invm) & GMP_NUMB_MASK); - up++; - } - cy = mpn_add_n (rp, up, up - n, n); - return cy; -} - -size_t -refmpn_get_str (unsigned char *dst, int base, mp_ptr src, mp_size_t size) -{ - unsigned char *d; - size_t dsize; - - ASSERT (size >= 0); - ASSERT (base >= 2); - ASSERT (base < numberof (mp_bases)); - ASSERT (size == 0 || src[size-1] != 0); - ASSERT_MPN (src, size); - - MPN_SIZEINBASE (dsize, src, size, base); - ASSERT (dsize >= 1); - ASSERT (! byte_overlap_p (dst, (mp_size_t) dsize, src, size * GMP_LIMB_BYTES)); - - if (size == 0) - { - dst[0] = 0; - return 1; - } - - /* don't clobber input for power of 2 bases */ - if (POW2_P (base)) - src = refmpn_memdup_limbs (src, size); - - d = dst + dsize; - do - { - d--; - ASSERT (d >= dst); - *d = refmpn_divrem_1 (src, (mp_size_t) 0, src, size, (mp_limb_t) base); - size -= (src[size-1] == 0); - } - while (size != 0); - - /* Move result back and decrement dsize if we didn't generate - the maximum possible digits. */ - if (d != dst) - { - size_t i; - dsize -= d - dst; - for (i = 0; i < dsize; i++) - dst[i] = d[i]; - } - - if (POW2_P (base)) - free (src); - - return dsize; -} - - -mp_limb_t -ref_bswap_limb (mp_limb_t src) -{ - mp_limb_t dst; - int i; - - dst = 0; - for (i = 0; i < GMP_LIMB_BYTES; i++) - { - dst = (dst << 8) + (src & 0xFF); - src >>= 8; - } - return dst; -} - - -/* These random functions are mostly for transitional purposes while adding - nail support, since they're independent of the normal mpn routines. They - can probably be removed when those normal routines are reliable, though - perhaps something independent would still be useful at times. */ - -#if GMP_LIMB_BITS == 32 -#define RAND_A CNST_LIMB(0x29CF535) -#endif -#if GMP_LIMB_BITS == 64 -#define RAND_A CNST_LIMB(0xBAECD515DAF0B49D) -#endif - -mp_limb_t refmpn_random_seed; - -mp_limb_t -refmpn_random_half (void) -{ - refmpn_random_seed = refmpn_random_seed * RAND_A + 1; - return (refmpn_random_seed >> GMP_LIMB_BITS/2); -} - -mp_limb_t -refmpn_random_limb (void) -{ - return ((refmpn_random_half () << (GMP_LIMB_BITS/2)) - | refmpn_random_half ()) & GMP_NUMB_MASK; -} - -void -refmpn_random (mp_ptr ptr, mp_size_t size) -{ - mp_size_t i; - if (GMP_NAIL_BITS == 0) - { - mpn_random (ptr, size); - return; - } - - for (i = 0; i < size; i++) - ptr[i] = refmpn_random_limb (); -} - -void -refmpn_random2 (mp_ptr ptr, mp_size_t size) -{ - mp_size_t i; - mp_limb_t bit, mask, limb; - int run; - - if (GMP_NAIL_BITS == 0) - { - mpn_random2 (ptr, size); - return; - } - -#define RUN_MODULUS 32 - - /* start with ones at a random pos in the high limb */ - bit = CNST_LIMB(1) << (refmpn_random_half () % GMP_NUMB_BITS); - mask = 0; - run = 0; - - for (i = size-1; i >= 0; i--) - { - limb = 0; - do - { - if (run == 0) - { - run = (refmpn_random_half () % RUN_MODULUS) + 1; - mask = ~mask; - } - - limb |= (bit & mask); - bit >>= 1; - run--; - } - while (bit != 0); - - ptr[i] = limb; - bit = GMP_NUMB_HIGHBIT; - } -} - -/* This is a simple bitwise algorithm working high to low across "s" and - testing each time whether setting the bit would make s^2 exceed n. */ -mp_size_t -refmpn_sqrtrem (mp_ptr sp, mp_ptr rp, mp_srcptr np, mp_size_t nsize) -{ - mp_ptr tp, dp; - mp_size_t ssize, talloc, tsize, dsize, ret, ilimbs; - unsigned ibit; - long i; - mp_limb_t c; - - ASSERT (nsize >= 0); - - /* If n==0, then s=0 and r=0. */ - if (nsize == 0) - return 0; - - ASSERT (np[nsize - 1] != 0); - ASSERT (rp == NULL || MPN_SAME_OR_SEPARATE_P (np, rp, nsize)); - ASSERT (rp == NULL || ! MPN_OVERLAP_P (sp, (nsize + 1) / 2, rp, nsize)); - ASSERT (! MPN_OVERLAP_P (sp, (nsize + 1) / 2, np, nsize)); - - /* root */ - ssize = (nsize+1)/2; - refmpn_zero (sp, ssize); - - /* the remainder so far */ - dp = refmpn_memdup_limbs (np, nsize); - dsize = nsize; - - /* temporary */ - talloc = 2*ssize + 1; - tp = refmpn_malloc_limbs (talloc); - - for (i = GMP_NUMB_BITS * ssize - 1; i >= 0; i--) - { - /* t = 2*s*2^i + 2^(2*i), being the amount s^2 will increase by if 2^i - is added to it */ - - ilimbs = (i+1) / GMP_NUMB_BITS; - ibit = (i+1) % GMP_NUMB_BITS; - refmpn_zero (tp, ilimbs); - c = refmpn_lshift_or_copy (tp+ilimbs, sp, ssize, ibit); - tsize = ilimbs + ssize; - tp[tsize] = c; - tsize += (c != 0); - - ilimbs = (2*i) / GMP_NUMB_BITS; - ibit = (2*i) % GMP_NUMB_BITS; - if (ilimbs + 1 > tsize) - { - refmpn_zero_extend (tp, tsize, ilimbs + 1); - tsize = ilimbs + 1; - } - c = refmpn_add_1 (tp+ilimbs, tp+ilimbs, tsize-ilimbs, - CNST_LIMB(1) << ibit); - ASSERT (tsize < talloc); - tp[tsize] = c; - tsize += (c != 0); - - if (refmpn_cmp_twosizes (dp, dsize, tp, tsize) >= 0) - { - /* set this bit in s and subtract from the remainder */ - refmpn_setbit (sp, i); - - ASSERT_NOCARRY (refmpn_sub_n (dp, dp, tp, dsize)); - dsize = refmpn_normalize (dp, dsize); - } - } - - if (rp == NULL) - { - ret = ! refmpn_zero_p (dp, dsize); - } - else - { - ASSERT (dsize == 0 || dp[dsize-1] != 0); - refmpn_copy (rp, dp, dsize); - ret = dsize; - } - - free (dp); - free (tp); - return ret; -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/refmpq.c b/src/plugins/e-acsl/contrib/libgmp/tests/refmpq.c deleted file mode 100644 index 6ca51c4bc51..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/refmpq.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Reference rational routines. - -Copyright 2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -void -refmpq_add (mpq_ptr w, mpq_srcptr x, mpq_srcptr y) -{ - mpz_mul (mpq_numref(w), mpq_numref(x), mpq_denref(y)); - mpz_addmul (mpq_numref(w), mpq_denref(x), mpq_numref(y)); - mpz_mul (mpq_denref(w), mpq_denref(x), mpq_denref(y)); - mpq_canonicalize (w); -} - -void -refmpq_sub (mpq_ptr w, mpq_srcptr x, mpq_srcptr y) -{ - mpz_mul (mpq_numref(w), mpq_numref(x), mpq_denref(y)); - mpz_submul (mpq_numref(w), mpq_denref(x), mpq_numref(y)); - mpz_mul (mpq_denref(w), mpq_denref(x), mpq_denref(y)); - mpq_canonicalize (w); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/refmpz.c b/src/plugins/e-acsl/contrib/libgmp/tests/refmpz.c deleted file mode 100644 index 2aef7aaa87b..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/refmpz.c +++ /dev/null @@ -1,298 +0,0 @@ -/* Reference mpz functions. - -Copyright 1997, 1999-2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -/* always do assertion checking */ -#define WANT_ASSERT 1 - -#include <stdio.h> -#include <stdlib.h> /* for free */ -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" -#include "tests.h" - - -/* Change this to "#define TRACE(x) x" for some traces. */ -#define TRACE(x) - - -/* FIXME: Shouldn't use plain mpz functions in a reference routine. */ -void -refmpz_combit (mpz_ptr r, unsigned long bit) -{ - if (mpz_tstbit (r, bit)) - mpz_clrbit (r, bit); - else - mpz_setbit (r, bit); -} - - -unsigned long -refmpz_hamdist (mpz_srcptr x, mpz_srcptr y) -{ - mp_size_t xsize, ysize, tsize; - mp_ptr xp, yp; - unsigned long ret; - - if ((SIZ(x) < 0 && SIZ(y) >= 0) - || (SIZ(y) < 0 && SIZ(x) >= 0)) - return ULONG_MAX; - - xsize = ABSIZ(x); - ysize = ABSIZ(y); - tsize = MAX (xsize, ysize); - - xp = refmpn_malloc_limbs (tsize); - refmpn_zero (xp, tsize); - refmpn_copy (xp, PTR(x), xsize); - - yp = refmpn_malloc_limbs (tsize); - refmpn_zero (yp, tsize); - refmpn_copy (yp, PTR(y), ysize); - - if (SIZ(x) < 0) - refmpn_neg (xp, xp, tsize); - - if (SIZ(x) < 0) - refmpn_neg (yp, yp, tsize); - - ret = refmpn_hamdist (xp, yp, tsize); - - free (xp); - free (yp); - return ret; -} - - -/* (0/b), with mpz b; is 1 if b=+/-1, 0 otherwise */ -#define JACOBI_0Z(b) JACOBI_0LS (PTR(b)[0], SIZ(b)) - -/* (a/b) effect due to sign of b: mpz/mpz */ -#define JACOBI_BSGN_ZZ_BIT1(a, b) JACOBI_BSGN_SS_BIT1 (SIZ(a), SIZ(b)) - -/* (a/b) effect due to sign of a: mpz/unsigned-mpz, b odd; - is (-1/b) if a<0, or +1 if a>=0 */ -#define JACOBI_ASGN_ZZU_BIT1(a, b) JACOBI_ASGN_SU_BIT1 (SIZ(a), PTR(b)[0]) - -int -refmpz_kronecker (mpz_srcptr a_orig, mpz_srcptr b_orig) -{ - unsigned long twos; - mpz_t a, b; - int result_bit1 = 0; - - if (mpz_sgn (b_orig) == 0) - return JACOBI_Z0 (a_orig); /* (a/0) */ - - if (mpz_sgn (a_orig) == 0) - return JACOBI_0Z (b_orig); /* (0/b) */ - - if (mpz_even_p (a_orig) && mpz_even_p (b_orig)) - return 0; - - if (mpz_cmp_ui (b_orig, 1) == 0) - return 1; - - mpz_init_set (a, a_orig); - mpz_init_set (b, b_orig); - - if (mpz_sgn (b) < 0) - { - result_bit1 ^= JACOBI_BSGN_ZZ_BIT1 (a, b); - mpz_neg (b, b); - } - if (mpz_even_p (b)) - { - twos = mpz_scan1 (b, 0L); - mpz_tdiv_q_2exp (b, b, twos); - result_bit1 ^= JACOBI_TWOS_U_BIT1 (twos, PTR(a)[0]); - } - - if (mpz_sgn (a) < 0) - { - result_bit1 ^= JACOBI_N1B_BIT1 (PTR(b)[0]); - mpz_neg (a, a); - } - if (mpz_even_p (a)) - { - twos = mpz_scan1 (a, 0L); - mpz_tdiv_q_2exp (a, a, twos); - result_bit1 ^= JACOBI_TWOS_U_BIT1 (twos, PTR(b)[0]); - } - - for (;;) - { - ASSERT (mpz_odd_p (a)); - ASSERT (mpz_odd_p (b)); - ASSERT (mpz_sgn (a) > 0); - ASSERT (mpz_sgn (b) > 0); - - TRACE (printf ("top\n"); - mpz_trace (" a", a); - mpz_trace (" b", b)); - - if (mpz_cmp (a, b) < 0) - { - TRACE (printf ("swap\n")); - mpz_swap (a, b); - result_bit1 ^= JACOBI_RECIP_UU_BIT1 (PTR(a)[0], PTR(b)[0]); - } - - if (mpz_cmp_ui (b, 1) == 0) - break; - - mpz_sub (a, a, b); - TRACE (printf ("sub\n"); - mpz_trace (" a", a)); - if (mpz_sgn (a) == 0) - goto zero; - - twos = mpz_scan1 (a, 0L); - mpz_fdiv_q_2exp (a, a, twos); - TRACE (printf ("twos %lu\n", twos); - mpz_trace (" a", a)); - result_bit1 ^= JACOBI_TWOS_U_BIT1 (twos, PTR(b)[0]); - } - - mpz_clear (a); - mpz_clear (b); - return JACOBI_BIT1_TO_PN (result_bit1); - - zero: - mpz_clear (a); - mpz_clear (b); - return 0; -} - -/* Same as mpz_kronecker, but ignoring factors of 2 on b */ -int -refmpz_jacobi (mpz_srcptr a, mpz_srcptr b) -{ - ASSERT_ALWAYS (mpz_sgn (b) > 0); - ASSERT_ALWAYS (mpz_odd_p (b)); - - return refmpz_kronecker (a, b); -} - -/* Legendre symbol via powm. p must be an odd prime. */ -int -refmpz_legendre (mpz_srcptr a, mpz_srcptr p) -{ - int res; - - mpz_t r; - mpz_t e; - - ASSERT_ALWAYS (mpz_sgn (p) > 0); - ASSERT_ALWAYS (mpz_odd_p (p)); - - mpz_init (r); - mpz_init (e); - - mpz_fdiv_r (r, a, p); - - mpz_set (e, p); - mpz_sub_ui (e, e, 1); - mpz_fdiv_q_2exp (e, e, 1); - mpz_powm (r, r, e, p); - - /* Normalize to a more or less symmetric range around zero */ - if (mpz_cmp (r, e) > 0) - mpz_sub (r, r, p); - - ASSERT_ALWAYS (mpz_cmpabs_ui (r, 1) <= 0); - - res = mpz_sgn (r); - - mpz_clear (r); - mpz_clear (e); - - return res; -} - - -int -refmpz_kronecker_ui (mpz_srcptr a, unsigned long b) -{ - mpz_t bz; - int ret; - mpz_init_set_ui (bz, b); - ret = refmpz_kronecker (a, bz); - mpz_clear (bz); - return ret; -} - -int -refmpz_kronecker_si (mpz_srcptr a, long b) -{ - mpz_t bz; - int ret; - mpz_init_set_si (bz, b); - ret = refmpz_kronecker (a, bz); - mpz_clear (bz); - return ret; -} - -int -refmpz_ui_kronecker (unsigned long a, mpz_srcptr b) -{ - mpz_t az; - int ret; - mpz_init_set_ui (az, a); - ret = refmpz_kronecker (az, b); - mpz_clear (az); - return ret; -} - -int -refmpz_si_kronecker (long a, mpz_srcptr b) -{ - mpz_t az; - int ret; - mpz_init_set_si (az, a); - ret = refmpz_kronecker (az, b); - mpz_clear (az); - return ret; -} - - -void -refmpz_pow_ui (mpz_ptr w, mpz_srcptr b, unsigned long e) -{ - mpz_t s, t; - unsigned long i; - - mpz_init_set_ui (t, 1L); - mpz_init_set (s, b); - - if ((e & 1) != 0) - mpz_mul (t, t, s); - - for (i = 2; i <= e; i <<= 1) - { - mpz_mul (s, s, s); - if ((i & e) != 0) - mpz_mul (t, t, s); - } - - mpz_set (w, t); - - mpz_clear (s); - mpz_clear (t); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/spinner.c b/src/plugins/e-acsl/contrib/libgmp/tests/spinner.c deleted file mode 100644 index 3435d20923d..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/spinner.c +++ /dev/null @@ -1,129 +0,0 @@ -/* A stupid little spinning wheel designed to make it look like useful work - is being done. - -Copyright 1999-2001 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include "config.h" - -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> -#if HAVE_UNISTD_H -#include <unistd.h> /* for isatty */ -#endif - -#include "gmp.h" -#include "gmp-impl.h" - -#include "tests.h" - - -/* "alarm" is not available on mingw32, and the SIGALRM constant is not - defined. Don't bother with a spinner in this case. */ -#if ! HAVE_ALARM || ! defined (SIGALRM) -#define alarm(n) abort() -#define signal(sig,func) SIG_ERR -#endif - - -/* An application can update this to get a count printed with the spinner. - If left at 0, no count is printed. */ - -unsigned long spinner_count = 0; - - -int spinner_wanted = -1; /* -1 uninitialized, 1 wanted, 0 not */ -int spinner_tick = 1; /* 1 ready to print, 0 not */ - - -/*ARGSUSED*/ -RETSIGTYPE -spinner_signal (int signum) -{ - spinner_tick = 1; - - if (signal (SIGALRM, spinner_signal) == SIG_ERR) - { - printf ("spinner_signal(): Oops, cannot reinstall SIGALRM\n"); - abort (); - } - alarm (1); -} - - -/* Initialize the spinner. - - This is done the first time spinner() is called, so an application - doesn't need to call this directly. - - The spinner is only wanted if the output is a tty. */ - -#define SPINNER_WANTED_INIT() \ - if (spinner_wanted < 0) spinner_init () - -void -spinner_init (void) -{ - spinner_wanted = isatty (fileno (stdout)); - if (spinner_wanted == -1) - abort (); - - if (!spinner_wanted) - return; - - if (signal (SIGALRM, spinner_signal) == SIG_ERR) - { - printf ("(no spinner)\r"); - spinner_tick = 0; - return; - } - alarm (1); - - /* unbuffered output so the spinner will show up */ - setbuf (stdout, NULL); -} - - -void -spinner (void) -{ - static const char data[] = { '|', '/', '-', '\\' }; - static int pos = 0; - - char buf[128]; - - SPINNER_WANTED_INIT (); - - if (spinner_tick) - { - buf[0] = data[pos]; - pos = (pos + 1) % numberof (data); - spinner_tick = 0; - - if (spinner_count != 0) - { - sprintf (buf+1, " %lu\r", spinner_count); - } - else - { - buf[1] = '\r'; - buf[2] = '\0'; - } - fputs (buf, stdout); - } -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/t-bswap.c b/src/plugins/e-acsl/contrib/libgmp/tests/t-bswap.c deleted file mode 100644 index 2543f9fc320..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/t-bswap.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Test BSWAP_LIMB. - -Copyright 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -int -main (void) -{ - mp_limb_t src, want, got; - int i; - - tests_start (); - mp_trace_base = -16; - - for (i = 0; i < 1000; i++) - { - mpn_random (&src, (mp_size_t) 1); - - want = ref_bswap_limb (src); - - BSWAP_LIMB (got, src); - if (got != want) - { - printf ("BSWAP_LIMB wrong result\n"); - error: - mpn_trace (" src ", &src, (mp_size_t) 1); - mpn_trace (" want", &want, (mp_size_t) 1); - mpn_trace (" got ", &got, (mp_size_t) 1); - abort (); - } - - BSWAP_LIMB_FETCH (got, &src); - if (got != want) - { - printf ("BSWAP_LIMB_FETCH wrong result\n"); - goto error; - } - - BSWAP_LIMB_STORE (&got, src); - if (got != want) - { - printf ("BSWAP_LIMB_STORE wrong result\n"); - goto error; - } - } - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/t-constants.c b/src/plugins/e-acsl/contrib/libgmp/tests/t-constants.c deleted file mode 100644 index 9f22931c1dc..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/t-constants.c +++ /dev/null @@ -1,343 +0,0 @@ -/* Check the values of some constants. - -Copyright 2000-2003, 2014 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "tests.h" - - -#ifdef ULONG_MAX -const char *ulong_max_def = "defined"; -#else -const char *ulong_max_def = "not defined"; -#endif -#ifdef LONG_MAX -const char *long_max_def = "defined"; -#else -const char *long_max_def = "not defined"; -#endif - -#ifdef UINT_MAX -const char *uint_max_def = "defined"; -#else -const char *uint_max_def = "not defined"; -#endif -#ifdef INT_MAX -const char *int_max_def = "defined"; -#else -const char *int_max_def = "not defined"; -#endif - -#ifdef USHRT_MAX -const char *ushrt_max_def = "defined"; -#else -const char *ushrt_max_def = "not defined"; -#endif -#ifdef SHRT_MAX -const char *shrt_max_def = "defined"; -#else -const char *shrt_max_def = "not defined"; -#endif - -#include "gmp-impl.h" -#include "longlong.h" - - -#ifdef _LONG_LONG_LIMB -#define LL(l,ll) ll -#else -#define LL(l,ll) l -#endif - -#if __GMP_MP_SIZE_T_INT -#define SS(i,l) i -#else -#define SS(i,l) l -#endif - - -#define CHECK_LIMB_S(x, xname, y, yname) \ - do { \ - if ((x) != (y)) \ - { \ - printf (LL("%s == %lx, but %s == %lx\n", \ - "%s == %llx, but %s == %llx\n"), \ - xname, x, yname, y); \ - error = 1; \ - } \ - } while (0) - -#define CHECK_INT_S(x, xname, y, yname) \ - do { \ - if ((x) != (y)) \ - { \ - printf ("%s == %d, but %s == %d\n", xname, x, yname, y); \ - error = 1; \ - } \ - } while (0) - - - -#define CHECK_CONDITION_S(x, xname) \ - do { \ - if (!(x)) \ - { \ - printf ("%s is false\n", xname); \ - error = 1; \ - } \ - } while (0) - - -/* How many bits seem to work in the given type. */ -#define CALC_BITS(result, type) \ - do { \ - type n = 1; \ - result = 0; \ - while (n != 0) \ - { \ - n <<= 1; \ - result++; \ - } \ - } while (0) - -#define CHECK_BITS_S(constant, constant_name, type) \ - do { \ - int calculated; \ - CALC_BITS (calculated, type); \ - if (calculated != constant) \ - { \ - printf ("%s == %d, but calculated %d\n", \ - constant_name, constant, calculated); \ - error = 1; \ - } \ - } while (0) - - -#define CHECK_HIGHBIT_S(value, value_name, type, format) \ - do { \ - type n = value; \ - if (n == 0) \ - { \ - printf ("%s == 0\n", value_name); \ - error = 1; \ - } \ - n <<= 1; \ - if (n != 0) \ - { \ - printf ("%s << 1 = ", value_name); \ - printf (format, n); \ - printf (" != 0\n"); \ - error = 1; \ - } \ - } while (0) - - -#define CHECK_MAX_S(max_val, max_name, min_val, min_name, type, format) \ - do { \ - type maxval = max_val; \ - type minval = min_val; \ - type n = maxval; \ - n++; \ - if (n != minval) \ - { \ - printf ("%s + 1 = ", max_name); \ - printf (format, n); \ - printf (" != %s = ", min_name); \ - printf (format, minval); \ - printf ("\n"); \ - error = 1; \ - } \ - if (maxval <= minval) \ - { \ - printf ("%s = ", max_name); \ - printf (format, maxval); \ - printf (" <= %s = ", min_name); \ - printf (format, minval); \ - printf ("\n"); \ - error = 1; \ - } \ - } while (0) - - -#define CHECK_LIMB(x,y) CHECK_LIMB_S (x, #x, y, #y) -#define CHECK_INT(x,y) CHECK_INT_S (x, #x, y, #y) -#define CHECK_CONDITION(x) CHECK_CONDITION_S (x, #x) -#define CHECK_BITS(c,t) CHECK_BITS_S (c, #c, t) -#define CHECK_MAX(m,n,t,f) CHECK_MAX_S (m, #m, n, #n, t, f) -#define CHECK_HIGHBIT(n,t,f) CHECK_HIGHBIT_S (n, #n, t, f) - - -/* The tests below marked "Bad!" fail on Cray T90 systems, where int, short - and mp_size_t are 48 bits or some such but don't wraparound in a plain - twos complement fashion. In particular, - - INT_HIGHBIT << 1 = 0xFFFFC00000000000 != 0 - INT_MAX + 1 = 35184372088832 != INT_MIN = -35184372088832 - - This is a bit bizarre, but doesn't matter because GMP doesn't rely on any - particular overflow behaviour for int or short, only for mp_limb_t. */ - -int -main (int argc, char *argv[]) -{ - int error = 0; - - CHECK_INT (GMP_LIMB_BYTES, (int) sizeof(mp_limb_t)); - CHECK_INT (mp_bits_per_limb, GMP_LIMB_BITS); - - CHECK_BITS (GMP_LIMB_BITS, mp_limb_t); - CHECK_BITS (BITS_PER_ULONG, unsigned long); - - CHECK_HIGHBIT (GMP_LIMB_HIGHBIT, mp_limb_t, LL("0x%lX","0x%llX")); - CHECK_HIGHBIT (ULONG_HIGHBIT, unsigned long, "0x%lX"); - CHECK_HIGHBIT (UINT_HIGHBIT, unsigned int, "0x%X"); - CHECK_HIGHBIT (USHRT_HIGHBIT, unsigned short, "0x%hX"); -#if 0 /* Bad! */ - CHECK_HIGHBIT (LONG_HIGHBIT, long, "0x%lX"); - CHECK_HIGHBIT (INT_HIGHBIT, int, "0x%X"); - CHECK_HIGHBIT (SHRT_HIGHBIT, short, "0x%hX"); -#endif - -#if 0 /* Bad! */ - CHECK_MAX (LONG_MAX, LONG_MIN, long, "%ld"); - CHECK_MAX (INT_MAX, INT_MIN, int, "%d"); - CHECK_MAX (SHRT_MAX, SHRT_MIN, short, "%hd"); -#endif - CHECK_MAX (ULONG_MAX, 0, unsigned long, "%lu"); - CHECK_MAX (UINT_MAX, 0, unsigned int, "%u"); - CHECK_MAX (USHRT_MAX, 0, unsigned short, "%hu"); -#if 0 /* Bad! */ - CHECK_MAX (MP_SIZE_T_MAX, MP_SIZE_T_MIN, mp_size_t, SS("%d","%ld")); -#endif - - /* UHWtype should have at least enough bits for half a UWtype */ - { - int bits_per_UWtype, bits_per_UHWtype; - CALC_BITS (bits_per_UWtype, UWtype); - CALC_BITS (bits_per_UHWtype, UHWtype); - CHECK_CONDITION (2*bits_per_UHWtype >= bits_per_UWtype); - } - - ASSERT_ALWAYS_LIMB (MODLIMB_INVERSE_3); - { - mp_limb_t modlimb_inverse_3_calc; - binvert_limb (modlimb_inverse_3_calc, CNST_LIMB(3)); - ASSERT_ALWAYS_LIMB (modlimb_inverse_3_calc); - CHECK_LIMB (MODLIMB_INVERSE_3, modlimb_inverse_3_calc); - } - { - mp_limb_t MODLIMB_INVERSE_3_times_3 - = (MODLIMB_INVERSE_3 * CNST_LIMB(3)) & GMP_NUMB_MASK; - CHECK_LIMB (MODLIMB_INVERSE_3_times_3, CNST_LIMB(1)); - } - - { - mp_limb_t hi, lo; - hi = refmpn_umul_ppmm (&lo, GMP_NUMB_CEIL_MAX_DIV3-1, - CNST_LIMB(3) << GMP_NAIL_BITS); - if (! (hi < 1)) - { - printf ("GMP_NUMB_CEIL_MAX_DIV3 too big\n"); - error = 1; - } - hi = refmpn_umul_ppmm (&lo, GMP_NUMB_CEIL_MAX_DIV3, - CNST_LIMB(3) << GMP_NAIL_BITS); - if (! (hi >= 1)) - { - printf ("GMP_NUMB_CEIL_MAX_DIV3 too small\n"); - error = 1; - } - } - - { - mp_limb_t hi, lo; - hi = refmpn_umul_ppmm (&lo, GMP_NUMB_CEIL_2MAX_DIV3-1, - CNST_LIMB(3) << GMP_NAIL_BITS); - if (! (hi < 2)) - { - printf ("GMP_NUMB_CEIL_2MAX_DIV3 too big\n"); - error = 1; - } - hi = refmpn_umul_ppmm (&lo, GMP_NUMB_CEIL_2MAX_DIV3, - CNST_LIMB(3) << GMP_NAIL_BITS); - if (! (hi >= 2)) - { - printf ("GMP_NUMB_CEIL_2MAX_DIV3 too small\n"); - error = 1; - } - } - -#ifdef PP_INVERTED - { - mp_limb_t pp_inverted_calc; - invert_limb (pp_inverted_calc, PP); - CHECK_LIMB (PP_INVERTED, pp_inverted_calc); - } -#endif - - if (argc >= 2 || error) - { - int bits; - - printf ("\n"); - printf ("After gmp.h,\n"); - printf (" ULONG_MAX %s\n", ulong_max_def); - printf (" LONG_MAX %s\n", long_max_def); - printf (" UINT_MAX %s\n", uint_max_def); - printf (" INT_MAX %s\n", int_max_def); - printf (" USHRT_MAX %s\n", ushrt_max_def); - printf (" SHRT_MAX %s\n", shrt_max_def); - printf ("\n"); - -#ifdef _CRAY - printf ("_CRAY is defined, so limits.h is being used\n"); -#endif - - printf ("ULONG_MAX %lX\n", ULONG_MAX); - printf ("ULONG_HIGHBIT %lX\n", ULONG_HIGHBIT); - printf ("LONG_MAX %lX\n", LONG_MAX); - printf ("LONG_MIN %lX\n", LONG_MIN); - - printf ("UINT_MAX %X\n", UINT_MAX); - printf ("UINT_HIGHBIT %X\n", UINT_HIGHBIT); - printf ("INT_MAX %X\n", INT_MAX); - printf ("INT_MIN %X\n", INT_MIN); - - printf ("USHRT_MAX %X\n", USHRT_MAX); - printf ("USHRT_HIGHBIT %X\n", USHRT_HIGHBIT); - printf ("SHRT_MAX %X\n", SHRT_MAX); - printf ("SHRT_MIN %X\n", SHRT_MIN); - - printf ("\n"); - printf ("Bits\n"); - CALC_BITS (bits, long); printf (" long %d\n", bits); - CALC_BITS (bits, int); printf (" int %d\n", bits); - CALC_BITS (bits, short); printf (" short %d\n", bits); - CALC_BITS (bits, unsigned long); printf (" unsigned long %d\n", bits); - CALC_BITS (bits, unsigned int); printf (" unsigned int %d\n", bits); - CALC_BITS (bits, unsigned short); printf (" unsigned short %d\n", bits); - CALC_BITS (bits, mp_size_t); printf (" mp_size_t %d\n", bits); - } - - if (error) - abort (); - - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/t-count_zeros.c b/src/plugins/e-acsl/contrib/libgmp/tests/t-count_zeros.c deleted file mode 100644 index 117babadc61..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/t-count_zeros.c +++ /dev/null @@ -1,87 +0,0 @@ -/* Test count_leading_zeros and count_trailing_zeros. - -Copyright 2001-2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" -#include "tests.h" - -void -check_clz (int want, mp_limb_t n) -{ - int got; - count_leading_zeros (got, n); - if (got != want) - { - printf ("count_leading_zeros wrong\n"); - mp_limb_trace (" n ", n); - printf (" want %d\n", want); - printf (" got %d\n", got); - abort (); - } -} - -void -check_ctz (int want, mp_limb_t n) -{ - int got; - count_trailing_zeros (got, n); - if (got != want) - { - printf ("count_trailing_zeros wrong\n"); - mpn_trace (" n ", &n, (mp_size_t) 1); - printf (" want %d\n", want); - printf (" got %d\n", got); - abort (); - } -} - -void -check_various (void) -{ - int i; - -#ifdef COUNT_LEADING_ZEROS_0 - check_clz (COUNT_LEADING_ZEROS_0, CNST_LIMB(0)); -#endif - - for (i=0; i < GMP_LIMB_BITS; i++) - { - check_clz (i, CNST_LIMB(1) << (GMP_LIMB_BITS-1-i)); - check_ctz (i, CNST_LIMB(1) << i); - - check_ctz (i, MP_LIMB_T_MAX << i); - check_clz (i, MP_LIMB_T_MAX >> i); - } -} - - -int -main (int argc, char *argv[]) -{ - tests_start (); - mp_trace_base = 16; - - check_various (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/t-hightomask.c b/src/plugins/e-acsl/contrib/libgmp/tests/t-hightomask.c deleted file mode 100644 index 1de20c94f6e..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/t-hightomask.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Test LIMB_HIGHBIT_TO_MASK. - -Copyright 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* There's very little to these tests, but it's nice to have them since if - something has gone wrong with the arithmetic right shift business in - LIMB_HIGHBIT_TO_MASK then the only symptom is likely to be failures in - udiv_qrnnd_preinv, which would not be easy to diagnose. */ - -int -main (void) -{ - ASSERT_ALWAYS (LIMB_HIGHBIT_TO_MASK (0) == 0); - ASSERT_ALWAYS (LIMB_HIGHBIT_TO_MASK (GMP_LIMB_HIGHBIT) == MP_LIMB_T_MAX); - ASSERT_ALWAYS (LIMB_HIGHBIT_TO_MASK (MP_LIMB_T_MAX) == MP_LIMB_T_MAX); - ASSERT_ALWAYS (LIMB_HIGHBIT_TO_MASK (GMP_LIMB_HIGHBIT >> 1) == 0); - ASSERT_ALWAYS (LIMB_HIGHBIT_TO_MASK (MP_LIMB_T_MAX >> 1) == 0); - - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/t-modlinv.c b/src/plugins/e-acsl/contrib/libgmp/tests/t-modlinv.c deleted file mode 100644 index 8e17d7787f0..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/t-modlinv.c +++ /dev/null @@ -1,84 +0,0 @@ -/* Test binvert_limb. - -Copyright 2000-2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" -#include "tests.h" - - -void -one (mp_limb_t n) -{ - mp_limb_t inv, prod; - - binvert_limb (inv, n); - prod = (inv * n) & GMP_NUMB_MASK; - if (prod != 1) - { - printf ("binvert_limb wrong\n"); - mp_limb_trace (" n ", n); - mp_limb_trace (" got ", inv); - mp_limb_trace (" product ", prod); - abort (); - } -} - -void -some (void) -{ - int i; - for (i = 0; i < 10000; i++) - one (refmpn_random_limb () | 1); -} - -void -all (void) -{ - mp_limb_t n; - - n = 1; - do { - one (n); - n += 2; - } while (n != 1); -} - - -int -main (int argc, char *argv[]) -{ - tests_start (); - - if (argc >= 2 && strcmp (argv[1], "-a") == 0) - { - /* it's feasible to run all values on a 32-bit limb, but not a 64-bit */ - all (); - } - else - { - some (); - } - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/t-parity.c b/src/plugins/e-acsl/contrib/libgmp/tests/t-parity.c deleted file mode 100644 index b6da1127330..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/t-parity.c +++ /dev/null @@ -1,67 +0,0 @@ -/* Test ULONG_PARITY. - -Copyright 2002, 2014 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - -void -check_one (int want, unsigned long n) -{ - int got; - ULONG_PARITY (got, n); - if (got != want) - { - printf ("ULONG_PARITY wrong\n"); - printf (" n %lX\n", n); - printf (" want %d\n", want); - printf (" got %d\n", got); - abort (); - } -} - -void -check_various (void) -{ - int i; - - check_one (0, 0L); - check_one (BITS_PER_ULONG & 1, ULONG_MAX); - check_one (0, 0x11L); - check_one (1, 0x111L); - check_one (1, 0x3111L); - - for (i = 0; i < BITS_PER_ULONG; i++) - check_one (1, 1UL << i); -} - - -int -main (int argc, char *argv[]) -{ - tests_start (); - mp_trace_base = 16; - - check_various (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/t-popc.c b/src/plugins/e-acsl/contrib/libgmp/tests/t-popc.c deleted file mode 100644 index c3b32886079..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/t-popc.c +++ /dev/null @@ -1,80 +0,0 @@ -/* Test popc_limb. - -Copyright 2002, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -int -main (void) -{ - mp_limb_t src, want, got; - int i; - - tests_start (); - mp_trace_base = -16; - - for (i = 0; i < GMP_LIMB_BITS; i++) - { - src = CNST_LIMB(1) << i; - want = 1; - - popc_limb (got, src); - if (got != want) - { - error: - printf ("popc_limb wrong result\n"); - mpn_trace (" src ", &src, (mp_size_t) 1); - mpn_trace (" want", &want, (mp_size_t) 1); - mpn_trace (" got ", &got, (mp_size_t) 1); - abort (); - } - } - - src = 0; - want = 0; - for (i = 0; i < GMP_LIMB_BITS; i++) - { - src += CNST_LIMB(1) << i; - want += 1; - - popc_limb (got, src); - if (got != want) - { - goto error; - } - } - - for (i = 0; i < 100; i++) - { - mpn_random2 (&src, (mp_size_t) 1); - want = ref_popc_limb (src); - - popc_limb (got, src); - if (got != want) - goto error; - } - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/t-sub.c b/src/plugins/e-acsl/contrib/libgmp/tests/t-sub.c deleted file mode 100644 index 331705ff6fe..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/t-sub.c +++ /dev/null @@ -1,115 +0,0 @@ -/* Test sub_ddmmss. - -Copyright 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include <stdlib.h> - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" -#include "tests.h" - - -void -check_data (void) -{ -#define M MP_LIMB_T_MAX - - static const struct { - mp_limb_t want_dh,want_dl, mh,ml, sh,sl; - } data[] = { - { 0,0, 0,0, 0,0 }, - { 0,0, 0,1, 0,1 }, - { 0,0, 1,2, 1,2 }, - - { 0,1, 0,2, 0,1 }, - { 0,M, 1,0, 0,1 }, - { M,M, 0,0, 0,1 }, - - { M,M, 0,M-1, 0,M }, - { 0,0, 0,M-1, 0,M-1 }, - { 0,1, 0,M-1, 0,M-2 }, - }; - int i; - mp_limb_t got_dh, got_dl; - - for (i = 0; i < numberof (data); i++) - { - sub_ddmmss (got_dh,got_dl, data[i].mh,data[i].ml, data[i].sh,data[i].sl); - if (got_dh != data[i].want_dh || got_dl != data[i].want_dl) - { - printf ("check_data wrong at data[%d]\n", i); - mp_limb_trace (" mh", data[i].mh); - mp_limb_trace (" ml", data[i].ml); - mp_limb_trace (" sh", data[i].sh); - mp_limb_trace (" sl", data[i].sl); - mp_limb_trace (" want dh", data[i].want_dh); - mp_limb_trace (" want dl", data[i].want_dl); - mp_limb_trace (" got dh ", got_dh); - mp_limb_trace (" got dl ", got_dl); - abort (); - } - } -} - -void -check_random (void) -{ - mp_limb_t want_dh,want_dl, got_dh,got_dl, mh,ml, sh,sl; - int i; - - for (i = 0; i < 20; i++) - { - mh = urandom (); - ml = urandom (); - sh = urandom (); - sl = urandom (); - - refmpn_sub_ddmmss (&want_dh,&want_dl, mh,ml, sh,sl); - - sub_ddmmss (got_dh,got_dl, mh,ml, sh,sl); - - if (got_dh != want_dh || got_dl != want_dl) - { - printf ("check_data wrong at data[%d]\n", i); - mp_limb_trace (" mh", mh); - mp_limb_trace (" ml", ml); - mp_limb_trace (" sh", sh); - mp_limb_trace (" sl", sl); - mp_limb_trace (" want dh", want_dh); - mp_limb_trace (" want dl", want_dl); - mp_limb_trace (" got dh ", got_dh); - mp_limb_trace (" got dl ", got_dl); - abort (); - } - } -} - -int -main (void) -{ - tests_start (); - mp_trace_base = -16; - - check_data (); - check_random (); - - tests_end (); - exit (0); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/tests.h b/src/plugins/e-acsl/contrib/libgmp/tests/tests.h deleted file mode 100644 index 92ef7864ea2..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/tests.h +++ /dev/null @@ -1,443 +0,0 @@ -/* Tests support prototypes etc. - -Copyright 2000-2004, 2008-2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -#ifndef __TESTS_H__ -#define __TESTS_H__ - -#include "config.h" - -#include <setjmp.h> /* for jmp_buf */ - -#if defined (__cplusplus) -extern "C" { -#endif - - -#ifdef __cplusplus -#define ANYARGS ... -#else -#define ANYARGS -#endif - - -void tests_start (void); -void tests_end (void); - -void tests_memory_start (void); -void tests_memory_end (void); -void *tests_allocate (size_t); -void *tests_reallocate (void *, size_t, size_t); -void tests_free (void *, size_t); -void tests_free_nosize (void *); -int tests_memory_valid (void *); - -void tests_rand_start (void); -void tests_rand_end (void); - -double tests_infinity_d (); -int tests_hardware_getround (void); -int tests_hardware_setround (int); -int tests_isinf (double); -int tests_dbl_mant_bits (void); - -void x86_fldcw (unsigned short); -unsigned short x86_fstcw (void); - - -/* tests_setjmp_sigfpe is like a setjmp, establishing a trap for SIGFPE. - The initial return is 0, if SIGFPE is trapped execution goes back there - with return value 1. - - tests_sigfpe_done puts SIGFPE back to SIG_DFL, which should be used once - the setjmp point is out of scope, so a later SIGFPE won't try to go back - there. */ - -#define tests_setjmp_sigfpe() \ - (signal (SIGFPE, tests_sigfpe_handler), \ - setjmp (tests_sigfpe_target)) - -RETSIGTYPE tests_sigfpe_handler (int); -void tests_sigfpe_done (void); -extern jmp_buf tests_sigfpe_target; - - -#if HAVE_CALLING_CONVENTIONS -extern mp_limb_t (*calling_conventions_function) (ANYARGS); -mp_limb_t calling_conventions (ANYARGS); -int calling_conventions_check (void); -#define CALLING_CONVENTIONS(function) \ - (calling_conventions_function = (function), calling_conventions) -#define CALLING_CONVENTIONS_CHECK() (calling_conventions_check()) -#else -#define CALLING_CONVENTIONS(function) (function) -#define CALLING_CONVENTIONS_CHECK() 1 /* always ok */ -#endif - - -extern int mp_trace_base; -void mp_limb_trace (const char *, mp_limb_t); -void mpn_trace (const char *, mp_srcptr, mp_size_t); -void mpn_tracea (const char *, const mp_ptr *, int, mp_size_t); -void mpn_tracen (const char *, int, mp_srcptr, mp_size_t); -void mpn_trace_file (const char *, mp_srcptr, mp_size_t); -void mpn_tracea_file (const char *, const mp_ptr *, int, mp_size_t); -void mpf_trace (const char *, mpf_srcptr); -void mpq_trace (const char *, mpq_srcptr); -void mpz_trace (const char *, mpz_srcptr); -void mpz_tracen (const char *, int, mpz_srcptr); -void byte_trace (const char *, const void *, mp_size_t); -void byte_tracen (const char *, int, const void *, mp_size_t); -void d_trace (const char *, double); - - -void spinner (void); -extern unsigned long spinner_count; -extern int spinner_wanted; -extern int spinner_tick; - - -void *align_pointer (void *, size_t); -void *__gmp_allocate_func_aligned (size_t, size_t); -void *__gmp_allocate_or_reallocate (void *, size_t, size_t); -char *__gmp_allocate_strdup (const char *); -char *strtoupper (char *); -mp_limb_t urandom (void); -void call_rand_algs (void (*func) (const char *, gmp_randstate_t)); - - -void mpf_set_str_or_abort (mpf_ptr, const char *, int); - - -void mpq_set_str_or_abort (mpq_ptr, const char *, int); - - -void mpz_erandomb (mpz_ptr, gmp_randstate_t, unsigned long); -void mpz_erandomb_nonzero (mpz_ptr, gmp_randstate_t, unsigned long); -void mpz_errandomb (mpz_ptr, gmp_randstate_t, unsigned long); -void mpz_errandomb_nonzero (mpz_ptr, gmp_randstate_t, unsigned long); -void mpz_init_set_n (mpz_ptr, mp_srcptr, mp_size_t); -void mpz_negrandom (mpz_ptr, gmp_randstate_t); -int mpz_pow2abs_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -void mpz_set_n (mpz_ptr, mp_srcptr, mp_size_t); -void mpz_set_str_or_abort (mpz_ptr, const char *, int); - -mp_size_t mpn_diff_highest (mp_srcptr, mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; -mp_size_t mpn_diff_lowest (mp_srcptr, mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; -mp_size_t byte_diff_highest (const void *, const void *, mp_size_t) __GMP_ATTRIBUTE_PURE; -mp_size_t byte_diff_lowest (const void *, const void *, mp_size_t) __GMP_ATTRIBUTE_PURE; - - -mp_limb_t ref_addc_limb (mp_limb_t *, mp_limb_t, mp_limb_t); -mp_limb_t ref_bswap_limb (mp_limb_t); -unsigned long ref_popc_limb (mp_limb_t); -mp_limb_t ref_subc_limb (mp_limb_t *, mp_limb_t, mp_limb_t); - - -void refmpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); -void refmpf_add_ulp (mpf_ptr ); -void refmpf_fill (mpf_ptr, mp_size_t, mp_limb_t); -void refmpf_normalize (mpf_ptr); -void refmpf_set_prec_limbs (mpf_ptr, unsigned long); -unsigned long refmpf_set_overlap (mpf_ptr, mpf_srcptr); -void refmpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); -int refmpf_validate (const char *, mpf_srcptr, mpf_srcptr); -int refmpf_validate_division (const char *, mpf_srcptr, mpf_srcptr, mpf_srcptr); - - -mp_limb_t refmpn_cnd_add_n (mp_limb_t, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_cnd_sub_n (mp_limb_t, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -mp_limb_t refmpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -mp_limb_t refmpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_add_err1_n (mp_ptr, mp_srcptr, mp_srcptr, mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_add_err2_n (mp_ptr, mp_srcptr, mp_srcptr, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_add_err3_n (mp_ptr, mp_srcptr, mp_srcptr, mp_ptr, mp_srcptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_add_nc (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_addlsh1_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_addlsh2_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_addlsh_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, unsigned); -mp_limb_t refmpn_addlsh1_n_ip1 (mp_ptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_addlsh2_n_ip1 (mp_ptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_addlsh_n_ip1 (mp_ptr, mp_srcptr, mp_size_t, unsigned); -mp_limb_t refmpn_addlsh1_n_ip2 (mp_ptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_addlsh2_n_ip2 (mp_ptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_addlsh_n_ip2 (mp_ptr, mp_srcptr, mp_size_t, unsigned); -mp_limb_t refmpn_addlsh1_nc (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_addlsh2_nc (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_addlsh_nc (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, unsigned, mp_limb_t); -mp_limb_t refmpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_addmul_1c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t); -mp_limb_t refmpn_addmul_2 (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); -mp_limb_t refmpn_addmul_3 (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); -mp_limb_t refmpn_addmul_4 (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); -mp_limb_t refmpn_addmul_5 (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); -mp_limb_t refmpn_addmul_6 (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); -mp_limb_t refmpn_addmul_7 (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); -mp_limb_t refmpn_addmul_8 (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -mp_limb_t refmpn_add_n_sub_n (mp_ptr, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_add_n_sub_nc (mp_ptr, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t); - -void refmpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -void refmpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -mp_limb_t refmpn_big_base (int); - -int refmpn_chars_per_limb (int); -void refmpn_clrbit (mp_ptr, unsigned long); -int refmpn_cmp (mp_srcptr, mp_srcptr, mp_size_t); -int refmpn_cmp_allowzero (mp_srcptr, mp_srcptr, mp_size_t); -int refmpn_cmp_twosizes (mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -void refmpn_com (mp_ptr, mp_srcptr, mp_size_t); -void refmpn_copy (mp_ptr, mp_srcptr, mp_size_t); -void refmpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -void refmpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -void refmpn_copy_extend (mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -unsigned refmpn_count_leading_zeros (mp_limb_t); -unsigned refmpn_count_trailing_zeros (mp_limb_t); - -mp_limb_t refmpn_divexact_by3 (mp_ptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -mp_limb_t refmpn_divmod_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_divmod_1c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t); -mp_limb_t refmpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_divrem_1c (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t); -mp_limb_t refmpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -int refmpn_equal_anynail (mp_srcptr, mp_srcptr, mp_size_t); - -void refmpn_fill (mp_ptr, mp_size_t, mp_limb_t); - -mp_limb_t refmpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -size_t refmpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -unsigned long refmpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t); - -mp_limb_t refmpn_invert_limb (mp_limb_t); -void refmpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -void refmpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -mp_limb_t refmpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned); -mp_limb_t refmpn_lshift_or_copy (mp_ptr, mp_srcptr, mp_size_t, unsigned); -mp_limb_t refmpn_lshift_or_copy_any (mp_ptr, mp_srcptr, mp_size_t, unsigned); -mp_limb_t refmpn_lshiftc (mp_ptr, mp_srcptr, mp_size_t, unsigned); -void refmpn_com (mp_ptr, mp_srcptr, mp_size_t); - -mp_ptr refmpn_malloc_limbs (mp_size_t); -mp_ptr refmpn_malloc_limbs_aligned (mp_size_t, size_t); -void refmpn_free_limbs (mp_ptr); -mp_limb_t refmpn_msbone (mp_limb_t); -mp_limb_t refmpn_msbone_mask (mp_limb_t); -mp_ptr refmpn_memdup_limbs (mp_srcptr, mp_size_t); - -mp_limb_t refmpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_mod_1c (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t); -mp_limb_t refmpn_mod_34lsub1 (mp_srcptr, mp_size_t); - -mp_limb_t refmpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_mul_1c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t); -mp_limb_t refmpn_mul_2 (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); -mp_limb_t refmpn_mul_3 (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); -mp_limb_t refmpn_mul_4 (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); -mp_limb_t refmpn_mul_5 (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); -mp_limb_t refmpn_mul_6 (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -void refmpn_mul_basecase (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -void refmpn_mulmid_basecase (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -void refmpn_toom42_mulmid (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_ptr); -void refmpn_mulmid_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -void refmpn_mulmid (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -void refmpn_mullo_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -void refmpn_mul_any (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -void refmpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -void refmpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -void refmpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -void refmpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_neg (mp_ptr, mp_srcptr, mp_size_t); -mp_size_t refmpn_normalize (mp_srcptr, mp_size_t); - -unsigned long refmpn_popcount (mp_srcptr, mp_size_t); -mp_limb_t refmpn_preinv_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t, unsigned); -mp_limb_t refmpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t); - -void refmpn_random (mp_ptr, mp_size_t); -void refmpn_random2 (mp_ptr, mp_size_t); -mp_limb_t refmpn_random_limb (void); - -mp_limb_t refmpn_rsh1add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_rsh1sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned); -mp_limb_t refmpn_rshift_or_copy (mp_ptr, mp_srcptr, mp_size_t, unsigned); -mp_limb_t refmpn_rshift_or_copy_any (mp_ptr, mp_srcptr, mp_size_t, unsigned); - -mp_limb_t refmpn_sb_div_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); -unsigned long refmpn_scan0 (mp_srcptr, unsigned long); -unsigned long refmpn_scan1 (mp_srcptr, unsigned long); -void refmpn_setbit (mp_ptr, unsigned long); -void refmpn_sqr (mp_ptr, mp_srcptr, mp_size_t); -void refmpn_sqrlo (mp_ptr, mp_srcptr, mp_size_t); -mp_size_t refmpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -void refmpn_sub_ddmmss (mp_limb_t *, mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t, mp_limb_t); -mp_limb_t refmpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -mp_limb_t refmpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_sub_err1_n (mp_ptr, mp_srcptr, mp_srcptr, mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_sub_err2_n (mp_ptr, mp_srcptr, mp_srcptr, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_sub_err3_n (mp_ptr, mp_srcptr, mp_srcptr, mp_ptr, mp_srcptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_sub_nc (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_sublsh1_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_sublsh2_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_sublsh_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, unsigned int); -mp_limb_t refmpn_sublsh1_n_ip1 (mp_ptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_sublsh2_n_ip1 (mp_ptr, mp_srcptr, mp_size_t); -mp_limb_t refmpn_sublsh_n_ip1 (mp_ptr, mp_srcptr, mp_size_t, unsigned int); -mp_limb_t refmpn_sublsh1_nc (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_sublsh2_nc (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_sublsh_nc (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, unsigned int, mp_limb_t); -mp_limb_t refmpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); -mp_limb_t refmpn_submul_1c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t); - -mp_limb_signed_t refmpn_rsblsh1_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -mp_limb_signed_t refmpn_rsblsh2_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -mp_limb_signed_t refmpn_rsblsh_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, unsigned int); -mp_limb_signed_t refmpn_rsblsh1_nc (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_signed_t); -mp_limb_signed_t refmpn_rsblsh2_nc (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_signed_t); -mp_limb_signed_t refmpn_rsblsh_nc (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, unsigned int, mp_limb_signed_t); - -void refmpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); -int refmpn_tstbit (mp_srcptr, unsigned long); - -mp_limb_t refmpn_udiv_qrnnd (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); -mp_limb_t refmpn_udiv_qrnnd_r (mp_limb_t, mp_limb_t, mp_limb_t, mp_limb_t *); -mp_limb_t refmpn_umul_ppmm (mp_limb_t *, mp_limb_t, mp_limb_t); -mp_limb_t refmpn_umul_ppmm_r (mp_limb_t, mp_limb_t, mp_limb_t *); - -void refmpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -void refmpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -void refmpn_zero (mp_ptr, mp_size_t); -void refmpn_zero_extend (mp_ptr, mp_size_t, mp_size_t); -int refmpn_zero_p (mp_srcptr, mp_size_t); - -void refmpn_binvert (mp_ptr, mp_srcptr, mp_size_t, mp_ptr); -void refmpn_invert (mp_ptr, mp_srcptr, mp_size_t, mp_ptr); - - -void refmpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); -void refmpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - - -void refmpz_combit (mpz_ptr, unsigned long); -unsigned long refmpz_hamdist (mpz_srcptr, mpz_srcptr); -int refmpz_kronecker (mpz_srcptr, mpz_srcptr); -int refmpz_jacobi (mpz_srcptr, mpz_srcptr); -int refmpz_legendre (mpz_srcptr, mpz_srcptr); -int refmpz_kronecker_si (mpz_srcptr, long); -int refmpz_kronecker_ui (mpz_srcptr, unsigned long); -int refmpz_si_kronecker (long, mpz_srcptr); -int refmpz_ui_kronecker (unsigned long, mpz_srcptr); - -void refmpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long); - - -#if defined (__cplusplus) -} -#endif - - -/* Establish ostringstream and istringstream. Do this here so as to hide - the conditionals, rather than putting stuff in each test program. - - Oldish versions of g++, like 2.95.2, don't have <sstream>, only - <strstream>. Fake up ostringstream and istringstream classes, but not a - full implementation, just enough for our purposes. */ - -#ifdef __cplusplus -#if 1 || HAVE_SSTREAM -#include <sstream> -#else /* ! HAVE_SSTREAM */ -#include <string> -#include <strstream> -class -ostringstream : public std::ostrstream { - public: - string str() { - int pcount = ostrstream::pcount (); - char *s = (char *) (*__gmp_allocate_func) (pcount + 1); - memcpy (s, ostrstream::str(), pcount); - s[pcount] = '\0'; - string ret = string(s); - (*__gmp_free_func) (s, pcount + 1); - return ret; } -}; -class -istringstream : public std::istrstream { - public: - istringstream (const char *s) : istrstream (s) { }; -}; -#endif /* ! HAVE_SSTREAM */ -#endif /* __cplusplus */ - - -#define TESTS_REPS(count, argv, argc) \ - do { \ - char *envval, *end; \ - double repfactor; \ - int reps_nondefault = 0; \ - if (argc > 1) \ - { \ - count = strtol (argv[1], &end, 0); \ - if (*end || count <= 0) \ - { \ - fprintf (stderr, "Invalid test count: %s.\n", argv[1]); \ - exit (1); \ - } \ - argv++; \ - argc--; \ - reps_nondefault = 1; \ - } \ - envval = getenv ("GMP_CHECK_REPFACTOR"); \ - if (envval != NULL) \ - { \ - repfactor = strtod (envval, &end); \ - if (*end || repfactor <= 0) \ - { \ - fprintf (stderr, "Invalid repfactor: %f.\n", repfactor); \ - exit (1); \ - } \ - count *= repfactor; \ - count = MAX (count, 1); \ - reps_nondefault = 1; \ - } \ - if (reps_nondefault) \ - printf ("Running test with %ld repetitions (include this in bug reports)\n",\ - (long) count); \ - } while (0) - - -#endif /* __TESTS_H__ */ diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/trace.c b/src/plugins/e-acsl/contrib/libgmp/tests/trace.c deleted file mode 100644 index 4b05bdb8244..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/trace.c +++ /dev/null @@ -1,318 +0,0 @@ -/* Support for diagnostic traces. - -Copyright 1999-2005 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - - -/* Future: Would like commas printed between limbs in hex or binary, but - perhaps not always since it might upset cutting and pasting into bc or - whatever. */ - - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> /* for strlen */ - -#include "gmp.h" -#include "gmp-impl.h" - -#include "tests.h" - - -/* Number base for the various trace printing routines. - Set this in main() or with the debugger. - If hexadecimal is going to be fed into GNU bc, remember to use -16 - because bc requires upper case. */ - -int mp_trace_base = 10; - - -void -mp_trace_start (const char *name) -{ - if (name != NULL && name[0] != '\0') - printf ("%s=", name); - - switch (ABS (mp_trace_base)) { - case 2: printf ("bin:"); break; - case 8: printf ("oct:"); break; - case 10: break; - case 16: printf ("0x"); break; - default: printf ("base%d:", ABS (mp_trace_base)); break; - } -} - -/* Print "name=value\n" to stdout for an mpq_t value. */ -void -mpq_trace (const char *name, mpq_srcptr q) -{ - mp_trace_start (name); - if (q == NULL) - { - printf ("NULL\n"); - return; - } - - mpq_out_str (stdout, mp_trace_base, q); - printf ("\n"); -} - - -/* Print "name=value\n" to stdout for an mpz_t value. */ -void -mpz_trace (const char *name, mpz_srcptr z) -{ - mpq_t q; - mp_limb_t one; - - if (z == NULL) - { - mpq_trace (name, NULL); - return; - } - - q->_mp_num._mp_alloc = ALLOC(z); - q->_mp_num._mp_size = SIZ(z); - q->_mp_num._mp_d = PTR(z); - - one = 1; - q->_mp_den._mp_alloc = 1; - q->_mp_den._mp_size = 1; - q->_mp_den._mp_d = &one; - - mpq_trace(name, q); -} - - -/* Print "name=value\n" to stdout for an mpf_t value. */ -void -mpf_trace (const char *name, mpf_srcptr f) -{ - mp_trace_start (name); - if (f == NULL) - { - printf ("NULL\n"); - return; - } - - mpf_out_str (stdout, ABS (mp_trace_base), 0, f); - printf ("\n"); -} - - -/* Print "namenum=value\n" to stdout for an mpz_t value. - "name" should have a "%d" to get the number. */ -void -mpz_tracen (const char *name, int num, mpz_srcptr z) -{ - if (name != NULL && name[0] != '\0') - { - printf (name, num); - putchar ('='); - } - mpz_trace (NULL, z); -} - - -/* Print "name=value\n" to stdout for an mpn style ptr,size. */ -void -mpn_trace (const char *name, mp_srcptr ptr, mp_size_t size) -{ - mpz_t z; - if (ptr == NULL) - { - mpz_trace (name, NULL); - return; - } - MPN_NORMALIZE (ptr, size); - PTR(z) = (mp_ptr) ptr; - SIZ(z) = size; - ALLOC(z) = size; - mpz_trace (name, z); -} - -/* Print "name=value\n" to stdout for a limb, nail doesn't have to be zero. */ -void -mp_limb_trace (const char *name, mp_limb_t n) -{ -#if GMP_NAIL_BITS != 0 - mp_limb_t a[2]; - a[0] = n & GMP_NUMB_MASK; - a[1] = n >> GMP_NUMB_BITS; - mpn_trace (name, a, (mp_size_t) 2); -#else - mpn_trace (name, &n, (mp_size_t) 1); -#endif -} - - -/* Print "namenum=value\n" to stdout for an mpn style ptr,size. - "name" should have a "%d" to get the number. */ -void -mpn_tracen (const char *name, int num, mp_srcptr ptr, mp_size_t size) -{ - if (name != NULL && name[0] != '\0') - { - printf (name, num); - putchar ('='); - } - mpn_trace (NULL, ptr, size); -} - - -/* Print "namenum=value\n" to stdout for an array of mpn style ptr,size. - - "a" is an array of pointers, each a[i] is a pointer to "size" many limbs. - The formal parameter isn't mp_srcptr because that causes compiler - warnings, but the values aren't modified. - - "name" should have a printf style "%d" to get the array index. */ - -void -mpn_tracea (const char *name, const mp_ptr *a, int count, mp_size_t size) -{ - int i; - for (i = 0; i < count; i++) - mpn_tracen (name, i, a[i], size); -} - - -/* Print "value\n" to a file for an mpz_t value. Any previous contents of - the file are overwritten, so you need different file names each time this - is called. - - Overwriting the file is a feature, it means you get old data replaced - when you run a test program repeatedly. */ - -void -mpn_trace_file (const char *filename, mp_srcptr ptr, mp_size_t size) -{ - FILE *fp; - mpz_t z; - - fp = fopen (filename, "w"); - if (fp == NULL) - { - perror ("fopen"); - abort(); - } - - MPN_NORMALIZE (ptr, size); - PTR(z) = (mp_ptr) ptr; - SIZ(z) = (int) size; - - mpz_out_str (fp, mp_trace_base, z); - fprintf (fp, "\n"); - - if (ferror (fp) || fclose (fp) != 0) - { - printf ("error writing %s\n", filename); - abort(); - } -} - - -/* Print "value\n" to a set of files, one file for each element of the given - array of mpn style ptr,size. Any previous contents of the files are - overwritten, so you need different file names each time this is called. - Each file is "filenameN" where N is 0 to count-1. - - "a" is an array of pointers, each a[i] is a pointer to "size" many limbs. - The formal parameter isn't mp_srcptr because that causes compiler - warnings, but the values aren't modified. - - Overwriting the files is a feature, it means you get old data replaced - when you run a test program repeatedly. The output style isn't - particularly pretty, but at least it gets something out, and you can cat - the files into bc, or whatever. */ - -void -mpn_tracea_file (const char *filename, - const mp_ptr *a, int count, mp_size_t size) -{ - char *s; - int i; - TMP_DECL; - - TMP_MARK; - s = (char *) TMP_ALLOC (strlen (filename) + 50); - - for (i = 0; i < count; i++) - { - sprintf (s, "%s%d", filename, i); - mpn_trace_file (s, a[i], size); - } - - TMP_FREE; -} - - -void -byte_trace (const char *name, const void *ptr, mp_size_t size) -{ - const char *fmt; - mp_size_t i; - - mp_trace_start (name); - - switch (mp_trace_base) { - case 8: fmt = " %o"; break; - case 10: fmt = " %d"; break; - case 16: fmt = " %x"; break; - case -16: fmt = " %X"; break; - default: printf ("Oops, unsupported base in byte_trace\n"); abort (); break; - } - - for (i = 0; i < size; i++) - printf (fmt, (int) ((unsigned char *) ptr)[i]); - printf ("\n"); -} - -void -byte_tracen (const char *name, int num, const void *ptr, mp_size_t size) -{ - if (name != NULL && name[0] != '\0') - { - printf (name, num); - putchar ('='); - } - byte_trace (NULL, ptr, size); -} - - -void -d_trace (const char *name, double d) -{ - union { - double d; - unsigned char b[sizeof(double)]; - } u; - int i; - - if (name != NULL && name[0] != '\0') - printf ("%s=", name); - - u.d = d; - printf ("["); - for (i = 0; i < sizeof (u.b); i++) - { - if (i != 0) - printf (" "); - printf ("%02X", (int) u.b[i]); - } - printf ("] %.20g\n", d); -} diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/x86call.asm b/src/plugins/e-acsl/contrib/libgmp/tests/x86call.asm deleted file mode 100644 index 462b68bad63..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/x86call.asm +++ /dev/null @@ -1,154 +0,0 @@ -dnl x86 calling conventions checking. - -dnl Copyright 2000, 2003, 2010, 2013 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library test suite. - -dnl The GNU MP Library test suite is free software; you can redistribute it -dnl and/or modify it under the terms of the GNU General Public License as -dnl published by the Free Software Foundation; either version 3 of the -dnl License, or (at your option) any later version. - -dnl The GNU MP Library test suite is distributed in the hope that it will be -dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -dnl Public License for more details. - -dnl You should have received a copy of the GNU General Public License along -dnl with the GNU MP Library test suite. If not, see -dnl https://www.gnu.org/licenses/. - - -dnl The current version of the code attempts to keep the call/return -dnl prediction stack valid, but matching calls and returns. - -include(`../config.m4') - - -C void x86_fldcw (unsigned short cw); -C -C Execute an fldcw, setting the x87 control word to cw. - -PROLOGUE(x86_fldcw) - fldcw 4(%esp) - ret -EPILOGUE() - - -C unsigned short x86_fstcw (void); -C -C Execute an fstcw, returning the current x87 control word. - -PROLOGUE(x86_fstcw) - xor %eax, %eax - push %eax - fstcw (%esp) - pop %eax - ret -EPILOGUE() - - -dnl Instrumented profiling doesn't come out quite right below, since we don't -dnl do an actual "ret". There's only a few instructions here, so there's no -dnl great need to get them separately accounted, just let them get attributed -dnl to the caller. FIXME this comment might no longer be true. - -ifelse(WANT_PROFILING,instrument, -`define(`WANT_PROFILING',no)') - - -C int calling_conventions (...); -C -C The global variable "calling_conventions_function" is the function to -C call, with the arguments as passed here. -C -C Perhaps the finit should be done only if the tags word isn't clear, but -C nothing uses the rounding mode or anything at the moment. - -define(`WANT_EBX', eval(4*0)($1)) -define(`WANT_EBP', eval(4*1)($1)) -define(`WANT_ESI', eval(4*2)($1)) -define(`WANT_EDI', eval(4*3)($1)) - -define(`JUNK_EAX', eval(4*4)($1)) -define(`JUNK_ECX', eval(4*5)($1)) -define(`JUNK_EDX', eval(4*6)($1)) - -define(`SAVE_EBX', eval(4*7)($1)) -define(`SAVE_EBP', eval(4*8)($1)) -define(`SAVE_ESI', eval(4*9)($1)) -define(`SAVE_EDI', eval(4*10)($1)) - -define(`RETADDR', eval(4*11)($1)) - -define(`EBX', eval(4*12)($1)) -define(`EBP', eval(4*13)($1)) -define(`ESI', eval(4*14)($1)) -define(`EDI', eval(4*15)($1)) -define(`EFLAGS', eval(4*16)($1)) - - -define(G, -m4_assert_numargs(1) -`GSYM_PREFIX`'$1') - - TEXT - ALIGN(8) -PROLOGUE(calling_conventions) - LEA( G(calling_conventions_values), %ecx) - pop RETADDR(%ecx) - - mov %ebx, SAVE_EBX(%ecx) - mov %ebp, SAVE_EBP(%ecx) - mov %esi, SAVE_ESI(%ecx) - mov %edi, SAVE_EDI(%ecx) - - C Values we expect to see unchanged, as per amd64check.c - mov WANT_EBX(%ecx), %ebx - mov WANT_EBP(%ecx), %ebp - mov WANT_ESI(%ecx), %esi - mov WANT_EDI(%ecx), %edi - - C Try to provoke a problem by starting with junk in the caller-saves - C registers, especially in %eax and %edx which will be return values - mov JUNK_EAX(%ecx), %eax - mov JUNK_EDX(%ecx), %edx -C mov JUNK_ECX(%ecx), %ecx - -ifdef(`PIC',` - LEA( G(calling_conventions_function), %ecx) - call *(%ecx) -',` - call *G(calling_conventions_function) -') - - LEA( G(calling_conventions_values), %ecx) - - mov %ebx, EBX(%ecx) - mov %ebp, EBP(%ecx) - mov %esi, ESI(%ecx) - mov %edi, EDI(%ecx) - - pushf - pop %ebx - mov %ebx, EFLAGS(%ecx) - - mov SAVE_EBX(%ecx), %ebx - mov SAVE_ESI(%ecx), %esi - mov SAVE_EDI(%ecx), %edi - mov SAVE_EBP(%ecx), %ebp - - push RETADDR(%ecx) - -ifdef(`PIC',` - LEA( G(calling_conventions_fenv), %ecx) - fstenv (%ecx) -',` - fstenv G(calling_conventions_fenv) -') - finit - - ret - -EPILOGUE() -ASM_END() diff --git a/src/plugins/e-acsl/contrib/libgmp/tests/x86check.c b/src/plugins/e-acsl/contrib/libgmp/tests/x86check.c deleted file mode 100644 index 065dc732922..00000000000 --- a/src/plugins/e-acsl/contrib/libgmp/tests/x86check.c +++ /dev/null @@ -1,118 +0,0 @@ -/* x86 calling conventions checking. */ - -/* -Copyright 2000, 2001, 2010 Free Software Foundation, Inc. - -This file is part of the GNU MP Library test suite. - -The GNU MP Library test suite is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 3 of the License, -or (at your option) any later version. - -The GNU MP Library test suite is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along with -the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ - -#include <stdio.h> -#include "gmp.h" -#include "gmp-impl.h" -#include "tests.h" - - -/* Vector if constants and register values. We use one vector to allow access - via a base pointer, very beneficial for the PIC-enabled amd64call.asm. */ -mp_limb_t calling_conventions_values[17] = -{ - CNST_LIMB(0x12345678), /* want_ebx */ - CNST_LIMB(0x89ABCDEF), /* want_ebp */ - CNST_LIMB(0xDEADBEEF), /* want_esi */ - CNST_LIMB(0xFFEEDDCC), /* want_edi */ - - CNST_LIMB(0xFEEDABBA), /* JUNK_EAX */ - CNST_LIMB(0xAB78DE89), /* JUNK_ECX */ - CNST_LIMB(0x12389018) /* JUNK_EDX */ - - /* rest of array used for dynamic values. */ -}; - -/* Index starts for various regions in above vector. */ -#define WANT 0 -#define JUNK 4 -#define SAVE 7 -#define RETADDR 11 -#define VAL 12 -#define EFLAGS 16 - - -/* values to check */ -#ifdef __cplusplus -extern "C" { -#endif -struct { - unsigned control; - unsigned status; - unsigned tag; - unsigned other[4]; -} calling_conventions_fenv; -#ifdef __cplusplus -} -#endif - -/* expected values, as per x86call.asm */ -#define VALUE_EBX 0x01234567 -#define VALUE_ESI 0x89ABCDEF -#define VALUE_EDI 0xFEDCBA98 -#define VALUE_EBP 0x76543210 - - -const char *regname[] = {"ebx", "ebp", "esi", "edi"}; - -#define DIR_BIT(eflags) (((eflags) & (1<<10)) != 0) - - -/* Return 1 if ok, 0 if not */ - -int -calling_conventions_check (void) -{ - const char *header = "Violated calling conventions:\n"; - int ret = 1; - int i; - -#define CHECK(callreg, regstr, value) \ - if (callreg != value) \ - { \ - printf ("%s %s got 0x%08X want 0x%08X\n", \ - header, regstr, callreg, value); \ - header = ""; \ - ret = 0; \ - } - - for (i = 0; i < 4; i++) - { - CHECK (calling_conventions_values[VAL+i], regname[i], calling_conventions_values[WANT+i]); - } - - if (DIR_BIT (calling_conventions_values[EFLAGS]) != 0) - { - printf ("%s eflags dir bit got %d want 0\n", - header, DIR_BIT (calling_conventions_values[EFLAGS])); - header = ""; - ret = 0; - } - - if ((calling_conventions_fenv.tag & 0xFFFF) != 0xFFFF) - { - printf ("%s fpu tags got 0x%X want 0xFFFF\n", - header, calling_conventions_fenv.tag & 0xFFFF); - header = ""; - ret = 0; - } - - return ret; -} -- GitLab