diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-03-28 22:16:07 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-03-28 22:19:12 +0100 |
commit | 07b390d5827da2f46f57e4650167920fb792ebc9 (patch) | |
tree | 65465c23cc30d0ee1aa67c24a6bdcbade77c84fa /configure.ac | |
parent | 06589f5c229c3ce4dd2cb627c90ef4372dd0a571 (diff) |
Allow compilation with GMP < 5.0.0.
* libguile/numbers.c (VARARG_MPZ_ITERATOR)[!HAVE_DECL_MPZ_INITS]: New
macro.
(mpz_inits, mpz_clears)[!HAVE_DECL_MPZ_INITS]: New functions.
* configure.ac: Check for the declaration of `mpz_inits'.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index bcfc1a65e..41a55771e 100644 --- a/configure.ac +++ b/configure.ac @@ -872,6 +872,14 @@ if test "x$HAVE_LIBGMP" != "xyes"; then AC_MSG_ERROR([GNU MP 4.1 or greater not found, see README]) fi +dnl `mpz_inits' and `mpz_clears' appeared in GMP 5.0.0. +save_CPPFLAGS="$CPPFLAGS" +if test "x$LIBGMP_PREFIX" != "x"; then + CPPFLAGS="-I$LIBGMP_PREFIX $CPPFLAGS" +fi +AC_CHECK_DECLS([mpz_inits], [], [], [[#include <gmp.h>]]) +CPPFLAGS="$save_CPPFLAGS" + dnl GNU libunistring is checked for by Gnulib's `libunistring' module. if test "x$LTLIBUNISTRING" = "x"; then AC_MSG_ERROR([GNU libunistring is required, please install it.]) |