aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GSL.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/GSL.sh b/GSL.sh
index efa5e92..f33128e 100644
--- a/GSL.sh
+++ b/GSL.sh
@@ -58,9 +58,12 @@ if [ -z "${GSL_DIR}" ]; then
INSTALL_DIR=${SCRATCH_BUILD}
GSL_DIR=${INSTALL_DIR}/${NAME}
- # Clean up environment
+ # Set up environment
unset LIBS
unset MAKEFLAGS
+ if echo '' ${ARFLAGS} | grep 64 > /dev/null 2>&1; then
+ export OBJECT_MODE=64
+ fi
(
exec >&2 # Redirect stdout to stderr
@@ -74,6 +77,9 @@ if [ -z "${GSL_DIR}" ]; then
else
echo "GSL: Building enclosed GSL library"
+ # Should we use gmake or make?
+ MAKE=$(gmake --help > /dev/null 2>&1 && echo gmake || echo make)
+
echo "GSL: Unpacking archive..."
rm -rf build-${NAME}
mkdir build-${NAME}
@@ -90,10 +96,10 @@ if [ -z "${GSL_DIR}" ]; then
./configure --prefix=${GSL_DIR}
echo "GSL: Building..."
- make
+ ${MAKE}
echo "GSL: Installing..."
- make install
+ ${MAKE} install
popd
echo 'done' > done-${NAME}