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() { :; }
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}"
27 mkdir -p "${CT_BUILD_DIR}/build-mpc"
28 cd "${CT_BUILD_DIR}/build-mpc"
30 CT_DoStep INFO "Installing MPC"
32 CT_DoLog EXTRA "Configuring MPC"
34 if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
35 mpc_opts+=( --enable-shared --disable-static )
37 mpc_opts+=( --disable-shared --enable-static )
40 CFLAGS="${CT_CFLAGS_FOR_HOST}" \
42 "${CT_SRC_DIR}/mpc-${CT_MPC_VERSION}/configure" \
45 --prefix="${CT_COMPLIBS_DIR}" \
46 --with-gmp="${CT_COMPLIBS_DIR}" \
47 --with-mpfr="${CT_COMPLIBS_DIR}" \
50 CT_DoLog EXTRA "Building MPC"
51 CT_DoExecLog ALL make ${PARALLELMFLAGS}
53 if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
54 CT_DoLog EXTRA "Checking MPC"
55 CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
58 CT_DoLog EXTRA "Installing MPC"
59 CT_DoExecLog ALL make install