summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorpixel <pixel>2003-03-25 08:27:40 +0000
committerpixel <pixel>2003-03-25 08:27:40 +0000
commit3e1220bc766e8a2d2623ffed45ed6d8ec7b8cf38 (patch)
tree059340308ab810c071ea19c774f544b5e5e0d983 /configure.ac
parent11231ea77019fb6a7e4d993eebb9efd95e12ad4a (diff)
Fixing GMP
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 9eccff9..a5a7959 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,6 +88,8 @@ if test x$ac_cv_wd_gzwrite != xyes ; then
fi
GMP_LIBS="-lm"
+AC_LANG_PUSH(C++)
+
if test "$with_gmp" != "no"; then
AC_ARG_WITH(gmp-prefix, [ --with-gmp-prefix=DIR path to GMP],
[if test "$withval" != "no"; then
@@ -108,12 +110,16 @@ if test "$with_gmp" != "no"; then
if test "$found_gmp" = "yes"; then
AC_DEFINE([HAVE_GMP], 1, [Have the GMP library])
+ AC_CHECK_LIB(gmpxx, main,
+ [GMP_LIBS="-lgmp -lm -lgmpxx"])
LIBS="$LIBS $GMP_LIBS"
AC_CHECK_FUNC(__gmp_randinit, AC_DEFINE([HAVE_GMP_RANDINIT], 1, [Have the RandInit function]))
# elif test "$with_gmp" != "no"; then
# AC_MSG_ERROR([Can't find GMP (--without-gmp for cut-down non-GMP build)])
fi
fi
+
+AC_LANG_POP(C++)
AC_SUBST(GMP_LIBS)
AC_DEFINE([HOOK_STDS], 1, [Hook the standard input/outputs])