From bebf829d88d1bc57f2153ceb4f45fb2ce100b1d9 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Tue, 3 Aug 2004 21:11:29 +0000 Subject: [PATCH] configure.in: Check for MPFR as well as GMP. * configure.in: Check for MPFR as well as GMP. * configure: Regenerate. * gcc/doc/install.texi: Document MPFR requirement. From-SVN: r85503 --- ChangeLog | 5 ++ configure | 193 +++++++++++++++++++++++++------------------ configure.in | 47 +++++++---- gcc/ChangeLog | 4 + gcc/doc/install.texi | 22 +++-- 5 files changed, 170 insertions(+), 101 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8a55e8b4a13..c740d19aeef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-08-03 Paul Brook + + * configure.in: Check for MPFR as well as GMP. + * configure: Regenerate. + 2004-08-01 Robert Millan * configure.in: Turn mt-linux into mt-gnu. Use mt-gnu and enable diff --git a/configure b/configure index 10c8b137f0a..54424bf9ed2 100755 --- a/configure +++ b/configure @@ -15,6 +15,10 @@ ac_help="$ac_help --without-libbanshee Don't build with libbanshee" ac_help="$ac_help --enable-libada Builds libada directory" +ac_help="$ac_help + --with-mpfr-dir=PATH Specify source directory for MPFR library" +ac_help="$ac_help + --with-mpfr=PATH Specify directory for installed MPFR library" ac_help="$ac_help --with-gmp-dir=PATH Specify source directory for GMP library" ac_help="$ac_help @@ -589,7 +593,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:593: checking host system type" >&5 +echo "configure:597: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -610,7 +614,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:614: checking target system type" >&5 +echo "configure:618: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -628,7 +632,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:632: checking build system type" >&5 +echo "configure:636: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -683,7 +687,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:687: checking for a BSD compatible install" >&5 +echo "configure:691: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -736,7 +740,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln works""... $ac_c" 1>&6 -echo "configure:740: checking whether ln works" >&5 +echo "configure:744: checking whether ln works" >&5 if eval "test \"`echo '$''{'acx_cv_prog_LN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -760,7 +764,7 @@ else fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:764: checking whether ln -s works" >&5 +echo "configure:768: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1784,7 +1788,7 @@ else # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1788: checking for $ac_word" >&5 +echo "configure:1792: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1814,7 +1818,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1818: checking for $ac_word" >&5 +echo "configure:1822: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1865,7 +1869,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1869: checking for $ac_word" >&5 +echo "configure:1873: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1897,7 +1901,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1901: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1905: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1908,12 +1912,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1912 "configure" +#line 1916 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1939,12 +1943,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1943: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1947: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1948: checking whether we are using GNU C" >&5 +echo "configure:1952: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1953,7 +1957,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1972,7 +1976,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1976: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1980: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2039,7 +2043,7 @@ fi # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2043: checking for $ac_word" >&5 +echo "configure:2047: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2071,7 +2075,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "gnatbind", so it can be a program name with args. set dummy gnatbind; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2075: checking for $ac_word" >&5 +echo "configure:2079: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2104,7 +2108,7 @@ fi fi echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6 -echo "configure:2108: checking whether compiler driver understands Ada" >&5 +echo "configure:2112: checking whether compiler driver understands Ada" >&5 if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2137,7 +2141,7 @@ else fi echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6 -echo "configure:2141: checking how to compare bootstrapped objects" >&5 +echo "configure:2145: checking how to compare bootstrapped objects" >&5 if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2167,10 +2171,38 @@ do_compare="$gcc_cv_prog_cmp_skip" -# Check for GMP +# Check for GMP and MPFR gmplibs= gmpinc= have_gmp=yes +# Specify a location for mpfr +# check for this first so it ends up on the link line before gmp. +# Check whether --with-mpfr-dir or --without-mpfr-dir was given. +if test "${with_mpfr_dir+set}" = set; then + withval="$with_mpfr_dir" + : +fi + + +if test "x$with_mpfr_dir" != x; then + gmpinc="-I$with_mpfr_dir/mpfr" + gmplibs="$with_mpfr_dir/libmpfr.a" +else + gmplibs="-lmpfr" +fi + +# Check whether --with-mpfr or --without-mpfr was given. +if test "${with_mpfr+set}" = set; then + withval="$with_mpfr" + : +fi + + +if test "x$with_mpfr" != x; then + gmplibs="-L$with_mpfr/lib $gmplibs" + gmpinc="-I$with_mpfr/include" +fi + # Specify a location for gmp # Check whether --with-gmp-dir or --without-gmp-dir was given. if test "${with_gmp_dir+set}" = set; then @@ -2179,14 +2211,16 @@ if test "${with_gmp_dir+set}" = set; then fi -if test "x$with_gmp_dir" != x && test -f "$with_gmp_dir/gmp.h"; then - gmpinc="-I$with_gmp_dir" +if test "x$with_gmp_dir" != x; then + gmpinc="$gmpinc -I$with_gmp_dir" if test -f "$with_gmp_dir/.libs/libgmp.a"; then - gmplibs="$with_gmp_dir/.libs/libgmp.a" + gmplibs="$gmplibs $with_gmp_dir/.libs/libgmp.a" elif test -f "$with_gmp_dir/_libs/libgmp.a"; then - gmplibs="$with_gmp_dir/_libs/libgmp.a" + gmplibs="$gmplibs $with_gmp_dir/_libs/libgmp.a" fi # One of the later tests will catch the error if neither library is present. +else + gmplibs="$gmplibs -lgmp" fi # Check whether --with-gmp or --without-gmp was given. @@ -2196,23 +2230,18 @@ if test "${with_gmp+set}" = set; then fi -if test "x$with_gmp" != x && test -d "$with_gmp"; then - gmplibs="-L$with_gmp/lib -lgmp" - gmpinc="-I$with_gmp/include" -fi - -# Use system gmp if nothing else specified -if test "x$gmplibs" = x; then - gmplibs="-lgmp" +if test "x$with_gmp" != x; then + gmplibs="-L$with_gmp/lib $gmplibs" + gmpinc="-I$with_gmp/include $gmpinc" fi saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $gmpinc" # Check GMP actually works echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6 -echo "configure:2214: checking for correct version of gmp.h" >&5 +echo "configure:2243: checking for correct version of gmp.h" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -2235,20 +2264,21 @@ fi rm -f conftest* if test x"$have_gmp" = xyes; then - echo $ac_n "checking for mpf_init in -lgmp""... $ac_c" 1>&6 -echo "configure:2240: checking for mpf_init in -lgmp" >&5 + echo $ac_n "checking for MPFR""... $ac_c" 1>&6 +echo "configure:2269: checking for MPFR" >&5 saved_LIBS="$LIBS" LIBS="$LIBS $gmplibs" cat > conftest.$ac_ext < +#include int main() { -mpf_t n; mpf_init(n); +mpfr_t n; mpfr_init(n); ; return 0; } EOF -if { (eval echo configure:2252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -2262,6 +2292,7 @@ rm -f conftest* CFLAGS="$saved_CFLAGS" fi +# Flags needed for both GMP and/or MPFR @@ -2721,7 +2752,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2725: checking for $ac_word" >&5 +echo "configure:2756: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_BISON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2756,7 +2787,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2760: checking for $ac_word" >&5 +echo "configure:2791: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2791,7 +2822,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2795: checking for $ac_word" >&5 +echo "configure:2826: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_M4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2826,7 +2857,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2830: checking for $ac_word" >&5 +echo "configure:2861: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_FLEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2861,7 +2892,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2865: checking for $ac_word" >&5 +echo "configure:2896: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2896,7 +2927,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2900: checking for $ac_word" >&5 +echo "configure:2931: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_MAKEINFO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3497,7 +3528,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias- # Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args. set dummy ${ncn_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3501: checking for $ac_word" >&5 +echo "configure:3532: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3530,7 +3561,7 @@ if test -z "$ac_cv_prog_AR" ; then # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3534: checking for $ac_word" >&5 +echo "configure:3565: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3569,7 +3600,7 @@ fi # Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args. set dummy ${ncn_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3573: checking for $ac_word" >&5 +echo "configure:3604: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3602,7 +3633,7 @@ if test -z "$ac_cv_prog_AS" ; then # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3606: checking for $ac_word" >&5 +echo "configure:3637: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3641,7 +3672,7 @@ fi # Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ncn_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3645: checking for $ac_word" >&5 +echo "configure:3676: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3674,7 +3705,7 @@ if test -z "$ac_cv_prog_DLLTOOL" ; then # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3678: checking for $ac_word" >&5 +echo "configure:3709: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3713,7 +3744,7 @@ fi # Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args. set dummy ${ncn_tool_prefix}ld; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3717: checking for $ac_word" >&5 +echo "configure:3748: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3746,7 +3777,7 @@ if test -z "$ac_cv_prog_LD" ; then # Extract the first word of "ld", so it can be a program name with args. set dummy ld; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3750: checking for $ac_word" >&5 +echo "configure:3781: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3785,7 +3816,7 @@ fi # Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args. set dummy ${ncn_tool_prefix}nm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3789: checking for $ac_word" >&5 +echo "configure:3820: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3818,7 +3849,7 @@ if test -z "$ac_cv_prog_NM" ; then # Extract the first word of "nm", so it can be a program name with args. set dummy nm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3822: checking for $ac_word" >&5 +echo "configure:3853: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3857,7 +3888,7 @@ fi # Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ncn_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3861: checking for $ac_word" >&5 +echo "configure:3892: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3890,7 +3921,7 @@ if test -z "$ac_cv_prog_RANLIB" ; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3894: checking for $ac_word" >&5 +echo "configure:3925: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3929,7 +3960,7 @@ fi # Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args. set dummy ${ncn_tool_prefix}windres; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3933: checking for $ac_word" >&5 +echo "configure:3964: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3962,7 +3993,7 @@ if test -z "$ac_cv_prog_WINDRES" ; then # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3966: checking for $ac_word" >&5 +echo "configure:3997: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4001,7 +4032,7 @@ fi # Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args. set dummy ${ncn_tool_prefix}objcopy; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4005: checking for $ac_word" >&5 +echo "configure:4036: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4034,7 +4065,7 @@ if test -z "$ac_cv_prog_OBJCOPY" ; then # Extract the first word of "objcopy", so it can be a program name with args. set dummy objcopy; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4038: checking for $ac_word" >&5 +echo "configure:4069: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4073,7 +4104,7 @@ fi # Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args. set dummy ${ncn_tool_prefix}objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4077: checking for $ac_word" >&5 +echo "configure:4108: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4106,7 +4137,7 @@ if test -z "$ac_cv_prog_OBJDUMP" ; then # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4110: checking for $ac_word" >&5 +echo "configure:4141: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4152,7 +4183,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4156: checking for $ac_word" >&5 +echo "configure:4187: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4185,7 +4216,7 @@ if test -z "$ac_cv_prog_CONFIGURED_AR_FOR_TARGET" ; then # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4189: checking for $ac_word" >&5 +echo "configure:4220: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4224,7 +4255,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4228: checking for $ac_word" >&5 +echo "configure:4259: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4257,7 +4288,7 @@ if test -z "$ac_cv_prog_CONFIGURED_AS_FOR_TARGET" ; then # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4261: checking for $ac_word" >&5 +echo "configure:4292: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4296,7 +4327,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4300: checking for $ac_word" >&5 +echo "configure:4331: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4329,7 +4360,7 @@ if test -z "$ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET" ; then # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4333: checking for $ac_word" >&5 +echo "configure:4364: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4368,7 +4399,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}ld; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4372: checking for $ac_word" >&5 +echo "configure:4403: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4401,7 +4432,7 @@ if test -z "$ac_cv_prog_CONFIGURED_LD_FOR_TARGET" ; then # Extract the first word of "ld", so it can be a program name with args. set dummy ld; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4405: checking for $ac_word" >&5 +echo "configure:4436: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4440,7 +4471,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}nm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4444: checking for $ac_word" >&5 +echo "configure:4475: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4473,7 +4504,7 @@ if test -z "$ac_cv_prog_CONFIGURED_NM_FOR_TARGET" ; then # Extract the first word of "nm", so it can be a program name with args. set dummy nm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4477: checking for $ac_word" >&5 +echo "configure:4508: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4512,7 +4543,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4516: checking for $ac_word" >&5 +echo "configure:4547: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4545,7 +4576,7 @@ if test -z "$ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET" ; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4549: checking for $ac_word" >&5 +echo "configure:4580: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4584,7 +4615,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}windres; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4588: checking for $ac_word" >&5 +echo "configure:4619: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4617,7 +4648,7 @@ if test -z "$ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET" ; then # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4621: checking for $ac_word" >&5 +echo "configure:4652: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4702,7 +4733,7 @@ RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target} NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target} echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:4706: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:4737: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -4749,7 +4780,7 @@ esac # gcc for stageN-gcc and stage-prev for stage(N-1). In case this is not # possible, however, we can resort to mv. echo $ac_n "checking if symbolic links between directories work""... $ac_c" 1>&6 -echo "configure:4753: checking if symbolic links between directories work" >&5 +echo "configure:4784: checking if symbolic links between directories work" >&5 if eval "test \"`echo '$''{'gcc_cv_prog_ln_s_dir'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/configure.in b/configure.in index 1a01660c034..83371123082 100644 --- a/configure.in +++ b/configure.in @@ -1030,33 +1030,48 @@ fi ACX_PROG_GNAT ACX_PROG_CMP_IGNORE_INITIAL -# Check for GMP +# Check for GMP and MPFR gmplibs= gmpinc= have_gmp=yes +# Specify a location for mpfr +# check for this first so it ends up on the link line before gmp. +AC_ARG_WITH(mpfr-dir, [ --with-mpfr-dir=PATH Specify source directory for MPFR library]) + +if test "x$with_mpfr_dir" != x; then + gmpinc="-I$with_mpfr_dir/mpfr" + gmplibs="$with_mpfr_dir/libmpfr.a" +else + gmplibs="-lmpfr" +fi + +AC_ARG_WITH(mpfr, [ --with-mpfr=PATH Specify directory for installed MPFR library]) + +if test "x$with_mpfr" != x; then + gmplibs="-L$with_mpfr/lib $gmplibs" + gmpinc="-I$with_mpfr/include" +fi + # Specify a location for gmp AC_ARG_WITH(gmp-dir, [ --with-gmp-dir=PATH Specify source directory for GMP library]) -if test "x$with_gmp_dir" != x && test -f "$with_gmp_dir/gmp.h"; then - gmpinc="-I$with_gmp_dir" +if test "x$with_gmp_dir" != x; then + gmpinc="$gmpinc -I$with_gmp_dir" if test -f "$with_gmp_dir/.libs/libgmp.a"; then - gmplibs="$with_gmp_dir/.libs/libgmp.a" + gmplibs="$gmplibs $with_gmp_dir/.libs/libgmp.a" elif test -f "$with_gmp_dir/_libs/libgmp.a"; then - gmplibs="$with_gmp_dir/_libs/libgmp.a" + gmplibs="$gmplibs $with_gmp_dir/_libs/libgmp.a" fi # One of the later tests will catch the error if neither library is present. +else + gmplibs="$gmplibs -lgmp" fi AC_ARG_WITH(gmp, [ --with-gmp=PATH Specify directory for installed GMP library]) -if test "x$with_gmp" != x && test -d "$with_gmp"; then - gmplibs="-L$with_gmp/lib -lgmp" - gmpinc="-I$with_gmp/include" -fi - -# Use system gmp if nothing else specified -if test "x$gmplibs" = x; then - gmplibs="-lgmp" +if test "x$with_gmp" != x; then + gmplibs="-L$with_gmp/lib $gmplibs" + gmpinc="-I$with_gmp/include $gmpinc" fi saved_CFLAGS="$CFLAGS" @@ -1071,16 +1086,18 @@ choke me [AC_MSG_RESULT([no]); have_gmp=no]) if test x"$have_gmp" = xyes; then - AC_MSG_CHECKING([for mpf_init in -lgmp]) + AC_MSG_CHECKING([for MPFR]) saved_LIBS="$LIBS" LIBS="$LIBS $gmplibs" - AC_TRY_LINK([#include ], [mpf_t n; mpf_init(n);], + AC_TRY_LINK([#include +#include ], [mpfr_t n; mpfr_init(n);], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no]) LIBS="$saved_LIBS" CFLAGS="$saved_CFLAGS" fi +# Flags needed for both GMP and/or MPFR AC_SUBST(gmplibs) AC_SUBST(gmpinc) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9d0199dae00..a0af7f6c361 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-08-03 Paul Brook + + * gcc/doc/install.texi: Document MPFR requirement. + 2004-07-30 Maciej W. Rozycki * aclocal.m4 (gcc_AC_FUNC_MMAP_BLACKLIST): Check for diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 9c7d01029c4..d941d216a49 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -291,6 +291,15 @@ Necessary to build the Fortran frontend. If you don't have it installed in your library search path, you will have to configure with the @option{--with-gmp} or @option{--with-gmp-dir} configure option. +@item MPFR Library + +Necessary to build the Fortran frontend. It can be downloaded from +@uref{http://http://www.mpfr.org/}. It is also included in the current GMP +release (4.1.3) when configured with @option{--enable-mpfr}. + +The @option{--with-mpfr} or @option{--with-mpfr-dir} configure option should +be used if your MPFR Library is not installed in your library search path. + @end table @@ -1204,12 +1213,15 @@ The following options apply to the build of the Fortran front end. @table @code @item --with-gmp=@var{pathname} +@itemx --with-mpfr=@var{pathname} @itemx --with-gmp-dir=@var{pathname} -If you don't have GMP (the GNU Multiple Precision library) installed -in a standard location and you want to build the Fortran front-end, -you can explicitly specify the directory where GMP is installed -(@samp{--with-gmp=gmpinstalldir}) or where you built the GMP library without -installing (@samp{--with-gmp-dir=gmpbuilddir}). +@itemx --with-mpfr-dir=@var{pathname} +If you don't have GMP (the GNU Multiple Precision library) and the MPFR +Libraries installed in a standard location and you want to build the Fortran +front-end, you can explicitly specify the directory where they are installed +(@samp{--with-gmp=gmpinstalldir}, @samp{--with-mpfr=mpfrinstalldir}) or where +you built them without installing (@samp{--with-gmp-dir=gmpbuilddir}, +@samp{--with-mpfr-dir=gmpbuilddir}). @end table -- 2.30.2