scripts/build/companion_libs/mpc.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Jan 13 23:20:39 2011 +0100 (2011-01-13)
branch1.9
changeset 2263 2b25e1dab615
parent 2099 1bb063c8a0ca
child 2275 9ab4392430ad
permissions -rw-r--r--
complibs/cloog: regenerate autostuff files

Latest version of CLooG does not have properly generated autoconf files,
so they need to be regenerated before the call to ./configure

Signed-off-by: "Ilya A. Volynets-Evenbakh" <ilya@total-knowlege.com>
[yann.morin.1998@anciens.enib.fr: make it conditional on 0.15.10 only]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 32c7bbfa3f6514a0fbd5a7388d33e664ba62ed89)
     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