summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2013-02-14 11:58:00 +0100
committerNiels Möller <nisse@lysator.liu.se>2013-02-14 11:58:00 +0100
commitf1019d019688bf563198b10d0519faa8e09b7eb2 (patch)
tree2df6dd846d1f395dfb3e21aaeed55889fb800a03 /configure.ac
parent2d9a849ee36280400b5f905005313ae1492654d3 (diff)
downloadnettle-f1019d019688bf563198b10d0519faa8e09b7eb2.tar.gz
Configure check for GMP_NUMB_BITS.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3dda4612..848601d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -587,6 +587,20 @@ Support for public key algorithms will be unavailable.])]
# Add -R flags needed to run programs linked with gmp
LSH_RPATH_FIX
+# Check for gmp limb size
+nettle_cv_gmp_numb_bits=0
+if test "$enable_public_key" = yes; then
+ AC_MSG_CHECKING([for GMP limb size])
+ AC_COMPUTE_INT(nettle_cv_gmp_numb_bits, [GMP_NUMB_BITS],
+ [#include <gmp.h>],
+ [AC_MSG_FAILURE([cannot find value of GMP_NUMB_BITS])])
+
+ AC_MSG_RESULT([$nettle_cv_gmp_numb_bits bits])
+fi
+
+GMP_NUMB_BITS="$nettle_cv_gmp_numb_bits"
+AC_SUBST([GMP_NUMB_BITS])
+
AH_TEMPLATE([HAVE_MPZ_POWM_SEC], [Define if mpz_powm_sec is available (appeared in GMP-5)])
AC_CHECK_FUNC(__gmpz_powm_sec, [AC_DEFINE(HAVE_MPZ_POWM_SEC)])