Fix GMP v4 compatibility.
authorAustin Seipp <austin@well-typed.com>
Wed, 26 Feb 2014 22:18:20 +0000 (16:18 -0600)
committerAustin Seipp <austin@well-typed.com>
Wed, 26 Feb 2014 22:18:20 +0000 (16:18 -0600)
commit4775d0060a7027196f7c5dd521d5754080667a84
treea197a5951489216f606fff2e594f2eafcc90e05c
parentbcd38ea7f97cc3a3ed192bc0666c816c027bd9fc
Fix GMP v4 compatibility.

We had started relying on GMP 5.x (for usage of mpz_powm_sec), but this
is pretty painful on RHEL-esque targets, which still use GMP 4.x.

In the mean time while we're still supporting this, it's easier to just
fallback to mpz_powm when _sec is unavailable, and emit a WARNING for
using the primitive.

This also installs a header, HsIntegerGmp.h, which clients could use for
a fallback.

As a side note, this will probably also help Debian oldstable users who
might have outdated GMP versions (which I believe is the cause for #8666.)

Reviewed-by: Herbert Valerio Riedel <hvr@gnu.org>
Signed-off-by: Austin Seipp <austin@well-typed.com>
libraries/integer-gmp/.gitignore
libraries/integer-gmp/GHC/Integer/Type.lhs
libraries/integer-gmp/aclocal.m4
libraries/integer-gmp/cbits/gmp-wrappers.cmm
libraries/integer-gmp/configure.ac
libraries/integer-gmp/include/HsIntegerGmp.h.in [new file with mode: 0644]
libraries/integer-gmp/integer-gmp.buildinfo.in
libraries/integer-gmp/integer-gmp.cabal