MPI/hdf5/build

- use array for for arguments passed to configure
- add support for Clang from Xcode (no Fortran!)
This commit is contained in:
2018-02-15 15:32:59 +01:00
parent f029d0fc72
commit 74ba292073

View File

@@ -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
}