diff --git a/MPI/hdf5/build b/MPI/hdf5/build index 221d464..338bcc0 100755 --- a/MPI/hdf5/build +++ b/MPI/hdf5/build @@ -3,25 +3,33 @@ SOURCE_URL="https://support.hdfgroup.org/ftp/HDF5/current${V_MAJOR}${V_MINOR}/src/hdf5-$V.tar.bz2" pbuild::configure() { - CC=$MPICC + declare -a config_args=() + export CC=$MPICC export CXX=$MPICXX - F77=$MPIF77 - F90=$MPIF90 - FC=$MPIFC - FORTRAN=$MPIFORTRAN - local conf='' - conf+=' --enable-shared' - conf+=' --enable-parallel' - conf+=' --enable-cxx' - conf+=' --enable-fortran' - conf+=' --enable-unsupported' - #conf+=' --enable-threadsafe' - conf+=' --with-pic' + case "${COMPILER}" in + clang-macos ) + # we do not have Fortran in Xcode + ;; + * ) + F77=$MPIF77 + F90=$MPIF90 + FC=$MPIFC + FORTRAN=$MPIFORTRAN + config_args+=( "--enable-fortran" ) + ;; + esac + + config_args+=( "--enable-shared" ) + config_args+=( "--enable-parallel" ) + config_args+=( "--enable-cxx" ) + config_args+=( "--enable-unsupported" ) + #config_args+=( "--enable-threadsafe" ) + config_args+=( "--with-pic" ) "${MODULE_SRCDIR}"/configure \ --prefix="${PREFIX}" \ - ${conf} \ + "${config_args[@]}" \ || exit 1 }