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() { :; }
10 # Overide functions depending on configuration
11 if [ "${CT_MPC}" = "y" ]; then
15 CT_GetFile "mpc-${CT_MPC_VERSION}" .tar.gz \
16 http://www.multiprecision.org/mpc/download
21 CT_Extract "mpc-${CT_MPC_VERSION}"
22 CT_Patch "mpc" "${CT_MPC_VERSION}"
28 mkdir -p "${CT_BUILD_DIR}/build-mpc"
29 cd "${CT_BUILD_DIR}/build-mpc"
31 CT_DoStep INFO "Installing MPC"
33 CT_DoLog EXTRA "Configuring MPC"
35 if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
36 mpc_opts+=( --enable-shared --disable-static )
38 mpc_opts+=( --disable-shared --enable-static )
41 CFLAGS="${CT_CFLAGS_FOR_HOST}" \
43 "${CT_SRC_DIR}/mpc-${CT_MPC_VERSION}/configure" \
46 --prefix="${CT_COMPLIBS_DIR}" \
47 --with-gmp="${CT_COMPLIBS_DIR}" \
48 --with-mpfr="${CT_COMPLIBS_DIR}" \
51 CT_DoLog EXTRA "Building MPC"
52 CT_DoExecLog ALL make ${PARALLELMFLAGS}
54 if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
55 CT_DoLog EXTRA "Checking MPC"
56 CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
59 CT_DoLog EXTRA "Installing MPC"
60 CT_DoExecLog ALL make install