diff options
-rw-r--r-- | configure.ac | 6 |
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]) |