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}"
24 mkdir -p "${CT_BUILD_DIR}/build-gmp"
25 cd "${CT_BUILD_DIR}/build-gmp"
27 CT_DoStep INFO "Installing GMP"
29 CT_DoLog EXTRA "Configuring GMP"
32 CFLAGS="${CT_CFLAGS_FOR_HOST} -fexceptions" \
33 "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
36 --prefix="${CT_COMPLIBS_DIR}" \
43 CT_DoLog EXTRA "Building GMP"
44 CT_DoExecLog ALL make ${JOBSFLAGS}
46 if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
47 CT_DoLog EXTRA "Checking GMP"
48 CT_DoExecLog ALL make ${JOBSFLAGS} -s check
51 CT_DoLog EXTRA "Installing GMP"
52 CT_DoExecLog ALL make install