From 1fe332ad8b92c6dc3c68d82f8f79f132726d9091 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Wed, 28 Nov 2018 22:33:47 +0100
Subject: [PATCH] Update configure check to require GMP-6.0.0 or later.

---
 ChangeLog    | 3 +++
 configure.ac | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ffa8198c..6dd03d26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2018-11-28  Niels Möller  <nisse@lysator.liu.se>
 
+	* configure.ac: Update GMP check. Check for the function
+	mpn_sec_div_r, available since GMP-6.0.0.
+
 	* testsuite/rsa-encrypt-test.c (test_main): Fix allocation of
 	decrypted storage. Update test of rsa_decrypt, to allow clobbering
 	of all of the passed in message area.
diff --git a/configure.ac b/configure.ac
index bb33e414..ec3fbe94 100644
--- a/configure.ac
+++ b/configure.ac
@@ -236,9 +236,9 @@ fi
 # Checks for libraries
 if test "x$enable_public_key" = "xyes" ; then
   if test "x$enable_mini_gmp" = "xno" ; then
-    AC_CHECK_LIB(gmp, __gmpz_powm_sec,,
+    AC_CHECK_LIB(gmp, __gmpn_sec_div_r,,
         [AC_MSG_WARN(
-    [GNU MP not found, or too old. GMP-5.0 or later is needed, see http://gmplib.org/.
+    [GNU MP not found, or too old. GMP-6.0 or later is needed, see https://gmplib.org/.
     Support for public key algorithms will be unavailable.])]
         enable_public_key=no)
 
-- 
GitLab