summaryrefslogtreecommitdiff
path: root/ext/gmp/config.m4
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2003-11-19 04:44:06 +0000
committerfoobar <sniper@php.net>2003-11-19 04:44:06 +0000
commit56ca2bb6c18d92158ddbcb5e99d0c76da4625dbd (patch)
treee6367f5fb98233b953a1278665d7428cf070ad31 /ext/gmp/config.m4
parent55b83c36e333d08f621874f65bc1d1f495285b54 (diff)
downloadphp-git-56ca2bb6c18d92158ddbcb5e99d0c76da4625dbd.tar.gz
- Fixed bug #26267 (gmp_random() leaks memory and does not produce random numbers)
# ..and mpz_random() is obsolete according to the GNU MP manual.
Diffstat (limited to 'ext/gmp/config.m4')
-rw-r--r--ext/gmp/config.m414
1 files changed, 13 insertions, 1 deletions
diff --git a/ext/gmp/config.m4 b/ext/gmp/config.m4
index 39e1bb24f9..aeb7edbd55 100644
--- a/ext/gmp/config.m4
+++ b/ext/gmp/config.m4
@@ -3,7 +3,7 @@ dnl $Id$
dnl
PHP_ARG_WITH(gmp, for GNU MP support,
-[ --with-gmp Include GNU MP support])
+[ --with-gmp[=DIR] Include GNU MP support])
if test "$PHP_GMP" != "no"; then
@@ -14,6 +14,18 @@ if test "$PHP_GMP" != "no"; then
if test -z "$GMP_DIR"; then
AC_MSG_ERROR(Unable to locate gmp.h)
fi
+
+ PHP_CHECK_LIBRARY(gmp, __gmp_randinit_lc_2exp_size,
+ [],[
+ PHP_CHECK_LIBRARY(gmp, gmp_randinit_lc_2exp_size,
+ [],[
+ AC_MSG_ERROR([GNU MP Library version 4.1.2 or greater required.])
+ ],[
+ -L$GMP_DIR/lib
+ ])
+ ],[
+ -L$GMP_DIR/lib
+ ])
PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_DIR/lib, GMP_SHARED_LIBADD)
PHP_ADD_INCLUDE($GMP_DIR/include)