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