1.1 --- a/scripts/build/companion_libs/gmp.sh Sat Apr 10 23:43:08 2010 +0200
1.2 +++ b/scripts/build/companion_libs/gmp.sh Sun Apr 11 00:47:23 2010 +0200
1.3 @@ -24,6 +24,7 @@
1.4 if [ "${CT_GMP}" = "y" ]; then
1.5
1.6 do_gmp() {
1.7 + local -a gmp_opts
1.8
1.9 mkdir -p "${CT_BUILD_DIR}/build-gmp"
1.10 cd "${CT_BUILD_DIR}/build-gmp"
1.11 @@ -32,17 +33,22 @@
1.12
1.13 CT_DoLog EXTRA "Configuring GMP"
1.14
1.15 + if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
1.16 + gmp_opts+=( --enable-shared --disable-static )
1.17 + else
1.18 + gmp_opts+=( --disable-shared --enable-static )
1.19 + fi
1.20 +
1.21 CFLAGS="${CT_CFLAGS_FOR_HOST} -fexceptions" \
1.22 CT_DoExecLog ALL \
1.23 "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
1.24 --build=${CT_BUILD} \
1.25 --host=${CT_HOST} \
1.26 --prefix="${CT_PREFIX_DIR}" \
1.27 - --disable-shared \
1.28 - --enable-static \
1.29 --enable-fft \
1.30 --enable-mpbsd \
1.31 - --enable-cxx
1.32 + --enable-cxx \
1.33 + "${gmp_opts[@]}"
1.34
1.35 CT_DoLog EXTRA "Building GMP"
1.36 CT_DoExecLog ALL make ${PARALLELMFLAGS}