How do I install HDF4
Optional: Set environment variables to point to the correct compilers. For example for Sun:
setenv CC "/opt/SUNWspro/bin/cc -xarch=v9" setenv F77 "/opt/SUNWspro/bin/f90 -xarch=v9"
Also, remember that HDF4 builds with Fortran by default. Particularly on systems that support both 32-bit and 64-bit, HDF may pick up the wrong compiler.
Solaris ONLY: Make sure that your PATH variable points to the correct ar
and tr
tools:
tr: /usr/ucb/tr ar: /usr/ccs/bin/ar
Following are the commands to build HDF. The JPEG and ZLIB libraries are required. You must include them when configuring. The SZIP library is optional.
./configure --with-zlib=/path_to_ZLIB_install_directory --with-jpeg=/path_to_JPEG_install_directory [--with-szlib=/path_to_SZIP_install_directory] --prefix=/path_to_HDF4_install_directory gmake 2>&1 gmake.out gmake check 2>&1 check.out gmake install
To disable fortran:
./configure --disable-fortran ...
To enable shared libraries:
--enable-shared --disable-fortran
Fortran shared libraries are not supported. Shared libraries are disabled by default.
If you encounter problems where configure can't find the JPEG or ZLIB library, but you know that you have specified the location properly, then it may have found more than one JPEG/ZLIB installation and is confused.