configure.ac: Add "recommended" version checks for GMP/MPC.

* 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.

From-SVN: r156408
This commit is contained in:
Kaveh R. Ghazi 2010-01-31 18:12:21 +00:00 committed by Kaveh Ghazi
parent 8370a62af8
commit 362c6d2fb2
5 changed files with 101 additions and 24 deletions

View File

@ -1,3 +1,9 @@
2010-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.ac: Add "recommended" version checks for GMP/MPC.
Update recommended GMP/MPFR/MPC versions.
* configure: Regenerate.
2010-01-31 Joern Rennecke <joern.rennecke@embecosm.com> 2010-01-31 Joern Rennecke <joern.rennecke@embecosm.com>
* MAINTAINERS: Move my Embecosm email address into the * MAINTAINERS: Move my Embecosm email address into the

72
configure vendored
View File

@ -5467,18 +5467,38 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
have_gmp=yes have_gmp=yes
saved_CFLAGS="$CFLAGS" saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $gmpinc" CFLAGS="$CFLAGS $gmpinc"
# Check GMP actually works # Check for the recommended and required versions of GMP.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct version of gmp.h" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of gmp.h" >&5
$as_echo_n "checking for correct version of gmp.h... " >&6; } $as_echo_n "checking for the correct version of gmp.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include "gmp.h" #include "gmp.h"
int int
main () main ()
{ {
#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
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <gmp.h>
int
main ()
{
#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 choke me
#endif #endif
@ -5489,6 +5509,11 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"; then : if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; } $as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5
$as_echo "buggy but acceptable" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }; have_gmp=no $as_echo "no" >&6; }; have_gmp=no
@ -5497,8 +5522,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# If we have GMP, check the MPFR version. # If we have GMP, check the MPFR version.
if test x"$have_gmp" = xyes; then if test x"$have_gmp" = xyes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct version of mpfr.h" >&5 # Check for the recommended and required versions of MPFR.
$as_echo_n "checking for correct version of mpfr.h... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of mpfr.h" >&5
$as_echo_n "checking for the correct version of mpfr.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <gmp.h> #include <gmp.h>
@ -5524,7 +5550,7 @@ int
main () main ()
{ {
#if MPFR_VERSION < MPFR_VERSION_NUM(2,3,2) #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,2)
choke me choke me
#endif #endif
@ -5549,6 +5575,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# Check for the MPC header version. # Check for the MPC header version.
if test x"$have_gmp" = xyes ; then if test x"$have_gmp" = xyes ; then
# Check for the recommended and required versions of MPC.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of mpc.h" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of mpc.h" >&5
$as_echo_n "checking for the correct version of mpc.h... " >&6; } $as_echo_n "checking for the correct version of mpc.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@ -5558,7 +5585,23 @@ int
main () main ()
{ {
#if MPC_VERSION < MPC_VERSION_NUM (0,8,0) #if MPC_VERSION < MPC_VERSION_NUM(0,8,0)
choke me
#endif
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <mpc.h>
int
main ()
{
#if MPC_VERSION < MPC_VERSION_NUM(0,8,1)
choke me choke me
#endif #endif
@ -5569,6 +5612,11 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"; then : if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; } $as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5
$as_echo "buggy but acceptable" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }; have_gmp=no $as_echo "no" >&6; }; have_gmp=no
@ -5625,8 +5673,10 @@ rm -f core conftest.err conftest.$ac_objext \
CFLAGS="$saved_CFLAGS" 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 if test x$have_gmp != xyes; then
as_fn_error "Building GCC requires GMP 4.2+, MPFR 2.3.2+ and MPC 0.8.0+. as_fn_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 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 locations. Source code for these libraries can be found at
their respective hosting sites as well as at their respective hosting sites as well as at

View File

@ -1343,18 +1343,27 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
have_gmp=yes have_gmp=yes
saved_CFLAGS="$CFLAGS" saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $gmpinc" CFLAGS="$CFLAGS $gmpinc"
# Check GMP actually works # Check for the recommended and required versions of GMP.
AC_MSG_CHECKING([for correct version of gmp.h]) AC_MSG_CHECKING([for the correct version of gmp.h])
AC_TRY_COMPILE([#include "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 choke me
#endif #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 we have GMP, check the MPFR version.
if test x"$have_gmp" = xyes; then if test x"$have_gmp" = xyes; then
dnl MPFR 2.3.1 is acceptable, but MPFR 2.3.2 is better. # Check for the recommended and required versions of MPFR.
AC_MSG_CHECKING([for correct version of mpfr.h]) AC_MSG_CHECKING([for the correct version of mpfr.h])
AC_TRY_COMPILE([#include <gmp.h> AC_TRY_COMPILE([#include <gmp.h>
#include <mpfr.h>],[ #include <mpfr.h>],[
#if MPFR_VERSION < MPFR_VERSION_NUM(2,3,1) #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 #endif
], AC_TRY_COMPILE([#include <gmp.h> ], AC_TRY_COMPILE([#include <gmp.h>
#include <mpfr.h>],[ #include <mpfr.h>],[
#if MPFR_VERSION < MPFR_VERSION_NUM(2,3,2) #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,2)
choke me choke me
#endif #endif
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])]), ], [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. # Check for the MPC header version.
if test x"$have_gmp" = xyes ; then 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_MSG_CHECKING([for the correct version of mpc.h])
AC_TRY_COMPILE([#include <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 choke me
#endif #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 fi
# Now check the MPFR library. # Now check the MPFR library.
@ -1408,8 +1423,10 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
CFLAGS="$saved_CFLAGS" 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 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 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 locations. Source code for these libraries can be found at
their respective hosting sites as well as at their respective hosting sites as well as at

View File

@ -1,3 +1,7 @@
2010-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* doc/install.texi: Update recommended GMP/MPFR/MPC versions.
2010-01-31 Kai Tietz <kai.tietz@onevision.com> 2010-01-31 Kai Tietz <kai.tietz@onevision.com>
* config.gcc: Adjust order of makefile fragments for mingw targets. * config.gcc: Adjust order of makefile fragments for mingw targets.

View File

@ -303,7 +303,7 @@ Necessary (only on some platforms) to untar the source code. Many
systems' @command{tar} programs will also work, only try GNU systems' @command{tar} programs will also work, only try GNU
@command{tar} if you have problems. @command{tar} if you have problems.
@item GNU Multiple Precision Library (GMP) version 4.2 (or later) @item GNU Multiple Precision Library (GMP) version 4.3.2 (or later)
Necessary to build GCC@. If you do not have it installed in your Necessary to build GCC@. If you do not have it installed in your
library search path, you will have to configure with the library search path, you will have to configure with the
@ -312,7 +312,7 @@ and @option{--with-gmp-include}. Alternatively, if a GMP source
distribution is found in a subdirectory of your GCC sources named distribution is found in a subdirectory of your GCC sources named
@file{gmp}, it will be built together with GCC@. @file{gmp}, it will be built together with GCC@.
@item MPFR Library version 2.3.2 (or later) @item MPFR Library version 2.4.2 (or later)
Necessary to build GCC@. It can be downloaded from Necessary to build GCC@. It can be downloaded from
@uref{http://www.mpfr.org/}. The @option{--with-mpfr} configure @uref{http://www.mpfr.org/}. The @option{--with-mpfr} configure
@ -322,7 +322,7 @@ default library search path. See also @option{--with-mpfr-lib} and
distribution is found in a subdirectory of your GCC sources named distribution is found in a subdirectory of your GCC sources named
@file{mpfr}, it will be built together with GCC@. @file{mpfr}, it will be built together with GCC@.
@item MPC Library version 0.8.0 (or later) @item MPC Library version 0.8.1 (or later)
Necessary to build GCC@. It can be downloaded from Necessary to build GCC@. It can be downloaded from
@uref{http://www.multiprecision.org/}. The @option{--with-mpc} @uref{http://www.multiprecision.org/}. The @option{--with-mpc}