aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreschnett <eschnett@fb53df36-e548-4a1e-8150-ab98cbd5e786>2010-08-11 01:33:20 +0000
committereschnett <eschnett@fb53df36-e548-4a1e-8150-ab98cbd5e786>2010-08-11 01:33:20 +0000
commit6ee3ec33886ccee6363e0fc635a3180a3c3288ea (patch)
tree7e2d1010ae71e5ebf5481f4b0565c9c8c714885d
parenta853392e53f3c6f7643d90e1813148b2adefed79 (diff)
If HDF5_DIR is set to the value "BUILD", then build the enclosed HDF5
library is built, even if an HDF5 installation is found on the system. Do you add /usr or /usr/local to the include or library paths. git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/HDF5/trunk@15 fb53df36-e548-4a1e-8150-ab98cbd5e786
-rw-r--r--HDF5.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/HDF5.sh b/HDF5.sh
index aa1f07c..47bc409 100644
--- a/HDF5.sh
+++ b/HDF5.sh
@@ -47,7 +47,7 @@ fi
# Build
################################################################################
-if [ -z "${HDF5_DIR}" ]; then
+if [ -z "${HDF5_DIR}" -o "${HDF5_DIR}" = 'BUILD' ]; then
echo "BEGIN MESSAGE"
echo "Building HDF5..."
echo "END MESSAGE"
@@ -123,8 +123,13 @@ fi
################################################################################
# Set options
-HDF5_INC_DIRS="${HDF5_DIR}/include"
-HDF5_LIB_DIRS="${HDF5_DIR}/lib"
+if [ "${HDF5_DIR}" = '/usr' -o "${HDF5_DIR}" = '/usr/local' ]; then
+ HDF5_INC_DIRS=''
+ HDF5_LIB_DIRS=''
+else
+ HDF5_INC_DIRS="${HDF5_DIR}/include"
+ HDF5_LIB_DIRS="${HDF5_DIR}/lib"
+fi
HDF5_LIBS='hdf5'