I am running PostgreSQL 9.1 with Postgis 2.0 on Fedora 15.
When trying to install the raster support,
psql -d
Checked for whether /etc/ld.so.conf has a reference to the path /usr/lib64/mpich2/lib.
by doing ldconfig -p | grep libhdf5.
Which did not output anything.
On checking that /etc/ld.so.conf had include ld.so.conf.d/*.conf.
Checked for the files in directory ld.so.conf.d.
One of the conf file in include ld.so.conf.d was /etc/ld.so.conf.d/atlas-x8664.conf which contained /usr/lib64/atlas.
So I,
gdal.conf in the directory ld.so.conf.d. /usr/lib64/mpich2/lib to the file. ldconfig -p | grep libhdf5 had the paths to llibhdf5 files. After doing the above, postgis raster support installation went smoothly.