1 # This file adds the functions to build the GMP library
2 # Copyright 2008 Yann E. MORIN
3 # Licensed under the GPL v2. See COPYING in the root of this package
6 do_gmp_extract() { :; }
9 # Overide functions depending on configuration
10 if [ "${CT_GMP}" = "y" ]; then
14 CT_GetFile "gmp-${CT_GMP_VERSION}" {ftp,http}://{ftp.sunet.se/pub,ftp.gnu.org}/gnu/gmp
19 CT_Extract "gmp-${CT_GMP_VERSION}"
20 CT_Patch "gmp" "${CT_GMP_VERSION}"
26 mkdir -p "${CT_BUILD_DIR}/build-gmp"
27 cd "${CT_BUILD_DIR}/build-gmp"
29 CT_DoStep INFO "Installing GMP"
31 CT_DoLog EXTRA "Configuring GMP"
33 if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
34 gmp_opts+=( --enable-shared --disable-static )
36 gmp_opts+=( --disable-shared --enable-static )
39 CFLAGS="${CT_CFLAGS_FOR_HOST} -fexceptions" \
41 "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
44 --prefix="${CT_COMPLIBS_DIR}" \
50 CT_DoLog EXTRA "Building GMP"
51 CT_DoExecLog ALL make ${PARALLELMFLAGS}
53 if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
54 CT_DoLog EXTRA "Checking GMP"
55 CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
58 CT_DoLog EXTRA "Installing GMP"
59 CT_DoExecLog ALL make install