summaryrefslogtreecommitdiff
path: root/scripts/build/companion_libs/mpfr.sh
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-04-10 22:47:23 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-04-10 22:47:23 (GMT)
commit5b27e8de528dbfaa1e3ddd926af26b906db85c3d (patch)
tree384bcbc175437e3d5a53bbd93f9f91087d0bc7ec /scripts/build/companion_libs/mpfr.sh
parent5b663e2aae05cab9fb519a2faba66f85f11db161 (diff)
complibs: allow either static or shared build
Diffstat (limited to 'scripts/build/companion_libs/mpfr.sh')
-rw-r--r--scripts/build/companion_libs/mpfr.sh23
1 files changed, 14 insertions, 9 deletions
diff --git a/scripts/build/companion_libs/mpfr.sh b/scripts/build/companion_libs/mpfr.sh
index 87580c3..c26f266 100644
--- a/scripts/build/companion_libs/mpfr.sh
+++ b/scripts/build/companion_libs/mpfr.sh
@@ -67,20 +67,27 @@ do_mpfr_extract() {
if [ "${CT_MPFR}" = "y" ]; then
do_mpfr() {
+ local -a mpfr_opts
+
mkdir -p "${CT_BUILD_DIR}/build-mpfr"
cd "${CT_BUILD_DIR}/build-mpfr"
CT_DoStep INFO "Installing MPFR"
- mpfr_opt=
# Under Cygwin, we can't build a thread-safe library
case "${CT_HOST}" in
- *cygwin*) mpfr_opt="--disable-thread-safe";;
- *mingw*) mpfr_opt="--disable-thread-safe";;
- *darwin*) mpfr_opt="--disable-thread-safe";;
- *) mpfr_opt="--enable-thread-safe";;
+ *cygwin*) mpfr_opts+=( --disable-thread-safe );;
+ *mingw*) mpfr_opts+=( --disable-thread-safe );;
+ *darwin*) mpfr_opts+=( --disable-thread-safe );;
+ *) mpfr_opts+=( --enable-thread-safe );;
esac
+ if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
+ mpfr_opts+=( --enable-shared --disable-static )
+ else
+ mpfr_opts+=( --disable-shared --enable-static )
+ fi
+
CT_DoLog EXTRA "Configuring MPFR"
CC="${CT_HOST}-gcc" \
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
@@ -89,10 +96,8 @@ do_mpfr() {
--build=${CT_BUILD} \
--host=${CT_HOST} \
--prefix="${CT_PREFIX_DIR}" \
- ${mpfr_opt} \
- --disable-shared \
- --enable-static \
- --with-gmp="${CT_PREFIX_DIR}"
+ --with-gmp="${CT_PREFIX_DIR}" \
+ "${mpfr_opts[@]}"
CT_DoLog EXTRA "Building MPFR"
CT_DoExecLog ALL make ${PARALLELMFLAGS}