From 0850615aef8aedf046ec05e070df994a8c556b6e Mon Sep 17 00:00:00 2001 From: knarf Date: Tue, 17 Aug 2010 20:11:57 +0000 Subject: 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 --- GSL.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/GSL.sh b/GSL.sh index f33128e..d5ce5c0 100644 --- a/GSL.sh +++ b/GSL.sh @@ -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" -- cgit v1.2.3