scripts/build/companion_libs/mpc.sh
author Bill Pringlemeir <bpringle@sympatico.ca>
Mon Nov 29 00:50:21 2010 +0100 (2010-11-29)
changeset 2206 2b5f5173daa0
parent 2099 1bb063c8a0ca
child 2275 9ab4392430ad
permissions -rw-r--r--
complibs/cloog: fix linking with libstdc++

This rules out 0.15.5 and previous versions, that did not
have this option, so remove them from the list. Anyway,
they were marked 'OBSOLETE', so it's not a big loss...

[Yann E. MORIN: remove obsolete versions]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 # This file adds the functions to build the MPC library
     2 # Copyright 2009 Yann E. MORIN
     3 # Licensed under the GPL v2. See COPYING in the root of this package
     4 
     5 do_mpc_get() { :; }
     6 do_mpc_extract() { :; }
     7 do_mpc() { :; }
     8 
     9 # Overide functions depending on configuration
    10 if [ "${CT_MPC}" = "y" ]; then
    11 
    12 # Download MPC
    13 do_mpc_get() {
    14     CT_GetFile "mpc-${CT_MPC_VERSION}" .tar.gz      \
    15         http://www.multiprecision.org/mpc/download
    16 }
    17 
    18 # Extract MPC
    19 do_mpc_extract() {
    20     CT_Extract "mpc-${CT_MPC_VERSION}"
    21     CT_Patch "mpc" "${CT_MPC_VERSION}"
    22 }
    23 
    24 do_mpc() {
    25     local -a mpc_opts
    26 
    27     mkdir -p "${CT_BUILD_DIR}/build-mpc"
    28     cd "${CT_BUILD_DIR}/build-mpc"
    29 
    30     CT_DoStep INFO "Installing MPC"
    31 
    32     CT_DoLog EXTRA "Configuring MPC"
    33 
    34     if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
    35         mpc_opts+=( --enable-shared --disable-static )
    36     else
    37         mpc_opts+=( --disable-shared --enable-static )
    38     fi
    39 
    40     CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
    41     CT_DoExecLog CFG                                \
    42     "${CT_SRC_DIR}/mpc-${CT_MPC_VERSION}/configure" \
    43         --build=${CT_BUILD}                         \
    44         --host=${CT_HOST}                           \
    45         --prefix="${CT_COMPLIBS_DIR}"               \
    46         --with-gmp="${CT_COMPLIBS_DIR}"             \
    47         --with-mpfr="${CT_COMPLIBS_DIR}"            \
    48         "${mpc_opts[@]}"
    49 
    50     CT_DoLog EXTRA "Building MPC"
    51     CT_DoExecLog ALL make ${PARALLELMFLAGS}
    52 
    53     if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
    54         CT_DoLog EXTRA "Checking MPC"
    55         CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
    56     fi
    57 
    58     CT_DoLog EXTRA "Installing MPC"
    59     CT_DoExecLog ALL make install
    60 
    61     CT_EndStep
    62 }
    63 
    64 fi # CT_MPC