#!/usr/bin/env modbuild

SOURCE_URL="https://support.hdfgroup.org/ftp/HDF5/current${V_MAJOR}${V_MINOR}/src/hdf5-$V.tar.bz2"

pbuild::configure() {
	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'

	"${MODULE_SRCDIR}"/configure \
		--prefix="${PREFIX}" \
		${conf} \
		|| exit 1
}


pbuild::add_to_group 'MPI'
pbuild::set_docfiles \
		ACKNOWLEDGMENTS \
		COPYING \
		MANIFEST \
		README.txt
pbuild::make_all

