This is the mail archive of the
mailing list for the GCC project.
Re: Including GMP/MPFR in GCC repository?
- From: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: Mark Mitchell <mark at codesourcery dot com>, gcc at gcc dot gnu dot org, fortran at gcc dot gnu dot org, paul at codesourcery dot com, kargl at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 12 Oct 2006 14:14:53 -0400 (EDT)
- Subject: Re: Including GMP/MPFR in GCC repository?
- References: <Pine.GSO.email@example.com> <452B11F1.firstname.lastname@example.org> <Pine.GSO.email@example.com> <20061012053416.GA5111@troutmask.apl.washington.edu>
On Wed, 11 Oct 2006, Steve Kargl wrote:
> It should be straight forward to modify the current configure tests
> in toplevel for the versions of gmp and mpfr you need. I would
> recommend at least mpfr 2.2.0 (which would allow me to kill the ugly
> hacks in gfortran). For gmp, you may be able to use a version as
> old as 4.1.0.
Like this? I combined the two MPFR tests into one and had it stop if
configure can't find the right versions of the libraries.
Tested on sparc-sun-solaris2.10 via "configure" with no GMP/MPFR, with an
older MPFR version and with current versions. It did the "right thing" in
Okay for stage1?
PS: nuts, I just realized I need up update install.texi accordingly. If
this patch is acceptable I'll post a followup patch for that.
2006-10-12 Kaveh R. Ghazi <firstname.lastname@example.org>
* configure.in: Require GMP-4.1+ and MPFR-2.2+.
* configure: Regenerate.
diff -rup orig/egcc-SVN20061011/configure.in egcc-SVN20061011/configure.in
--- orig/egcc-SVN20061011/configure.in 2006-09-27 20:01:59.000000000 -0400
+++ egcc-SVN20061011/configure.in 2006-10-12 13:55:25.073919479 -0400
@@ -1103,24 +1103,24 @@ choke me
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
if test x"$have_gmp" = xyes; then
+ LIBS="$LIBS $gmplibs"
AC_MSG_CHECKING([for correct version of mpfr.h])
- AC_TRY_COMPILE([#include "gmp.h"
+ AC_TRY_LINK([#include <gmp.h>
#if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2)
-], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy version of MPFR detected])])
- 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])
+ mpfr_t n; mpfr_init(n);
+], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
+if 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.])
# Flags needed for both GMP and/or MPFR