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() { :; }
7 do_gmp_for_host() { :; }
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}"
23 # Build GMP for running on host
27 CT_DoStep INFO "Installing GMP for host"
28 CT_mkdir_pushd "${CT_BUILD_DIR}/build-gmp-host-${CT_HOST}"
30 gmp_opts+=( "host=${CT_HOST}" )
31 gmp_opts+=( "prefix=${CT_COMPLIBS_DIR}" )
32 gmp_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
33 do_gmp_backend "${gmp_opts[@]}"
40 # Parameter : description : type : default
41 # host : machine to run on : tuple : (none)
42 # prefix : prefix to install into : dir : (none)
43 # cflags : host cflags to use : string : (empty)
54 CT_DoLog EXTRA "Configuring GMP"
57 CFLAGS="${cflags} -fexceptions" \
58 "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
61 --prefix="${prefix}" \
68 CT_DoLog EXTRA "Building GMP"
69 CT_DoExecLog ALL make ${JOBSFLAGS}
71 if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
72 CT_DoLog EXTRA "Checking GMP"
73 CT_DoExecLog ALL make ${JOBSFLAGS} -s check
76 CT_DoLog EXTRA "Installing GMP"
77 CT_DoExecLog ALL make install