Fix building MPFR >= 2.4.0.

/trunk/scripts/build/mpfr.sh |   51    29    22     0 ++++++++++++++++++++++++++++----------------------
 1 file changed, 29 insertions(+), 22 deletions(-)
This commit is contained in:
Yann E. MORIN" 2009-03-08 22:13:27 +00:00
parent 20945a3465
commit 9bd1c96d1f

View File

@ -28,26 +28,31 @@ do_mpfr_extract() {
# and: http://sourceware.org/ml/crossgcc/2008-06/msg00005.html # and: http://sourceware.org/ml/crossgcc/2008-06/msg00005.html
# This hack is not bad per se, but the MPFR guys would be better not to # This hack is not bad per se, but the MPFR guys would be better not to
# do that in the future... # do that in the future...
CT_Pushd "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}" # It seems that MPFR >= 2.4.0 do not need this...
if [ ! -f .autotools.ct-ng ]; then case "${CT_MPFR_VERSION}" in
CT_DoLog DEBUG "Re-building autotools files" 1.*|2.0.*|2.1.*|2.2.*|2.3.*)
CT_DoExecLog ALL autoreconf -fi CT_Pushd "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}"
# Starting with libtool-1.9f, config.{guess,sub} are no longer if [ ! -f .autotools.ct-ng ]; then
# installed without -i, but starting with libtool-2.2.6, they CT_DoLog DEBUG "Re-building autotools files"
# are no longer removed without -i. Sight... Just use -i with CT_DoExecLog ALL autoreconf -fi
# libtool >=2 # Starting with libtool-1.9f, config.{guess,sub} are no longer
# See: http://sourceware.org/ml/crossgcc/2008-11/msg00046.html # installed without -i, but starting with libtool-2.2.6, they
# and: http://sourceware.org/ml/crossgcc/2008-11/msg00048.html # are no longer removed without -i. Sight... Just use -i with
libtoolize_opt= # libtool >=2
case "$(libtoolize --version |head -n 1 |gawk '{ print $(NF); }')" in # See: http://sourceware.org/ml/crossgcc/2008-11/msg00046.html
0.*) ;; # and: http://sourceware.org/ml/crossgcc/2008-11/msg00048.html
1.*) ;; libtoolize_opt=
*) libtoolize_opt=-i;; case "$(libtoolize --version |head -n 1 |gawk '{ print $(NF); }')" in
esac 0.*) ;;
CT_DoExecLog ALL libtoolize -f ${libtoolize_opt} 1.*) ;;
touch .autotools.ct-ng *) libtoolize_opt=-i;;
fi esac
CT_Popd CT_DoExecLog ALL libtoolize -f ${libtoolize_opt}
touch .autotools.ct-ng
fi
CT_Popd
;;
esac
} }
do_mpfr() { do_mpfr() {
@ -57,13 +62,14 @@ do_mpfr() {
CT_DoStep INFO "Installing MPFR" CT_DoStep INFO "Installing MPFR"
mpfr_opt= mpfr_opt=
# Under Cygwin, wa can't bnuild a thread-safe library # Under Cygwin, we can't build a thread-safe library
case "${CT_HOST}" in case "${CT_HOST}" in
*-cygwin) mpfr_opt="--disable-thread-safe";; *-cygwin) mpfr_opt="--disable-thread-safe";;
*) mpfr_opt="--enable-thread-safe";; *) mpfr_opt="--enable-thread-safe";;
esac esac
CT_DoLog EXTRA "Configuring MPFR" CT_DoLog EXTRA "Configuring MPFR"
CC="${CT_HOST}-gcc" \
CFLAGS="${CT_CFLAGS_FOR_HOST}" \ CFLAGS="${CT_CFLAGS_FOR_HOST}" \
CT_DoExecLog ALL \ CT_DoExecLog ALL \
"${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \ "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \
@ -98,13 +104,14 @@ do_mpfr_target() {
CT_DoStep INFO "Installing MPFR for the target" CT_DoStep INFO "Installing MPFR for the target"
mpfr_opt= mpfr_opt=
# Under Cygwin, wa can't bnuild a thread-safe library # Under Cygwin, we can't build a thread-safe library
case "${CT_TARGET}" in case "${CT_TARGET}" in
*-cygwin) mpfr_opt="--disable-thread-safe";; *-cygwin) mpfr_opt="--disable-thread-safe";;
*) mpfr_opt="--enable-thread-safe";; *) mpfr_opt="--enable-thread-safe";;
esac esac
CT_DoLog EXTRA "Configuring MPFR" CT_DoLog EXTRA "Configuring MPFR"
CC="${CT_TARGET}-gcc" \
CFLAGS="${CT_CFLAGS_FOR_TARGET}" \ CFLAGS="${CT_CFLAGS_FOR_TARGET}" \
CT_DoExecLog ALL \ CT_DoExecLog ALL \
"${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \ "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \