summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2018-12-20 13:43:57 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2018-12-20 13:43:57 +0000
commit50fb429a88ce0c0ba51aa0ad3388f8b8c3cad72d (patch)
tree78f5131114149ba9e7c9c55afdcc14afdf622b3b /configure.ac
parent8dcd6fcec692f5b4d716557b6f3ed245f1193330 (diff)
downloadmpfr-50fb429a88ce0c0ba51aa0ad3388f8b8c3cad72d.tar.gz
[configure.ac] Support mini-gmp with reduced limb size, in the case
GMP_NUMB_BITS is not defined: guess GMP_NUMB_BITS from the size of mp_limb_t instead of the size of unsigned long. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13350 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index ee99283ef..3b1488de5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -782,7 +782,8 @@ do
ln -s -- "$mini_gmp_path/mini-gmp.$i" "$mpfr_build_src/mini-gmp.$i"
done
-dnl First check whether mini-gmp defines GMP_NUMB_BITS.
+dnl First check whether mini-gmp defines GMP_NUMB_BITS. If it doesn't,
+dnl then guess the value from the size of mp_limb_t.
AC_MSG_CHECKING(for GMP_NUMB_BITS)
how="from mini-gmp.h"
saved_CPPFLAGS="$CPPFLAGS"
@@ -790,8 +791,9 @@ CPPFLAGS="$CPPFLAGS -I$mpfr_build_src"
AC_COMPUTE_INT(mini_gmp_numb_bits, [(GMP_NUMB_BITS)],
[#include <mini-gmp.h>],
[how="not in mini-gmp.h; guessed"
- AC_COMPUTE_INT(mini_gmp_numb_bits, [(sizeof(unsigned long) * CHAR_BIT)],
- [#include <limits.h>],
+ AC_COMPUTE_INT(mini_gmp_numb_bits, [(sizeof(mp_limb_t) * CHAR_BIT)],
+ [#include <limits.h>
+ #include <mini-gmp.h>],
[AC_MSG_FAILURE([cannot define GMP_NUMB_BITS])])
AC_DEFINE_UNQUOTED([GMP_NUMB_BITS], $mini_gmp_numb_bits, [number of bits in a limb])
])