2001-12-01 03:00:13 +08:00
|
|
|
dnl
|
2000-11-27 02:36:16 +08:00
|
|
|
dnl $Id$
|
2001-12-01 03:00:13 +08:00
|
|
|
dnl
|
2000-11-27 02:36:16 +08:00
|
|
|
|
2001-12-01 03:00:13 +08:00
|
|
|
PHP_ARG_WITH(gmp, for GNU MP support,
|
2013-08-07 02:06:09 +08:00
|
|
|
[ --with-gmp[=DIR] Include GNU MP support])
|
2000-11-27 02:36:16 +08:00
|
|
|
|
|
|
|
if test "$PHP_GMP" != "no"; then
|
|
|
|
|
2003-10-01 06:36:43 +08:00
|
|
|
for i in $PHP_GMP /usr/local /usr; do
|
2003-10-01 10:53:23 +08:00
|
|
|
test -f $i/include/gmp.h && GMP_DIR=$i && break
|
2000-11-27 02:36:16 +08:00
|
|
|
done
|
|
|
|
|
|
|
|
if test -z "$GMP_DIR"; then
|
|
|
|
AC_MSG_ERROR(Unable to locate gmp.h)
|
|
|
|
fi
|
2003-11-19 12:44:06 +08:00
|
|
|
|
|
|
|
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.])
|
|
|
|
],[
|
2004-11-03 22:32:52 +08:00
|
|
|
-L$GMP_DIR/$PHP_LIBDIR
|
2003-11-19 12:44:06 +08:00
|
|
|
])
|
|
|
|
],[
|
2004-11-03 22:32:52 +08:00
|
|
|
-L$GMP_DIR/$PHP_LIBDIR
|
2003-11-19 12:44:06 +08:00
|
|
|
])
|
2003-10-01 10:53:23 +08:00
|
|
|
|
2004-11-03 22:32:52 +08:00
|
|
|
PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_DIR/$PHP_LIBDIR, GMP_SHARED_LIBADD)
|
2001-03-28 04:35:04 +08:00
|
|
|
PHP_ADD_INCLUDE($GMP_DIR/include)
|
2000-11-27 02:36:16 +08:00
|
|
|
|
2002-03-13 00:44:00 +08:00
|
|
|
PHP_NEW_EXTENSION(gmp, gmp.c, $ext_shared)
|
2002-06-21 08:15:48 +08:00
|
|
|
PHP_SUBST(GMP_SHARED_LIBADD)
|
2003-10-01 10:53:23 +08:00
|
|
|
AC_DEFINE(HAVE_GMP, 1, [ ])
|
2000-11-27 02:36:16 +08:00
|
|
|
fi
|