HDF5 Fortran autotools build

The HDF5 1.12 beta release seems to have broken CMake scripts. The CMake scripts for HDF5 invoke autotools anyway, so we decided to just use autotools to build HDF5 1.12:

./configure --enable-fortran --enable-build-mode=production --prefix=~/.local/hdf5-1.12/

make -j4 install
-j4
number of build threads (arbitrary)

This creates static (.a) and dynamic (.so) HDF5 library archives under the user install prefix:

hdf5/lib/libhdf5.a
hdf5/lib/libhdf5_fortran.a
hdf5/lib/libhdf5_hl.a
hdf5/lib/libhdf5_hl_fortran.a
hdf5/lib/libhdf5hl_fortran.a

The Fortran .mod files that need to be included are under

hdf5/include/

Usage

Tell CMake to use this new HDF5 1.12 from your project by:

cmake -B build -DHDF5_ROOT=~/.local/hdf5-1.12/hdf5

cmake --build build