Instructions for the installation of H4H5TOOLS at UNIX(linux) platforms

CONTENTS

1.  Obtaining h4h5tools
2.  Warnings about compilers
3.  Introduction to configuration
4.  h4toh5 installation
5. Using the library
6. Support

1. Obtaining h4h5tools
h4h5tools source codes can be obtained from ftp://hdf.ncsa.uiuc.edu/pub/????(Elena and Barbara, please modify this).

2.  Warnings about compilers
Due to the use of both HDF4 and HDF5 libraries, some redefinition warnings are generated. These will be automatically fixed when HDF4 and HDF5 libraries are fixed.

3. Introduction to configuration

H4H5TOOLS uses the GNU autoconf system for configuration, which detects various features of the host system and creates the Makefiles.

The configuration process can be controlled through environment variables, command-line switches, and host configuration files.
For a complete list of switches type:
$ ./configure --help

The host configuration files are located in the `config' directory and are based on architecture name, vendor name, and/or operating system, which are displayed near the beginning of the`configure' output. The host config file influences the behavior of configure by setting or augmenting shell variables.

4. h4h5tools installation

By default, h4h5tools will be built with shared library. Process 1) to 4) is the instruction of building shared version of H4toH5 libraries.

1) Configuration  
To correctly generate the configuration process for h4toh5 library, one has to use with-hdf4 and with-hdf5 switch type. To use a path other than /usr/local specify the path with the `--prefix=PATH' switch.

Assume:
HDF5 public header files are stored at /*your hdf5 path*/include,
HDF5 libraries are stored at /*your hdf5 path*/lib
HDF4 public header files are stored at /*your hdf4 path*/include
HDF4 libraries are stored at /*your hdf4 path*/lib

H4toH5 library will be installed at /*your h4toh5 path*/

The configuration should be:
./configure -with-hdf5=/*your hdf5 path*/include,/*your hdf5 path*/lib -with-hdf4=/*your hdf4 path*/include,/*your hdf4 path*/lib -prefix=/*your h4toh5 path */

2) Generate library

type 'gmake' (GNU make) or 'make'

   You should not see Errors if building correctly.
3) Check the library

type 'gmake check' or 'make check'

You should see "All h4toh5 tests passed."
   
4) Install the library

type 'gmake install' will install your library into the directory you set. Without setting prefix, the library will be stalled at /usr/local

To build static library, disable-shared has to be used. Step 1) in the above should be changed to 
./configure -disable-shared -with-hdf5=/*your hdf5 path*/include,/*your hdf5 path*/lib -with-hdf4=/*your hdf4 path*/include,/*your hdf4 path*/lib -prefix=/*your h4toh5 path */
 
5.  Using the H4toH5 conversion library

In order to use the H4toH5 conversion library, you have to include "h4toh5.h" in your header file and link with HDF4, HDF5, H4TOH5 and zlib libraries. Please see the User's guide at http://hdf.ncsa.uiuc.edu/h4toh5/h4toh5lib_UG.pdf 

6. Support

     Contact with hdfhelp@ncsa.uiuc.edu







