Fix GMP v4 compatibility. master
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)
commitd7bff4dddfa10389156ca11f75a5a23e78cf3ab0
tree9fb885dbb09c03c96905d8bb8930ca73362e1230
parent2f841fdf5b33c4eb32cfc5d1b8207585f1880d9a
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>
.gitignore
GHC/Integer/Type.lhs
aclocal.m4
cbits/gmp-wrappers.cmm
configure.ac
include/HsIntegerGmp.h.in [new file with mode: 0644]
integer-gmp.buildinfo.in
integer-gmp.cabal