aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/detect.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/detect.sh b/src/detect.sh
index 7bef01a..7fbe2dd 100755
--- a/src/detect.sh
+++ b/src/detect.sh
@@ -158,10 +158,19 @@ fi
# Check for additional libraries
################################################################################
+# Set library directory name for machine architecture:
+gcc -dumpversion > /dev/null 2>&1
+
+if [ $? -eq 0 ]; then
+ MACHINE=${MACHINE:=`gcc -dumpmachine`}
+else
+ MACHINE=${MACHINE:=""}
+fi
+
# Set options
# Fortran modules may be located in the lib directory
-HDF5_INC_DIRS="${HDF5_DIR}/include ${HDF5_DIR}/lib"
-HDF5_LIB_DIRS="${HDF5_DIR}/lib"
+HDF5_INC_DIRS="${HDF5_DIR}/include ${HDF5_DIR}/lib/${MACHINE} ${HDF5_DIR}/lib"
+HDF5_LIB_DIRS="${HDF5_DIR}/lib/${MACHINE} ${HDF5_DIR}/lib"
HDF5_LIBS="${HDF5_CXX_LIBS} ${HDF5_FORTRAN_LIBS} ${HDF5_C_LIBS}"