summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2008-11-20 14:29:47 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2008-11-20 14:29:47 +0000
commitf58d9ec68c462d4d700dfab5e3b140b0a15deebe (patch)
treee6f04548cd558a735a1d3d50bfed1c08d61ebcda
parentcf2baeaba8056e98f6242b93c02c112ae3731e94 (diff)
downloadmpc-f58d9ec68c462d4d700dfab5e3b140b0a15deebe.tar.gz
implemented change proposed by M. Gastineau:
link a mini program with mpfr git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@348 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r--configure.ac15
1 files changed, 12 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 198ca7d..85daf6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,6 +77,7 @@ AC_ARG_ENABLE([logging],
# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL
+AC_PROG_SED
AC_PATH_PROG([SED], [sed], no)
if test "x$SED" = "xno"; then
@@ -87,9 +88,17 @@ fi
AC_CHECK_LIB([gmp], [__gmpz_init],
[LIBS="-lgmp $LIBS"],
[AC_MSG_ERROR([libgmp not found or uses a different ABI.])])
-AC_CHECK_LIB([mpfr], [mpfr_init],
- [LIBS="-lmpfr $LIBS"],
- [AC_MSG_ERROR([libmpfr not found or uses a different ABI.])])
+#AC_CHECK_LIB([mpfr], [mpfr_init],
+# [LIBS="-lmpfr $LIBS"],
+# [AC_MSG_ERROR([libmpfr not found or uses a different ABI.])])
+LIBS="-lmpfr $LIBS"
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include "mpfr.h"]],
+ [[mpfr_t x; mpfr_init(x) ; mpfr_clear(x);]]
+ )],
+ [],
+ [AC_MSG_ERROR([libmpfr not found or uses a different ABI.])])
# Check for a recent GMP
AC_MSG_CHECKING(for recent GMP)