summaryrefslogtreecommitdiff
path: root/lib/make/extras/LAPACK/setup.sh
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-01-09 12:47:06 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-01-09 12:47:06 +0000
commitd8edd35b6fa40a2fe187bf21770383b271deccb2 (patch)
tree1bd1c2cafe8feb74ef6b8dd47cd31258186e48b1 /lib/make/extras/LAPACK/setup.sh
parentad121926b3fc18bfaa4bdd0ff6d3399a56f43b24 (diff)
Configure script for LAPACK library.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3084 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/extras/LAPACK/setup.sh')
-rwxr-xr-xlib/make/extras/LAPACK/setup.sh53
1 files changed, 53 insertions, 0 deletions
diff --git a/lib/make/extras/LAPACK/setup.sh b/lib/make/extras/LAPACK/setup.sh
new file mode 100755
index 00000000..e43fe0c8
--- /dev/null
+++ b/lib/make/extras/LAPACK/setup.sh
@@ -0,0 +1,53 @@
+#! /bin/sh
+# /*@@
+# @file setup.sh
+# @date Wed 8 January 2003
+# @author Thomas Radke
+# @desc
+# Setup for compilation with the lapack library system installation
+# @enddesc
+# @@*/
+
+choose_lapack=`echo $LAPACK | tr '[:upper:]' '[:lower:]'`
+
+if test "X$choose_lapack" = "Xyes" ; then
+
+ echo "Configuring with LAPACK"
+
+ # Search for LAPACK installation
+ if test -z "$LAPACK_DIR"; then
+ echo 'LAPACK selected but no LAPACK_DIR set... Checking some places'
+ CCTK_Search LAPACK_DIR '/usr/lib /usr/local/lib' liblapack.a
+ if test -z "$LAPACK_DIR"; then
+ CCTK_Search LAPACK_DIR '/usr/lib /usr/local/lib' liblapack.so
+ fi
+ if test -z "$LAPACK_DIR"; then
+ echo 'Unable to locate the LAPACK library - please set LAPACK_DIR'
+ exit 2
+ fi
+ echo "Found a LAPACK package in $LAPACK_DIR"
+ elif test "$LAPACK_DIR" = 'none'; then
+ # user doesn't want the library path added
+ LAPACK_DIR=''
+ fi
+
+ if test -z "$LAPACK_LIBS"; then
+ LAPACK_LIBS='lapack blas'
+ fi
+
+ # write the variables out to the header and makefiles
+ CCTK_WriteLine cctk_Extradefs.h '#define CCTK_LAPACK 1'
+
+ CCTK_WriteLine make.extra.defn "LAPACK_LIBS = $LAPACK_LIBS $LAPACK_EXTRA_LIBS m"
+ CCTK_WriteLine make.extra.defn "LAPACK_LIB_DIRS = $LAPACK_DIR $LAPACK_EXTRA_LIB_DIRS"
+ CCTK_WriteLine make.extra.defn ''
+ CCTK_WriteLine make.extra.defn 'LIBS += $(LAPACK_LIBS)'
+ CCTK_WriteLine make.extra.defn 'LIBDIRS += $(LAPACK_LIB_DIRS)'
+
+elif test "X$choose_lapack" != "Xno" -a "X$choose_lapack" != "X"; then
+
+ echo "Don't understand the setting \"LAPACK=$LAPACK\" !"
+ echo 'Please set it to either "yes" or "no", or leave it blank (same as "no") !'
+ exit 1
+
+fi