Fix building MPFR >= 2.4.0.
/trunk/scripts/build/mpfr.sh | 51 29 22 0 ++++++++++++++++++++++++++++----------------------
1 file changed, 29 insertions(+), 22 deletions(-)
1.1 --- a/scripts/build/mpfr.sh Sun Mar 08 18:04:56 2009 +0000
1.2 +++ b/scripts/build/mpfr.sh Sun Mar 08 22:13:27 2009 +0000
1.3 @@ -28,26 +28,31 @@
1.4 # and: http://sourceware.org/ml/crossgcc/2008-06/msg00005.html
1.5 # This hack is not bad per se, but the MPFR guys would be better not to
1.6 # do that in the future...
1.7 - CT_Pushd "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}"
1.8 - if [ ! -f .autotools.ct-ng ]; then
1.9 - CT_DoLog DEBUG "Re-building autotools files"
1.10 - CT_DoExecLog ALL autoreconf -fi
1.11 - # Starting with libtool-1.9f, config.{guess,sub} are no longer
1.12 - # installed without -i, but starting with libtool-2.2.6, they
1.13 - # are no longer removed without -i. Sight... Just use -i with
1.14 - # libtool >=2
1.15 - # See: http://sourceware.org/ml/crossgcc/2008-11/msg00046.html
1.16 - # and: http://sourceware.org/ml/crossgcc/2008-11/msg00048.html
1.17 - libtoolize_opt=
1.18 - case "$(libtoolize --version |head -n 1 |gawk '{ print $(NF); }')" in
1.19 - 0.*) ;;
1.20 - 1.*) ;;
1.21 - *) libtoolize_opt=-i;;
1.22 - esac
1.23 - CT_DoExecLog ALL libtoolize -f ${libtoolize_opt}
1.24 - touch .autotools.ct-ng
1.25 - fi
1.26 - CT_Popd
1.27 + # It seems that MPFR >= 2.4.0 do not need this...
1.28 + case "${CT_MPFR_VERSION}" in
1.29 + 1.*|2.0.*|2.1.*|2.2.*|2.3.*)
1.30 + CT_Pushd "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}"
1.31 + if [ ! -f .autotools.ct-ng ]; then
1.32 + CT_DoLog DEBUG "Re-building autotools files"
1.33 + CT_DoExecLog ALL autoreconf -fi
1.34 + # Starting with libtool-1.9f, config.{guess,sub} are no longer
1.35 + # installed without -i, but starting with libtool-2.2.6, they
1.36 + # are no longer removed without -i. Sight... Just use -i with
1.37 + # libtool >=2
1.38 + # See: http://sourceware.org/ml/crossgcc/2008-11/msg00046.html
1.39 + # and: http://sourceware.org/ml/crossgcc/2008-11/msg00048.html
1.40 + libtoolize_opt=
1.41 + case "$(libtoolize --version |head -n 1 |gawk '{ print $(NF); }')" in
1.42 + 0.*) ;;
1.43 + 1.*) ;;
1.44 + *) libtoolize_opt=-i;;
1.45 + esac
1.46 + CT_DoExecLog ALL libtoolize -f ${libtoolize_opt}
1.47 + touch .autotools.ct-ng
1.48 + fi
1.49 + CT_Popd
1.50 + ;;
1.51 + esac
1.52 }
1.53
1.54 do_mpfr() {
1.55 @@ -57,13 +62,14 @@
1.56 CT_DoStep INFO "Installing MPFR"
1.57
1.58 mpfr_opt=
1.59 - # Under Cygwin, wa can't bnuild a thread-safe library
1.60 + # Under Cygwin, we can't build a thread-safe library
1.61 case "${CT_HOST}" in
1.62 *-cygwin) mpfr_opt="--disable-thread-safe";;
1.63 *) mpfr_opt="--enable-thread-safe";;
1.64 esac
1.65
1.66 CT_DoLog EXTRA "Configuring MPFR"
1.67 + CC="${CT_HOST}-gcc" \
1.68 CFLAGS="${CT_CFLAGS_FOR_HOST}" \
1.69 CT_DoExecLog ALL \
1.70 "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \
1.71 @@ -98,13 +104,14 @@
1.72 CT_DoStep INFO "Installing MPFR for the target"
1.73
1.74 mpfr_opt=
1.75 - # Under Cygwin, wa can't bnuild a thread-safe library
1.76 + # Under Cygwin, we can't build a thread-safe library
1.77 case "${CT_TARGET}" in
1.78 *-cygwin) mpfr_opt="--disable-thread-safe";;
1.79 *) mpfr_opt="--enable-thread-safe";;
1.80 esac
1.81
1.82 CT_DoLog EXTRA "Configuring MPFR"
1.83 + CC="${CT_TARGET}-gcc" \
1.84 CFLAGS="${CT_CFLAGS_FOR_TARGET}" \
1.85 CT_DoExecLog ALL \
1.86 "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \