diff options
author | DJ Delorie <dj@redhat.com> | 2006-11-14 23:26:39 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2006-11-14 23:26:39 +0000 |
commit | 9dbaa84237a7854d05d6e1a8e9c1492647419beb (patch) | |
tree | 820269ca0ca58c65d41c1b90a8282a27dfa4c661 /configure.in | |
parent | 866dcbf333e17c490ccef992235ccf3268f2bccf (diff) | |
download | binutils-gdb-9dbaa84237a7854d05d6e1a8e9c1492647419beb.tar.gz |
* Makefile.tpl (clean-stage*): Sync with GCC (clean).
* Makefile.in: Sync with GCC.
* configure.in: Sync with GCC (mpfr, gmp).
* configure: Sync with GCC.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/configure.in b/configure.in index 71abbbc236f..ccb1b93ecdf 100644 --- a/configure.in +++ b/configure.in @@ -1097,24 +1097,34 @@ 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]) - saved_LIBS="$LIBS" LIBS="$LIBS $gmplibs" + AC_MSG_CHECKING([for correct 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]) +#include <mpfr.h>],[ +#if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2) + choke me +#endif + mpfr_t n; mpfr_init(n); +], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no]) LIBS="$saved_LIBS" fi CFLAGS="$saved_CFLAGS" +if test -d ${srcdir}/gcc && test x$have_gmp != xyes; then + AC_MSG_ERROR([Building GCC requires GMP 4.1+ and MPFR 2.2+. +Try the --with-gmp and/or --with-mpfr options to specify their locations. +Copies of these libraries' source code can be found at their respective +hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/. +See also http://gcc.gnu.org/install/prerequisites.html for additional info.]) +fi + # Flags needed for both GMP and/or MPFR AC_SUBST(gmplibs) AC_SUBST(gmpinc) @@ -1202,7 +1212,6 @@ if test -d ${srcdir}/gcc; then subdir_requires= boot_language= build_by_default= - need_gmp= . ${lang_frag} potential_languages="${potential_languages},${language}" # This is quite sensitive to the ordering of the case statement arms. @@ -1248,18 +1257,6 @@ if test -d ${srcdir}/gcc; then esac done - # Disable languages that need GMP if it isn't available. - 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]) - ;; - *:no:yes) - # Silently disable. - add_this_lang=no - ;; - esac - # Disable a language that is unsupported by the target. case " $unsupported_languages " in *" $language "*) |