From 25848a0dd9e71b77035af58c3a5905838f2deae0 Mon Sep 17 00:00:00 2001 From: eschnett Date: Tue, 5 May 2015 17:36:44 +0000 Subject: Correct gcc -dumpversion invocation git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/HDF5/trunk@104 fb53df36-e548-4a1e-8150-ab98cbd5e786 --- src/detect.sh | 14 ++++++-------- 1 file 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}" -- cgit v1.2.3