scripts/build/mpfr.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Jun 20 07:44:14 2008 +0000 (2008-06-20)
changeset 591 1854f2c508a8
parent 584 b46de4c38396
child 595 3ea35558d659
permissions -rw-r--r--
Realy fix building MPFR.

/trunk/scripts/build/mpfr.sh | 2 2 0 0 ++
1 file changed, 2 insertions(+)
     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
     4 
     5 if [ "${CT_CC_GCC_GMP_MPFR}" = "y" ]; then
     6 
     7 do_print_filename() {
     8     [ "${CT_CC_GCC_GMP_MPFR}" = "y" ] || return 0
     9     echo "mpfr-${CT_MPFR_VERSION}"
    10 }
    11 
    12 # Download MPFR
    13 do_mpfr_get() {
    14     CT_GetFile "${CT_MPFR_FILE}" http://www.mpfr.org/mpfr-current/          \
    15                                  http://www.mpfr.org/mpfr-${CT_MPFR_VERSION}/
    16 }
    17 
    18 # Extract MPFR
    19 do_mpfr_extract() {
    20     CT_ExtractAndPatch "${CT_MPFR_FILE}"
    21 }
    22 
    23 do_mpfr() {
    24     mkdir -p "${CT_BUILD_DIR}/build-mpfr"
    25     cd "${CT_BUILD_DIR}/build-mpfr"
    26 
    27     CT_DoStep INFO "Installing MPFR"
    28 
    29     # OK, Gentoo have a sanity check that libtool.m4 and ltmain.sh have the
    30     # same version number. Unfortunately, some tarballs of MPFR are not
    31     # built sanely, and thus ./configure fails on Gentoo.
    32     # See: http://sourceware.org/ml/crossgcc/2008-05/msg00080.html
    33     # and: http://sourceware.org/ml/crossgcc/2008-06/msg00005.html
    34     # This hack is not bad per se, but the MPFR guys would be better to not
    35     # do that in the future...
    36     CT_DoLog EXTRA "Re-building configuration files"
    37     CT_Pushd "${CT_SRC_DIR}/${CT_MPFR_FILE}"
    38     autoreconf -fi  2>&1 |CT_DoLog ALL
    39     libtoolize      2>&1 |CT_DoLog ALL
    40     CT_Popd
    41 
    42     CT_DoLog EXTRA "Configuring MPFR"
    43     CFLAGS="${CT_CFLAGS_FOR_HOST}"                          \
    44     "${CT_SRC_DIR}/${CT_MPFR_FILE}/configure"               \
    45         --build=${CT_BUILD}                                 \
    46         --host=${CT_HOST}                                   \
    47         --prefix="${CT_PREFIX_DIR}"                         \
    48         --enable-thread-safe                                \
    49         --disable-shared --enable-static                    \
    50         --with-gmp="${CT_PREFIX_DIR}"                       2>&1 |CT_DoLog ALL
    51 
    52     CT_DoLog EXTRA "Building MPFR"
    53     make ${PARALLELMFLAGS}  2>&1 |CT_DoLog ALL
    54 
    55     if [ "${CT_MPFR_CHECK}" = "y" ]; then
    56         CT_DoLog EXTRA "Checking MPFR"
    57         make -s check       2>&1 |CT_DoLog ALL
    58     fi
    59 
    60     CT_DoLog EXTRA "Installing MPFR"
    61     make install            2>&1 |CT_DoLog ALL
    62 
    63     CT_EndStep
    64 }
    65 
    66 else # No MPFR
    67 
    68 do_print_filename() { :; }
    69 do_mpfr_get() { :; }
    70 do_mpfr_extract() { :; }
    71 do_mpfr() { :; }
    72 
    73 fi