summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorthevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2008-09-26 09:49:05 +0000
committerthevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2008-09-26 09:49:05 +0000
commitf0986b30d8ce01b3090ab305a4d93b3bc1d03a2b (patch)
treeccfa15423c83b9cd3dfada6a0e217a46b487a83d /configure.ac
parentba021c14c5f40bd24117023d47405e96d52064d7 (diff)
downloadmpc-f0986b30d8ce01b3090ab305a4d93b3bc1d03a2b.tar.gz
configure.ac: check for a recent MPFR library (adapted from MPFR's configure.in).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@210 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 17 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 13edbd5..6d07917 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,15 +14,15 @@ AC_ARG_WITH([mpfr],
[AC_HELP_STRING([--with-mpfr=DIR],
[MPFR install directory])],
[
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- LDFLAGS="$LDFLAGS -L$withval/lib"
+ CPPFLAGS="-I$withval/include $CPPFLAGS"
+ LDFLAGS="-L$withval/lib $LDFLAGS"
])
AC_ARG_WITH([gmp],
[AC_HELP_STRING([--with-gmp=DIR],
[GMP install directory])],
[
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- LDFLAGS="$LDFLAGS -L$withval/lib"
+ CPPFLAGS="-I$withval/include $CPPFLAGS"
+ LDFLAGS="-L$withval/lib $LDFLAGS"
])
AC_ARG_VAR([MPC_USE_LOGGING], [defined if logging support wanted])
AC_ARG_ENABLE([logging],
@@ -54,6 +54,19 @@ AC_CHECK_LIB([mpfr], [mpfr_clear],
[LIBS="-lmpfr $LIBS"],
[AC_MSG_ERROR([libmpfr not found or uses a different ABI.])])
+# Check for a recent MPFR
+AC_MSG_CHECKING(for recent MPFR)
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include "mpfr.h"
+#if (MPFR_VERSION_MAJOR*100 + MPFR_VERSION_MINOR*10 < 230)
+# error "min MPFR version is 2.3.0"
+error
+#endif
+]])],[AC_MSG_RESULT(yes)],[
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([MPFR 2.3.0 min required])
+])
+
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([limits.h stdlib.h sys/time.h])