diff options
author | knarf <knarf@9e23cc15-e5c8-4d65-9080-beda90ea645b> | 2010-08-17 20:11:57 +0000 |
---|---|---|
committer | knarf <knarf@9e23cc15-e5c8-4d65-9080-beda90ea645b> | 2010-08-17 20:11:57 +0000 |
commit | 0850615aef8aedf046ec05e070df994a8c556b6e (patch) | |
tree | 0091ab5fec848cfe56573db748bd740cdf83f63b | |
parent | 9af487d851087b38cd0fd2de54680e73fa0eab2c (diff) |
don't unset MAKEFLAGS to enable parallel builds, use gsl-config to find paths
git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/GSL/trunk@13 9e23cc15-e5c8-4d65-9080-beda90ea645b
-rw-r--r-- | GSL.sh | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -60,7 +60,6 @@ if [ -z "${GSL_DIR}" ]; then # Set up environment unset LIBS - unset MAKEFLAGS if echo '' ${ARFLAGS} | grep 64 > /dev/null 2>&1; then export OBJECT_MODE=64 fi @@ -123,11 +122,11 @@ fi ################################################################################ # Set options -if [ "${GSL_DIR}" != '/usr' -a "${GSL_DIR}" != '/usr/local' ]; then - GSL_INC_DIRS="${GSL_DIR}/include" - GSL_LIB_DIRS="${GSL_DIR}/lib" +if [ -x ${GSL_DIR}/bin/gsl-config ]; then + GSL_INC_DIRS=`${GSL_DIR}/bin/gsl-config --cflags | sed -e 's/ \+-[^I][^ ]\+//g;s/^ *-[^I][^ ]\+ *//g;s/ \+-I/ /g;s/^ *-I//g'`; + GSL_LIB_DIRS=`${GSL_DIR}/bin/gsl-config --libs | sed -e 's/ \+-[^L][^ ]\+//g;s/^ *-[^L][^ ]\+ *//g;s/ \+-L/ /g;s/^ *-L//g'`; + GSL_LIBS=`${GSL_DIR}/bin/gsl-config --libs | sed -e 's/ \+-[^l][^ ]\+//g;s/^ *-[^l][^ ]\+ *//g;s/ \+-l/ /g;s/^ *-l//g'`; fi -: ${GSL_LIBS='gsl gslcblas'} # Pass options to Cactus echo "BEGIN MAKE_DEFINITION" |