scripts/build/companion_libs/mpfr.sh
changeset 1892 af092b4bf65c
parent 1891 2f0de10c058d
child 1893 f5dab3c43abf
     1.1 --- a/scripts/build/companion_libs/mpfr.sh	Sat Apr 10 23:43:08 2010 +0200
     1.2 +++ b/scripts/build/companion_libs/mpfr.sh	Sun Apr 11 00:47:23 2010 +0200
     1.3 @@ -67,20 +67,27 @@
     1.4  if [ "${CT_MPFR}" = "y" ]; then
     1.5  
     1.6  do_mpfr() {
     1.7 +    local -a mpfr_opts
     1.8 +
     1.9      mkdir -p "${CT_BUILD_DIR}/build-mpfr"
    1.10      cd "${CT_BUILD_DIR}/build-mpfr"
    1.11  
    1.12      CT_DoStep INFO "Installing MPFR"
    1.13  
    1.14 -    mpfr_opt=
    1.15      # Under Cygwin, we can't build a thread-safe library
    1.16      case "${CT_HOST}" in
    1.17 -        *cygwin*)   mpfr_opt="--disable-thread-safe";;
    1.18 -        *mingw*)    mpfr_opt="--disable-thread-safe";;
    1.19 -        *darwin*)   mpfr_opt="--disable-thread-safe";;
    1.20 -        *)          mpfr_opt="--enable-thread-safe";;
    1.21 +        *cygwin*)   mpfr_opts+=( --disable-thread-safe );;
    1.22 +        *mingw*)    mpfr_opts+=( --disable-thread-safe );;
    1.23 +        *darwin*)   mpfr_opts+=( --disable-thread-safe );;
    1.24 +        *)          mpfr_opts+=( --enable-thread-safe  );;
    1.25      esac
    1.26  
    1.27 +    if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
    1.28 +        mpfr_opts+=( --enable-shared --disable-static )
    1.29 +    else
    1.30 +        mpfr_opts+=( --disable-shared --enable-static )
    1.31 +    fi
    1.32 +
    1.33      CT_DoLog EXTRA "Configuring MPFR"
    1.34      CC="${CT_HOST}-gcc"                                 \
    1.35      CFLAGS="${CT_CFLAGS_FOR_HOST}"                      \
    1.36 @@ -89,10 +96,8 @@
    1.37          --build=${CT_BUILD}                             \
    1.38          --host=${CT_HOST}                               \
    1.39          --prefix="${CT_PREFIX_DIR}"                     \
    1.40 -        ${mpfr_opt}                                     \
    1.41 -        --disable-shared                                \
    1.42 -        --enable-static                                 \
    1.43 -        --with-gmp="${CT_PREFIX_DIR}"
    1.44 +        --with-gmp="${CT_PREFIX_DIR}"                   \
    1.45 +        "${mpfr_opts[@]}"
    1.46  
    1.47      CT_DoLog EXTRA "Building MPFR"
    1.48      CT_DoExecLog ALL make ${PARALLELMFLAGS}