diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-04-10 22:47:23 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-04-10 22:47:23 (GMT) |
commit | 5b27e8de528dbfaa1e3ddd926af26b906db85c3d (patch) | |
tree | 384bcbc175437e3d5a53bbd93f9f91087d0bc7ec /scripts/build/companion_libs/gmp.sh | |
parent | 5b663e2aae05cab9fb519a2faba66f85f11db161 (diff) |
complibs: allow either static or shared build
Diffstat (limited to 'scripts/build/companion_libs/gmp.sh')
-rw-r--r-- | scripts/build/companion_libs/gmp.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/build/companion_libs/gmp.sh b/scripts/build/companion_libs/gmp.sh index 35933d7..ec92b9a 100644 --- a/scripts/build/companion_libs/gmp.sh +++ b/scripts/build/companion_libs/gmp.sh @@ -24,6 +24,7 @@ do_gmp_extract() { if [ "${CT_GMP}" = "y" ]; then do_gmp() { + local -a gmp_opts mkdir -p "${CT_BUILD_DIR}/build-gmp" cd "${CT_BUILD_DIR}/build-gmp" @@ -32,17 +33,22 @@ do_gmp() { CT_DoLog EXTRA "Configuring GMP" + if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then + gmp_opts+=( --enable-shared --disable-static ) + else + gmp_opts+=( --disable-shared --enable-static ) + fi + CFLAGS="${CT_CFLAGS_FOR_HOST} -fexceptions" \ CT_DoExecLog ALL \ "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ --prefix="${CT_PREFIX_DIR}" \ - --disable-shared \ - --enable-static \ --enable-fft \ --enable-mpbsd \ - --enable-cxx + --enable-cxx \ + "${gmp_opts[@]}" CT_DoLog EXTRA "Building GMP" CT_DoExecLog ALL make ${PARALLELMFLAGS} |