1 # This file adds the functions to build the MPFR library
2 # Copyright 2008 Yann E. MORIN
3 # Licensed under the GPL v2. See COPYING in the root of this package
5 if [ "${CT_CC_GCC_GMP_MPFR}" = "y" ]; then
8 [ "${CT_CC_GCC_GMP_MPFR}" = "y" ] || return 0
9 echo "mpfr-${CT_MPFR_VERSION}"
14 CT_GetFile "${CT_MPFR_FILE}" http://www.mpfr.org/mpfr-current/
19 CT_ExtractAndPatch "${CT_MPFR_FILE}"
23 mkdir -p "${CT_BUILD_DIR}/build-mpfr"
24 cd "${CT_BUILD_DIR}/build-mpfr"
26 CT_DoStep INFO "Installing MPFR"
28 # OK, Gentoo have a sanity check that libtool.m4 and ltmain.sh have the
29 # same version number. Unfortunately, some tarballs of MPFR are not
30 # built sanely, and thus ./configure fails on Gentoo.
31 # See: http://sourceware.org/ml/crossgcc/2008-05/msg00080.html
32 # and: http://sourceware.org/ml/crossgcc/2008-06/msg00005.html
33 # This hack is not bad per se, but the MPFR guys would be better to not
34 # do that in the future...
35 CT_DoLog EXTRA "Re-building configuration files"
36 CT_Pushd "${CT_SRC_DIR}/${CT_MPFR_FILE}"
37 autoreconf -fi 2>&1 |CT_DoLog ALL
38 libtoolize 2>&1 |CT_DoLog ALL
41 CT_DoLog EXTRA "Configuring MPFR"
42 CFLAGS="${CT_CFLAGS_FOR_HOST}" \
43 "${CT_SRC_DIR}/${CT_MPFR_FILE}/configure" \
46 --prefix="${CT_PREFIX_DIR}" \
47 --enable-thread-safe \
48 --disable-shared --enable-static \
49 --with-gmp="${CT_PREFIX_DIR}" 2>&1 |CT_DoLog ALL
51 CT_DoLog EXTRA "Building MPFR"
52 make ${PARALLELMFLAGS} 2>&1 |CT_DoLog ALL
54 if [ "${CT_MPFR_CHECK}" = "y" ]; then
55 CT_DoLog EXTRA "Checking MPFR"
56 make -s check 2>&1 |CT_DoLog ALL
59 CT_DoLog EXTRA "Installing MPFR"
60 make install 2>&1 |CT_DoLog ALL
67 do_print_filename() { :; }
69 do_mpfr_extract() { :; }