summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-31 18:12:21 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-31 18:12:21 +0000
commit17b6993a1fab1c7c9d887766a2bc66fd289acf6d (patch)
tree0de7e4ea535670852bf83d117d0ff6a1c2196d5c /configure.ac
parent0767c2a88a20b393f653680acb0e6e7ac1da6f9f (diff)
downloadgcc-17b6993a1fab1c7c9d887766a2bc66fd289acf6d.tar.gz
* configure.ac: Add "recommended" version checks for GMP/MPC.
Update recommended GMP/MPFR/MPC versions. * configure: Regenerate. gcc: * doc/install.texi: Update recommended GMP/MPFR/MPC versions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156408 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac37
1 files changed, 27 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 4ea3f25283f..34641667339 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1343,18 +1343,27 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
have_gmp=yes
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $gmpinc"
- # Check GMP actually works
- AC_MSG_CHECKING([for correct version of gmp.h])
+ # Check for the recommended and required versions of GMP.
+ AC_MSG_CHECKING([for the correct version of gmp.h])
AC_TRY_COMPILE([#include "gmp.h"],[
- #if __GNU_MP_VERSION < 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR < 2)
+ #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+ #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL)
+ #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,2,0)
choke me
#endif
- ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
+ ], AC_TRY_COMPILE([#include <gmp.h>],[
+ #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
+ #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL)
+ #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,3,2)
+ choke me
+ #endif
+ ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])]),
+ [AC_MSG_RESULT([no]); have_gmp=no])
# If we have GMP, check the MPFR version.
if test x"$have_gmp" = xyes; then
- dnl MPFR 2.3.1 is acceptable, but MPFR 2.3.2 is better.
- AC_MSG_CHECKING([for correct version of mpfr.h])
+ # Check for the recommended and required versions of MPFR.
+ AC_MSG_CHECKING([for the correct version of mpfr.h])
AC_TRY_COMPILE([#include <gmp.h>
#include <mpfr.h>],[
#if MPFR_VERSION < MPFR_VERSION_NUM(2,3,1)
@@ -1362,7 +1371,7 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
#endif
], AC_TRY_COMPILE([#include <gmp.h>
#include <mpfr.h>],[
- #if MPFR_VERSION < MPFR_VERSION_NUM(2,3,2)
+ #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,2)
choke me
#endif
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])]),
@@ -1371,12 +1380,18 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
# Check for the MPC header version.
if test x"$have_gmp" = xyes ; then
+ # Check for the recommended and required versions of MPC.
AC_MSG_CHECKING([for the correct version of mpc.h])
AC_TRY_COMPILE([#include <mpc.h>],[
- #if MPC_VERSION < MPC_VERSION_NUM (0,8,0)
+ #if MPC_VERSION < MPC_VERSION_NUM(0,8,0)
choke me
#endif
- ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
+ ], AC_TRY_COMPILE([#include <mpc.h>],[
+ #if MPC_VERSION < MPC_VERSION_NUM(0,8,1)
+ choke me
+ #endif
+ ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])]),
+ [AC_MSG_RESULT([no]); have_gmp=no])
fi
# Now check the MPFR library.
@@ -1408,8 +1423,10 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
CFLAGS="$saved_CFLAGS"
+# The library versions listed in the error message below should match
+# the HARD-minimums enforced above.
if test x$have_gmp != xyes; then
- AC_MSG_ERROR([Building GCC requires GMP 4.2+, MPFR 2.3.2+ and MPC 0.8.0+.
+ AC_MSG_ERROR([Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at