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
6 do_mpc_extract() { :; }
7 do_mpc_for_host() { :; }
9 # Overide functions depending on configuration
10 if [ "${CT_MPC}" = "y" ]; then
14 CT_GetFile "mpc-${CT_MPC_VERSION}" .tar.gz \
15 http://www.multiprecision.org/mpc/download
20 CT_Extract "mpc-${CT_MPC_VERSION}"
21 CT_Patch "mpc" "${CT_MPC_VERSION}"
24 # Build MPC for running on host
28 CT_DoStep INFO "Installing MPC for host"
29 CT_mkdir_pushd "${CT_BUILD_DIR}/build-mpc-host-${CT_HOST}"
31 mpc_opts+=( "host=${CT_HOST}" )
32 mpc_opts+=( "prefix=${CT_COMPLIBS_DIR}" )
33 mpc_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
34 do_mpc_backend "${mpc_opts[@]}"
41 # Parameter : description : type : default
42 # host : machine to run on : tuple : (none)
43 # prefix : prefix to install into : dir : (none)
44 # cflags : host cflags to use : string : (empty)
55 CT_DoLog EXTRA "Configuring MPC"
59 "${CT_SRC_DIR}/mpc-${CT_MPC_VERSION}/configure" \
62 --prefix="${prefix}" \
63 --with-gmp="${prefix}" \
64 --with-mpfr="${prefix}" \
68 CT_DoLog EXTRA "Building MPC"
69 CT_DoExecLog ALL make ${JOBSFLAGS}
71 if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
72 CT_DoLog EXTRA "Checking MPC"
73 CT_DoExecLog ALL make ${JOBSFLAGS} -s check
76 CT_DoLog EXTRA "Installing MPC"
77 CT_DoExecLog ALL make install