If configure is failing for you when compiling with the Cray compiler, try the build_hdf5 script used by The HDF Group.

This script works on Cori, as well as other machines.