scripts/build/companion_libs/cloog.sh
changeset 1892 af092b4bf65c
parent 1891 2f0de10c058d
child 1893 f5dab3c43abf
     1.1 --- a/scripts/build/companion_libs/cloog.sh	Sat Apr 10 23:43:08 2010 +0200
     1.2 +++ b/scripts/build/companion_libs/cloog.sh	Sun Apr 11 00:47:23 2010 +0200
     1.3 @@ -35,6 +35,8 @@
     1.4  
     1.5  do_cloog() {
     1.6      local _t
     1.7 +    local cloog_LDFLAGS
     1.8 +    local -a cloog_opts
     1.9  
    1.10      # Version 0.15.3 has a dirname 'cloog-ppl' (with no version in it!)
    1.11      # while versions 0.15.4 onward do have the version in the dirname.
    1.12 @@ -49,8 +51,16 @@
    1.13      CT_DoStep INFO "Installing CLooG/ppl"
    1.14  
    1.15      CT_DoLog EXTRA "Configuring CLooG/ppl"
    1.16 +
    1.17 +    if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
    1.18 +        cloog_opts+=( --enable-shared --disable-static )
    1.19 +    else
    1.20 +        cloog_opts+=( --disable-shared --enable-static )
    1.21 +        cloog_LDFLAGS='-lstdc++'
    1.22 +    fi
    1.23 +
    1.24      CFLAGS="${CT_CFLAGS_FOR_HOST}"              \
    1.25 -    LDFLAGS='-lstdc++'                          \
    1.26 +    LDFLAGS="${cloog_LDFLAGS}"                  \
    1.27      CT_DoExecLog ALL                            \
    1.28      "${CT_SRC_DIR}/cloog-ppl${_t}/configure"    \
    1.29          --build=${CT_BUILD}                     \
    1.30 @@ -58,9 +68,8 @@
    1.31          --prefix="${CT_PREFIX_DIR}"             \
    1.32          --with-gmp="${CT_PREFIX_DIR}"           \
    1.33          --with-ppl="${CT_PREFIX_DIR}"           \
    1.34 -        --disable-shared                        \
    1.35 -        --enable-static                         \
    1.36 -        --with-bits=gmp
    1.37 +        --with-bits=gmp                         \
    1.38 +        "${cloog_opts[@]}"
    1.39  
    1.40      CT_DoLog EXTRA "Building CLooG/ppl"
    1.41      CT_DoExecLog ALL make ${PARALLELMFLAGS}