compiling HDF5 with Mac os x

Dear all,
I am trying to compile HDF5-1.8.9 on Mac os X version 10.7.5. I used
gfortran from gcc and mpich-3.0.4.
I wrote the foolwing :
export F77=gfortran
export FCFlAGS='-m64'
export FC=gfortran
export FCFlAGS='-m64'

CC=/Users/reem/mpich3-install/bin/mpicc
FC=/Users/reem/mpich3-install/bin/mpif90 ~/Desktop/hdf5-1.8.9/configure
-prefix=/Users/reem/hdf5-install/ --with-zlib=/usr/local/ --enable-shared
--enable-fortran --enable-unsupported --enable-parallel

but I got the following errors:
Testing hard normalized float -> long conversions
PASSED
Testing hard normalized double -> long conversions
PASSED
Testing hard normalized float -> unsigned long conversions
PASSED
Testing hard normalized double -> unsigned long conversions
PASSED
Testing hard normalized long double -> signed char conversions
Command terminated abnormally.
        4.34 real 0.10 user 0.02 sys
make[4]: *** [dt_arith.chkexe_] Error 1
make[3]: *** [build-check-s] Error 2
make[2]: *** [test] Error 2
make[1]: *** [check-am] Error 2
make: *** [check-recursive] Error 1

Any ideas?

Thanks alot,
Reem