diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2006-09-27 20:15:22 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2006-09-27 20:15:22 +0000 |
commit | e48d66a949a0ea367bb3df15df5f345f46184d9f (patch) | |
tree | 3792a732440b9bb02382ecb8b58e6ed8d955c8f9 /configure.in | |
parent | c394e8918d7d752d9f8a6aba037ab6c7647ab483 (diff) | |
download | gcc-e48d66a949a0ea367bb3df15df5f345f46184d9f.zip gcc-e48d66a949a0ea367bb3df15df5f345f46184d9f.tar.gz gcc-e48d66a949a0ea367bb3df15df5f345f46184d9f.tar.bz2 |
re PR fortran/28276 (EXPONENT() broken for real constants)
* configure.in: Check for GMP 4.1 or newer. Check for MPFR 2.2.0
or newer.
* configure: Regenerated.
* doc/install.texi: Document required versions of GMP and MPFR.
* fortran/arith.c: Conditionally include arctangent2().
(gfc_check_real_range): Use mpfr_subnormalize in preference to local
hack.
* fortran/trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Append
l for long double functions.
* fortran/simplify.c: Wrap Copyright to new line.
(gfc_simplify_atan2): Use mpfr_atan2 in preference to arctangent2().
(gfc_simplify_log): Ditto.
PR fortran/28276
* fortran/simplify.c (gfc_simplify_exponent): Use mpfr_get_exp in
preference to broken local hack.
PR fortran/27021
* fortran/simplify.c (gfc_simplify_nearest): Use mpfr_nexttoward and
mpfr_subnormalize to handle numbers near zero in preference to broken
local hack.
PR fortran/28276
* testsuite/gfortran.dg/exponent_1.f90: New test.
PR fortran/27021
* testsuite/gfortran.dg/nearest_1.f90: New test.
From-SVN: r117257
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/configure.in b/configure.in index 99606fc..2162f25 100644 --- a/configure.in +++ b/configure.in @@ -1097,17 +1097,23 @@ CFLAGS="$CFLAGS $gmpinc" # Check GMP actually works AC_MSG_CHECKING([for correct version of gmp.h]) AC_TRY_COMPILE([#include "gmp.h"],[ -#if __GNU_MP_VERSION < 3 +#if __GNU_MP_VERSION < 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR < 1) choke me #endif -], [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]); have_gmp=no]) +], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no]) if test x"$have_gmp" = xyes; then - AC_MSG_CHECKING([for MPFR]) + AC_MSG_CHECKING([for correct version of mpfr.h]) + AC_TRY_COMPILE([#include "gmp.h" +#include <mpfr.h>],[ +#if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2) + choke me +#endif +], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy version of MPFR detected])]) saved_LIBS="$LIBS" LIBS="$LIBS $gmplibs" + AC_MSG_CHECKING([for any version of mpfr.h]) AC_TRY_LINK([#include <gmp.h> #include <mpfr.h>], [mpfr_t n; mpfr_init(n);], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no]) @@ -1252,7 +1258,7 @@ if test -d ${srcdir}/gcc; then case ,${enable_languages},:${have_gmp}:${need_gmp} in *,${language},*:no:yes) # Specifically requested language; tell them. - AC_MSG_ERROR([GMP with MPFR support is required to build $language]) + AC_MSG_ERROR([GMP 4.1 and MPFR 2.2 or newer versions required by $language]) ;; *:no:yes) # Silently disable. |