diff options
author | eschnett <eschnett@fb53df36-e548-4a1e-8150-ab98cbd5e786> | 2015-05-05 17:36:44 +0000 |
---|---|---|
committer | eschnett <eschnett@fb53df36-e548-4a1e-8150-ab98cbd5e786> | 2015-05-05 17:36:44 +0000 |
commit | 25848a0dd9e71b77035af58c3a5905838f2deae0 (patch) | |
tree | bba74f47a6fff9da8e4047ab8e050836923cf91a | |
parent | 04ddd739bf410ff5b745728083f624a7b9949397 (diff) |
Correct gcc -dumpversion invocation
git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/HDF5/trunk@104 fb53df36-e548-4a1e-8150-ab98cbd5e786
-rwxr-xr-x | src/detect.sh | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/detect.sh b/src/detect.sh index 7fbe2dd..9a64b4c 100755 --- a/src/detect.sh +++ b/src/detect.sh @@ -158,19 +158,17 @@ 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`} +# Set library directory name for machine architecture +if machine=$(gcc -dumpversion 2>/dev/null); then + machinedir="${HDF5_DIR}/lib/${machine}" else - MACHINE=${MACHINE:=""} + machinedir='' fi # Set options # Fortran modules may be located in the lib directory -HDF5_INC_DIRS="${HDF5_DIR}/include ${HDF5_DIR}/lib/${MACHINE} ${HDF5_DIR}/lib" -HDF5_LIB_DIRS="${HDF5_DIR}/lib/${MACHINE} ${HDF5_DIR}/lib" +HDF5_INC_DIRS="${HDF5_DIR}/include ${machinedir} ${HDF5_DIR}/lib" +HDF5_LIB_DIRS="${machinedir} ${HDF5_DIR}/lib" HDF5_LIBS="${HDF5_CXX_LIBS} ${HDF5_FORTRAN_LIBS} ${HDF5_C_LIBS}" |